Skip to content

Commit

Permalink
[MIRROR] Sec helmet fixes (#5227)
Browse files Browse the repository at this point in the history
* Sec helmet fixes (#4673)

* Sec helmet fixes

* Apparently these aren't pepperproof on tg

* I copy pasted too hard

* [MIRROR] Sec helmet fixes

---------

Co-authored-by: FlufflesTheDog <[email protected]>
Co-authored-by: StealsThePRs <[email protected]>
  • Loading branch information
3 people authored Dec 14, 2024
1 parent 0e45c2a commit 992df27
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 32 deletions.
Binary file modified modular_nova/master_files/icons/mob/clothing/head/helmet.dmi
Binary file not shown.
Binary file not shown.
Binary file modified modular_nova/master_files/icons/obj/clothing/head/helmet.dmi
Binary file not shown.
39 changes: 7 additions & 32 deletions modular_nova/modules/goofsec/code/sec_clothing_overrides.dm
Original file line number Diff line number Diff line change
Expand Up @@ -234,37 +234,15 @@
base_icon_state = "security_helmet"
actions_types = list(/datum/action/item_action/toggle)
supports_variations_flags = CLOTHING_SNOUTED_VARIATION
flags_cover = HEADCOVERSEYES | PEPPERPROOF
visor_flags_cover = HEADCOVERSEYES | PEPPERPROOF
flags_cover = parent_type::flags_cover | PEPPERPROOF
dog_fashion = null

///chat message when the visor is toggled down.
var/toggle_message = "You pull the visor down on"
///chat message when the visor is toggled up.
var/alt_toggle_message = "You push the visor up on"
///Can toggle?
var/can_toggle = TRUE

/// Duplication of toggleable logic - only way to make it toggleable without worse hacks due to being in base maps.
/obj/item/clothing/head/helmet/sec/attack_self(mob/user)
/obj/item/clothing/head/helmet/sec/click_alt(mob/user)
. = ..()
if(.)
return
if(user.incapacitated || !can_toggle)
return
up = !up
flags_1 ^= visor_flags
flags_inv ^= visor_flags_inv
flags_cover ^= visor_flags_cover
// This part is changed to work with the seclight.
base_icon_state = "[initial(icon_state)][up ? "up" : ""]"
update_icon_state()
to_chat(user, span_notice("[up ? alt_toggle_message : toggle_message] \the [src]."))

user.update_worn_head()
if(iscarbon(user))
var/mob/living/carbon/carbon_user = user
carbon_user.update_worn_head()
if (flipped_visor)
flags_cover &= ~PEPPERPROOF
else
flags_cover |= PEPPERPROOF


//Beret replacement
Expand Down Expand Up @@ -839,11 +817,8 @@
worn_icon = 'icons/mob/clothing/head/helmet.dmi'
icon_state = "helmet"
base_icon_state = "helmet"
actions_types = null
can_toggle = FALSE
supports_variations_flags = CLOTHING_SNOUTED_VARIATION_NO_NEW_ICON
flags_cover = HEADCOVERSEYES
flags_inv = HIDEHAIR
dog_fashion = /datum/dog_fashion/head/helmet

/*
* UNIFORM
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,12 @@
base_icon_state = "security_helmet_novisor"
actions_types = NONE
supports_variations_flags = CLOTHING_SNOUTED_VARIATION_NO_NEW_ICON
flags_cover = /obj/item/clothing/head/helmet::flags_cover
armor_type = /datum/armor/head_helmet

/obj/item/clothing/head/helmet/sec/sol/click_alt(mob/user)
return NONE // No visor to flip

/obj/item/clothing/head/hats/warden/police/patrol
name = "police patrol cap"
desc = "A dark colored hat with a silver badge, for the officer interested in style."
Expand Down

0 comments on commit 992df27

Please sign in to comment.