Files
Aurora.3/code/game/objects/structures/curtains.dm
T
MnemeoryandGitHub 5a1bd08d69 Bar Remodel; Control Hub; and Idris Smart Switch (#21437)
This PR does the following:
1. Creates a control hub variant to eliminate the need for using
multiple buttons (mostly so the bar wouldn't have like 5 of them, and i
could make it prettier, but it's extendable for other button
types/locations).
2. Creates a light switch variant which controls the color and
brightness of the lights in the area it's placed in.
3. Creatures a secure safe variant which relies on an ID, instead of an
access code.
4. Remodels the Bar

###IMAGES/VIDEO
<details>
**<summary>Control Hub/Idris Smart Switch</summary>**


https://github.com/user-attachments/assets/8b16698a-df50-444e-8428-d85ac07ddbbf
</details>

<details>
<summary> Bar Remodel (Final as of Oct. 17, 2025) </summary>
<img width="652" height="649" alt="finalbar1"
src="https://github.com/user-attachments/assets/3f8a9a47-ebb6-447d-906a-695dd3f200ce"
/>
<img width="977" height="952" alt="finalbar2"
src="https://github.com/user-attachments/assets/f09e48a3-8d3c-4922-9e2b-0e65f5ac2540"
/>
<img width="590" height="548" alt="finalbar3"
src="https://github.com/user-attachments/assets/923e0763-fe6c-4428-9556-9d98b869327b"
/>
<img width="655" height="596" alt="finalbar4"
src="https://github.com/user-attachments/assets/13ce66af-6e6e-4b93-b9b3-b21d5290d0f8"
/>
<img width="499" height="465" alt="finalbar5"
src="https://github.com/user-attachments/assets/98d54f51-1422-4a50-9806-aa9d20ee112e"
/>
<img width="727" height="482" alt="finalbar6"
src="https://github.com/user-attachments/assets/b16c12bf-91e1-4668-930b-db2fd0dbaf31"
/>
<img width="692" height="638" alt="finalbar7"
src="https://github.com/user-attachments/assets/c994ea1c-d46d-4988-b5d8-5ac465b4bee9"
/>
<img width="432" height="877" alt="finalbar8"
src="https://github.com/user-attachments/assets/765a451c-e88a-4f19-a40c-716aa376d7c2"
/>

</details>
2025-10-19 10:19:06 +00:00

125 lines
3.3 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(/datum/component/turf_hand)
/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.iswirecutter() || 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.isscrewdriver()) //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