From f9436e53c46f38f10fccf054a168de12d4e73bbc Mon Sep 17 00:00:00 2001 From: Ashe Higgs Date: Thu, 12 Oct 2017 19:32:08 -0400 Subject: [PATCH 1/2] Stargazers are now station-restricted, and cogged APCs are now quiet (#31565) * Clockwork power generator tweaks * Includes a blob_allowed check --- code/game/area/areas.dm | 2 +- .../gamemodes/clock_cult/clock_items/integration_cog.dm | 3 --- .../clock_cult/clock_scriptures/scripture_drivers.dm | 7 +++++++ .../gamemodes/clock_cult/clock_structures/stargazer.dm | 4 ++++ 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index 222ce73f92..053ff34589 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -450,7 +450,7 @@ GLOBAL_LIST_EMPTY(teleportlocs) if(!L.client.played) SEND_SOUND(L, sound(sound, repeat = 0, wait = 0, volume = 25, channel = CHANNEL_AMBIENCE)) L.client.played = TRUE - addtimer(CALLBACK(L.client, /client/proc/ResetAmbiencePlayed), 600) + addtimer(CALLBACK(L.client, /client/proc/ResetAmbiencePlayed), 600) /client/proc/ResetAmbiencePlayed() played = FALSE diff --git a/code/game/gamemodes/clock_cult/clock_items/integration_cog.dm b/code/game/gamemodes/clock_cult/clock_items/integration_cog.dm index 214345a71f..866458b4f6 100644 --- a/code/game/gamemodes/clock_cult/clock_items/integration_cog.dm +++ b/code/game/gamemodes/clock_cult/clock_items/integration_cog.dm @@ -31,8 +31,5 @@ if(cell && (cell.charge / cell.maxcharge > COG_MAX_SIPHON_THRESHOLD)) cell.use(1) adjust_clockwork_power(1) //Power is shared, so only do it once; this runs very quickly so it's about 1W/second - if(prob(1)) - playsound(apc, 'sound/machines/clockcult/steam_whoosh.ogg', 10, TRUE) - new/obj/effect/temp_visual/steam(get_turf(apc), pick(GLOB.cardinals)) #undef COG_MAX_SIPHON_THRESHOLD diff --git a/code/game/gamemodes/clock_cult/clock_scriptures/scripture_drivers.dm b/code/game/gamemodes/clock_cult/clock_scriptures/scripture_drivers.dm index 19dee4e347..a219d64666 100644 --- a/code/game/gamemodes/clock_cult/clock_scriptures/scripture_drivers.dm +++ b/code/game/gamemodes/clock_cult/clock_scriptures/scripture_drivers.dm @@ -231,6 +231,13 @@ quickbind = TRUE quickbind_desc = "Creates a stargazer, which generates power when near starlight." +/datum/clockwork_scripture/create_object/stargazer/check_special_requirements() + var/area/A = get_area(invoker) + if(A.outdoors || A.map_name == "Space" || !A.blob_allowed) + to_chat(invoker, "Stargazers can't be built off-station.") + return + return TRUE + //Integration Cog: Creates an integration cog that can be inserted into APCs to passively siphon power. /datum/clockwork_scripture/create_object/integration_cog diff --git a/code/game/gamemodes/clock_cult/clock_structures/stargazer.dm b/code/game/gamemodes/clock_cult/clock_structures/stargazer.dm index bb8051356e..4f04fcb82b 100644 --- a/code/game/gamemodes/clock_cult/clock_structures/stargazer.dm +++ b/code/game/gamemodes/clock_cult/clock_structures/stargazer.dm @@ -50,6 +50,10 @@ if(isspaceturf(T)) has_starlight = TRUE break + if(has_starlight && anchored) + var/area/A = get_area(src) + if(A.outdoors || A.map_name == "Space" || !A.blob_allowed) + has_starlight = FALSE if(old_status != has_starlight) if(has_starlight) visible_message("[src] hums and shines brilliantly!")