Skip to content
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

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open

Reworks Curtains #28163

wants to merge 24 commits into from

Conversation

Alecksohs
Copy link
Contributor

@Alecksohs Alecksohs commented Jan 28, 2025

What Does This PR Do

Reworks curtains. Makes Curtains a craftable fixture, like light tubes. Craft with Iron Rod, can put on walls, windows, or use in your hand to put it where you're standing on the ceiling. Apply cloth to turn into normal curtain. Use wirecutters to revert to assembly. Alt click assembly to turn into fixture item.

Additionally Resprites them.

Why It's Good For The Game

Eases the placement of curtains, removes them from the realm of the crafting menu. No more deconstructing the window to put up a curtain.

Images of changes

2025-01-28.02-12-06_edit.mp4

Testing

Did all of the interactions, works. I also made it compatible with borgs. You're welcome, Crunch.


Declaration

  • I confirm that I either do not require pre-approval for this PR, or I have obtained such approval and have included a screenshot to demonstrate this below.

Changelog

🆑
tweak: Reworks Curtains
/:cl:

@ParadiseSS13-Bot ParadiseSS13-Bot added -Status: Awaiting type assignment This PR is waiting for its type to be assigned internally Sprites This PR modifies the game sprites labels Jan 28, 2025
@CinnamonSnowball
Copy link
Contributor

The resprite could probably be a separate PR, or at the very least mentioned in the PR description.

@1080pCat 1080pCat added the Tweak This PR tweaks something ingame label Jan 28, 2025
@ParadiseSS13-Bot ParadiseSS13-Bot added -Status: Awaiting approval This PR is waiting for approval internally and removed -Status: Awaiting type assignment This PR is waiting for its type to be assigned internally labels Jan 28, 2025
Co-authored-by: CRUNCH <143041327+Fordoxia@users.noreply.github.com>
Signed-off-by: Tojo <32783144+Alecksohs@users.noreply.github.com>
@ParadiseSS13-Bot ParadiseSS13-Bot added -Status: Awaiting review This PR is awaiting review from the review team and removed -Status: Awaiting approval This PR is waiting for approval internally labels Jan 28, 2025
@Alecksohs
Copy link
Contributor Author

image
image
image
image

New sprites and overlay code.

@Alecksohs
Copy link
Contributor Author

WOOOOOOOOO TIME TO MIGRATE THE ENTIRETY OF ITEM/MOUNTED TO THE NEW ATTACKCHAIN

code/game/objects/structures/curtains.dm Outdated Show resolved Hide resolved
code/game/objects/structures/curtains.dm Outdated Show resolved Hide resolved
code/game/objects/structures/curtains.dm Outdated Show resolved Hide resolved
code/game/objects/structures/curtains.dm Outdated Show resolved Hide resolved
code/game/objects/structures/curtains.dm Outdated Show resolved Hide resolved
code/game/objects/structures/curtains.dm Outdated Show resolved Hide resolved
code/game/objects/structures/curtains.dm Outdated Show resolved Hide resolved
code/game/objects/structures/curtains.dm Outdated Show resolved Hide resolved
code/game/objects/structures/curtains.dm Outdated Show resolved Hide resolved
code/game/objects/structures/curtains.dm Outdated Show resolved Hide resolved
Alecksohs and others added 7 commits February 10, 2025 15:41
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Signed-off-by: Tojo <32783144+Alecksohs@users.noreply.github.com>
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Signed-off-by: Tojo <32783144+Alecksohs@users.noreply.github.com>
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Signed-off-by: Tojo <32783144+Alecksohs@users.noreply.github.com>
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Signed-off-by: Tojo <32783144+Alecksohs@users.noreply.github.com>
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Signed-off-by: Tojo <32783144+Alecksohs@users.noreply.github.com>
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Signed-off-by: Tojo <32783144+Alecksohs@users.noreply.github.com>
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Signed-off-by: Tojo <32783144+Alecksohs@users.noreply.github.com>
Alecksohs and others added 7 commits February 10, 2025 15:42
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Signed-off-by: Tojo <32783144+Alecksohs@users.noreply.github.com>
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Signed-off-by: Tojo <32783144+Alecksohs@users.noreply.github.com>
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Signed-off-by: Tojo <32783144+Alecksohs@users.noreply.github.com>
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Signed-off-by: Tojo <32783144+Alecksohs@users.noreply.github.com>
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Signed-off-by: Tojo <32783144+Alecksohs@users.noreply.github.com>
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Signed-off-by: Tojo <32783144+Alecksohs@users.noreply.github.com>
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Signed-off-by: Tojo <32783144+Alecksohs@users.noreply.github.com>
@ParadiseSS13-Bot ParadiseSS13-Bot added -Status: Awaiting merge This PR is ready for merge and removed -Status: Awaiting review This PR is awaiting review from the review team labels Feb 10, 2025

/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/))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if(!istype(target,/obj/structure/window) && !istype(target,/turf/simulated/wall/))
if(!istype(target ,/obj/structure/window) && !istype(target, /turf/simulated/wall/))

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>")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
to_chat(user, "<span class='notice'>You begin attaching [src] to the [on_wall].</span>")
to_chat(user, "<span class='notice'>You begin attaching [src] to [on_wall].</span>")

Comment on lines +61 to +62
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>")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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>")
user.visible_message("<span class='notice'>[user] attaches the [src] to [on_wall].</span>", \
"<span class='notice'>You attach the [src] to [on_wall].</span>")

return
if(!Adjacent(user))
return
// TODO: turn back into assembly item
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO here, planning on doing it in this PR?

. += "<span class='notice'>Alt-Click to take it down.</span>"

/obj/structure/curtain/assembly/AltClick(mob/user)
if(user.incapacitated())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if(user.incapacitated())
if(HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))

Comment on lines 142 to 155
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you move these to an update_overlays() call (and similar procs for the other things) and use the update_appearance() framework? I see this is duplicated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-Status: Awaiting merge This PR is ready for merge Sprites This PR modifies the game sprites Tweak This PR tweaks something ingame
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

7 participants