mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Repath blindfolds to prevent regular sunglasses creation exploit (#41710)
Blindfolds don't actually need to inherit anything from sunglasses, from what I can see, unless there's some bad type checking somewhere in the code that I'm not aware of. Exploit is: cloth makes blindfold + medHUD -> medHUD sunglasses -> remove medHUD, regular sunglasses.
This commit is contained in:
@@ -22730,7 +22730,7 @@
|
||||
/obj/structure/bed,
|
||||
/obj/item/clothing/suit/straight_jacket,
|
||||
/obj/item/clothing/mask/muzzle,
|
||||
/obj/item/clothing/glasses/sunglasses/blindfold,
|
||||
/obj/item/clothing/glasses/blindfold,
|
||||
/obj/effect/turf_decal/tile/red{
|
||||
dir = 1
|
||||
},
|
||||
@@ -22746,7 +22746,7 @@
|
||||
/obj/structure/bed,
|
||||
/obj/item/clothing/suit/straight_jacket,
|
||||
/obj/item/clothing/mask/muzzle,
|
||||
/obj/item/clothing/glasses/sunglasses/blindfold,
|
||||
/obj/item/clothing/glasses/blindfold,
|
||||
/obj/effect/turf_decal/tile/red,
|
||||
/obj/effect/turf_decal/tile/red{
|
||||
dir = 4
|
||||
@@ -106951,7 +106951,7 @@
|
||||
},
|
||||
/obj/item/clothing/suit/straight_jacket,
|
||||
/obj/item/clothing/mask/muzzle,
|
||||
/obj/item/clothing/glasses/sunglasses/blindfold,
|
||||
/obj/item/clothing/glasses/blindfold,
|
||||
/obj/item/clothing/ears/earmuffs,
|
||||
/obj/item/gun/syringe,
|
||||
/obj/item/clothing/glasses/eyepatch,
|
||||
|
||||
@@ -818,7 +818,7 @@
|
||||
"abW" = (
|
||||
/obj/structure/bed,
|
||||
/obj/item/clothing/suit/straight_jacket,
|
||||
/obj/item/clothing/glasses/sunglasses/blindfold,
|
||||
/obj/item/clothing/glasses/blindfold,
|
||||
/obj/item/clothing/mask/muzzle,
|
||||
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,
|
||||
/obj/item/electropack,
|
||||
@@ -1531,7 +1531,7 @@
|
||||
"adg" = (
|
||||
/obj/structure/bed,
|
||||
/obj/item/clothing/suit/straight_jacket,
|
||||
/obj/item/clothing/glasses/sunglasses/blindfold,
|
||||
/obj/item/clothing/glasses/blindfold,
|
||||
/obj/item/clothing/mask/muzzle,
|
||||
/turf/open/floor/plasteel/white,
|
||||
/area/security/prison)
|
||||
@@ -1544,7 +1544,7 @@
|
||||
"adi" = (
|
||||
/obj/structure/bed,
|
||||
/obj/item/clothing/suit/straight_jacket,
|
||||
/obj/item/clothing/glasses/sunglasses/blindfold,
|
||||
/obj/item/clothing/glasses/blindfold,
|
||||
/obj/item/clothing/mask/muzzle,
|
||||
/obj/structure/cable/yellow{
|
||||
icon_state = "4-8"
|
||||
@@ -60274,7 +60274,7 @@
|
||||
/obj/item/clothing/mask/muzzle,
|
||||
/obj/item/gun/syringe,
|
||||
/obj/item/clothing/glasses/eyepatch,
|
||||
/obj/item/clothing/glasses/sunglasses/blindfold,
|
||||
/obj/item/clothing/glasses/blindfold,
|
||||
/obj/item/clothing/ears/earmuffs,
|
||||
/obj/item/storage/belt/medical{
|
||||
pixel_y = 2
|
||||
|
||||
@@ -28,9 +28,9 @@
|
||||
|
||||
/datum/quirk/blindness/on_spawn()
|
||||
var/mob/living/carbon/human/H = quirk_holder
|
||||
var/obj/item/clothing/glasses/sunglasses/blindfold/white/glasses = new(get_turf(H))
|
||||
if(!H.equip_to_slot_if_possible(glasses, SLOT_GLASSES, bypass_equip_delay_self = TRUE)) //if you can't put it on the user's eyes, put it in their hands, otherwise put it on their eyes
|
||||
H.put_in_hands(glasses)
|
||||
var/obj/item/clothing/glasses/blindfold/white/B = new(get_turf(H))
|
||||
if(!H.equip_to_slot_if_possible(B, SLOT_GLASSES, bypass_equip_delay_self = TRUE)) //if you can't put it on the user's eyes, put it in their hands, otherwise put it on their eyes
|
||||
H.put_in_hands(B)
|
||||
H.regenerate_icons()
|
||||
|
||||
/datum/quirk/brainproblems
|
||||
|
||||
@@ -47,14 +47,14 @@
|
||||
items = list(
|
||||
/obj/item/clothing/under/schoolgirl,
|
||||
/obj/item/clothing/head/kitty,
|
||||
/obj/item/clothing/glasses/sunglasses/blindfold)
|
||||
/obj/item/clothing/glasses/blindfold)
|
||||
|
||||
/obj/effect/spawner/bundle/costume/maid
|
||||
name = "maid costume spawner"
|
||||
items = list(
|
||||
/obj/item/clothing/under/skirt/black,
|
||||
/obj/effect/spawner/lootdrop/minor/beret_or_rabbitears,
|
||||
/obj/item/clothing/glasses/sunglasses/blindfold)
|
||||
/obj/item/clothing/glasses/blindfold)
|
||||
|
||||
|
||||
/obj/effect/spawner/bundle/costume/butler
|
||||
|
||||
@@ -248,7 +248,7 @@ GLOBAL_LIST_INIT(cloth_recipes, list ( \
|
||||
new/datum/stack_recipe("white softcap", /obj/item/clothing/head/soft/mime, 2), \
|
||||
new/datum/stack_recipe("white beanie", /obj/item/clothing/head/beanie, 2), \
|
||||
null, \
|
||||
new/datum/stack_recipe("blindfold", /obj/item/clothing/glasses/sunglasses/blindfold, 2), \
|
||||
new/datum/stack_recipe("blindfold", /obj/item/clothing/glasses/blindfold, 2), \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/cloth
|
||||
|
||||
@@ -253,42 +253,44 @@
|
||||
weldingvisortoggle(user)
|
||||
|
||||
|
||||
/obj/item/clothing/glasses/sunglasses/blindfold
|
||||
/obj/item/clothing/glasses/blindfold
|
||||
name = "blindfold"
|
||||
desc = "Covers the eyes, preventing sight."
|
||||
icon_state = "blindfold"
|
||||
item_state = "blindfold"
|
||||
flash_protect = 2
|
||||
tint = 3 // to make them blind
|
||||
tint = 3
|
||||
darkness_view = 1
|
||||
dog_fashion = /datum/dog_fashion/head
|
||||
|
||||
/obj/item/clothing/glasses/sunglasses/blindfold/equipped(mob/living/carbon/human/user, slot)
|
||||
/obj/item/clothing/glasses/blindfold/equipped(mob/living/carbon/human/user, slot)
|
||||
. = ..()
|
||||
if(slot == SLOT_GLASSES)
|
||||
user.become_blind("blindfold_[REF(src)]")
|
||||
|
||||
/obj/item/clothing/glasses/sunglasses/blindfold/dropped(mob/living/carbon/human/user)
|
||||
/obj/item/clothing/glasses/blindfold/dropped(mob/living/carbon/human/user)
|
||||
..()
|
||||
user.cure_blind("blindfold_[REF(src)]")
|
||||
|
||||
/obj/item/clothing/glasses/sunglasses/blindfold/white
|
||||
/obj/item/clothing/glasses/blindfold/white
|
||||
name = "blind personnel blindfold"
|
||||
desc = "Indicates that the wearer suffers from blindness."
|
||||
icon_state = "blindfoldwhite"
|
||||
item_state = "blindfoldwhite"
|
||||
var/colored_before = FALSE
|
||||
|
||||
/obj/item/clothing/glasses/sunglasses/blindfold/white/equipped(mob/living/carbon/human/user, slot)
|
||||
/obj/item/clothing/glasses/blindfold/white/equipped(mob/living/carbon/human/user, slot)
|
||||
if(ishuman(user) && slot == SLOT_GLASSES)
|
||||
update_icon(user)
|
||||
user.update_inv_glasses() //Color might have been changed by update_icon.
|
||||
..()
|
||||
|
||||
/obj/item/clothing/glasses/sunglasses/blindfold/white/update_icon(mob/living/carbon/human/user)
|
||||
/obj/item/clothing/glasses/blindfold/white/update_icon(mob/living/carbon/human/user)
|
||||
if(ishuman(user) && !colored_before)
|
||||
add_atom_colour("#[user.eye_color]", FIXED_COLOUR_PRIORITY)
|
||||
colored_before = TRUE
|
||||
|
||||
/obj/item/clothing/glasses/sunglasses/blindfold/white/worn_overlays(isinhands = FALSE, file2use)
|
||||
/obj/item/clothing/glasses/blindfold/white/worn_overlays(isinhands = FALSE, file2use)
|
||||
. = list()
|
||||
if(!isinhands && ishuman(loc) && !colored_before)
|
||||
var/mob/living/carbon/human/H = loc
|
||||
|
||||
@@ -356,7 +356,7 @@
|
||||
uniform = /obj/item/clothing/under/color/black
|
||||
shoes = /obj/item/clothing/shoes/sneakers/black
|
||||
suit = /obj/item/clothing/suit/toggle/labcoat
|
||||
glasses = /obj/item/clothing/glasses/sunglasses/blindfold
|
||||
glasses = /obj/item/clothing/glasses/blindfold
|
||||
back = /obj/item/tank/internals/oxygen
|
||||
mask = /obj/item/clothing/mask/breath
|
||||
if("Cultist")
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
/obj/item/clothing/head/powdered_wig = 1,
|
||||
/obj/item/gun/magic/wand = 2,
|
||||
/obj/item/clothing/glasses/sunglasses/garb = 2,
|
||||
/obj/item/clothing/glasses/sunglasses/blindfold = 1,
|
||||
/obj/item/clothing/glasses/blindfold = 1,
|
||||
/obj/item/clothing/mask/muzzle = 2)
|
||||
premium = list(/obj/item/clothing/suit/pirate/captain = 2,
|
||||
/obj/item/clothing/head/pirate/captain = 2,
|
||||
|
||||
Reference in New Issue
Block a user