Skip to content

Commit

Permalink
(needs 515.1624) Bodypart code cleanup via 515 (#722)
Browse files Browse the repository at this point in the history
* doesnt work yet lol thanks lummox

* error
  • Loading branch information
Kapu1178 authored Feb 26, 2024
1 parent d958607 commit 3ed7f34
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 45 deletions.
5 changes: 0 additions & 5 deletions code/__DEFINES/bodyparts.dm
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@
#define HATCH_UNSCREWED 2
#define HATCH_OPENED 3

#define STOCK_BP_FLAGS_CHEST (BP_HAS_BLOOD | BP_HAS_BONES | BP_HAS_ARTERY | BP_CAN_BE_DISLOCATED)
#define STOCK_BP_FLAGS_HEAD (BP_HAS_BLOOD | BP_HAS_BONES | BP_HAS_ARTERY | BP_CAN_BE_DISLOCATED)
#define STOCK_BP_FLAGS_ARMS (BP_IS_GRABBY_LIMB | BP_HAS_BLOOD | BP_HAS_BONES | BP_HAS_TENDON | BP_HAS_ARTERY | BP_CAN_BE_DISLOCATED)
#define STOCK_BP_FLAGS_LEGS (BP_IS_MOVEMENT_LIMB | BP_HAS_BLOOD | BP_HAS_BONES | BP_HAS_TENDON | BP_HAS_ARTERY| BP_CAN_BE_DISLOCATED)

//check_bones() return values
#define CHECKBONES_NONE (1<<0)
#define CHECKBONES_OK (1<<1)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/surgery/bodyparts/head.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
unarmed_stun_threshold = 4
bodypart_trait_source = HEAD_TRAIT

bodypart_flags = STOCK_BP_FLAGS_HEAD
bodypart_flags = (BP_HAS_BLOOD | BP_HAS_BONES | BP_HAS_ARTERY | BP_CAN_BE_DISLOCATED)

amputation_point = "neck"
encased = "skull"
Expand Down
6 changes: 3 additions & 3 deletions code/modules/surgery/bodyparts/parts.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

minimum_break_damage = 35

bodypart_flags = STOCK_BP_FLAGS_CHEST
bodypart_flags = (BP_HAS_BLOOD | BP_HAS_BONES | BP_HAS_ARTERY | BP_CAN_BE_DISLOCATED)

///The bodytype(s) allowed to attach to this chest.
var/acceptable_bodytype = BODYTYPE_HUMANOID
Expand Down Expand Up @@ -80,7 +80,7 @@
unarmed_stun_threshold = 10
body_zone = BODY_ZONE_L_ARM

bodypart_flags = STOCK_BP_FLAGS_ARMS
bodypart_flags = (BP_IS_GRABBY_LIMB | BP_HAS_BLOOD | BP_HAS_BONES | BP_HAS_TENDON | BP_HAS_ARTERY | BP_CAN_BE_DISLOCATED)

artery_name = "basilic vein"
tendon_name = "palmaris longus tendon"
Expand Down Expand Up @@ -272,7 +272,7 @@
unarmed_damage_high = 12
unarmed_stun_threshold = 10

bodypart_flags = STOCK_BP_FLAGS_LEGS
bodypart_flags = (BP_IS_MOVEMENT_LIMB | BP_HAS_BLOOD | BP_HAS_BONES | BP_HAS_TENDON | BP_HAS_ARTERY| BP_CAN_BE_DISLOCATED)

artery_name = "femoral artery"
tendon_name = "cruciate ligament"
Expand Down
12 changes: 6 additions & 6 deletions code/modules/surgery/bodyparts/robot_bodyparts.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

armor = list(BLUNT = 5, PUNCTURE = 5, SLASH = 0, LASER = 5, ENERGY = 0, BOMB = 0, BIO = 100, FIRE = 5, ACID = 10)

bodypart_flags = BP_NO_PAIN | STOCK_BP_FLAGS_ARMS & ~(BP_HAS_BLOOD|BP_HAS_BONES|BP_HAS_TENDON|BP_HAS_ARTERY)
bodypart_flags = (parent_type::bodypart_flags | BP_NO_PAIN) & ~(BP_HAS_BLOOD|BP_HAS_BONES|BP_HAS_TENDON|BP_HAS_ARTERY)

light_brute_msg = ROBOTIC_LIGHT_BRUTE_MSG
medium_brute_msg = ROBOTIC_MEDIUM_BRUTE_MSG
Expand All @@ -54,7 +54,7 @@

armor = list(BLUNT = 5, PUNCTURE = 5, SLASH = 0, LASER = 5, ENERGY = 0, BOMB = 0, BIO = 100, FIRE = 5, ACID = 10)

bodypart_flags = BP_NO_PAIN | STOCK_BP_FLAGS_ARMS & ~(BP_HAS_BLOOD|BP_HAS_BONES|BP_HAS_TENDON|BP_HAS_ARTERY)
bodypart_flags = (parent_type::bodypart_flags | BP_NO_PAIN) & ~(BP_HAS_BLOOD|BP_HAS_BONES|BP_HAS_TENDON|BP_HAS_ARTERY)

light_brute_msg = ROBOTIC_LIGHT_BRUTE_MSG
medium_brute_msg = ROBOTIC_MEDIUM_BRUTE_MSG
Expand All @@ -81,7 +81,7 @@

armor = list(BLUNT = 5, PUNCTURE = 5, SLASH = 0, LASER = 5, ENERGY = 0, BOMB = 0, BIO = 100, FIRE = 5, ACID = 10)

bodypart_flags = BP_NO_PAIN | STOCK_BP_FLAGS_LEGS & ~(BP_HAS_BLOOD|BP_HAS_BONES|BP_HAS_TENDON|BP_HAS_ARTERY)
bodypart_flags = (parent_type::bodypart_flags | BP_NO_PAIN) & ~(BP_HAS_BLOOD|BP_HAS_BONES|BP_HAS_TENDON|BP_HAS_ARTERY)

light_brute_msg = ROBOTIC_LIGHT_BRUTE_MSG
medium_brute_msg = ROBOTIC_MEDIUM_BRUTE_MSG
Expand All @@ -108,7 +108,7 @@

armor = list(BLUNT = 5, PUNCTURE = 5, SLASH = 0, LASER = 5, ENERGY = 0, BOMB = 0, BIO = 100, FIRE = 5, ACID = 10)

bodypart_flags = BP_NO_PAIN | STOCK_BP_FLAGS_LEGS & ~(BP_HAS_BLOOD|BP_HAS_BONES|BP_HAS_TENDON|BP_HAS_ARTERY)
bodypart_flags = (parent_type::bodypart_flags | BP_NO_PAIN) & ~(BP_HAS_BLOOD|BP_HAS_BONES|BP_HAS_TENDON|BP_HAS_ARTERY)

light_brute_msg = ROBOTIC_LIGHT_BRUTE_MSG
medium_brute_msg = ROBOTIC_MEDIUM_BRUTE_MSG
Expand All @@ -134,7 +134,7 @@

armor = list(BLUNT = 5, PUNCTURE = 5, SLASH = 0, LASER = 5, ENERGY = 0, BOMB = 0, BIO = 100, FIRE = 5, ACID = 10)

bodypart_flags = BP_NO_PAIN | STOCK_BP_FLAGS_CHEST & ~(BP_HAS_BLOOD|BP_HAS_BONES|BP_HAS_TENDON|BP_HAS_ARTERY)
bodypart_flags = (parent_type::bodypart_flags | BP_NO_PAIN) & ~(BP_HAS_BLOOD|BP_HAS_BONES|BP_HAS_TENDON|BP_HAS_ARTERY)

light_brute_msg = ROBOTIC_LIGHT_BRUTE_MSG
medium_brute_msg = ROBOTIC_MEDIUM_BRUTE_MSG
Expand Down Expand Up @@ -245,7 +245,7 @@

armor = list(BLUNT = 5, PUNCTURE = 5, SLASH = 0, LASER = 5, ENERGY = 0, BOMB = 0, BIO = 100, FIRE = 5, ACID = 10)

bodypart_flags = BP_NO_PAIN | STOCK_BP_FLAGS_HEAD & ~(BP_HAS_BLOOD|BP_HAS_BONES|BP_HAS_TENDON|BP_HAS_ARTERY)
bodypart_flags = (parent_type::bodypart_flags | BP_NO_PAIN) & ~(BP_HAS_BLOOD|BP_HAS_BONES|BP_HAS_TENDON|BP_HAS_ARTERY)

light_brute_msg = ROBOTIC_LIGHT_BRUTE_MSG
medium_brute_msg = ROBOTIC_MEDIUM_BRUTE_MSG
Expand Down
48 changes: 24 additions & 24 deletions code/modules/surgery/bodyparts/species_parts/misc_bodyparts.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,106 +33,106 @@
is_dimorphic = FALSE
should_draw_greyscale = FALSE

bodypart_flags = STOCK_BP_FLAGS_HEAD & ~BP_HAS_BLOOD
bodypart_flags = parent_type::bodypart_flags & ~BP_HAS_BLOOD

/obj/item/bodypart/chest/abductor
limb_id = SPECIES_ABDUCTOR
is_dimorphic = FALSE
should_draw_greyscale = FALSE

bodypart_flags = STOCK_BP_FLAGS_CHEST & ~BP_HAS_BLOOD
bodypart_flags = parent_type::bodypart_flags & ~BP_HAS_BLOOD

/obj/item/bodypart/arm/left/abductor
limb_id = SPECIES_ABDUCTOR
should_draw_greyscale = FALSE
bodypart_traits = list(TRAIT_CHUNKYFINGERS)

bodypart_flags = STOCK_BP_FLAGS_ARMS & ~BP_HAS_BLOOD
bodypart_flags = parent_type::bodypart_flags & ~BP_HAS_BLOOD

/obj/item/bodypart/arm/right/abductor
limb_id = SPECIES_ABDUCTOR
should_draw_greyscale = FALSE
bodypart_traits = list(TRAIT_CHUNKYFINGERS)

bodypart_flags = STOCK_BP_FLAGS_ARMS & ~BP_HAS_BLOOD
bodypart_flags = parent_type::bodypart_flags & ~BP_HAS_BLOOD

/obj/item/bodypart/leg/left/abductor
limb_id = SPECIES_ABDUCTOR
should_draw_greyscale = FALSE

bodypart_flags = STOCK_BP_FLAGS_LEGS & ~BP_HAS_BLOOD
bodypart_flags = parent_type::bodypart_flags & ~BP_HAS_BLOOD

/obj/item/bodypart/leg/right/abductor
limb_id = SPECIES_ABDUCTOR
should_draw_greyscale = FALSE

bodypart_flags = STOCK_BP_FLAGS_LEGS & ~BP_HAS_BLOOD
bodypart_flags = parent_type::bodypart_flags & ~BP_HAS_BLOOD

///JELLY
/obj/item/bodypart/head/jelly
limb_id = SPECIES_JELLYPERSON
is_dimorphic = TRUE
icon_dmg_overlay = null

bodypart_flags = STOCK_BP_FLAGS_HEAD & ~(BP_HAS_BLOOD|BP_HAS_BONES|BP_HAS_TENDON|BP_HAS_ARTERY)
bodypart_flags = parent_type::bodypart_flags & ~(BP_HAS_BLOOD|BP_HAS_BONES|BP_HAS_TENDON|BP_HAS_ARTERY)

/obj/item/bodypart/chest/jelly
limb_id = SPECIES_JELLYPERSON
is_dimorphic = TRUE
icon_dmg_overlay = null

bodypart_flags = STOCK_BP_FLAGS_CHEST & ~(BP_HAS_BLOOD|BP_HAS_BONES|BP_HAS_TENDON|BP_HAS_ARTERY)
bodypart_flags = parent_type::bodypart_flags & ~(BP_HAS_BLOOD|BP_HAS_BONES|BP_HAS_TENDON|BP_HAS_ARTERY)

/obj/item/bodypart/arm/left/jelly
limb_id = SPECIES_JELLYPERSON
icon_dmg_overlay = null

bodypart_flags = STOCK_BP_FLAGS_ARMS & ~(BP_HAS_BLOOD|BP_HAS_BONES|BP_HAS_TENDON|BP_HAS_ARTERY)
bodypart_flags = parent_type::bodypart_flags & ~(BP_HAS_BLOOD|BP_HAS_BONES|BP_HAS_TENDON|BP_HAS_ARTERY)

/obj/item/bodypart/arm/right/jelly
limb_id = SPECIES_JELLYPERSON
icon_dmg_overlay = null

bodypart_flags = STOCK_BP_FLAGS_ARMS & ~(BP_HAS_BLOOD|BP_HAS_BONES|BP_HAS_TENDON|BP_HAS_ARTERY)
bodypart_flags = parent_type::bodypart_flags & ~(BP_HAS_BLOOD|BP_HAS_BONES|BP_HAS_TENDON|BP_HAS_ARTERY)

/obj/item/bodypart/leg/left/jelly
limb_id = SPECIES_JELLYPERSON
icon_dmg_overlay = null

bodypart_flags = STOCK_BP_FLAGS_LEGS & ~(BP_HAS_BLOOD|BP_HAS_BONES|BP_HAS_TENDON|BP_HAS_ARTERY)
bodypart_flags = parent_type::bodypart_flags & ~(BP_HAS_BLOOD|BP_HAS_BONES|BP_HAS_TENDON|BP_HAS_ARTERY)

/obj/item/bodypart/leg/right/jelly
limb_id = SPECIES_JELLYPERSON
icon_dmg_overlay = null

bodypart_flags = STOCK_BP_FLAGS_LEGS & ~(BP_HAS_BLOOD|BP_HAS_BONES|BP_HAS_TENDON|BP_HAS_ARTERY)
bodypart_flags = parent_type::bodypart_flags & ~(BP_HAS_BLOOD|BP_HAS_BONES|BP_HAS_TENDON|BP_HAS_ARTERY)

///SLIME
/obj/item/bodypart/head/slime
limb_id = SPECIES_SLIMEPERSON
is_dimorphic = FALSE
bodypart_flags = STOCK_BP_FLAGS_HEAD & ~(BP_HAS_BLOOD|BP_HAS_BONES|BP_HAS_TENDON|BP_HAS_ARTERY)
bodypart_flags = parent_type::bodypart_flags & ~(BP_HAS_BLOOD|BP_HAS_BONES|BP_HAS_TENDON|BP_HAS_ARTERY)

/obj/item/bodypart/chest/slime
limb_id = SPECIES_SLIMEPERSON
is_dimorphic = TRUE
bodypart_flags = STOCK_BP_FLAGS_CHEST & ~(BP_HAS_BLOOD|BP_HAS_BONES|BP_HAS_TENDON|BP_HAS_ARTERY)
bodypart_flags = parent_type::bodypart_flags & ~(BP_HAS_BLOOD|BP_HAS_BONES|BP_HAS_TENDON|BP_HAS_ARTERY)

/obj/item/bodypart/arm/left/slime
limb_id = SPECIES_SLIMEPERSON
bodypart_flags = STOCK_BP_FLAGS_ARMS & ~(BP_HAS_BLOOD|BP_HAS_BONES|BP_HAS_TENDON|BP_HAS_ARTERY)
bodypart_flags = parent_type::bodypart_flags & ~(BP_HAS_BLOOD|BP_HAS_BONES|BP_HAS_TENDON|BP_HAS_ARTERY)

/obj/item/bodypart/arm/right/slime
limb_id = SPECIES_SLIMEPERSON
bodypart_flags = STOCK_BP_FLAGS_ARMS & ~(BP_HAS_BLOOD|BP_HAS_BONES|BP_HAS_TENDON|BP_HAS_ARTERY)
bodypart_flags = parent_type::bodypart_flags & ~(BP_HAS_BLOOD|BP_HAS_BONES|BP_HAS_TENDON|BP_HAS_ARTERY)

/obj/item/bodypart/leg/left/slime
limb_id = SPECIES_SLIMEPERSON
bodypart_flags = STOCK_BP_FLAGS_LEGS & ~(BP_HAS_BLOOD|BP_HAS_BONES|BP_HAS_TENDON|BP_HAS_ARTERY)
bodypart_flags = parent_type::bodypart_flags & ~(BP_HAS_BLOOD|BP_HAS_BONES|BP_HAS_TENDON|BP_HAS_ARTERY)

/obj/item/bodypart/leg/right/slime
limb_id = SPECIES_SLIMEPERSON
bodypart_flags = STOCK_BP_FLAGS_LEGS & ~(BP_HAS_BLOOD|BP_HAS_BONES|BP_HAS_TENDON|BP_HAS_ARTERY)
bodypart_flags = parent_type::bodypart_flags & ~(BP_HAS_BLOOD|BP_HAS_BONES|BP_HAS_TENDON|BP_HAS_ARTERY)

///LUMINESCENT
/obj/item/bodypart/head/luminescent
Expand Down Expand Up @@ -278,43 +278,43 @@
should_draw_greyscale = FALSE
icon_dmg_overlay = null

bodypart_flags = STOCK_BP_FLAGS_HEAD & ~(BP_HAS_BLOOD)
bodypart_flags = parent_type::bodypart_flags & ~(BP_HAS_BLOOD)

/obj/item/bodypart/chest/skeleton
limb_id = SPECIES_SKELETON
is_dimorphic = FALSE
should_draw_greyscale = FALSE
icon_dmg_overlay = null

bodypart_flags = STOCK_BP_FLAGS_CHEST & ~(BP_HAS_BLOOD)
bodypart_flags = parent_type::bodypart_flags & ~(BP_HAS_BLOOD)

/obj/item/bodypart/arm/left/skeleton
limb_id = SPECIES_SKELETON
should_draw_greyscale = FALSE
icon_dmg_overlay = null

bodypart_flags = STOCK_BP_FLAGS_ARMS & ~(BP_HAS_BLOOD)
bodypart_flags = parent_type::bodypart_flags & ~(BP_HAS_BLOOD)

/obj/item/bodypart/arm/right/skeleton
limb_id = SPECIES_SKELETON
should_draw_greyscale = FALSE
icon_dmg_overlay = null

bodypart_flags = STOCK_BP_FLAGS_ARMS & ~(BP_HAS_BLOOD)
bodypart_flags = parent_type::bodypart_flags & ~(BP_HAS_BLOOD)

/obj/item/bodypart/leg/left/skeleton
limb_id = SPECIES_SKELETON
should_draw_greyscale = FALSE
icon_dmg_overlay = null

bodypart_flags = STOCK_BP_FLAGS_LEGS & ~(BP_HAS_BLOOD)
bodypart_flags = parent_type::bodypart_flags & ~(BP_HAS_BLOOD)

/obj/item/bodypart/leg/right/skeleton
limb_id = SPECIES_SKELETON
should_draw_greyscale = FALSE
icon_dmg_overlay = null

bodypart_flags = STOCK_BP_FLAGS_LEGS & ~(BP_HAS_BLOOD)
bodypart_flags = parent_type::bodypart_flags & ~(BP_HAS_BLOOD)

///MUSHROOM
/obj/item/bodypart/head/mushroom
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
should_draw_greyscale = FALSE
icon_dmg_overlay = null

bodypart_flags = STOCK_BP_FLAGS_HEAD & ~(BP_HAS_BLOOD)
bodypart_flags = parent_type::bodypart_flags & ~(BP_HAS_BLOOD)

/obj/item/bodypart/chest/plasmaman
icon = 'icons/mob/species/plasmaman/bodyparts.dmi'
Expand All @@ -18,7 +18,7 @@
should_draw_greyscale = FALSE
icon_dmg_overlay = null

bodypart_flags = STOCK_BP_FLAGS_CHEST & ~(BP_HAS_BLOOD)
bodypart_flags = parent_type::bodypart_flags & ~(BP_HAS_BLOOD)

/obj/item/bodypart/arm/left/plasmaman
icon = 'icons/mob/species/plasmaman/bodyparts.dmi'
Expand All @@ -28,7 +28,7 @@
should_draw_greyscale = FALSE
icon_dmg_overlay = null

bodypart_flags = STOCK_BP_FLAGS_ARMS & ~(BP_HAS_BLOOD)
bodypart_flags = parent_type::bodypart_flags & ~(BP_HAS_BLOOD)

/obj/item/bodypart/arm/right/plasmaman
icon = 'icons/mob/species/plasmaman/bodyparts.dmi'
Expand All @@ -38,7 +38,7 @@
should_draw_greyscale = FALSE
icon_dmg_overlay = null

bodypart_flags = STOCK_BP_FLAGS_ARMS & ~(BP_HAS_BLOOD)
bodypart_flags = parent_type::bodypart_flags & ~(BP_HAS_BLOOD)

/obj/item/bodypart/leg/left/plasmaman
icon = 'icons/mob/species/plasmaman/bodyparts.dmi'
Expand All @@ -47,7 +47,7 @@
limb_id = SPECIES_PLASMAMAN
should_draw_greyscale = FALSE
icon_dmg_overlay = null
bodypart_flags = STOCK_BP_FLAGS_LEGS & ~(BP_HAS_BLOOD)
bodypart_flags = parent_type::bodypart_flags & ~(BP_HAS_BLOOD)

/obj/item/bodypart/leg/right/plasmaman
icon = 'icons/mob/species/plasmaman/bodyparts.dmi'
Expand All @@ -56,4 +56,4 @@
limb_id = SPECIES_PLASMAMAN
should_draw_greyscale = FALSE
icon_dmg_overlay = null
bodypart_flags = STOCK_BP_FLAGS_LEGS & ~(BP_HAS_BLOOD)
bodypart_flags = parent_type::bodypart_flags & ~(BP_HAS_BLOOD)

0 comments on commit 3ed7f34

Please sign in to comment.