From 6935d2df5d305903a01c7f312c43d5a92641211c Mon Sep 17 00:00:00 2001
From: kyunkyunkyun <120701975+kyunkyunkyun@users.noreply.github.com>
Date: Wed, 16 Apr 2025 22:32:31 +0500
Subject: [PATCH] Updates pride mirror's code (#28718)
* better
* code review
Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
Signed-off-by: kyunkyunkyun <120701975+kyunkyunkyun@users.noreply.github.com>
---------
Signed-off-by: kyunkyunkyun <120701975+kyunkyunkyun@users.noreply.github.com>
Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
---
code/game/objects/structures/mirror.dm | 3 ++-
code/game/turfs/simulated/floor/chasm.dm | 7 -------
.../ruins/lavalandruin_code/sin_ruins.dm | 19 ++++++++-----------
3 files changed, 10 insertions(+), 19 deletions(-)
diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm
index ef29f583f44..92526130f41 100644
--- a/code/game/objects/structures/mirror.dm
+++ b/code/game/objects/structures/mirror.dm
@@ -138,7 +138,8 @@
AC.flags = APPEARANCE_ALL
AC.whitelist = race_list
ui_users[user] = AC
- AC.ui_interact(user)
+ if(user.Adjacent(src))
+ AC.ui_interact(user)
if("Voice")
var/voice_choice = tgui_input_list(user, "Perhaps...", "Voice effects", list("Comic Sans", "Wingdings", "Swedish", "Chav", "Mute"))
diff --git a/code/game/turfs/simulated/floor/chasm.dm b/code/game/turfs/simulated/floor/chasm.dm
index 40c0717d5a0..2a41fb32514 100644
--- a/code/game/turfs/simulated/floor/chasm.dm
+++ b/code/game/turfs/simulated/floor/chasm.dm
@@ -317,13 +317,6 @@
/turf/simulated/floor/chasm/CanPass(atom/movable/mover, border_dir)
return TRUE
-/turf/simulated/floor/chasm/pride/Initialize(mapload)
- . = ..()
- drop_x = x
- drop_y = y
- var/list/target_z = levels_by_trait(SPAWN_RUINS)
- drop_z = pick(target_z)
-
/turf/simulated/floor/chasm/space_ruin
/// Used to keep count of how many times we checked if our target turf was valid.
var/times_turfs_checked = 0
diff --git a/code/modules/ruins/lavalandruin_code/sin_ruins.dm b/code/modules/ruins/lavalandruin_code/sin_ruins.dm
index cfa4c18f3c8..22ae484831a 100644
--- a/code/modules/ruins/lavalandruin_code/sin_ruins.dm
+++ b/code/modules/ruins/lavalandruin_code/sin_ruins.dm
@@ -161,25 +161,22 @@
icon_state = "magic_mirror"
/obj/structure/mirror/magic/pride/curse(mob/user)
- user.visible_message("The ground splits beneath [user] as [user.p_their()] hand leaves the mirror!", \
+ user.visible_message("The ground splits beneath [user] as [user.p_their()] hand leaves the mirror!", \
"Perfect. Much better! Now nobody will be able to resist yo-")
var/turf/T = get_turf(user)
- var/list/levels = GLOB.space_manager.z_list.Copy()
- for(var/level in levels)
- if(!is_teleport_allowed(level))
- levels -= level
- if(user.z != 3) //if you somehow manage to bloody get out of lavaland without closing the UI
- var/turf/return_turf = locate(user.x, user.y, 3) //return to sender
+ if(!user.Adjacent(src)) // Trying to escape?
+ var/turf/return_turf = locate(x, y - 1, z) // To the south one to account for the fact the mirror is on a wall
var/mob/living/carbon/human/fool = user
if(return_turf && fool)
- to_chat(fool, "You dare try to play me for a fool?")
+ to_chat(fool, "You dare try to play me for a fool?")
fool.monkeyize()
fool.forceMove(return_turf)
return
- T.ChangeTurf(/turf/simulated/floor/chasm/pride)
- var/turf/simulated/floor/chasm/C = T
- C.drop(user)
+ T.ChangeTurf(/turf/simulated/floor/chasm/space_ruin)
+ if(user.Adjacent(src))
+ var/turf/simulated/floor/chasm/space_ruin/C = T
+ C.drop(user)
// Envy
/// Envy's knife: Found in the Envy ruin. Attackers take on the appearance of whoever they strike.