Skip to content

Commit

Permalink
qol: Folded masks in boxes (#5087)
Browse files Browse the repository at this point in the history
* folded masks in boxes

* Update gasmask.dm

* Update gasmask.dm

* Update gasmask.dm

* Update gasmask.dm

* Update gasmask.dm

* Update gasmask.dm

* Update gasmask.dm

* Update clothing.dm

* Update clothing.dm

* Update clothing.dm

* Update clothing.dm

* Update clothing.dm

* Update clothing.dm

* Update clothing.dm

* Update gasmask.dm
  • Loading branch information
Arceniu authored Jun 3, 2024
1 parent 6d0ce5e commit 9b1af72
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 16 deletions.
8 changes: 4 additions & 4 deletions code/game/objects/items/weapons/storage/boxes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
icon_state = "box_min"

/obj/item/storage/box/survival_mining/populate_contents()
new /obj/item/clothing/mask/gas/explorer(src)
new /obj/item/clothing/mask/gas/explorer/folded(src)
new /obj/item/tank/internals/emergency_oxygen/engi(src)
new /obj/item/crowbar/red(src)
new /obj/item/storage/firstaid/crew(src)
Expand All @@ -112,7 +112,7 @@
new /obj/item/storage/firstaid/crew(src)
new /obj/item/flashlight/flare/glowstick/red(src)
new /obj/item/crowbar/red/sec(src)
new /obj/item/clothing/mask/gas/sechailer(src)
new /obj/item/clothing/mask/gas/sechailer/folded(src)
new /obj/item/radio/sec(src)

/obj/item/storage/box/survival_security/hos
Expand Down Expand Up @@ -854,7 +854,7 @@
max_combined_w_class = 20

/obj/item/storage/box/centcomofficer/populate_contents()
new /obj/item/clothing/mask/gas/sechailer(src)
new /obj/item/clothing/mask/gas/sechailer/folded(src)
new /obj/item/tank/internals/emergency_oxygen/double(src)
new /obj/item/flashlight/seclite(src)
new /obj/item/kitchen/knife/combat(src)
Expand All @@ -872,7 +872,7 @@
icon_state = "box_ert"

/obj/item/storage/box/responseteam/populate_contents()
new /obj/item/clothing/mask/gas/sechailer(src)
new /obj/item/clothing/mask/gas/sechailer/folded(src)
new /obj/item/tank/internals/emergency_oxygen/engi(src)
new /obj/item/flashlight/flare(src)
new /obj/item/crowbar/red(src)
Expand Down
9 changes: 9 additions & 0 deletions code/modules/clothing/clothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,15 @@ BLIND // can't see anything
if(!user.equip_to_slot_if_possible(src, slot_flags))
user.put_in_hands(src)

/obj/item/clothing/mask/proc/force_adjust_mask()
up = !up
update_icon(UPDATE_ICON_STATE)
gas_transfer_coefficient = null
permeability_coefficient = null
flags_cover &= ~MASKCOVERSMOUTH
flags_inv &= ~HIDENAME
clothing_flags &= ~AIRTIGHT
w_class = WEIGHT_CLASS_SMALL

// Changes the speech verb when wearing a mask if a value is returned
/obj/item/clothing/mask/proc/change_speech_verb()
Expand Down
20 changes: 8 additions & 12 deletions code/modules/clothing/masks/gasmask.dm
Original file line number Diff line number Diff line change
Expand Up @@ -96,18 +96,6 @@
. = ..()
force_adjust_mask()


/obj/item/clothing/mask/gas/explorer/folded/proc/force_adjust_mask()
up = !up
update_icon(UPDATE_ICON_STATE)
gas_transfer_coefficient = null
permeability_coefficient = null
flags_cover &= ~MASKCOVERSMOUTH
flags_inv &= ~HIDENAME
clothing_flags &= ~AIRTIGHT
w_class = WEIGHT_CLASS_SMALL


//Bane gas mask
/obj/item/clothing/mask/banemask
name = "bane mask"
Expand Down Expand Up @@ -361,6 +349,14 @@
"dredd" = "I am, the LAW!"
)

/obj/item/clothing/mask/gas/sechailer/adjustmask(user)
. = ..()
if(.)
w_class = up ? WEIGHT_CLASS_SMALL : WEIGHT_CLASS_NORMAL

/obj/item/clothing/mask/gas/sechailer/folded/Initialize(mapload)
. = ..()
force_adjust_mask()

/obj/item/clothing/mask/gas/sechailer/hos
name = "\improper HOS SWAT mask"
Expand Down

0 comments on commit 9b1af72

Please sign in to comment.