New messages system for visors and welding equipment (#92501)

## About The Pull Request
Riot helmets and welding helmets will give message about their visor
being moved and not whole helmet.
## Changelog
🆑
qol: Swat and welding helmets give proper messages when adjusting
visors.
/🆑
This commit is contained in:
panvxv
2025-08-19 22:40:34 -04:00
committed by nevimer
parent 1bc937555e
commit 9ad596913e
4 changed files with 17 additions and 7 deletions
+11 -1
View File
@@ -18,6 +18,10 @@
var/visor_toggle_down_sound = null
///Sound this item makes when its visor is flipped up
var/visor_toggle_up_sound = null
///chat message when the visor is toggled down.
var/toggle_message
///chat message when the visor is toggled up.
var/alt_toggle_message
var/clothing_flags = NONE
///List of items that can be equipped in the suit storage slot while we're worn.
@@ -540,7 +544,13 @@ BLIND // can't see anything
visor_toggling()
to_chat(user, span_notice("You push [src] [up ? "out of the way" : "back into place"]."))
var/message
if(up)
message = src.alt_toggle_message || "You push [src] out of the way."
else
message = src.toggle_message || "You push [src] back into place."
to_chat(user, span_notice("[message]"))
//play sounds when toggling the visor up or down (if there is any)
if(visor_toggle_up_sound && up)
+2
View File
@@ -118,6 +118,8 @@
name = "welding hard hat"
desc = "A piece of headgear used in dangerous working conditions to protect the head. Comes with a built-in flashlight AND welding shield! The bulb seems a little smaller though."
light_range = 3 //Needs a little bit of tradeoff
toggle_message = "You pull the visor down"
alt_toggle_message = "You push the visor up"
dog_fashion = null
actions_types = list(/datum/action/item_action/toggle_helmet_light, /datum/action/item_action/toggle_welding_screen)
flash_protect = FLASH_PROTECTION_WELDER
+2 -6
View File
@@ -213,10 +213,6 @@
/obj/item/clothing/head/helmet/toggleable
visor_vars_to_toggle = NONE
dog_fashion = null
///chat message when the visor is toggled down.
var/toggle_message
///chat message when the visor is toggled up.
var/alt_toggle_message
/obj/item/clothing/head/helmet/toggleable/attack_self(mob/user)
adjust_visor(user)
@@ -230,8 +226,8 @@
desc = "It's a helmet specifically designed to protect against close range attacks."
icon_state = "riot"
inhand_icon_state = "riot_helmet"
toggle_message = "You pull the visor down on"
alt_toggle_message = "You push the visor up on"
toggle_message = "You pull the visor down"
alt_toggle_message = "You push the visor up"
armor_type = /datum/armor/toggleable_riot
flags_inv = HIDEHAIR|HIDEEARS|HIDEFACE|HIDESNOUT
strip_delay = 8 SECONDS
+2
View File
@@ -215,6 +215,8 @@ GLOBAL_LIST_INIT(clown_mask_options, list(
flash_protect = FLASH_PROTECTION_WELDER
custom_materials = list(/datum/material/iron=SHEET_MATERIAL_AMOUNT*2, /datum/material/glass=SHEET_MATERIAL_AMOUNT)
tint = 2
toggle_message = "You pull the visor down"
alt_toggle_message = "You push the visor up"
armor_type = /datum/armor/gas_welding
actions_types = list(/datum/action/item_action/toggle)
flags_inv = HIDEEARS|HIDEEYES|HIDEFACE|HIDESNOUT