Skip to content

Commit c448a6c

Browse files
authored
Equipment delay minor overhaul (#1093)
* equipment delays galore * maybe fix modsuits?
1 parent ec0bb3e commit c448a6c

File tree

29 files changed

+211
-49
lines changed

29 files changed

+211
-49
lines changed

code/__DEFINES/inventory.dm

+16
Original file line numberDiff line numberDiff line change
@@ -232,3 +232,19 @@ GLOBAL_LIST_INIT(security_wintercoat_allowed, typecacheof(list(
232232
#define LOCATION_HEAD "on your head"
233233
/// String for items placed in the neck slot.
234234
#define LOCATION_NECK "around your neck"
235+
236+
// Base equipment delays
237+
/// Delay base for Undersuit equipment.
238+
#define EQUIP_DELAY_UNDERSUIT (5 SECONDS)
239+
/// Delay base efor Oversuit equipment.
240+
#define EQUIP_DELAY_OVERSUIT (7 SECONDS)
241+
/// Delay base for things like coats that are trivially removed or put on.
242+
#define EQUIP_DELAY_COAT (2 SECONDS)
243+
/// Delay base for back-worn objects.
244+
#define EQUIP_DELAY_BACK (2 SECONDS)
245+
/// Delay base for belts.
246+
#define EQUIP_DELAY_BELT (1 SECONDS)
247+
/// Delay base for gloves.
248+
#define EQUIP_DELAY_GLOVES (1 SECONDS)
249+
/// Delay base for shoes.
250+
#define EQUIP_DELAY_SHOES (1 SECONDS)

code/datums/elements/strippable.dm

+2-4
Original file line numberDiff line numberDiff line change
@@ -292,15 +292,13 @@
292292
/datum/strippable_item/mob_item_slot/proc/get_equip_delay(obj/item/equipping)
293293
return equipping.equip_delay_other
294294

295-
/// A utility function for `/datum/strippable_item`s to start unequipping an item from a mob.
296-
/proc/start_unequip_mob(obj/item/item, mob/source, mob/user, strip_delay)
295+
/datum/strippable_item/proc/start_unequip_mob(obj/item/item, mob/source, mob/user, strip_delay)
297296
if (!do_after(user, source, strip_delay || item.strip_delay, DO_PUBLIC, interaction_key = REF(item), display = image('icons/hud/do_after.dmi', "pickpocket")))
298297
return FALSE
299298

300299
return TRUE
301300

302-
/// A utility function for `/datum/strippable_item`s to finish unequipping an item from a mob.
303-
/proc/finish_unequip_mob(obj/item/item, mob/source, mob/user)
301+
/datum/strippable_item/proc/finish_unequip_mob(obj/item/item, mob/source, mob/user)
304302
if (!item.doStrip(user, source))
305303
return FALSE
306304

code/game/objects/items/storage/backpack.dm

+4
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@
2828

2929
storage_type = /datum/storage/backpack
3030

31+
equip_delay_self = EQUIP_DELAY_BACK
32+
equip_delay_other = EQUIP_DELAY_BACK * 1.5
33+
strip_delay = EQUIP_DELAY_BACK * 1.5
34+
3135
/obj/item/storage/backpack/Initialize()
3236
. = ..()
3337
atom_storage.max_slots = 21

code/game/objects/items/storage/belt.dm

+5
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@
1515
attack_verb_continuous = list("whips", "lashes", "disciplines")
1616
attack_verb_simple = list("whip", "lash", "discipline")
1717
max_integrity = 300
18+
1819
equip_sound = 'sound/items/equip/toolbelt_equip.ogg'
20+
equip_delay_self = EQUIP_DELAY_BELT
21+
equip_delay_other = EQUIP_DELAY_BELT * 1.5
22+
strip_delay = EQUIP_DELAY_BELT * 1.5
23+
1924
var/content_overlays = FALSE //If this is true, the belt will gain overlays based on what it's holding
2025

2126
/obj/item/storage/belt/suicide_act(mob/living/carbon/user)

code/modules/clothing/gloves/_gloves.dm

+5-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@
1111
supports_variations_flags = CLOTHING_VOX_VARIATION
1212
attack_verb_continuous = list("challenges")
1313
attack_verb_simple = list("challenge")
14-
strip_delay = 20
15-
equip_delay_other = 40
14+
15+
equip_delay_self = EQUIP_DELAY_GLOVES
16+
equip_delay_other = EQUIP_DELAY_GLOVES + (3 SECONDS)
17+
strip_delay = EQUIP_DELAY_GLOVES + (3 SECONDS)
18+
1619
// Path variable. If defined, will produced the type through interaction with wirecutters.
1720
var/cut_type = null
1821
/// Used for handling bloody gloves leaving behind bloodstains on objects. Will be decremented whenever a bloodstain is left behind, and be incremented when the gloves become bloody.

code/modules/clothing/shoes/_shoes.dm

+4-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@
1313

1414
permeability_coefficient = 0.5
1515
slowdown = SHOES_SLOWDOWN
16-
strip_delay = 1 SECONDS
16+
17+
equip_delay_self = EQUIP_DELAY_SHOES
18+
equip_delay_other = EQUIP_DELAY_SHOES * 1.5
19+
strip_delay = EQUIP_DELAY_SHOES // In stripping code, if the mob is standing, it adds additional time.
1720

1821
var/offset = 0
1922
var/equipped_before_drop = FALSE

code/modules/clothing/suits/_suits.dm

+12-2
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,25 @@
33
icon = 'icons/obj/clothing/suits.dmi'
44
fallback_colors = list(list(13, 15))
55
fallback_icon_state = "coat"
6-
var/fire_resist = T0C+100
6+
77
allowed = list(/obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman)
8+
89
armor = list(BLUNT = 0, PUNCTURE = 0, SLASH = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, FIRE = 0, ACID = 0)
10+
911
drop_sound = 'sound/items/handling/cloth_drop.ogg'
1012
pickup_sound = 'sound/items/handling/cloth_pickup.ogg'
13+
14+
equip_delay_self = EQUIP_DELAY_OVERSUIT
15+
equip_delay_other = EQUIP_DELAY_OVERSUIT * 1.5
16+
strip_delay = EQUIP_DELAY_OVERSUIT * 1.5
17+
1118
slot_flags = ITEM_SLOT_OCLOTHING
19+
20+
limb_integrity = 0 // disabled for most exo-suits
21+
1222
supports_variations_flags = CLOTHING_DIGITIGRADE_VARIATION | CLOTHING_TESHARI_VARIATION | CLOTHING_VOX_VARIATION
1323
var/blood_overlay_type = "suit"
14-
limb_integrity = 0 // disabled for most exo-suits
24+
var/fire_resist = T0C+100
1525

1626
/obj/item/clothing/suit/Initialize(mapload)
1727
. = ..()

code/modules/clothing/suits/bio.dm

-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
allowed = list(/obj/item/tank/internals, /obj/item/reagent_containers/dropper, /obj/item/flashlight/pen, /obj/item/reagent_containers/syringe, /obj/item/reagent_containers/hypospray, /obj/item/reagent_containers/glass/beaker, /obj/item/gun/syringe)
2525
armor = list(BLUNT = 0, PUNCTURE = 0, SLASH = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 100, FIRE = 30, ACID = 100)
2626
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
27-
strip_delay = 70
28-
equip_delay_other = 70
2927
resistance_flags = ACID_PROOF
3028
supports_variations_flags = CLOTHING_DIGITIGRADE_VARIATION | CLOTHING_TESHARI_VARIATION | CLOTHING_VOX_VARIATION
3129

code/modules/clothing/suits/chaplainsuits.dm

+8
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,17 @@
33
/obj/item/clothing/suit/chaplainsuit
44
allowed = list(/obj/item/storage/book/bible, /obj/item/nullrod, /obj/item/reagent_containers/food/drinks/bottle/holywater, /obj/item/storage/fancy/candle_box, /obj/item/candle, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman)
55

6+
equip_delay_self = EQUIP_DELAY_COAT
7+
equip_delay_other = EQUIP_DELAY_COAT * 1.5
8+
strip_delay = EQUIP_DELAY_COAT * 1.5
9+
610
/obj/item/clothing/suit/hooded/chaplainsuit
711
allowed = list(/obj/item/storage/book/bible, /obj/item/nullrod, /obj/item/reagent_containers/food/drinks/bottle/holywater, /obj/item/storage/fancy/candle_box, /obj/item/candle, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman)
812

13+
equip_delay_self = EQUIP_DELAY_COAT
14+
equip_delay_other = EQUIP_DELAY_COAT * 1.5
15+
strip_delay = EQUIP_DELAY_COAT * 1.5
16+
917
//Suits
1018
/obj/item/clothing/suit/chaplainsuit/holidaypriest
1119
name = "holiday priest"

code/modules/clothing/suits/cloaks.dm

+4
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
body_parts_covered = CHEST|GROIN|LEGS|ARMS
1313
flags_inv = HIDESUITSTORAGE
1414

15+
equip_delay_self = EQUIP_DELAY_COAT
16+
equip_delay_other = EQUIP_DELAY_COAT * 1.5
17+
strip_delay = EQUIP_DELAY_COAT * 1.5
18+
1519
/obj/item/clothing/neck/cloak/suicide_act(mob/user)
1620
user.visible_message(span_suicide("[user] is strangling [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit suicide!"))
1721
return(OXYLOSS)

code/modules/clothing/suits/ghostsheet.dm

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
flags_inv = HIDEGLOVES|HIDEEARS|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT
1111
alternate_worn_layer = UNDER_HEAD_LAYER
1212

13+
equip_delay_self = 0
14+
equip_delay_other = 0
15+
strip_delay = 0
1316

1417
/obj/item/clothing/suit/ghost_sheet/spooky
1518
name = "spooky ghost"

code/modules/clothing/suits/jacket.dm

+4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010

1111
supports_variations_flags = CLOTHING_DIGITIGRADE_VARIATION | CLOTHING_TESHARI_VARIATION | CLOTHING_VOX_VARIATION
1212

13+
equip_delay_self = EQUIP_DELAY_COAT
14+
equip_delay_other = EQUIP_DELAY_COAT * 1.5
15+
strip_delay = EQUIP_DELAY_COAT * 1.5
16+
1317
/obj/item/clothing/suit/jacket/leather
1418
name = "leather jacket"
1519
desc = "Pompadour not included."

code/modules/clothing/suits/jobs.dm

+35
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414

1515
supports_variations_flags = CLOTHING_DIGITIGRADE_VARIATION | CLOTHING_TESHARI_VARIATION | CLOTHING_VOX_VARIATION
1616

17+
equip_delay_self = 0
18+
equip_delay_other = 0
19+
strip_delay = 0
20+
1721
/obj/item/clothing/suit/apron/waders
1822
name = "horticultural waders"
1923
desc = "A pair of heavy duty leather waders, perfect for insulating your soft flesh from spills, soil and thorns."
@@ -33,6 +37,10 @@
3337
allowed = list(/obj/item/disk, /obj/item/stamp, /obj/item/reagent_containers/food/drinks/flask, /obj/item/melee, /obj/item/storage/lockbox/medal, /obj/item/assembly/flash/handheld, /obj/item/storage/box/matches, /obj/item/lighter, /obj/item/clothing/mask/cigarette, /obj/item/storage/fancy/cigarettes, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman)
3438
supports_variations_flags = CLOTHING_DIGITIGRADE_VARIATION | CLOTHING_TESHARI_VARIATION | CLOTHING_VOX_VARIATION
3539

40+
equip_delay_self = EQUIP_DELAY_COAT
41+
equip_delay_other = EQUIP_DELAY_COAT * 1.5
42+
strip_delay = EQUIP_DELAY_COAT * 1.5
43+
3644
//Chef
3745
/obj/item/clothing/suit/toggle/chef
3846
name = "chef's apron"
@@ -46,6 +54,10 @@
4654

4755
supports_variations_flags = CLOTHING_DIGITIGRADE_VARIATION | CLOTHING_TESHARI_VARIATION | CLOTHING_VOX_VARIATION
4856

57+
equip_delay_self = EQUIP_DELAY_COAT
58+
equip_delay_other = EQUIP_DELAY_COAT * 1.5
59+
strip_delay = EQUIP_DELAY_COAT * 1.5
60+
4961
//Cook
5062
/obj/item/clothing/suit/apron/chef
5163
name = "cook's apron"
@@ -68,6 +80,10 @@
6880
heat_protection = CHEST|GROIN|LEGS|ARMS
6981
supports_variations_flags = CLOTHING_DIGITIGRADE_VARIATION | CLOTHING_TESHARI_VARIATION | CLOTHING_VOX_VARIATION
7082

83+
equip_delay_self = EQUIP_DELAY_COAT
84+
equip_delay_other = EQUIP_DELAY_COAT * 1.5
85+
strip_delay = EQUIP_DELAY_COAT * 1.5
86+
7187
/obj/item/clothing/suit/det_suit/Initialize(mapload)
7288
. = ..()
7389
allowed = GLOB.detective_vest_allowed
@@ -99,6 +115,10 @@
99115

100116
supports_variations_flags = CLOTHING_DIGITIGRADE_VARIATION_NO_NEW_ICON | CLOTHING_TESHARI_VARIATION | CLOTHING_VOX_VARIATION
101117

118+
equip_delay_self = EQUIP_DELAY_COAT
119+
equip_delay_other = EQUIP_DELAY_COAT * 1.5
120+
strip_delay = EQUIP_DELAY_COAT * 1.5
121+
102122
/obj/item/clothing/suit/hazardvest/worn_overlays(mob/living/carbon/human/wearer, mutable_appearance/standing, isinhands, icon_file)
103123
. = ..()
104124
if(!isinhands)
@@ -113,6 +133,9 @@
113133
blood_overlay_type = "coat"
114134
body_parts_covered = CHEST|ARMS
115135

136+
equip_delay_self = EQUIP_DELAY_COAT
137+
equip_delay_other = EQUIP_DELAY_COAT * 1.5
138+
strip_delay = EQUIP_DELAY_COAT * 1.5
116139

117140
/obj/item/clothing/suit/toggle/lawyer/purple
118141
name = "purple suit jacket"
@@ -154,6 +177,11 @@
154177
icon = 'icons/obj/clothing/belts.dmi'
155178
greyscale_colors = "#888888"
156179

180+
/obj/item/clothing/suit/security
181+
equip_delay_self = EQUIP_DELAY_COAT
182+
equip_delay_other = EQUIP_DELAY_COAT * 1.5
183+
strip_delay = EQUIP_DELAY_COAT * 1.5
184+
157185
//Security
158186
/obj/item/clothing/suit/security/officer
159187
name = "security officer's jacket"
@@ -211,6 +239,9 @@
211239
cold_protection = CHEST|ARMS
212240
heat_protection = CHEST|ARMS
213241

242+
equip_delay_self = EQUIP_DELAY_COAT
243+
equip_delay_other = EQUIP_DELAY_COAT * 1.5
244+
strip_delay = EQUIP_DELAY_COAT * 1.5
214245

215246
//Robotocist
216247

@@ -252,3 +283,7 @@
252283
inhand_icon_state = "p_suit"
253284
armor = list(BLUNT = 0, PUNCTURE = 0, SLASH = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 50, FIRE = 50, ACID = 50)
254285
supports_variations_flags = CLOTHING_TESHARI_VARIATION
286+
287+
equip_delay_self = EQUIP_DELAY_COAT
288+
equip_delay_other = EQUIP_DELAY_COAT * 1.5
289+
strip_delay = EQUIP_DELAY_COAT * 1.5

code/modules/clothing/suits/labcoat.dm

+4
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@
2828

2929
supports_variations_flags = CLOTHING_DIGITIGRADE_VARIATION_NO_NEW_ICON | CLOTHING_TESHARI_VARIATION | CLOTHING_VOX_VARIATION
3030

31+
equip_delay_self = EQUIP_DELAY_COAT
32+
equip_delay_other = EQUIP_DELAY_COAT * 1.5
33+
strip_delay = EQUIP_DELAY_COAT * 1.5
34+
3135
/obj/item/clothing/suit/toggle/labcoat/cmo
3236
name = "medical director's labcoat"
3337
desc = "Bluer than the standard model."

code/modules/clothing/suits/shirt.dm

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
icon_state = "ianshirt"
55
inhand_icon_state = "ianshirt"
66

7+
equip_delay_self = EQUIP_DELAY_UNDERSUIT
8+
equip_delay_other = EQUIP_DELAY_UNDERSUIT * 1.5
9+
strip_delay = EQUIP_DELAY_UNDERSUIT * 1.5
10+
711
supports_variations_flags = CLOTHING_DIGITIGRADE_VARIATION | CLOTHING_TESHARI_VARIATION | CLOTHING_VOX_VARIATION
812
///How many times has this shirt been washed? (In an ideal world this is just the determinant of the transform matrix.)
913
var/wash_count = 0

code/modules/clothing/suits/straightjacket.dm

-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,5 @@
66
body_parts_covered = CHEST|GROIN|LEGS|ARMS|HANDS
77
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
88
clothing_flags = DANGEROUS_OBJECT
9-
equip_delay_self = 50
10-
strip_delay = 60
119
breakouttime = 5 MINUTES
1210
supports_variations_flags = CLOTHING_DIGITIGRADE_VARIATION | CLOTHING_TESHARI_VARIATION | CLOTHING_VOX_VARIATION

code/modules/clothing/suits/toggles.dm

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
/obj/item/clothing/suit/hooded
44
actions_types = list(/datum/action/item_action/toggle_hood)
5+
6+
equip_delay_self = EQUIP_DELAY_COAT
7+
equip_delay_other = EQUIP_DELAY_COAT * 1.5
8+
strip_delay = EQUIP_DELAY_COAT * 1.5
9+
510
var/obj/item/clothing/head/hooded/hood
611
var/hoodtype = /obj/item/clothing/head/hooded/winterhood //so the chaplain hoodie or other hoodies can override this
712
///Alternative mode for hiding the hood, instead of storing the hood in the suit it qdels it, useful for when you deal with hooded suit with storage.

code/modules/clothing/suits/utility.dm

-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
max_heat_protection_temperature = FIRE_SUIT_MAX_TEMP_PROTECT
2828
cold_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS
2929
min_cold_protection_temperature = FIRE_SUIT_MIN_TEMP_PROTECT
30-
strip_delay = 60
31-
equip_delay_other = 60
3230
resistance_flags = FIRE_PROOF
3331

3432
/obj/item/clothing/suit/fire/worn_overlays(mob/living/carbon/human/wearer, mutable_appearance/standing, isinhands, icon_file)

code/modules/clothing/under/_under.dm

+9
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,23 @@
44
worn_icon = 'icons/mob/clothing/under/default.dmi'
55
fallback_colors = list(list(15, 17), list(10, 19), list(15, 10))
66
fallback_icon_state = "under"
7+
78
body_parts_covered = CHEST|GROIN|LEGS|ARMS
89
permeability_coefficient = 0.9
910
slot_flags = ITEM_SLOT_ICLOTHING
11+
1012
armor = list(BLUNT = 0, PUNCTURE = 0, SLASH = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, FIRE = 0, ACID = 0)
13+
1114
equip_sound = 'sound/items/equip/jumpsuit_equip.ogg'
1215
drop_sound = 'sound/items/handling/cloth_drop.ogg'
1316
pickup_sound = 'sound/items/handling/cloth_pickup.ogg'
17+
18+
equip_delay_self = EQUIP_DELAY_UNDERSUIT
19+
equip_delay_other = EQUIP_DELAY_UNDERSUIT * 1.5
20+
strip_delay = EQUIP_DELAY_UNDERSUIT * 1.5
21+
1422
limb_integrity = 30
23+
1524
/// The variable containing the flags for how the woman uniform cropping is supposed to interact with the sprite.
1625
var/female_sprite_flags = FEMALE_UNIFORM_FULL
1726
var/has_sensor = HAS_SENSORS // For the crew computer

0 commit comments

Comments
 (0)