mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 13:38:41 +01:00
Merges HEADBANGPROTECT and EARBANGPROTECT into new secondary flag (#24881)
Unless we get a clothing item that can be worn on the head, and the ears, and only protects from loud noises in one of the configurations, this isn't going to be an issue. Frees up another flag slot, all hail the secondary flags.
This commit is contained in:
@@ -171,11 +171,14 @@ var/list/damaged_clothes_icons = list()
|
||||
desc = "Protects your hearing from loud noises, and quiet ones as well."
|
||||
icon_state = "earmuffs"
|
||||
item_state = "earmuffs"
|
||||
flags = EARBANGPROTECT
|
||||
strip_delay = 15
|
||||
put_on_delay = 25
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/obj/item/clothing/ears/earmuffs/Initialize(mapload)
|
||||
..()
|
||||
SET_SECONDARY_FLAG(src, BANG_PROTECT)
|
||||
|
||||
//Glasses
|
||||
/obj/item/clothing/glasses
|
||||
name = "glasses"
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
name = "helmet"
|
||||
desc = "Standard Security gear. Protects the head from impacts."
|
||||
icon_state = "helmet"
|
||||
flags = HEADBANGPROTECT
|
||||
item_state = "helmet"
|
||||
armor = list(melee = 35, bullet = 30, laser = 30,energy = 10, bomb = 25, bio = 0, rad = 0, fire = 50, acid = 50)
|
||||
flags_inv = HIDEEARS
|
||||
@@ -17,8 +16,9 @@
|
||||
dog_fashion = /datum/dog_fashion/head/helmet
|
||||
|
||||
|
||||
/obj/item/clothing/head/helmet/New()
|
||||
/obj/item/clothing/head/helmet/Initialize()
|
||||
..()
|
||||
SET_SECONDARY_FLAG(src, BANG_PROTECT)
|
||||
|
||||
/obj/item/clothing/head/helmet/sec
|
||||
can_flashlight = 1
|
||||
@@ -44,7 +44,6 @@
|
||||
toggle_message = "You pull the visor down on"
|
||||
alt_toggle_message = "You push the visor up on"
|
||||
can_toggle = 1
|
||||
flags = HEADBANGPROTECT
|
||||
armor = list(melee = 45, bullet = 15, laser = 5,energy = 5, bomb = 5, bio = 2, rad = 0, fire = 50, acid = 50)
|
||||
flags_inv = HIDEEARS|HIDEFACE
|
||||
strip_delay = 80
|
||||
@@ -182,12 +181,16 @@
|
||||
icon_state = "knight_green"
|
||||
item_state = "knight_green"
|
||||
armor = list(melee = 41, bullet = 15, laser = 5,energy = 5, bomb = 5, bio = 2, rad = 0, fire = 0, acid = 50)
|
||||
flags = null
|
||||
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR
|
||||
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
|
||||
strip_delay = 80
|
||||
dog_fashion = null
|
||||
|
||||
/obj/item/clothing/head/helmet/knight/Initialize(mapload)
|
||||
..()
|
||||
// old knight helmets do not offer protection against loud noises
|
||||
CLEAR_SECONDARY_FLAG(src, BANG_PROTECT)
|
||||
|
||||
/obj/item/clothing/head/helmet/knight/blue
|
||||
icon_state = "knight_blue"
|
||||
item_state = "knight_blue"
|
||||
@@ -219,7 +222,6 @@
|
||||
//LightToggle
|
||||
|
||||
/obj/item/clothing/head/helmet/update_icon()
|
||||
|
||||
var/state = "[initial(icon_state)]"
|
||||
if(F)
|
||||
if(F.on)
|
||||
@@ -233,8 +235,6 @@
|
||||
var/mob/living/carbon/human/H = loc
|
||||
H.update_inv_head()
|
||||
|
||||
return
|
||||
|
||||
/obj/item/clothing/head/helmet/ui_action_click(mob/user, action)
|
||||
if(istype(action, /datum/action/item_action/toggle_helmet_flashlight))
|
||||
toggle_helmlight()
|
||||
@@ -293,7 +293,6 @@
|
||||
|
||||
playsound(user, 'sound/weapons/empty.ogg', 100, 1)
|
||||
update_helmlight(user)
|
||||
return
|
||||
|
||||
/obj/item/clothing/head/helmet/proc/update_helmlight(mob/user = null)
|
||||
if(F)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
return number
|
||||
|
||||
/mob/living/carbon/get_ear_protection()
|
||||
if(head && (head.flags & HEADBANGPROTECT))
|
||||
if(head && HAS_SECONDARY_FLAG(head, BANG_PROTECT))
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/check_projectile_dismemberment(obj/item/projectile/P, def_zone)
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
return number
|
||||
|
||||
/mob/living/carbon/human/get_ear_protection()
|
||||
if((ears && (ears.flags & EARBANGPROTECT)) || (head && (head.flags & HEADBANGPROTECT)))
|
||||
if((ears && HAS_SECONDARY_FLAG(ears, BANG_PROTECT)) || (head && HAS_SECONDARY_FLAG(head, BANG_PROTECT)))
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/human/on_hit(obj/item/projectile/P)
|
||||
|
||||
Reference in New Issue
Block a user