storage rewrite (#6284)

Co-authored-by: silicons <no@you.cat>
This commit is contained in:
silicons
2024-02-17 10:08:35 +01:00
committed by GitHub
co-authored by silicons
parent f073efbc88
commit 383308a1d1
585 changed files with 4819 additions and 3881 deletions
+3 -3
View File
@@ -979,7 +979,7 @@ Note that amputating the affected organ does in fact remove the infection from t
if(DROPLIMB_BURN)
new /obj/effect/debris/cleanable/ash(droploc)
for(var/obj/item/I in src)
if(I.w_class > ITEMSIZE_SMALL && !istype(I,/obj/item/organ))
if(I.w_class > WEIGHT_CLASS_SMALL && !istype(I,/obj/item/organ))
I.forceMove(droploc)
qdel(src)
if(DROPLIMB_BLUNT)
@@ -1001,7 +1001,7 @@ Note that amputating the affected organ does in fact remove the infection from t
I.throw_at_old(get_edge_target_turf(src,pick(GLOB.alldirs)),rand(1,3),5)
for(var/obj/item/I in src)
if(I.w_class <= ITEMSIZE_SMALL)
if(I.w_class <= WEIGHT_CLASS_SMALL)
qdel(I)
continue
I.forceMove(droploc)
@@ -1298,7 +1298,7 @@ Note that amputating the affected organ does in fact remove the infection from t
for(var/atom/movable/implant in implants)
//large items and non-item objs fall to the floor, everything else stays
var/obj/item/I = implant
if(istype(I) && I.w_class < ITEMSIZE_NORMAL)
if(istype(I) && I.w_class < WEIGHT_CLASS_NORMAL)
implant.forceMove(victim.drop_location())
else
implant.forceMove(src)
+1 -1
View File
@@ -3,7 +3,7 @@
amputation_point = "axis"
joint = "central axis"
model = "NULL DATA."
w_class = ITEMSIZE_LARGE
w_class = WEIGHT_CLASS_BULKY
gendered_icon = 0
dislocated = -1
max_damage = 50
+6 -6
View File
@@ -27,7 +27,7 @@
icon_name = "torso"
max_damage = 200
min_broken_damage = 50
w_class = ITEMSIZE_HUGE
w_class = WEIGHT_CLASS_HUGE
body_part_flags = UPPER_TORSO
vital = TRUE
cannot_amputate = TRUE
@@ -39,7 +39,7 @@
icon_name = "groin"
max_damage = 100
min_broken_damage = 50
w_class = ITEMSIZE_LARGE
w_class = WEIGHT_CLASS_BULKY
body_part_flags = LOWER_TORSO
parent_organ = BP_TORSO
@@ -49,7 +49,7 @@
icon_name = "l_arm"
max_damage = 30
min_broken_damage = 20
w_class = ITEMSIZE_NORMAL
w_class = WEIGHT_CLASS_NORMAL
body_part_flags = ARM_LEFT
parent_organ = BP_TORSO
can_grasp = TRUE
@@ -66,7 +66,7 @@
icon_name = "l_leg"
max_damage = 30
min_broken_damage = 20
w_class = ITEMSIZE_NORMAL
w_class = WEIGHT_CLASS_NORMAL
body_part_flags = LEG_LEFT
icon_position = LEFT
parent_organ = BP_GROIN
@@ -85,7 +85,7 @@
icon_name = "l_foot"
max_damage = 25
min_broken_damage = 10
w_class = ITEMSIZE_SMALL
w_class = WEIGHT_CLASS_SMALL
body_part_flags = FOOT_LEFT
icon_position = LEFT
parent_organ = BP_R_LEG
@@ -107,7 +107,7 @@
icon_name = "l_hand"
max_damage = 25
min_broken_damage = 15
w_class = ITEMSIZE_SMALL
w_class = WEIGHT_CLASS_SMALL
body_part_flags = HAND_LEFT
parent_organ = BP_L_ARM
can_grasp = TRUE
+7 -7
View File
@@ -10,7 +10,7 @@
icon_name = "torso"
max_damage = 100
min_broken_damage = 35
w_class = ITEMSIZE_HUGE
w_class = WEIGHT_CLASS_HUGE
body_part_flags = UPPER_TORSO
vital = TRUE
amputation_point = "spine"
@@ -52,7 +52,7 @@
icon_name = "groin"
max_damage = 100
min_broken_damage = 35
w_class = ITEMSIZE_LARGE
w_class = WEIGHT_CLASS_BULKY
body_part_flags = LOWER_TORSO
vital = TRUE
parent_organ = BP_TORSO
@@ -82,7 +82,7 @@
icon_name = "l_arm"
max_damage = 80
min_broken_damage = 30
w_class = ITEMSIZE_NORMAL
w_class = WEIGHT_CLASS_NORMAL
body_part_flags = ARM_LEFT
parent_organ = BP_TORSO
joint = "left elbow"
@@ -122,7 +122,7 @@
icon_name = "l_leg"
max_damage = 80
min_broken_damage = 30
w_class = ITEMSIZE_NORMAL
w_class = WEIGHT_CLASS_NORMAL
body_part_flags = LEG_LEFT
icon_position = LEFT
parent_organ = BP_GROIN
@@ -161,7 +161,7 @@
icon_name = "l_foot"
max_damage = 50
min_broken_damage = 15
w_class = ITEMSIZE_SMALL
w_class = WEIGHT_CLASS_SMALL
body_part_flags = FOOT_LEFT
icon_position = LEFT
parent_organ = BP_L_LEG
@@ -201,7 +201,7 @@
icon_name = "l_hand"
max_damage = 50
min_broken_damage = 15
w_class = ITEMSIZE_SMALL
w_class = WEIGHT_CLASS_SMALL
body_part_flags = HAND_LEFT
parent_organ = BP_L_ARM
joint = "left wrist"
@@ -245,7 +245,7 @@
slot_flags = SLOT_BELT
max_damage = 75
min_broken_damage = 35
w_class = ITEMSIZE_NORMAL
w_class = WEIGHT_CLASS_NORMAL
body_part_flags = HEAD
vital = TRUE
parent_organ = BP_TORSO
@@ -6,7 +6,7 @@
name = "laser rifle implant"
desc = "A large implant that fits into a subject's arm. It deploys a laser-emitting array by some painful means."
icon_state = "augment_laser"
w_class = ITEMSIZE_LARGE
w_class = WEIGHT_CLASS_BULKY
organ_tag = O_AUG_L_FOREARM
parent_organ = BP_L_ARM
target_slot = /datum/inventory_slot_meta/abstract/hand/left
@@ -40,7 +40,7 @@
name = "crossbow implant"
desc = "A small implant that fits into a subject's arm. It deploys a dart launching mechanism through the flesh through unknown means."
icon_state = "augment_dart"
w_class = ITEMSIZE_SMALL
w_class = WEIGHT_CLASS_SMALL
integrated_object_type = /obj/item/gun/energy/crossbow
// Wrist-or-hand-mounted implant
@@ -49,7 +49,7 @@
name = "resonant analyzer implant"
desc = "An augment that fits neatly into the hand, useful for determining the usefulness of an object for research."
icon_state = "augment_box"
w_class = ITEMSIZE_SMALL
w_class = WEIGHT_CLASS_SMALL
integrated_object_type = /obj/item/portable_scanner
/obj/item/organ/internal/augment/armmounted/hand/attackby(obj/item/I as obj, mob/user as mob)
@@ -81,7 +81,7 @@
desc = "A large implant that fits into a subject's arm. It looks kind of like a skeleton."
icon_state = "augment_armframe"
organ_tag = O_AUG_R_UPPERARM
w_class = ITEMSIZE_HUGE
w_class = WEIGHT_CLASS_HUGE
integrated_object_type = null
/obj/item/organ/internal/augment/armmounted/shoulder/attackby(obj/item/I as obj, mob/user as mob)
@@ -129,7 +129,7 @@
organ_tag = O_AUG_R_UPPERARM
w_class = ITEMSIZE_HUGE
w_class = WEIGHT_CLASS_HUGE
integrated_object_type = null
+1 -1
View File
@@ -20,7 +20,7 @@
icon_state = "augment_shades"
dead_icon = "augment_shades_dead"
w_class = ITEMSIZE_TINY
w_class = WEIGHT_CLASS_TINY
organ_tag = O_AUG_EYES
@@ -7,7 +7,7 @@
decay_rate = ORGAN_DECAY_PER_SECOND_BRAIN
icon_state = "brain2"
damage_force = 1.0
w_class = ITEMSIZE_SMALL
w_class = WEIGHT_CLASS_SMALL
throw_force = 1.0
throw_speed = 3
throw_range = 5
@@ -3,7 +3,7 @@
icon_state = "spleen"
organ_tag = O_SPLEEN
parent_organ = BP_TORSO
w_class = ITEMSIZE_TINY
w_class = WEIGHT_CLASS_TINY
var/spleen_tick = 20 // The number of ticks between Spleen cycles.
var/spleen_efficiency = 1 // A multiplier for how efficient this spleen is.
+1 -1
View File
@@ -86,7 +86,7 @@
if(isliving(loc))
owner = loc
w_class = max(src.w_class + mob_size_difference(owner.mob_size, MOB_MEDIUM), 1) //smaller mobs have smaller organs.
set_weight_class(max(src.w_class + mob_size_difference(owner.mob_size, MOB_MEDIUM), 1)) //smaller mobs have smaller organs.
if(internal)
LAZYDISTINCTADD(owner.internal_organs, src)
LAZYSET(owner.internal_organs_by_name, organ_tag, src)