-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reworks Curtains #28163
base: master
Are you sure you want to change the base?
Reworks Curtains #28163
Changes from all commits
e25e9bc
d61bdef
a06f2c8
347998d
e745761
2e73856
5a1686b
a0f56ee
4751b81
f63e81c
31e2821
c18984d
a72bf72
ebad2d5
d9ab1fc
50cb7d2
5c8e25e
2789ba2
d72503f
12b0fce
f702ff5
96b7db6
5d564bf
51d3e84
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -9,17 +9,122 @@ | |||||||||
layer = SHOWER_CLOSED_LAYER | ||||||||||
opacity = TRUE | ||||||||||
density = FALSE | ||||||||||
var/image/overlay = null | ||||||||||
new_attack_chain = TRUE | ||||||||||
var/assembled = FALSE | ||||||||||
var/overlay_color = "#ffffff" | ||||||||||
var/overlay_alpha = 255 | ||||||||||
|
||||||||||
|
||||||||||
/obj/structure/curtain/Initialize(mapload) | ||||||||||
. = ..() | ||||||||||
if(opacity) | ||||||||||
icon_state = "closed" | ||||||||||
overlay = image("closed_overlay") | ||||||||||
overlay.color = overlay_color | ||||||||||
overlay.alpha = overlay_alpha | ||||||||||
add_overlay(overlay) | ||||||||||
layer = SHOWER_CLOSED_LAYER | ||||||||||
else | ||||||||||
icon_state = "open" | ||||||||||
overlay = image("open_overlay") | ||||||||||
overlay.color = overlay_color | ||||||||||
overlay.alpha = overlay_alpha | ||||||||||
add_overlay(overlay) | ||||||||||
layer = SHOWER_OPEN_LAYER | ||||||||||
|
||||||||||
/obj/structure/curtain/open | ||||||||||
icon_state = "open" | ||||||||||
layer = SHOWER_OPEN_LAYER | ||||||||||
opacity = FALSE | ||||||||||
|
||||||||||
/obj/item/mounted/curtain/curtain_fixture | ||||||||||
icon_state = "handheld" | ||||||||||
icon = 'icons/obj/curtain.dmi' | ||||||||||
name = "\improper curtain rod assembly" | ||||||||||
new_attack_chain = TRUE | ||||||||||
|
||||||||||
/obj/item/mounted/curtain/curtain_fixture/interact_with_atom(atom/target, mob/living/user, list/modifiers) | ||||||||||
. = ..() | ||||||||||
if(!istype(target,/obj/structure/window) && !istype(target,/turf/simulated/wall/)) | ||||||||||
return | ||||||||||
var/on_wall = get_turf(target) | ||||||||||
to_chat(user, "<span class='notice'>You begin attaching [src] to the [on_wall].</span>") | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
playsound(get_turf(src), 'sound/machines/click.ogg', 75, TRUE) | ||||||||||
if(!do_after(user, 3 SECONDS, target = on_wall)) | ||||||||||
return | ||||||||||
var/obj/structure/curtain/assembly/new_curtain = new /obj/structure/curtain/assembly(on_wall) | ||||||||||
new_curtain.fingerprints = src.fingerprints | ||||||||||
new_curtain.fingerprintshidden = src.fingerprintshidden | ||||||||||
new_curtain.fingerprintslast = src.fingerprintslast | ||||||||||
|
||||||||||
user.visible_message("<span class='notice'>[user] attaches the [src] to the [on_wall].</span>", \ | ||||||||||
"<span class='notice'>You attach the [src] to the [on_wall].</span>") | ||||||||||
Comment on lines
+61
to
+62
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
qdel(src) | ||||||||||
|
||||||||||
/obj/item/mounted/curtain/curtain_fixture/activate_self(mob/user) | ||||||||||
. = ..() | ||||||||||
to_chat(user, "<span class='notice'>You begin attaching [src] to the ceiling.</span>") | ||||||||||
playsound(get_turf(src), 'sound/machines/click.ogg', 75, TRUE) | ||||||||||
if(!do_after(user, 3 SECONDS, target = get_turf(user))) | ||||||||||
return | ||||||||||
var/obj/structure/curtain/assembly/new_curtain = new /obj/structure/curtain/assembly(get_turf(user)) | ||||||||||
new_curtain.fingerprints = src.fingerprints | ||||||||||
new_curtain.fingerprintshidden = src.fingerprintshidden | ||||||||||
new_curtain.fingerprintslast = src.fingerprintslast | ||||||||||
|
||||||||||
user.visible_message("<span class='notice'>[user] attaches the [src] to the ceiling.</span>", \ | ||||||||||
"<span class='notice'>You attach the [src] to the ceiling.</span>") | ||||||||||
qdel(src) | ||||||||||
|
||||||||||
|
||||||||||
Alecksohs marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
|
||||||||||
/obj/structure/curtain/assembly | ||||||||||
icon_state = "assembly0" | ||||||||||
name = "Curtain Rod" | ||||||||||
opacity = FALSE | ||||||||||
density = FALSE | ||||||||||
desc = "A curtain assembly! It needs a <b>material</b>." | ||||||||||
|
||||||||||
/obj/structure/curtain/assembly/examine(mob/user) | ||||||||||
. = ..() | ||||||||||
. += "<span class='notice'>Alt-Click to take it down.</span>" | ||||||||||
|
||||||||||
/obj/structure/curtain/assembly/AltClick(mob/user) | ||||||||||
if(user.incapacitated()) | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>") | ||||||||||
return | ||||||||||
if(!Adjacent(user)) | ||||||||||
return | ||||||||||
// TODO: turn back into assembly item | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TODO here, planning on doing it in this PR? |
||||||||||
new /obj/item/mounted/curtain/curtain_fixture(get_turf(user)) | ||||||||||
playsound(loc, 'sound/effects/salute.ogg' , 75, TRUE) | ||||||||||
qdel(src) | ||||||||||
|
||||||||||
/obj/structure/curtain/assembly/item_interaction(mob/living/user, obj/item/used, list/modifiers) | ||||||||||
if(istype(used, /obj/item/stack/sheet/cloth)) // Are we putting the cloth onto the assembly on the wall? | ||||||||||
var/obj/item/stack/sheet/cloth/cloth_used = used | ||||||||||
if(!cloth_used.use(2)) | ||||||||||
to_chat(user, "<span class='warning'> You need two sheets of cloth to hang the curtains.</span>") | ||||||||||
return ITEM_INTERACT_COMPLETE | ||||||||||
|
||||||||||
var/obj/structure/curtain/new_curtain = new /obj/structure/curtain/(loc, 1) | ||||||||||
new_curtain.assembled = TRUE | ||||||||||
playsound(loc, used.drop_sound, 75, TRUE) // Play a generic cloth sound. | ||||||||||
qdel(src) | ||||||||||
|
||||||||||
return ITEM_INTERACT_COMPLETE | ||||||||||
|
||||||||||
/obj/structure/curtain/attack_hand(mob/user) | ||||||||||
playsound(get_turf(loc), "rustle", 15, TRUE, -5) | ||||||||||
toggle() | ||||||||||
..() | ||||||||||
/obj/structure/curtain/attack_robot(mob/living/user) | ||||||||||
. = ..() | ||||||||||
playsound(get_turf(loc), "rustle", 15, TRUE, -5) | ||||||||||
toggle() | ||||||||||
..() | ||||||||||
Alecksohs marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
|
||||||||||
|
||||||||||
/obj/structure/curtain/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) | ||||||||||
switch(damage_type) | ||||||||||
|
@@ -33,11 +138,20 @@ | |||||||||
|
||||||||||
/obj/structure/curtain/proc/toggle() | ||||||||||
set_opacity(!opacity) | ||||||||||
cut_overlays() | ||||||||||
if(opacity) | ||||||||||
icon_state = "closed" | ||||||||||
overlay = image("closed_overlay") | ||||||||||
overlay.color = overlay_color | ||||||||||
overlay.alpha = overlay_alpha | ||||||||||
add_overlay(overlay) | ||||||||||
layer = SHOWER_CLOSED_LAYER | ||||||||||
else | ||||||||||
icon_state = "open" | ||||||||||
overlay = image("open_overlay") | ||||||||||
overlay.color = overlay_color | ||||||||||
overlay.alpha = overlay_alpha | ||||||||||
add_overlay(overlay) | ||||||||||
layer = SHOWER_OPEN_LAYER | ||||||||||
Comment on lines
142
to
155
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you move these to an |
||||||||||
|
||||||||||
/obj/structure/curtain/item_interaction(mob/living/user, obj/item/used, list/modifiers) | ||||||||||
|
@@ -68,39 +182,49 @@ | |||||||||
. = TRUE | ||||||||||
if(!I.tool_start_check(src, user, 0)) | ||||||||||
return | ||||||||||
if(assembled) | ||||||||||
WIRECUTTER_ATTEMPT_DISMANTLE_MESSAGE | ||||||||||
if(I.use_tool(src,user, 5 SECONDS, volume = I.tool_volume)) | ||||||||||
WIRECUTTER_DISMANTLE_SUCCESS_MESSAGE | ||||||||||
var/obj/structure/curtain/assembly/new_assembly = new /obj/structure/curtain/assembly(loc, 1) | ||||||||||
new_assembly.assembled = TRUE | ||||||||||
var/obj/item/stack/sheet/cloth/dropped_cloth = new /obj/item/stack/sheet/cloth(loc, 2) | ||||||||||
qdel(src) | ||||||||||
return | ||||||||||
return | ||||||||||
|
||||||||||
WIRECUTTER_ATTEMPT_DISMANTLE_MESSAGE | ||||||||||
if(I.use_tool(src, user, 50, volume = I.tool_volume)) | ||||||||||
if(I.use_tool(src, user, 5 SECONDS, volume = I.tool_volume)) | ||||||||||
WIRECUTTER_DISMANTLE_SUCCESS_MESSAGE | ||||||||||
deconstruct() | ||||||||||
|
||||||||||
/obj/structure/curtain/deconstruct(disassembled = TRUE) | ||||||||||
new /obj/item/stack/sheet/cloth(loc, 2) | ||||||||||
new /obj/item/stack/sheet/plastic(loc, 2) | ||||||||||
new /obj/item/stack/rods(loc, 1) | ||||||||||
qdel(src) | ||||||||||
|
||||||||||
/obj/structure/curtain/black | ||||||||||
name = "black curtain" | ||||||||||
color = "#222222" | ||||||||||
overlay_color = "#222222" | ||||||||||
|
||||||||||
/obj/structure/curtain/medical | ||||||||||
name = "plastic curtain" | ||||||||||
color = "#B8F5E3" | ||||||||||
alpha = 200 | ||||||||||
overlay_color = "#B8F5E3" | ||||||||||
overlay_alpha = 200 | ||||||||||
|
||||||||||
/obj/structure/curtain/open/shower | ||||||||||
name = "shower curtain" | ||||||||||
color = "#ACD1E9" | ||||||||||
alpha = 200 | ||||||||||
overlay_color = "#7aa6c4" | ||||||||||
overlay_alpha = 200 | ||||||||||
|
||||||||||
/obj/structure/curtain/open/shower/engineering | ||||||||||
color = "#FFA500" | ||||||||||
overlay_color = "#FFA500" | ||||||||||
|
||||||||||
/obj/structure/curtain/open/shower/security | ||||||||||
color = "#AA0000" | ||||||||||
overlay_color = "#AA0000" | ||||||||||
|
||||||||||
/obj/structure/curtain/open/shower/centcom | ||||||||||
color = "#000066" | ||||||||||
overlay_color = "#000066" | ||||||||||
|
||||||||||
#undef SHOWER_OPEN_LAYER | ||||||||||
#undef SHOWER_CLOSED_LAYER |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.