From 25c616e353142502f37473d36e5d1ae45da9df7b Mon Sep 17 00:00:00 2001 From: jimmyl <70376633+mc-oofert@users.noreply.github.com> Date: Sun, 1 Dec 2024 13:39:29 +0100 Subject: [PATCH] fixes the museum cafeteria puzzle and some other things related to the museum (#88287) ## About The Pull Request the dotted color board was missing a color for the 10th digit, and orange and brown were not valid byond colors (damn you ghommie) fake scrubbers and vents use the correct layer and plane you may no longer deconstruct indestructible windows you can no longer push indestructible grilles and robust windows if you have a strong move force step teleporters may not teleport abstract objects or mirage holders (due to init shenanigans this sometimes teleported a mirage holder messing the visuals up) ## Why It's Good For The Game bug bad also i didnt make these bugs ok ## Changelog :cl: fix: fixed the museum password puzzle (to the cafeteria), and the scrubbers and vents there now look correctly (also fixed a rare visual bug) fix: it is now harder to bypass indestructible windows and grilles (those are placed there for a reason, you know!) /:cl: --- code/game/objects/effects/step_triggers.dm | 12 ++++++------ code/game/objects/items/puzzle_pieces.dm | 5 +++-- code/game/objects/structures/grille.dm | 3 ++- code/game/objects/structures/window.dm | 6 +++++- code/modules/awaymissions/mission_code/murderdome.dm | 11 +++-------- .../mapfluff/ruins/objects_and_mobs/museum.dm | 8 ++++---- 6 files changed, 23 insertions(+), 22 deletions(-) diff --git a/code/game/objects/effects/step_triggers.dm b/code/game/objects/effects/step_triggers.dm index 31ca55a54fb..0920b8e8b72 100644 --- a/code/game/objects/effects/step_triggers.dm +++ b/code/game/objects/effects/step_triggers.dm @@ -17,15 +17,15 @@ /obj/effect/step_trigger/proc/Trigger(atom/movable/A) return 0 -/obj/effect/step_trigger/proc/on_entered(datum/source, H as mob|obj) +/obj/effect/step_trigger/proc/on_entered(datum/source, atom/movable/entering) SIGNAL_HANDLER - if(!H || H == src) + if(!entering || entering == src || entering.invisibility >= INVISIBILITY_ABSTRACT || istype(entering, /atom/movable/mirage_holder)) //dont teleport ourselves, abstract objects, and mirage holders due to init shenanigans return - if(isobserver(H) && !affect_ghosts) + if(isobserver(entering) && !affect_ghosts) return - if(!ismob(H) && mobs_only) + if(!ismob(entering) && mobs_only) return - INVOKE_ASYNC(src, PROC_REF(Trigger), H) + INVOKE_ASYNC(src, PROC_REF(Trigger), entering) /obj/effect/step_trigger/singularity_act() @@ -144,7 +144,7 @@ var/teleport_x_offset = 0 var/teleport_y_offset = 0 -/obj/effect/step_trigger/teleporter/offset/on_entered(datum/source, H as mob|obj, atom/old_loc) +/obj/effect/step_trigger/teleporter/offset/on_entered(datum/source, atom/movable/entered, atom/old_loc) if(!old_loc?.Adjacent(loc)) // prevents looping, if we were teleported into this then the old loc is usually not adjacent return return ..() diff --git a/code/game/objects/items/puzzle_pieces.dm b/code/game/objects/items/puzzle_pieces.dm index a008acedb6d..a7bd4da85ae 100644 --- a/code/game/objects/items/puzzle_pieces.dm +++ b/code/game/objects/items/puzzle_pieces.dm @@ -454,9 +454,10 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/puzzle/password, 32) "green", "blue", "yellow", - "orange", - "brown", + COLOR_ORANGE, // orange is also not valid + COLOR_BROWN, // brown is NOT a valid byond color "gray", + "purple", ) for(var/digit in 0 to 9) digit_to_color["[digit]"] = pick_n_take(possible_colors) diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index 4aaba04bc18..c5a94edfdfd 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -53,7 +53,8 @@ /obj/structure/grille/examine(mob/user) . = ..() - + if(resistance_flags & INDESTRUCTIBLE) + return if(anchored) . += span_notice("It's secured in place with screws. The rods look like they could be cut through.") else diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index b3a3ea31038..71c3ef9b671 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -513,6 +513,9 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/window/unanchored/spawner, 0) return FALSE /obj/structure/window/reinforced/attackby_secondary(obj/item/tool, mob/user, params) + if(resistance_flags & INDESTRUCTIBLE) + balloon_alert(user, "too resilient!") + return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN switch(state) if(RWINDOW_SECURE) if(tool.tool_behaviour == TOOL_WELDER) @@ -591,7 +594,8 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/window/unanchored/spawner, 0) /obj/structure/window/reinforced/examine(mob/user) . = ..() - + if(resistance_flags & INDESTRUCTIBLE) + return switch(state) if(RWINDOW_SECURE) . += span_notice("It's been screwed in with one way screws, you'd need to heat them to have any chance of backing them out.") diff --git a/code/modules/awaymissions/mission_code/murderdome.dm b/code/modules/awaymissions/mission_code/murderdome.dm index a59a491d492..f80c4c12ca1 100644 --- a/code/modules/awaymissions/mission_code/murderdome.dm +++ b/code/modules/awaymissions/mission_code/murderdome.dm @@ -1,19 +1,14 @@ /obj/structure/window/reinforced/fulltile/indestructible name = "robust window" + move_resist = MOVE_FORCE_OVERPOWERING flags_1 = PREVENT_CLICK_UNDER_1 resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF -/obj/structure/window/reinforced/fulltile/indestructible/screwdriver_act(mob/living/user, obj/item/tool) - return NONE - -/obj/structure/window/reinforced/fulltile/indestructible/wrench_act(mob/living/user, obj/item/tool) - return NONE - -/obj/structure/window/reinforced/fulltile/indestructible/crowbar_act(mob/living/user, obj/item/tool) - return NONE /obj/structure/grille/indestructible + desc = "A STRONG framework of hardened plasteel rods, that you cannot possibly get through. If you were an engineer you would be drooling over its construction right now." + move_resist = MOVE_FORCE_OVERPOWERING obj_flags = CONDUCTS_ELECTRICITY resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF diff --git a/code/modules/mapfluff/ruins/objects_and_mobs/museum.dm b/code/modules/mapfluff/ruins/objects_and_mobs/museum.dm index c8b504b72e5..58d5754cccc 100644 --- a/code/modules/mapfluff/ruins/objects_and_mobs/museum.dm +++ b/code/modules/mapfluff/ruins/objects_and_mobs/museum.dm @@ -77,16 +77,16 @@ name = /obj/machinery/atmospherics/components/unary/vent_scrubber::name desc = /obj/machinery/atmospherics/components/unary/vent_scrubber::desc icon = /obj/machinery/atmospherics/components/unary/vent_scrubber::icon - layer = /obj/machinery/atmospherics/components/unary/vent_scrubber::layer - plane = /obj/machinery/atmospherics/components/unary/vent_scrubber::plane + layer = ABOVE_OPEN_TURF_LAYER + plane = FLOOR_PLANE icon_state = "scrub_on" /obj/structure/fluff/fake_vent name = /obj/machinery/atmospherics/components/unary/vent_pump::name desc = /obj/machinery/atmospherics/components/unary/vent_pump::desc icon = /obj/machinery/atmospherics/components/unary/vent_pump::icon - layer = /obj/machinery/atmospherics/components/unary/vent_pump::layer - plane = /obj/machinery/atmospherics/components/unary/vent_pump::plane + layer = ABOVE_OPEN_TURF_LAYER + plane = FLOOR_PLANE icon_state = "vent_out" /turf/open/mirage