Lyodsuit Additions (#9690)

This commit is contained in:
Geeves
2020-08-21 14:50:30 +02:00
committed by GitHub
parent 14456d57c9
commit dad3770f55
4 changed files with 57 additions and 11 deletions
+17 -5
View File
@@ -622,23 +622,35 @@
if(hanging)
gas_transfer_coefficient = down_gas_transfer_coefficient
body_parts_covered = down_body_parts_covered
icon_state = "[icon_state]down"
adjust_sprites()
item_flags = down_item_flags
flags_inv = down_flags_inv
if(self)
user.visible_message("<b>[user]</b> pulls \the [src] down to hang around their neck.", SPAN_NOTICE("You pull \the [src] down to hang around your neck."))
lower_message(user)
else
gas_transfer_coefficient = initial(gas_transfer_coefficient)
body_parts_covered = initial(body_parts_covered)
icon_state = initial(icon_state)
item_state = initial(icon_state)
adjust_sprites()
item_flags = initial(item_flags)
flags_inv = initial(flags_inv)
if(self)
user.visible_message("<b>[user]</b> pulls \the [src] up to cover their face.", SPAN_NOTICE("You pull \the [src] up to cover your face."))
raise_message(user)
usr.update_action_buttons()
update_clothing_icon()
/obj/item/clothing/mask/proc/adjust_sprites()
if(hanging)
icon_state = "[icon_state]down"
else
icon_state = initial(icon_state)
item_state = initial(icon_state)
/obj/item/clothing/mask/proc/lower_message(mob/user)
user.visible_message("<b>[user]</b> pulls \the [src] down to hang around their neck.", SPAN_NOTICE("You pull \the [src] down to hang around your neck."))
/obj/item/clothing/mask/proc/raise_message(mob/user)
user.visible_message("<b>[user]</b> pulls \the [src] up to cover their face.", SPAN_NOTICE("You pull \the [src] up to cover your face."))
/obj/item/clothing/mask/attack_self(mob/user)
if(adjustable)
adjust_mask(user)
+31 -6
View File
@@ -1,13 +1,29 @@
/obj/item/clothing/mask/lyodsuit
/obj/item/clothing/mask/breath/lyodsuit
name = "lyodsuit mask"
desc = "A simple mask that forms a part of the Dominian lyodsuit. Rather cozy, if you're warm-blooded."
desc = "A simple mask that forms a part of the Dominian lyodsuit. Rather cozy, if you're warm-blooded. It has a port to connect air tanks to."
icon = 'icons/clothing/masks/lyodsuit.dmi'
icon_state = "dom_thermal_mask"
item_state = "dom_thermal_mask"
gas_transfer_coefficient = 0.90 // it's made primarily for heat, not gas and chemical protection
permeability_coefficient = 0.95
flags_inv = BLOCKHAIR
contained_sprite = TRUE
canremove = FALSE
/obj/item/clothing/mask/breath/lyodsuit/adjust_sprites()
if(hanging)
icon_state = "[icon_state]down"
item_state = "[item_state]down"
else
icon_state = initial(icon_state)
item_state = initial(icon_state)
/obj/item/clothing/mask/breath/lyodsuit/lower_message(mob/user)
user.visible_message("<b>[user]</b> rolls \the [src] up to reveal their face.", SPAN_NOTICE("You roll \the [src] up to reveal your face."), range = 3)
/obj/item/clothing/mask/breath/lyodsuit/raise_message(mob/user)
user.visible_message("<b>[user]</b> pulls \the [src] down to cover their face.", SPAN_NOTICE("You pull \the [src] down to cover your face."), range = 3)
/obj/item/clothing/gloves/lyodsuit
name = "lyodsuit gloves"
desc = "A pair of thermal gloves, guaranteed to keep hands toasty."
@@ -157,12 +173,14 @@
icon = 'icons/clothing/under/uniforms/lyodsuit_hoodie.dmi'
icon_state = "dom_thermal_hoodie"
item_state = "dom_thermal_hoodie"
var/obj/item/clothing/mask/lyodsuit/mask
action_button_name = "Toggle Lyodsuit Mask"
var/obj/item/clothing/mask/breath/lyodsuit/mask
var/hood_raised = FALSE
/obj/item/clothing/under/dominia/lyodsuit/hoodie/Initialize()
. = ..()
create_mask()
verbs += /obj/item/clothing/under/dominia/lyodsuit/hoodie/proc/toggle_mask
/obj/item/clothing/under/dominia/lyodsuit/hoodie/Destroy()
QDEL_NULL(mask)
@@ -174,6 +192,11 @@
/obj/item/clothing/under/dominia/lyodsuit/hoodie/on_slotmove()
remove_mask()
/obj/item/clothing/under/dominia/lyodsuit/hoodie/attack_self(mob/user)
..()
if(equip_slot == slot_w_uniform)
toggle_mask()
/obj/item/clothing/under/dominia/lyodsuit/hoodie/equipped(mob/user, slot)
if(slot != slot_w_uniform)
remove_mask()
@@ -181,8 +204,7 @@
/obj/item/clothing/under/dominia/lyodsuit/hoodie/proc/create_mask()
if(!mask)
mask = new /obj/item/clothing/mask/lyodsuit(src)
item_state = "dom_thermal"
mask = new /obj/item/clothing/mask/breath/lyodsuit(src)
/obj/item/clothing/under/dominia/lyodsuit/hoodie/proc/remove_mask()
// Mask got nuked. Probably because of RIGs or the like.
@@ -196,7 +218,7 @@
mask.forceMove(src)
hood_raised = FALSE
/obj/item/clothing/under/dominia/lyodsuit/hoodie/verb/toggle_mask()
/obj/item/clothing/under/dominia/lyodsuit/hoodie/proc/toggle_mask()
set name = "Toggle Lyodsuit Mask"
set category = "Object"
set src in usr
@@ -220,8 +242,11 @@
H.equip_to_slot_if_possible(mask, slot_wear_mask, 0, 0, 1)
hood_raised = TRUE
H.update_inv_wear_mask()
item_state = "dom_thermal"
else
remove_mask()
usr.update_action_buttons()
update_clothing_icon()
/obj/item/clothing/under/dominia/lyodsuit/hoodie/rollsuit()
..()