From 2336eac81962e5f6222ecbb043627aadb2e7324d Mon Sep 17 00:00:00 2001 From: Gary Lafortune Date: Mon, 11 Apr 2022 04:04:40 -0500 Subject: [PATCH 1/4] Adds singularity_act() for pools --- code/modules/pool/pool.dm | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/code/modules/pool/pool.dm b/code/modules/pool/pool.dm index 2176423a0d89..b488a0f8e323 100644 --- a/code/modules/pool/pool.dm +++ b/code/modules/pool/pool.dm @@ -32,13 +32,13 @@ Place a pool filter somewhere in the pool if you want people to be able to modif . = ..() water_overlay = new /obj/effect/overlay/poolwater(get_turf(src)) -/turf/open/indestructible/sound/pool/proc/set_colour(colour) - water_overlay.color = colour - -/turf/open/indestructible/sound/pool/end/ChangeTurf(path, list/new_baseturfs, flags) +/turf/open/indestructible/sound/pool/Destroy() if(water_overlay) qdel(water_overlay) - . = ..() + return ..() + +/turf/open/indestructible/sound/pool/proc/set_colour(colour) + water_overlay.color = colour /turf/open/CanPass(atom/movable/mover, turf/target) var/datum/component/swimming/S = mover.GetComponent(/datum/component/swimming) //If you're swimming around, you don't really want to stop swimming just like that do you? @@ -165,6 +165,16 @@ Place a pool filter somewhere in the pool if you want people to be able to modif if(!(H.head?.clothing_flags & SHOWEROKAY)) return TRUE +/turf/open/indestructible/sound/pool/singularity_act() // Pool's closed + playsound(src, 'sound/effects/splosh.ogg', 100, 1) // Slourmping up all the pool water is very sploshy. + visible_message(span_warning("The pool's water is sucked into the singularity!")) + for(var/turf/open/indestructible/sound/pool/water in get_area_turfs(get_area(src))) // Basically, we can just turn into plating or something. + if(water != src) + if(isnull(id) || id == water.id) // To make sure this is the same pool being drained + water.ChangeTurf(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR) + ChangeTurf(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR) + return + /obj/effect/turf_decal/pool name = "Pool siding" icon = 'icons/obj/pool.dmi' From 845a1d75015a387f8f36e04bb7854a26e2a02322 Mon Sep 17 00:00:00 2001 From: Gary Lafortune Date: Mon, 11 Apr 2022 04:15:10 -0500 Subject: [PATCH 2/4] Minor spellfixes in pool.dm --- code/modules/pool/pool.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/pool/pool.dm b/code/modules/pool/pool.dm index b488a0f8e323..07dbb07dd244 100644 --- a/code/modules/pool/pool.dm +++ b/code/modules/pool/pool.dm @@ -99,7 +99,7 @@ Place a pool filter somewhere in the pool if you want people to be able to modif splash(dropping) /datum/mood_event/poolparty - description = "I love swimming!.\n" + description = "I love swimming!\n" mood_change = 2 timeout = 2 MINUTES @@ -109,7 +109,7 @@ Place a pool filter somewhere in the pool if you want people to be able to modif timeout = 2 MINUTES /datum/mood_event/poolwet - description = "Eugh! my clothes are soaking wet from that swim.\n" + description = "Eugh! My clothes are soaking wet from that swim.\n" mood_change = -4 timeout = 4 MINUTES From c5b82e01d105d4aeeacae3a643445942dfc69e9c Mon Sep 17 00:00:00 2001 From: Gary Lafortune Date: Mon, 11 Apr 2022 04:16:29 -0500 Subject: [PATCH 3/4] Adds warning about poolwater for zappable mobs The warning is not given if the mob has the clumsy trait :^) Edit: I can in-fact spell "pool" thank you for asking --- code/modules/pool/pool.dm | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/code/modules/pool/pool.dm b/code/modules/pool/pool.dm index 07dbb07dd244..0575ccd9f6f6 100644 --- a/code/modules/pool/pool.dm +++ b/code/modules/pool/pool.dm @@ -37,6 +37,11 @@ Place a pool filter somewhere in the pool if you want people to be able to modif qdel(water_overlay) return ..() +/turf/open/indestructible/sound/pool/examine(mob/user) + . = ..() // This is a list + if(!HAS_TRAIT(user,TRAIT_CLUMSY) && calculate_zap(user)) + . += span_warning("It's probably not the best idea to jump in...") + /turf/open/indestructible/sound/pool/proc/set_colour(colour) water_overlay.color = colour @@ -113,10 +118,8 @@ Place a pool filter somewhere in the pool if you want people to be able to modif mood_change = -4 timeout = 4 MINUTES -/turf/open/indestructible/sound/pool/proc/splash(mob/user) - user.forceMove(src) - playsound(src, 'sound/effects/splosh.ogg', 100, 1) //Credit to hippiestation for this sound file! - user.visible_message("SPLASH!") +//Used to determine how zappy to be to a perhaps-electronic user entering this pool. +/turf/open/indestructible/sound/pool/proc/calculate_zap(mob/user) var/zap = 0 if(issilicon(user)) //Do not throw brick in a pool. Brick begs. zap = 1 //Sorry borgs! Swimming will come at a cost. @@ -135,6 +138,13 @@ Place a pool filter somewhere in the pool if you want people to be able to modif zap -- if(zap > 0) zap = 3 - zap // 1 is higher severity emp than 2 + return zap + +/turf/open/indestructible/sound/pool/proc/splash(mob/user) + user.forceMove(src) + playsound(src, 'sound/effects/splosh.ogg', 100, 1) //Credit to hippiestation for this sound file! + user.visible_message("SPLASH!") + var/zap = calculate_zap(user) if(zap > 0) user.emp_act(zap) user.emote("scream") //Chad coders use M.say("*scream") From e23c1eae1b3e44f9277eb735423b6740e01ca644 Mon Sep 17 00:00:00 2001 From: TheGamerdk <5618080+TheGamerdk@users.noreply.github.com> Date: Mon, 11 Apr 2022 22:11:49 +0200 Subject: [PATCH 4/4] Update code/modules/pool/pool.dm --- code/modules/pool/pool.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/modules/pool/pool.dm b/code/modules/pool/pool.dm index 0575ccd9f6f6..e8b9fe12258e 100644 --- a/code/modules/pool/pool.dm +++ b/code/modules/pool/pool.dm @@ -183,7 +183,6 @@ Place a pool filter somewhere in the pool if you want people to be able to modif if(isnull(id) || id == water.id) // To make sure this is the same pool being drained water.ChangeTurf(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR) ChangeTurf(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR) - return /obj/effect/turf_decal/pool name = "Pool siding"