Armor rework (#5158)

Co-authored-by: silicons <no@you.cat>
This commit is contained in:
silicons
2023-03-25 11:58:25 +01:00
committed by GitHub
co-authored by silicons
parent 72902437c8
commit 8b778b0321
619 changed files with 5599 additions and 4064 deletions
+10 -8
View File
@@ -6,6 +6,10 @@
organ_tag = "limb"
decays = FALSE
//? Coverage
/// body_cover_flags that count as covering us
var/body_part_flags = NONE
//? Wounds
/// Wound datum list.
var/list/wounds
@@ -51,8 +55,6 @@
var/transparent = 0
/// Icon state base.
var/icon_name = null
/// Part flag
var/body_part = null
/// Used in mob overlay layering calculations.
var/icon_position = 0
/// Used when caching robolimb icons.
@@ -482,9 +484,9 @@
if(user == src.owner)
var/grasp
if(user.l_hand == tool && (src.body_part & (ARM_LEFT|HAND_LEFT)))
if(user.l_hand == tool && (src.body_part_flags & (ARM_LEFT|HAND_LEFT)))
grasp = BP_L_HAND
else if(user.r_hand == tool && (src.body_part & (ARM_RIGHT|HAND_RIGHT)))
else if(user.r_hand == tool && (src.body_part_flags & (ARM_RIGHT|HAND_RIGHT)))
grasp = BP_R_HAND
if(grasp)
@@ -980,12 +982,12 @@ Note that amputating the affected organ does in fact remove the infection from t
holder = owner
if(!holder)
return
if (holder.handcuffed && (body_part in list(ARM_LEFT, ARM_RIGHT, HAND_LEFT, HAND_RIGHT)))
if (holder.handcuffed && (body_part_flags in list(ARM_LEFT, ARM_RIGHT, HAND_LEFT, HAND_RIGHT)))
holder.visible_message(\
"\The [holder.handcuffed.name] falls off of [holder.name].",\
"\The [holder.handcuffed.name] falls off you.")
holder.drop_item_to_ground(holder.handcuffed, INV_OP_FORCE)
if (holder.legcuffed && (body_part in list(FOOT_LEFT, FOOT_RIGHT, LEG_LEFT, LEG_RIGHT)))
if (holder.legcuffed && (body_part_flags in list(FOOT_LEFT, FOOT_RIGHT, LEG_LEFT, LEG_RIGHT)))
holder.visible_message(\
"\The [holder.legcuffed.name] falls off of [holder.name].",\
"\The [holder.legcuffed.name] falls off you.")
@@ -1398,7 +1400,7 @@ Note that amputating the affected organ does in fact remove the infection from t
var/list/covering_clothing = list()
if(!target_covering)
target_covering = src.body_part
target_covering = src.body_part_flags
if(owner)
var/list/protective_gear = list(owner.head, owner.wear_mask, owner.wear_suit, owner.w_uniform, owner.gloves, owner.shoes, owner.glasses)
@@ -1407,7 +1409,7 @@ Note that amputating the affected organ does in fact remove the infection from t
covering_clothing |= gear
if(LAZYLEN(gear.accessories))
for(var/obj/item/clothing/accessory/bling in gear.accessories)
if(bling.body_cover_flags & src.body_part)
if(bling.body_cover_flags & src.body_part_flags)
covering_clothing |= bling
return covering_clothing
+10 -10
View File
@@ -32,7 +32,7 @@
max_damage = 200
min_broken_damage = 50
w_class = ITEMSIZE_HUGE
body_part = UPPER_TORSO
body_part_flags = UPPER_TORSO
vital = TRUE
cannot_amputate = TRUE
parent_organ = null
@@ -44,7 +44,7 @@
max_damage = 100
min_broken_damage = 50
w_class = ITEMSIZE_LARGE
body_part = LOWER_TORSO
body_part_flags = LOWER_TORSO
parent_organ = BP_TORSO
/obj/item/organ/external/diona/arm
@@ -54,7 +54,7 @@
max_damage = 30
min_broken_damage = 20
w_class = ITEMSIZE_NORMAL
body_part = ARM_LEFT
body_part_flags = ARM_LEFT
parent_organ = BP_TORSO
can_grasp = TRUE
@@ -62,7 +62,7 @@
name = "right upper tendril"
organ_tag = BP_R_ARM
icon_name = "r_arm"
body_part = ARM_RIGHT
body_part_flags = ARM_RIGHT
/obj/item/organ/external/diona/leg
name = "left lower tendril"
@@ -71,7 +71,7 @@
max_damage = 30
min_broken_damage = 20
w_class = ITEMSIZE_NORMAL
body_part = LEG_LEFT
body_part_flags = LEG_LEFT
icon_position = LEFT
parent_organ = BP_GROIN
can_stand = TRUE
@@ -80,7 +80,7 @@
name = "right lower tendril"
organ_tag = BP_R_LEG
icon_name = "r_leg"
body_part = LEG_RIGHT
body_part_flags = LEG_RIGHT
icon_position = RIGHT
/obj/item/organ/external/diona/foot
@@ -90,7 +90,7 @@
max_damage = 25
min_broken_damage = 10
w_class = ITEMSIZE_SMALL
body_part = FOOT_LEFT
body_part_flags = FOOT_LEFT
icon_position = LEFT
parent_organ = BP_R_LEG
can_stand = TRUE
@@ -99,7 +99,7 @@
name = "right foot"
organ_tag = BP_R_FOOT
icon_name = "r_foot"
body_part = FOOT_RIGHT
body_part_flags = FOOT_RIGHT
icon_position = RIGHT
parent_organ = BP_R_LEG
joint = "right ankle"
@@ -112,7 +112,7 @@
max_damage = 25
min_broken_damage = 15
w_class = ITEMSIZE_SMALL
body_part = HAND_LEFT
body_part_flags = HAND_LEFT
parent_organ = BP_L_ARM
can_grasp = TRUE
@@ -120,7 +120,7 @@
name = "right grasper"
organ_tag = BP_R_HAND
icon_name = "r_hand"
body_part = HAND_RIGHT
body_part_flags = HAND_RIGHT
parent_organ = BP_R_ARM
//DIONA ORGANS.
+1 -1
View File
@@ -12,7 +12,7 @@
max_damage = 75
min_broken_damage = 35
eye_icon = "eyes_s"
force = 5
damage_force = 5
throw_force = 10
/obj/item/organ/external/head/unathi/digi
+16 -16
View File
@@ -11,7 +11,7 @@
max_damage = 100
min_broken_damage = 35
w_class = ITEMSIZE_HUGE
body_part = UPPER_TORSO
body_part_flags = UPPER_TORSO
vital = TRUE
amputation_point = "spine"
joint = "neck"
@@ -53,7 +53,7 @@
max_damage = 100
min_broken_damage = 35
w_class = ITEMSIZE_LARGE
body_part = LOWER_TORSO
body_part_flags = LOWER_TORSO
vital = TRUE
parent_organ = BP_TORSO
amputation_point = "lumbar"
@@ -83,12 +83,12 @@
max_damage = 80
min_broken_damage = 30
w_class = ITEMSIZE_NORMAL
body_part = ARM_LEFT
body_part_flags = ARM_LEFT
parent_organ = BP_TORSO
joint = "left elbow"
amputation_point = "left shoulder"
can_grasp = TRUE
force = 7
damage_force = 7
throw_force = 10
/obj/item/organ/external/arm/handle_germ_effects()
@@ -112,7 +112,7 @@
organ_tag = BP_R_ARM
name = "right arm"
icon_name = "r_arm"
body_part = ARM_RIGHT
body_part_flags = ARM_RIGHT
joint = "right elbow"
amputation_point = "right shoulder"
@@ -123,13 +123,13 @@
max_damage = 80
min_broken_damage = 30
w_class = ITEMSIZE_NORMAL
body_part = LEG_LEFT
body_part_flags = LEG_LEFT
icon_position = LEFT
parent_organ = BP_GROIN
joint = "left knee"
amputation_point = "left hip"
can_stand = TRUE
force = 10
damage_force = 10
throw_force = 12
/obj/item/organ/external/leg/handle_germ_effects()
@@ -150,7 +150,7 @@
organ_tag = BP_R_LEG
name = "right leg"
icon_name = "r_leg"
body_part = LEG_RIGHT
body_part_flags = LEG_RIGHT
icon_position = RIGHT
joint = "right knee"
amputation_point = "right hip"
@@ -162,13 +162,13 @@
max_damage = 50
min_broken_damage = 15
w_class = ITEMSIZE_SMALL
body_part = FOOT_LEFT
body_part_flags = FOOT_LEFT
icon_position = LEFT
parent_organ = BP_L_LEG
joint = "left ankle"
amputation_point = "left ankle"
can_stand = TRUE
force = 3
damage_force = 3
throw_force = 6
/obj/item/organ/external/foot/handle_germ_effects()
@@ -189,7 +189,7 @@
organ_tag = BP_R_FOOT
name = "right foot"
icon_name = "r_foot"
body_part = FOOT_RIGHT
body_part_flags = FOOT_RIGHT
icon_position = RIGHT
parent_organ = BP_R_LEG
joint = "right ankle"
@@ -202,14 +202,14 @@
max_damage = 50
min_broken_damage = 15
w_class = ITEMSIZE_SMALL
body_part = HAND_LEFT
body_part_flags = HAND_LEFT
parent_organ = BP_L_ARM
joint = "left wrist"
amputation_point = "left wrist"
can_grasp = TRUE
organ_rel_size = 10
base_miss_chance = 50
force = 3
damage_force = 3
throw_force = 5
/obj/item/organ/external/hand/handle_germ_effects()
@@ -233,7 +233,7 @@
organ_tag = BP_R_HAND
name = "right hand"
icon_name = "r_hand"
body_part = HAND_RIGHT
body_part_flags = HAND_RIGHT
parent_organ = BP_R_ARM
joint = "right wrist"
amputation_point = "right wrist"
@@ -246,7 +246,7 @@
max_damage = 75
min_broken_damage = 35
w_class = ITEMSIZE_NORMAL
body_part = HEAD
body_part_flags = HEAD
vital = TRUE
parent_organ = BP_TORSO
joint = "jaw"
@@ -255,7 +255,7 @@
cannot_gib = TRUE
encased = "skull"
base_miss_chance = 40
force = 3
damage_force = 3
throw_force = 7
var/can_intake_reagents = TRUE
+1 -1
View File
@@ -6,7 +6,7 @@
/obj/item/organ/external/stump/Initialize(mapload, internal, obj/item/organ/external/limb)
if(istype(limb))
organ_tag = limb.organ_tag
body_part = limb.body_part
body_part_flags = limb.body_part_flags
amputation_point = limb.amputation_point
joint = limb.joint
parent_organ = limb.parent_organ