mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-09 16:12:17 +00:00
A lot of new defines are now in inventory_sizes.dm, which contains; All the size identifiers (the thing that tells the game if something is bulky, or w/e). Storage costs for all the sizes, which are exponents of two, as previously. A few constants for inventory size. Also changes all storage item's capacity definitions by basing it off of how many 'normal slots' exist for it. This allows one to change the definition for all of the defines in the file, and everything will follow along without needing to change 500 files. In testing, I made all ITEMSIZE_COST_* defines doubled, and nothing had broke. The benefit of doing all of this is that it makes adding new weight classes in the future much simpler, and makes knowing how much space a container has easier, as seeing ITEMSIZE_COST_NORMAL * 7 means it can hold seven normal items.
46 lines
1.5 KiB
Plaintext
46 lines
1.5 KiB
Plaintext
/obj/item/clothing/mask/breath
|
|
desc = "A close-fitting mask that can be connected to an air supply."
|
|
name = "breath mask"
|
|
icon_state = "breath"
|
|
item_state_slots = list(slot_r_hand_str = "breath", slot_l_hand_str = "breath")
|
|
item_flags = AIRTIGHT|FLEXIBLEMATERIAL
|
|
body_parts_covered = FACE
|
|
w_class = ITEMSIZE_SMALL
|
|
gas_transfer_coefficient = 0.10
|
|
permeability_coefficient = 0.50
|
|
var/hanging = 0
|
|
|
|
/obj/item/clothing/mask/breath/proc/adjust_mask(mob/user)
|
|
if(user.canmove && !user.stat)
|
|
src.hanging = !src.hanging
|
|
if (src.hanging)
|
|
gas_transfer_coefficient = 1
|
|
body_parts_covered = body_parts_covered & ~FACE
|
|
item_flags = item_flags & ~AIRTIGHT
|
|
icon_state = "breathdown"
|
|
user << "Your mask is now hanging on your neck."
|
|
else
|
|
gas_transfer_coefficient = initial(gas_transfer_coefficient)
|
|
body_parts_covered = initial(body_parts_covered)
|
|
item_flags = initial(item_flags)
|
|
icon_state = initial(icon_state)
|
|
user << "You pull the mask up to cover your face."
|
|
update_clothing_icon()
|
|
|
|
/obj/item/clothing/mask/breath/attack_self(mob/user)
|
|
adjust_mask(user)
|
|
|
|
/obj/item/clothing/mask/breath/verb/toggle()
|
|
set category = "Object"
|
|
set name = "Adjust mask"
|
|
set src in usr
|
|
|
|
adjust_mask(usr)
|
|
|
|
/obj/item/clothing/mask/breath/medical
|
|
desc = "A close-fitting sterile mask that can be connected to an air supply."
|
|
name = "medical mask"
|
|
icon_state = "medical"
|
|
item_state_slots = list(slot_r_hand_str = "medical", slot_l_hand_str = "medical")
|
|
permeability_coefficient = 0.01
|