Skip to content

Commit

Permalink
nodding with welding helmet up pops it down
Browse files Browse the repository at this point in the history
  • Loading branch information
frawhst committed Jul 10, 2023
1 parent cf7ae6f commit 3a5f174
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
19 changes: 15 additions & 4 deletions code/obj/item/clothing/helmets.dm
Expand Up @@ -738,6 +738,13 @@ TYPEINFO(/obj/item/clothing/head/helmet/camera)
if (ishuman(the_mob))
..()

/// Ran when the wearer emotes
proc/emote_handler(mob/source, var/emote)
switch(emote)
if ("nod")
src.flip_down(source, silent=TRUE)
boutput(mob, "<span class='hint'>You nod, dropping the welding mask over your face.</span>")

proc/obscure(mob/user)
user.addOverlayComposition(/datum/overlayComposition/weldingmask)
user.updateOverlaysClient(user.client)
Expand All @@ -746,12 +753,11 @@ TYPEINFO(/obj/item/clothing/head/helmet/camera)
user.removeOverlayComposition(/datum/overlayComposition/weldingmask)
user.updateOverlaysClient(user.client)

proc/flip_down(var/mob/living/carbon/human/user)
proc/flip_down(var/mob/living/carbon/human/user, var/silent = FALSE)
up = FALSE
see_face = FALSE
icon_state = "welding[decal ? "-[decal]" : null]"
item_state = "welding[decal ? "-[decal]" : null]"
boutput(user, "You flip the mask down. The mask now provides protection from eye damage.")
src.c_flags |= (COVERSEYES | BLOCKCHOKE)
src.hides_from_examine |= (C_EARS|C_MASK|C_GLASSES)
setProperty("meleeprot_head", 1)
Expand All @@ -760,14 +766,15 @@ TYPEINFO(/obj/item/clothing/head/helmet/camera)
if (user.head == src)
src.obscure(user)
user.update_clothing()
if (!silent)
boutput(user, "<span class='hint'>You flip the mask down. The mask now provides protection from eye damage.</span>")


proc/flip_up(var/mob/living/carbon/human/user)
proc/flip_up(var/mob/living/carbon/human/user, var/silent = FALSE)
up = TRUE
see_face = TRUE
icon_state = "welding-up[decal ? "-[decal]" : null]"
item_state = "welding-up[decal ? "-[decal]" : null]"
boutput(user, "You flip the mask up. The mask now provides higher armor to the head.")
src.c_flags &= ~(COVERSEYES | BLOCKCHOKE)
src.hides_from_examine &= ~(C_EARS|C_MASK|C_GLASSES)
setProperty("meleeprot_head", 4)
Expand All @@ -776,15 +783,19 @@ TYPEINFO(/obj/item/clothing/head/helmet/camera)
if (user.head == src)
src.reveal(user)
user.update_clothing()
if (!silent)
boutput(user, "<span class='hint'>You flip the mask up. The mask now provides higher armor to the head.</span>")

equipped(mob/user, slot)
. = ..()
if (!src.up)
src.obscure(user)
RegisterSignal(user, COMSIG_MOB_EMOTE, PROC_REF(emote_handler))

unequipped(mob/user)
. = ..()
src.reveal(user)
UnregisterSignal(user, COMSIG_MOB_EMOTE)

disposing()
. = ..()
Expand Down
2 changes: 2 additions & 0 deletions strings/changelog.txt
@@ -1,5 +1,7 @@

(t)sun jul 09 23
(u)aloe &
(+)*nod-ing while wearing a flipped-up welding mask now flips it down.
(u)aloe
(+)Gave the captain (and the gimmick leadership roles like VIP and RegDir) a new traitor item, the black market megaphone. It costs 5 TC and makes your text really, really large and annoying.
(t)sat jul 08 23
Expand Down

0 comments on commit 3a5f174

Please sign in to comment.