Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIRROR] Sec helmet fixes #5227

Merged
merged 2 commits into from
Dec 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading