From 10d5c985846f8c044ccd8a64c378a657b0434f87 Mon Sep 17 00:00:00 2001 From: Poojawa Date: Wed, 10 Aug 2016 08:45:31 -0500 Subject: [PATCH] QoL 2 Pump logging fixed, shuttle sound effects sync properly. Voreconstants wip code commented out for now. --- code/__DEFINES/voreconstants.dm | 4 ++-- .../machinery/components/binary_devices/pump.dm | 11 +++++++++-- code/modules/shuttle/emergency.dm | 11 ++++++----- tgstation.dme | 1 + 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/code/__DEFINES/voreconstants.dm b/code/__DEFINES/voreconstants.dm index 773a70f424..4252972c6f 100644 --- a/code/__DEFINES/voreconstants.dm +++ b/code/__DEFINES/voreconstants.dm @@ -46,7 +46,7 @@ var/global/list/death_sounds = list( #define isrodent(A) (is_species(A, /datum/species/rodent)) #define isherbivorous(A) (is_species(A, /datum/species/herbivorous)) #define isexotic(A) (is_species(A, /datum/species/exotic)) - +/* var/list/canine_species = list ( anubis, corgi, @@ -147,4 +147,4 @@ var/global/list/wings_list = list() for(var/client/C in admins) if(C.prefs.toggles & CHAT_DEBUGLOGS) - C << "DEBUG: [text]" \ No newline at end of file + C << "DEBUG: [text]" */ \ No newline at end of file diff --git a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm index a500b3841d..b6cbccb883 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm @@ -119,7 +119,9 @@ Thus, the two variables affect pump operation are set in New(): switch(action) if("power") on = !on - investigate_log("was turned [on ? "on" : "off"] by [key_name(usr)]", "atmos") + investigate_log("Pump, [src.name], was turned [on ? "on" : "off"] by [key_name(usr)] at [x], [y], [z], [loc.loc]", "atmos") + message_admins("Pump, [src.name], turned [on ? "on" : "off"] by [key_name(usr)] at [x], [y], [z], [loc.loc]") + log_admin("[key_name(usr)] manipulated a pump at [x], [y], [z]") . = TRUE if("pressure") var/pressure = params["pressure"] @@ -135,7 +137,9 @@ Thus, the two variables affect pump operation are set in New(): . = TRUE if(.) target_pressure = Clamp(pressure, 0, MAX_OUTPUT_PRESSURE) - investigate_log("was set to [target_pressure] kPa by [key_name(usr)]", "atmos") + investigate_log("Pump, [src.name], was set to [target_pressure] kPa by [key_name(usr)] at [x], [y], [z], [loc.loc]", "atmos") + message_admins("Pump, [src.name], was set to [target_pressure] kPa by [key_name(usr)] at [x], [y], [z], [loc.loc]") + log_admin("[key_name(usr)] manipulated a pump at [x], [y], [z]") update_icon() /obj/machinery/atmospherics/components/binary/pump/atmosinit() @@ -178,5 +182,8 @@ Thus, the two variables affect pump operation are set in New(): if(!(stat & NOPOWER) && on) user << "You cannot unwrench this [src], turn it off first!" else + investigate_log("Pump, [src.name], was unwrenched by [key_name(usr)] at [x], [y], [z], [loc.loc]", "atmos") + message_admins("Pump, [src.name], was unwrenched by [key_name(usr)] at [x], [y], [z], [loc.loc]") + log_admin("[key_name(usr)] unwrenched a pump at [x], [y], [z]") return 1 diff --git a/code/modules/shuttle/emergency.dm b/code/modules/shuttle/emergency.dm index 4389dfacc7..108b2f320f 100644 --- a/code/modules/shuttle/emergency.dm +++ b/code/modules/shuttle/emergency.dm @@ -182,6 +182,7 @@ travelDir = -90 roundstart_move = "emergency_away" var/sound_played = 0 //If the launch sound has been sent to all players on the shuttle itself + var/end_sound_played = 0 //so it doesn't loop annoyingly /obj/docking_port/mobile/emergency/register() . = ..() @@ -299,7 +300,7 @@ if(SHUTTLE_DOCKED) - if(time_left <= 50 && !sound_played) //4 seconds left:REV UP THOSE ENGINES BOYS. - should sync up with the launch + if(time_left <= 60 && !sound_played) //4 seconds left:REV UP THOSE ENGINES BOYS. - should sync up with the launch sound_played = 1 //Only rev them up once. for(var/area/shuttle/escape/E in world) E << 'sound/effects/hyperspace_begin.ogg' @@ -327,8 +328,8 @@ priority_announce("The Emergency Shuttle has left the station. Estimate [timeLeft(600)] minutes until the shuttle docks at Central Command.", null, null, "Priority") if(SHUTTLE_ESCAPE) - if(time_left <= 50 && sound_played) //4 seconds left:Hyperspace trip completed. - should sync up with the landing - sound_played = 1 //Only rev them up once. + if(time_left <= 50 && !end_sound_played) //4 seconds left:Hyperspace trip completed. - should sync up with the landing + end_sound_played = 1 //Only rev them up once. for(var/area/shuttle/escape/E in world) E << 'sound/effects/hyperspace_end.ogg' @@ -343,8 +344,8 @@ continue //Mapping a new docking point for each ship mappers could potentially want docking with centcomm would take up lots of space, just let them keep flying off into the sunset for their greentext //now move the actual emergency shuttle to centcomm - for(var/area/shuttle/escape/E in world) - E << 'sound/effects/hyperspace_end.ogg' + // for(var/area/shuttle/escape/E in world) + // E << 'sound/effects/hyperspace_end.ogg' dock(SSshuttle.getDock("emergency_away")) mode = SHUTTLE_ENDGAME timer = 0 diff --git a/tgstation.dme b/tgstation.dme index 4682841cde..68a92acf5f 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -51,6 +51,7 @@ #include "code\__DEFINES\tablecrafting.dm" #include "code\__DEFINES\tgui.dm" #include "code\__DEFINES\tick.dm" +#include "code\__DEFINES\voreconstants.dm" #include "code\__DEFINES\wires.dm" #include "code\__HELPERS\_logging.dm" #include "code\__HELPERS\_string_lists.dm"