Files
VMSolidus 8998842f7a Large Variety Of Hard Dels (#21834)
I spent the entirety of today's event looking at hard dels with my new
digital minions. This was *nearly* every Hard Del that came up during
2/7/2026's event. It turns out that AI is extremely well suited to
hunting down circular references like this across an entire repo. This
PR was made with Antigravity-Gemini3Pro.

I have not yet tested this PR.

---------

Signed-off-by: VMSolidus <evilexecutive@gmail.com>
Co-authored-by: Wildkins <john.wildkins@gmail.com>
2026-02-17 15:57:11 +00:00

125 lines
3.4 KiB
Plaintext

/obj/structure/curtain
name = "curtain"
icon = 'icons/obj/curtain.dmi'
icon_state = "closed"
layer = ABOVE_WINDOW_LAYER
opacity = 1
density = 0
anchored = TRUE //curtains start secured in place
build_amt = 2
var/manipulating = FALSE //prevents queuing up multiple deconstructs and returning a bunch of cloth
var/curtain_material = MATERIAL_CLOTH
/obj/structure/curtain/Initialize()
. = ..()
material = SSmaterials.get_material_by_name(curtain_material)
AddComponent(TURF_HAND_COMPONENT)
/obj/structure/curtain/open
icon_state = "open"
layer = ABOVE_HUMAN_LAYER
opacity = 0
/obj/structure/curtain/bullet_act(obj/projectile/hitting_projectile, def_zone, piercing_hit)
. = ..()
if(. != BULLET_ACT_HIT)
return .
if(hitting_projectile.damage > 0)
visible_message(SPAN_WARNING("[hitting_projectile] tears [src] down!"))
qdel(src)
/obj/structure/curtain/attack_hand(mob/user)
playsound(get_turf(loc), 'sound/effects/curtain.ogg', 15, 1, -5)
toggle()
..()
/obj/structure/curtain/attack_ai(mob/user)
if(istype(user, /mob/living/silicon/robot) && Adjacent(user)) // Robots can open/close it, but not the AI.
attack_hand(user)
/obj/structure/curtain/attackby(obj/item/attacking_item, mob/user)
if(attacking_item.tool_behaviour == TOOL_WIRECUTTER || attacking_item.sharp && !attacking_item.noslice)
if(manipulating) return
manipulating = TRUE
visible_message(SPAN_NOTICE("[user] begins cutting down \the [src]."),
SPAN_NOTICE("You begin cutting down \the [src]."))
if(!attacking_item.use_tool(src, user, 30, volume = 50))
manipulating = FALSE
return
visible_message(SPAN_NOTICE("[user] cuts down \the [src]."),
SPAN_NOTICE("You cut down \the [src]."))
dismantle()
if(attacking_item.tool_behaviour == TOOL_SCREWDRIVER) //You can anchor/unanchor curtains
anchored = !anchored
var/obj/structure/curtain/C
for(C in src.loc)
if(C != src && C.anchored) //Can't secure more than one curtain in a tile
to_chat(user, "There is already a curtain secured here!")
return
attacking_item.play_tool_sound(get_turf(src), 50)
visible_message(SPAN_NOTICE("\The [src] has been [anchored ? "secured in place" : "unsecured"] by \the [user]."))
/obj/structure/curtain/proc/toggle()
src.set_opacity(!src.opacity)
if(opacity)
icon_state = "closed"
layer = ABOVE_HUMAN_LAYER
else
icon_state = "open"
layer = ABOVE_WINDOW_LAYER
/obj/structure/curtain/black
name = "black curtain"
color = "#222222"
/obj/structure/curtain/medical
name = "plastic curtain"
color = "#B8F5E3"
anchored = FALSE
alpha = 200
curtain_material = MATERIAL_PLASTIC
/obj/structure/curtain/open/medical
name = "plastic curtain"
color = "#B8F5E3"
anchored = FALSE
alpha = 200
curtain_material = MATERIAL_PLASTIC
/obj/structure/curtain/open/bed
name = "bed curtain"
color = "#854636"
/obj/structure/curtain/open/privacy
name = "privacy curtain"
color = "#B8F5E3"
anchored = FALSE
/obj/structure/curtain/open/shower
name = "shower curtain"
color = "#ACD1E9"
alpha = 200
/obj/structure/curtain/open/shower/engineering
color = "#FFA500"
/obj/structure/curtain/open/shower/security
color = "#AA0000"
/obj/structure/curtain/open/bar
name = "curtain"
color = "#792f27"
icon_state = "open"
/obj/structure/curtain/open/bar/toggle()
src.set_opacity(!src.opacity)
if(opacity)
icon_state = "closed"
layer = ABOVE_ABOVE_HUMAN_LAYER
else
icon_state = "open"
layer = ABOVE_ABOVE_HUMAN_LAYER