mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 12:35:33 +01:00
Merge pull request #13790 from tkdrg/niggers
Fixes invisible mask exploits
This commit is contained in:
@@ -471,27 +471,19 @@ BLIND // can't see anything
|
||||
H.update_inv_w_uniform()
|
||||
|
||||
/obj/item/clothing/proc/weldingvisortoggle() //Malk: proc to toggle welding visors on helmets, masks, goggles, etc.
|
||||
if(can_use(usr))
|
||||
if(up)
|
||||
up = !up
|
||||
flags |= (visor_flags)
|
||||
flags_inv |= (visor_flags_inv)
|
||||
flags_cover = initial(flags_cover)
|
||||
icon_state = initial(icon_state)
|
||||
usr << "<span class='notice'>You pull \the [src] down.</span>"
|
||||
flash_protect = initial(flash_protect)
|
||||
tint = initial(tint)
|
||||
else
|
||||
up = !up
|
||||
flags &= ~(visor_flags)
|
||||
flags_inv &= ~(visor_flags_inv)
|
||||
flags_cover &= 0
|
||||
icon_state = "[initial(icon_state)]up"
|
||||
usr << "<span class='notice'>You push \the [src] up.</span>"
|
||||
flash_protect = 0
|
||||
tint = 0
|
||||
if(!can_use(usr))
|
||||
return
|
||||
|
||||
if(istype(src, /obj/item/clothing/head)) //makes the mob-overlays update
|
||||
up ^= 1
|
||||
flags ^= visor_flags
|
||||
flags_inv ^= visor_flags_inv
|
||||
flags_cover ^= initial(flags_cover)
|
||||
icon_state = "[initial(icon_state)][up ? "up" : ""]"
|
||||
usr << "<span class='notice'>You adjust \the [src] [up ? "up" : "down"].</span>"
|
||||
flash_protect ^= initial(flash_protect)
|
||||
tint ^= initial(tint)
|
||||
|
||||
if(istype(src, /obj/item/clothing/head)) //makes the mob-overlays update //this is awful
|
||||
usr.update_inv_head()
|
||||
if(istype(src, /obj/item/clothing/glasses))
|
||||
usr.update_inv_glasses()
|
||||
@@ -499,7 +491,7 @@ BLIND // can't see anything
|
||||
usr.update_inv_wear_mask()
|
||||
if(istype(usr, /mob/living/carbon))
|
||||
var/mob/living/carbon/C = usr
|
||||
C.head_update(src) //updates based on the HIDE_ flags and fixes the sec hud
|
||||
C.head_update(src, forced = 1)
|
||||
|
||||
/obj/item/clothing/proc/can_use(mob/user)
|
||||
if(user && ismob(user))
|
||||
|
||||
@@ -52,26 +52,22 @@
|
||||
if(usr.canmove && !usr.stat && !usr.restrained() && can_toggle)
|
||||
if(world.time > cooldown + toggle_cooldown)
|
||||
cooldown = world.time
|
||||
up = !up
|
||||
if(up)
|
||||
flags &= ~(visor_flags)
|
||||
flags_inv &= ~(visor_flags_inv)
|
||||
flags_cover &= 0
|
||||
icon_state = "[initial(icon_state)]up"
|
||||
usr << "[alt_toggle_message] \the [src]"
|
||||
usr.update_inv_head()
|
||||
if(active_sound)
|
||||
while(up)
|
||||
playsound(src.loc, "[active_sound]", 100, 0, 4)
|
||||
sleep(15)
|
||||
else
|
||||
flags |= (visor_flags)
|
||||
flags_inv |= (visor_flags_inv)
|
||||
flags_cover = initial(flags_cover)
|
||||
icon_state = initial(icon_state)
|
||||
usr << "[toggle_message] \the [src]."
|
||||
usr.update_inv_head()
|
||||
up ^= 1
|
||||
flags ^= visor_flags
|
||||
flags_inv ^= visor_flags_inv
|
||||
flags_cover ^= initial(flags_cover)
|
||||
icon_state = "[initial(icon_state)][up ? "up" : ""]"
|
||||
usr << "[up ? alt_toggle_message : toggle_message] \the [src]"
|
||||
|
||||
usr.update_inv_head()
|
||||
if(istype(usr, /mob/living/carbon))
|
||||
var/mob/living/carbon/C = usr
|
||||
C.head_update(src, forced = 1)
|
||||
|
||||
if(active_sound)
|
||||
while(up)
|
||||
playsound(src.loc, "[active_sound]", 100, 0, 4)
|
||||
sleep(15)
|
||||
|
||||
/obj/item/clothing/head/helmet/justice
|
||||
name = "helmet of justice"
|
||||
|
||||
@@ -216,6 +216,9 @@
|
||||
playsound(src.loc, 'sound/mecha/mechmove03.ogg', 50, 1)
|
||||
toggle_hardsuit_mode(user)
|
||||
user.update_inv_head()
|
||||
if(istype(user, /mob/living/carbon))
|
||||
var/mob/living/carbon/C = user
|
||||
C.head_update(src, forced = 1)
|
||||
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/syndi/proc/toggle_hardsuit_mode(mob/user) //Helmet Toggles Suit Mode
|
||||
if(linkedsuit)
|
||||
|
||||
@@ -193,12 +193,12 @@
|
||||
sec_hud_set_security_status()
|
||||
..()
|
||||
|
||||
/mob/living/carbon/human/head_update(obj/item/I)
|
||||
if(I.flags & BLOCKHAIR)
|
||||
/mob/living/carbon/human/head_update(obj/item/I, forced)
|
||||
if(I.flags & BLOCKHAIR || forced)
|
||||
update_hair()
|
||||
if(I.flags_inv & HIDEEYES)
|
||||
if(I.flags_inv & HIDEEYES || forced)
|
||||
update_inv_glasses()
|
||||
if(I.flags_inv & HIDEEARS)
|
||||
if(I.flags_inv & HIDEEARS || forced)
|
||||
update_body()
|
||||
sec_hud_set_security_status()
|
||||
..()
|
||||
@@ -300,4 +300,4 @@
|
||||
if(!O)
|
||||
return 0
|
||||
|
||||
return O.equip(src, visualsOnly)
|
||||
return O.equip(src, visualsOnly)
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
update_inv_wear_mask()
|
||||
|
||||
//handle stuff to update when a mob equips/unequips a headgear.
|
||||
/mob/living/carbon/proc/head_update(obj/item/I)
|
||||
if(I.flags_inv & HIDEMASK)
|
||||
/mob/living/carbon/proc/head_update(obj/item/I, forced)
|
||||
if(I.flags_inv & HIDEMASK || forced)
|
||||
update_inv_wear_mask()
|
||||
update_inv_head()
|
||||
|
||||
Reference in New Issue
Block a user