From d2b4db716daeeec8f4ee11efe136c866f6f8ffae Mon Sep 17 00:00:00 2001 From: PsiOmegaDelta Date: Thu, 7 Jul 2016 11:33:03 +0200 Subject: [PATCH 1/4] Ports Paradise's 510 scheduler. Conflicts: code/__defines/btime.dm code/__defines/process_scheduler.dm code/_helpers/time.dm code/controllers/ProcessScheduler/core/_stubs.dm code/controllers/ProcessScheduler/core/processScheduler.dm polaris.dme --- btime.dll | Bin 6656 -> 0 bytes btime.so | Bin 7232 -> 0 bytes code/__defines/btime.dm | 18 ------ code/__defines/math_physics.dm | 5 +- code/__defines/process_scheduler.dm | 5 +- code/_helpers/time.dm | 60 +++++++++++++++--- .../ProcessScheduler/core/_stubs.dm | 19 ------ .../ProcessScheduler/core/process.dm | 46 +++++--------- .../ProcessScheduler/core/processScheduler.dm | 25 +++----- .../ProcessScheduler/test/processScheduler.js | 56 ---------------- polaris.dme | 2 - 11 files changed, 82 insertions(+), 154 deletions(-) delete mode 100644 btime.dll delete mode 100644 btime.so delete mode 100644 code/__defines/btime.dm delete mode 100644 code/controllers/ProcessScheduler/core/_stubs.dm delete mode 100644 code/controllers/ProcessScheduler/test/processScheduler.js diff --git a/btime.dll b/btime.dll deleted file mode 100644 index af6c82a99865919316afd9689e56badb20c619de..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6656 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 diff --git a/code/__defines/btime.dm b/code/__defines/btime.dm deleted file mode 100644 index d4cefc3524..0000000000 --- a/code/__defines/btime.dm +++ /dev/null @@ -1,18 +0,0 @@ -// Comment this out if the external btime library is unavailable -#define PRECISE_TIMER_AVAILABLE - -#ifdef PRECISE_TIMER_AVAILABLE -var/global/__btime__libName = "btime.[world.system_type==MS_WINDOWS?"dll":"so"]" -#define TimeOfHour (__extern__timeofhour) -#define __extern__timeofhour text2num(call(__btime__libName, "gettime")()) -/hook/startup/proc/checkbtime() - try - // This will always return 1 unless the btime library cannot be accessed - if(TimeOfHour || 1) return 1 - catch(var/exception/e) - log_to_dd("PRECISE_TIMER_AVAILABLE is defined in btime.dm, but calling the btime library failed: [e]") - log_to_dd("This is a fatal error. The world will now shut down.") - del(world) -#else -#define TimeOfHour (world.timeofday % 36000) -#endif \ No newline at end of file diff --git a/code/__defines/math_physics.dm b/code/__defines/math_physics.dm index 198f87eccc..da1c2aebd1 100644 --- a/code/__defines/math_physics.dm +++ b/code/__defines/math_physics.dm @@ -26,4 +26,7 @@ #define INFINITY 1.#INF #define TICKS_IN_DAY 24*60*60*10 -#define TICKS_IN_SECOND 10 \ No newline at end of file +#define TICKS_IN_SECOND 10 + +#define SIMPLE_SIGN(X) ((X) < 0 ? -1 : 1) +#define SIGN(X) ((X) ? SIMPLE_SIGN(X) : 0) diff --git a/code/__defines/process_scheduler.dm b/code/__defines/process_scheduler.dm index 76449b9a4b..d9c8f106ef 100644 --- a/code/__defines/process_scheduler.dm +++ b/code/__defines/process_scheduler.dm @@ -11,10 +11,9 @@ #define PROCESS_DEFAULT_HANG_ALERT_TIME 600 // 60 seconds #define PROCESS_DEFAULT_HANG_RESTART_TIME 900 // 90 seconds #define PROCESS_DEFAULT_SCHEDULE_INTERVAL 50 // 50 ticks -#define PROCESS_DEFAULT_SLEEP_INTERVAL 8 // 2 ticks -#define PROCESS_DEFAULT_CPU_THRESHOLD 90 // 90% +#define PROCESS_DEFAULT_SLEEP_INTERVAL 8 // 1/8th of a tick // SCHECK macros // This references src directly to work around a weird bug with try/catch #define SCHECK_EVERY(this_many_calls) if(++src.calls_since_last_scheck >= this_many_calls) sleepCheck() -#define SCHECK SCHECK_EVERY(50) \ No newline at end of file +#define SCHECK sleepCheck() diff --git a/code/_helpers/time.dm b/code/_helpers/time.dm index 19e2206cd0..75842ca30f 100644 --- a/code/_helpers/time.dm +++ b/code/_helpers/time.dm @@ -4,16 +4,55 @@ #define MINUTE *600 #define MINUTES *600 +#define HOUR *36000 +#define HOURS *36000 + +#define DAY *864000 +#define DAYS *864000 + +#define TimeOfGame (get_game_time()) +#define TimeOfTick (world.tick_usage*0.01*world.tick_lag) + +/proc/get_game_time() + var/global/time_offset = 0 + var/global/last_time = 0 + var/global/last_usage = 0 + + var/wtime = world.time + var/wusage = world.tick_usage * 0.01 + + if(last_time < wtime && last_usage > 1) + time_offset += last_usage - 1 + + last_time = wtime + last_usage = wusage + + return wtime + (time_offset + wusage) * world.tick_lag + var/roundstart_hour = 0 -//Returns the world time in english -proc/worldtime2text(time = world.time, timeshift = 1) +var/station_date = "" +var/next_station_date_change = 1 DAY + +#define station_adjusted_time(time) time2text(time + station_time_in_ticks, "hh:mm") +#define round_duration_in_ticks (round_start_time ? world.time - round_start_time : 0) +#define station_time_in_ticks (roundstart_hour HOURS + round_duration_in_ticks) + +/proc/stationtime2text() if(!roundstart_hour) roundstart_hour = pick(2,7,12,17) - return timeshift ? time2text(time+(36000*roundstart_hour), "hh:mm") : time2text(time, "hh:mm") + return time2text(station_time_in_ticks, "hh:mm") -proc/worlddate2text() - return num2text((text2num(time2text(world.timeofday, "YYYY"))+544)) + "-" + time2text(world.timeofday, "MM-DD") +/proc/stationdate2text() + var/update_time = FALSE + if(station_time_in_ticks > next_station_date_change) + next_station_date_change += 1 DAY + update_time = TRUE + if(!station_date || update_time) + var/extra_days = round(station_time_in_ticks / (1 DAY)) DAYS + var/timeofday = world.timeofday + extra_days + station_date = num2text((text2num(time2text(timeofday, "YYYY"))+544)) + "-" + time2text(timeofday, "MM-DD") + return station_date -proc/time_stamp() +/proc/time_stamp() return time2text(world.timeofday, "hh:mm:ss") /* Returns 1 if it is the selected month and day */ @@ -36,9 +75,7 @@ var/round_start_time = 0 round_start_time = world.time return 1 -#define round_duration_in_ticks (round_start_time ? world.time - round_start_time : 0) - -/proc/round_duration_as_text() +/proc/roundduration2text() if(!round_start_time) return "00:00" if(last_round_duration && world.time < next_duration_update) @@ -55,3 +92,8 @@ var/round_start_time = 0 last_round_duration = "[hours]:[mins]" next_duration_update = world.time + 1 MINUTES return last_round_duration + +//Can be useful for things dependent on process timing +/proc/process_schedule_interval(var/process_name) + var/datum/controller/process/process = processScheduler.getProcess(process_name) + return process.schedule_interval \ No newline at end of file diff --git a/code/controllers/ProcessScheduler/core/_stubs.dm b/code/controllers/ProcessScheduler/core/_stubs.dm deleted file mode 100644 index 1aa2c8efb8..0000000000 --- a/code/controllers/ProcessScheduler/core/_stubs.dm +++ /dev/null @@ -1,19 +0,0 @@ -/** - * _stubs.dm - * - * This file contains constructs that the process scheduler expects to exist - * in a standard ss13 fork. - */ - -/** - * logTheThing - * - * In goonstation, this proc writes a message to either the world log or diary. - * - * Blame Keelin. - */ -/proc/logTheThing(type, source, target, text, diaryType) - if(diaryType) - log_debug("Diary: \[[diaryType]:[type]] [text]") - else - log_debug("Log: \[[type]] [text]") diff --git a/code/controllers/ProcessScheduler/core/process.dm b/code/controllers/ProcessScheduler/core/process.dm index b7767c367f..836d2124bd 100644 --- a/code/controllers/ProcessScheduler/core/process.dm +++ b/code/controllers/ProcessScheduler/core/process.dm @@ -69,10 +69,10 @@ * recordkeeping vars */ - // Records the time (1/10s timeofday) at which the process last finished sleeping + // Records the time (1/10s timeoftick) at which the process last finished sleeping var/tmp/last_slept = 0 - // Records the time (1/10s timeofday) at which the process last began running + // Records the time (1/10s timeofgame) at which the process last began running var/tmp/run_start = 0 // Records the number of times this process has been killed and restarted @@ -106,12 +106,8 @@ last_object = null /datum/controller/process/proc/started() - var/timeofhour = TimeOfHour - // Initialize last_slept so we can know when to sleep - last_slept = timeofhour - // Initialize run_start so we can detect hung processes. - run_start = timeofhour + run_start = TimeOfGame // Initialize defer count cpu_defer_count = 0 @@ -163,18 +159,13 @@ setStatus(PROCESS_STATUS_HUNG) /datum/controller/process/proc/handleHung() - var/timeofhour = TimeOfHour var/datum/lastObj = last_object var/lastObjType = "null" if(istype(lastObj)) lastObjType = lastObj.type - // If timeofhour has rolled over, then we need to adjust. - if (timeofhour < run_start) - run_start -= 36000 - var/msg = "[name] process hung at tick #[ticks]. Process was unresponsive for [(timeofhour - run_start) / 10] seconds and was restarted. Last task: [last_task]. Last Object Type: [lastObjType]" - logTheThing("debug", null, null, msg) - logTheThing("diary", null, null, msg, "debug") + var/msg = "[name] process hung at tick #[ticks]. Process was unresponsive for [(TimeOfGame - run_start) / 10] seconds and was restarted. Last task: [last_task]. Last Object Type: [lastObjType]" + log_debug(msg) message_admins(msg) main.restartProcess(src.name) @@ -182,8 +173,8 @@ /datum/controller/process/proc/kill() if (!killed) var/msg = "[name] process was killed at tick #[ticks]." - logTheThing("debug", null, null, msg) - logTheThing("diary", null, null, msg, "debug") + log_debug(msg) + message_admins(msg) //finished() // Allow inheritors to clean up if needed @@ -208,17 +199,12 @@ if (main.getCurrentTickElapsedTime() > main.timeAllowance) sleep(world.tick_lag) cpu_defer_count++ - last_slept = TimeOfHour + last_slept = 0 else - var/timeofhour = TimeOfHour - // If timeofhour has rolled over, then we need to adjust. - if (timeofhour < last_slept) - last_slept -= 36000 - - if (timeofhour > last_slept + sleep_interval) + if (TimeOfTick > last_slept + sleep_interval) // If we haven't slept in sleep_interval deciseconds, sleep to allow other work to proceed. sleep(0) - last_slept = TimeOfHour + last_slept = TimeOfTick /datum/controller/process/proc/update() // Clear delta @@ -239,10 +225,7 @@ /datum/controller/process/proc/getElapsedTime() - var/timeofhour = TimeOfHour - if (timeofhour < run_start) - return timeofhour - (run_start - 36000) - return timeofhour - run_start + return TimeOfGame - run_start /datum/controller/process/proc/tickDetail() return @@ -343,6 +326,11 @@ stat("[name]", "T#[getTicks()] | AR [averageRunTime] | LR [lastRunTime] | HR [highestRunTime] | D [cpu_defer_count]") /datum/controller/process/proc/catchException(var/exception/e, var/thrower) + if(istype(e)) // Real runtimes go to the real error handler + // There are two newlines here, because handling desc sucks + e.desc = " Caught by process: [name]\n\n" + e.desc + world.Error(e, e_src = thrower) + return var/etext = "[e]" var/eid = "[e]" // Exception ID, for tracking repeated exceptions var/ptext = "" // "processing..." text, for what was being processed (if known) @@ -369,4 +357,4 @@ /datum/controller/process/proc/catchBadType(var/datum/caught) if(isnull(caught) || !istype(caught) || !isnull(caught.gcDestroyed)) return // Only bother with types we can identify and that don't belong - catchException("Type [caught.type] does not belong in process' queue") \ No newline at end of file + catchException("Type [caught.type] does not belong in process' queue") diff --git a/code/controllers/ProcessScheduler/core/processScheduler.dm b/code/controllers/ProcessScheduler/core/processScheduler.dm index bde79fba07..dc412ee92a 100644 --- a/code/controllers/ProcessScheduler/core/processScheduler.dm +++ b/code/controllers/ProcessScheduler/core/processScheduler.dm @@ -43,8 +43,6 @@ var/global/datum/controller/processScheduler/processScheduler var/tmp/currentTick = 0 - var/tmp/currentTickStart = 0 - var/tmp/timeAllowance = 0 var/tmp/cpuAverage = 0 @@ -247,7 +245,7 @@ var/global/datum/controller/processScheduler/processScheduler /datum/controller/processScheduler/proc/recordStart(var/datum/controller/process/process, var/time = null) if (isnull(time)) - time = TimeOfHour + time = TimeOfGame last_queued[process] = world.time last_start[process] = time else @@ -256,11 +254,7 @@ var/global/datum/controller/processScheduler/processScheduler /datum/controller/processScheduler/proc/recordEnd(var/datum/controller/process/process, var/time = null) if (isnull(time)) - time = TimeOfHour - - // If world.timeofday has rolled over, then we need to adjust. - if (time < last_start[process]) - last_start[process] -= 36000 + time = TimeOfGame var/lastRunTime = time - last_start[process] @@ -349,29 +343,23 @@ var/global/datum/controller/processScheduler/processScheduler updateCurrentTickData() return 0 else - return TimeOfHour - currentTickStart + return TimeOfTick /datum/controller/processScheduler/proc/updateCurrentTickData() if (world.time > currentTick) // New tick! currentTick = world.time - currentTickStart = TimeOfHour updateTimeAllowance() cpuAverage = (world.cpu + cpuAverage + cpuAverage) / 3 /datum/controller/processScheduler/proc/updateTimeAllowance() // Time allowance goes down linearly with world.cpu. var/tmp/error = cpuAverage - 100 - var/tmp/timeAllowanceDelta = sign(error) * -0.5 * world.tick_lag * max(0, 0.001 * abs(error)) + var/tmp/timeAllowanceDelta = SIMPLE_SIGN(error) * -0.5 * world.tick_lag * max(0, 0.001 * abs(error)) //timeAllowance = world.tick_lag * min(1, 0.5 * ((200/max(1,cpuAverage)) - 1)) timeAllowance = min(timeAllowanceMax, max(0, timeAllowance + timeAllowanceDelta)) -/datum/controller/processScheduler/proc/sign(var/x) - if (x == 0) - return 1 - return x / abs(x) - /datum/controller/processScheduler/proc/statProcesses() if(!isRunning) stat("Processes", "Scheduler not running") @@ -379,4 +367,7 @@ var/global/datum/controller/processScheduler/processScheduler stat("Processes", "[processes.len] (R [running.len] / Q [queued.len] / I [idle.len])") stat(null, "[round(cpuAverage, 0.1)] CPU, [round(timeAllowance, 0.1)/10] TA") for(var/datum/controller/process/p in processes) - p.statProcess() \ No newline at end of file + p.statProcess() + +/datum/controller/processScheduler/proc/getProcess(var/process_name) + return nameToProcessMap[process_name] diff --git a/code/controllers/ProcessScheduler/test/processScheduler.js b/code/controllers/ProcessScheduler/test/processScheduler.js deleted file mode 100644 index 0a4f111355..0000000000 --- a/code/controllers/ProcessScheduler/test/processScheduler.js +++ /dev/null @@ -1,56 +0,0 @@ -(function ($) { - function setRef(theRef) { - ref = theRef; - } - - function jax(action, data) { - if (typeof data === 'undefined') - data = {}; - var params = []; - for (var k in data) { - if (data.hasOwnProperty(k)) { - params.push(encodeURIComponent(k) + '=' + encodeURIComponent(data[k])); - } - } - var newLoc = '?src=' + ref + ';action=' + action + ';' + params.join(';'); - window.location = newLoc; - } - - function requestRefresh(e) { - jax("refresh", null); - } - - function handleRefresh(processTable) { - $('#processTable').html(processTable); - initProcessTableButtons(); - } - - function requestKill(e) { - var button = $(e.currentTarget); - jax("kill", {name: button.data("process-name")}); - } - - function requestEnable(e) { - var button = $(e.currentTarget); - jax("enable", {name: button.data("process-name")}); - } - - function requestDisable(e) { - var button = $(e.currentTarget); - jax("disable", {name: button.data("process-name")}); - } - - function initProcessTableButtons() { - $(".kill-btn").on("click", requestKill); - $(".enable-btn").on("click", requestEnable); - $(".disable-btn").on("click", requestDisable); - } - - window.setRef = setRef; - window.handleRefresh = handleRefresh; - - $(function() { - initProcessTableButtons(); - $('#btn-refresh').on("click", requestRefresh); - }); -}(jQuery)); \ No newline at end of file diff --git a/polaris.dme b/polaris.dme index 4c0a8079c6..e45ca4c92e 100644 --- a/polaris.dme +++ b/polaris.dme @@ -21,7 +21,6 @@ #include "code\__defines\admin.dm" #include "code\__defines\appearance.dm" #include "code\__defines\atmos.dm" -#include "code\__defines\btime.dm" #include "code\__defines\chemistry.dm" #include "code\__defines\damage_organs.dm" #include "code\__defines\dna.dm" @@ -152,7 +151,6 @@ #include "code\controllers\Processes\ticker.dm" #include "code\controllers\Processes\turf.dm" #include "code\controllers\Processes\vote.dm" -#include "code\controllers\ProcessScheduler\core\_stubs.dm" #include "code\controllers\ProcessScheduler\core\process.dm" #include "code\controllers\ProcessScheduler\core\processScheduler.dm" #include "code\datums\ai_law_sets.dm" From 4f7ea573c15445ee667b9896c6f2e6c0b08a1d81 Mon Sep 17 00:00:00 2001 From: SinTwo Date: Sat, 30 Jul 2016 03:19:47 -0400 Subject: [PATCH 2/4] world time fix --- code/game/machinery/adv_med.dm | 2 +- code/game/machinery/computer/card.dm | 2 +- code/game/machinery/computer/guestpass.dm | 12 ++++++------ code/game/machinery/computer/medical.dm | 2 +- code/game/machinery/computer/security.dm | 2 +- .../machinery/computer3/computers/medical.dm | 2 +- .../machinery/computer3/computers/security.dm | 2 +- code/game/machinery/computer3/lapvend.dm | 8 ++++---- code/game/machinery/cryopod.dm | 4 ++-- code/game/machinery/newscaster.dm | 2 +- code/game/machinery/status_display.dm | 2 +- code/game/machinery/vending.dm | 4 ++-- code/game/objects/items/devices/PDA/PDA.dm | 4 ++-- .../items/devices/communicator/communicator.dm | 2 +- code/game/objects/items/devices/uplink.dm | 2 +- code/game/objects/items/weapons/autopsy.dm | 4 ++-- code/modules/admin/player_panel.dm | 2 +- code/modules/economy/ATM.dm | 18 +++++++++--------- code/modules/economy/Accounts.dm | 12 ++++++------ code/modules/economy/Accounts_DB.dm | 2 +- code/modules/economy/EFTPOS.dm | 6 +++--- code/modules/economy/cash_register.dm | 8 ++++---- code/modules/economy/retail_scanner.dm | 8 ++++---- code/modules/events/event_manager.dm | 10 +++++----- code/modules/events/money_hacker.dm | 8 ++++---- code/modules/events/money_lotto.dm | 2 +- code/modules/events/prison_break.dm | 4 ++-- code/modules/mob/death.dm | 2 +- code/modules/mob/hear_say.dm | 2 +- code/modules/mob/mob.dm | 4 ++-- code/modules/mob/new_player/new_player.dm | 2 +- code/modules/paperwork/paper.dm | 4 ++-- .../Chemistry-Reagents-Toxins.dm | 2 +- code/modules/research/rdconsole.dm | 2 +- .../tools/tools_depthscanner.dm | 4 ++-- code/world.dm | 4 ++-- 36 files changed, 81 insertions(+), 81 deletions(-) diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index 43ca9d2fc3..27e0281e63 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -410,7 +410,7 @@ visible_message("\The [src] rattles and prints out a sheet of paper.") var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(loc) P.info = "
Body Scan - [href_list["name"]]

" - P.info += "Time of scan: [worldtime2text(world.time)]

" + P.info += "Time of scan: [stationtime2text(world.time)]

" P.info += "[printing_text]" P.info += "

Notes:
" P.name = "Body Scan - [href_list["name"]]" diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index 3bc9a17fce..293ff22ef9 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -250,7 +250,7 @@ var/obj/item/weapon/paper/P = new(loc) if (mode) - P.name = text("crew manifest ([])", worldtime2text()) + P.name = text("crew manifest ([])", stationtime2text()) P.info = {"

Crew Manifest


[data_core ? data_core.get_manifest(0) : ""] diff --git a/code/game/machinery/computer/guestpass.dm b/code/game/machinery/computer/guestpass.dm index b3f9765746..bb70d668bd 100644 --- a/code/game/machinery/computer/guestpass.dm +++ b/code/game/machinery/computer/guestpass.dm @@ -20,17 +20,17 @@ /obj/item/weapon/card/id/guest/examine(mob/user) ..(user) if (world.time < expiration_time) - user << "This pass expires at [worldtime2text(expiration_time)]." + user << "This pass expires at [stationtime2text(expiration_time)]." else - user << "It expired at [worldtime2text(expiration_time)]." + user << "It expired at [stationtime2text(expiration_time)]." /obj/item/weapon/card/id/guest/read() if(!Adjacent(usr)) return //Too far to read if (world.time > expiration_time) - usr << "This pass expired at [worldtime2text(expiration_time)]." + usr << "This pass expired at [stationtime2text(expiration_time)]." else - usr << "This pass expires at [worldtime2text(expiration_time)]." + usr << "This pass expires at [stationtime2text(expiration_time)]." usr << "It grants access to following areas:" for (var/A in temp_access) @@ -207,13 +207,13 @@ if ("issue") if (giver) var/number = add_zero("[rand(0,9999)]", 4) - var/entry = "\[[worldtime2text()]\] Pass #[number] issued by [giver.registered_name] ([giver.assignment]) to [giv_name]. Reason: [reason]. Grants access to following areas: " + var/entry = "\[[stationtime2text()]\] Pass #[number] issued by [giver.registered_name] ([giver.assignment]) to [giv_name]. Reason: [reason]. Grants access to following areas: " for (var/i=1 to accesses.len) var/A = accesses[i] if (A) var/area = get_access_desc(A) entry += "[i > 1 ? ", [area]" : "[area]"]" - entry += ". Expires at [worldtime2text(world.time + duration*10*60)]." + entry += ". Expires at [stationtime2text(world.time + duration*10*60)]." internal_log.Add(entry) var/obj/item/weapon/card/id/guest/pass = new(src.loc) diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index 3150003f46..4f73301e84 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -454,7 +454,7 @@ var/counter = 1 while(src.active2.fields[text("com_[]", counter)]) counter++ - src.active2.fields[text("com_[counter]")] = text("Made by [authenticated] ([rank]) on [time2text(world.realtime, "DDD MMM DD")] [worldtime2text()], [game_year]
[t1]") + src.active2.fields[text("com_[counter]")] = text("Made by [authenticated] ([rank]) on [time2text(world.realtime, "DDD MMM DD")] [stationtime2text()], [game_year]
[t1]") if (href_list["del_c"]) if ((istype(src.active2, /datum/data/record) && src.active2.fields[text("com_[]", href_list["del_c"])])) diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index 2624c4ff28..6868f23343 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -391,7 +391,7 @@ What a mess.*/ var/counter = 1 while(active2.fields[text("com_[]", counter)]) counter++ - active2.fields[text("com_[counter]")] = text("Made by [authenticated] ([rank]) on [time2text(world.realtime, "DDD MMM DD")] [worldtime2text()], [game_year]
[t1]") + active2.fields[text("com_[counter]")] = text("Made by [authenticated] ([rank]) on [time2text(world.realtime, "DDD MMM DD")] [stationtime2text()], [game_year]
[t1]") if ("Delete Record (ALL)") if (active1) diff --git a/code/game/machinery/computer3/computers/medical.dm b/code/game/machinery/computer3/computers/medical.dm index 4425dc236a..57a662db46 100644 --- a/code/game/machinery/computer3/computers/medical.dm +++ b/code/game/machinery/computer3/computers/medical.dm @@ -461,7 +461,7 @@ var/counter = 1 while(src.active2.fields[text("com_[]", counter)]) counter++ - src.active2.fields[text("com_[counter]")] = text("Made by [authenticated] ([rank]) on [time2text(world.realtime, "DDD MMM DD")] [worldtime2text()], [game_year]
[t1]") + src.active2.fields[text("com_[counter]")] = text("Made by [authenticated] ([rank]) on [time2text(world.realtime, "DDD MMM DD")] [stationtime2text()], [game_year]
[t1]") if (href_list["del_c"]) if ((istype(src.active2, /datum/data/record) && src.active2.fields[text("com_[]", href_list["del_c"])])) diff --git a/code/game/machinery/computer3/computers/security.dm b/code/game/machinery/computer3/computers/security.dm index 59bb46fd69..e6f19b8588 100644 --- a/code/game/machinery/computer3/computers/security.dm +++ b/code/game/machinery/computer3/computers/security.dm @@ -410,7 +410,7 @@ What a mess.*/ var/counter = 1 while(active2.fields[text("com_[]", counter)]) counter++ - active2.fields[text("com_[counter]")] = text("Made by [authenticated] ([rank]) on [time2text(world.realtime, "DDD MMM DD")] [worldtime2text()], [game_year]
[t1]") + active2.fields[text("com_[counter]")] = text("Made by [authenticated] ([rank]) on [time2text(world.realtime, "DDD MMM DD")] [stationtime2text()], [game_year]
[t1]") if ("Delete Record (ALL)") if (active1) diff --git a/code/game/machinery/computer3/lapvend.dm b/code/game/machinery/computer3/lapvend.dm index 6acb530acc..3800fb9440 100644 --- a/code/game/machinery/computer3/lapvend.dm +++ b/code/game/machinery/computer3/lapvend.dm @@ -201,7 +201,7 @@ T.amount = "[transaction_amount]" T.source_terminal = src.name T.date = current_date_string - T.time = worldtime2text() + T.time = stationtime2text() D.transaction_log.Add(T) // T = new() @@ -210,7 +210,7 @@ T.amount = "[transaction_amount]" T.source_terminal = src.name T.date = current_date_string - T.time = worldtime2text() + T.time = stationtime2text() vendor_account.transaction_log.Add(T) newlap = new /obj/machinery/computer3/laptop/vended(src.loc) @@ -350,7 +350,7 @@ T.amount = "[transaction_amount]" T.source_terminal = src.name T.date = current_date_string - T.time = worldtime2text() + T.time = stationtime2text() D.transaction_log.Add(T) // T = new() @@ -359,7 +359,7 @@ T.amount = "[transaction_amount]" T.source_terminal = src.name T.date = current_date_string - T.time = worldtime2text() + T.time = stationtime2text() vendor_account.transaction_log.Add(T) qdel(relap) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index e1c65243d9..90db93ad8d 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -466,8 +466,8 @@ //Make an announcement and log the person entering storage. - control_computer.frozen_crew += "[occupant.real_name], [occupant.mind.role_alt_title] - [worldtime2text()]" - control_computer._admin_logs += "[key_name(occupant)] ([occupant.mind.role_alt_title]) at [worldtime2text()]" + control_computer.frozen_crew += "[occupant.real_name], [occupant.mind.role_alt_title] - [stationtime2text()]" + control_computer._admin_logs += "[key_name(occupant)] ([occupant.mind.role_alt_title]) at [stationtime2text()]" log_and_message_admins("[key_name(occupant)] ([occupant.mind.role_alt_title]) entered cryostorage.") announce.autosay("[occupant.real_name], [occupant.mind.role_alt_title], [on_store_message]", "[on_store_name]") diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index 7bfe32d719..4c1198838a 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -76,7 +76,7 @@ var/datum/feed_message/newMsg = new /datum/feed_message newMsg.author = author newMsg.body = msg - newMsg.time_stamp = "[worldtime2text()]" + newMsg.time_stamp = "[stationtime2text()]" newMsg.is_admin_message = adminMessage if(message_type) newMsg.message_type = message_type diff --git a/code/game/machinery/status_display.dm b/code/game/machinery/status_display.dm index 8b0d78cb96..2c4a2cefbb 100644 --- a/code/game/machinery/status_display.dm +++ b/code/game/machinery/status_display.dm @@ -150,7 +150,7 @@ return 1 if(STATUS_DISPLAY_TIME) message1 = "TIME" - message2 = worldtime2text() + message2 = stationtime2text() update_display(message1, message2) return 1 return 0 diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index d28cb2444c..2cf5347edb 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -314,7 +314,7 @@ T.amount = "[currently_vending.price]" T.source_terminal = src.name T.date = current_date_string - T.time = worldtime2text() + T.time = stationtime2text() customer_account.transaction_log.Add(T) // Give the vendor the money. We use the account owner name, which means @@ -337,7 +337,7 @@ T.amount = "[currently_vending.price]" T.source_terminal = src.name T.date = current_date_string - T.time = worldtime2text() + T.time = stationtime2text() vendor_account.transaction_log.Add(T) /obj/machinery/vending/attack_ai(mob/user as mob) diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index f0bb82efd0..137693f1cf 100644 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -66,7 +66,7 @@ var/global/list/obj/item/device/pda/PDAs = list() /obj/item/device/pda/examine(mob/user) if(..(user, 1)) - user << "The time [worldtime2text()] is displayed in the corner of the screen." + user << "The time [stationtime2text()] is displayed in the corner of the screen." /obj/item/device/pda/medical default_cartridge = /obj/item/weapon/cartridge/medical @@ -523,7 +523,7 @@ var/global/list/obj/item/device/pda/PDAs = list() cartdata["charges"] = cartridge.charges ? cartridge.charges : 0 data["cartridge"] = cartdata - data["stationTime"] = worldtime2text() + data["stationTime"] = stationtime2text() data["new_Message"] = new_message data["new_News"] = new_news diff --git a/code/game/objects/items/devices/communicator/communicator.dm b/code/game/objects/items/devices/communicator/communicator.dm index b101bab0ee..e5715c6060 100644 --- a/code/game/objects/items/devices/communicator/communicator.dm +++ b/code/game/objects/items/devices/communicator/communicator.dm @@ -334,7 +334,7 @@ var/global/list/obj/item/device/communicator/all_communicators = list() data["video_comm"] = video_source ? "\ref[video_source.loc]" : null data["imContacts"] = im_contacts_ui data["imList"] = im_list_ui - data["time"] = worldtime2text() + data["time"] = stationtime2text() data["ring"] = ringer data["homeScreen"] = modules_ui data["note"] = note // current notes diff --git a/code/game/objects/items/devices/uplink.dm b/code/game/objects/items/devices/uplink.dm index faa17586c2..1c5e9c97d2 100644 --- a/code/game/objects/items/devices/uplink.dm +++ b/code/game/objects/items/devices/uplink.dm @@ -158,7 +158,7 @@ nanoui_data["categories"] = categories nanoui_data["discount_name"] = discount_item ? discount_item.name : "" nanoui_data["discount_amount"] = (1-discount_amount)*100 - nanoui_data["offer_expiry"] = worldtime2text(next_offer_time) + nanoui_data["offer_expiry"] = stationtime2text(next_offer_time) else if(nanoui_menu == 1) var/items[0] for(var/datum/uplink_item/item in category.items) diff --git a/code/game/objects/items/weapons/autopsy.dm b/code/game/objects/items/weapons/autopsy.dm index 61c6668c33..65632493dc 100644 --- a/code/game/objects/items/weapons/autopsy.dm +++ b/code/game/objects/items/weapons/autopsy.dm @@ -86,7 +86,7 @@ var/scan_data = "" if(timeofdeath) - scan_data += "Time of death: [worldtime2text(timeofdeath)]

" + scan_data += "Time of death: [stationtime2text(timeofdeath)]

" var/n = 1 for(var/wdata_idx in wdata) @@ -133,7 +133,7 @@ if(damaging_weapon) scan_data += "Severity: [damage_desc]
" scan_data += "Hits by weapon: [total_hits]
" - scan_data += "Approximate time of wound infliction: [worldtime2text(age)]
" + scan_data += "Approximate time of wound infliction: [stationtime2text(age)]
" scan_data += "Affected limbs: [D.organ_names]
" scan_data += "Possible weapons:
" for(var/weapon_name in weapon_chances) diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index 622be84c3d..ece5f068d7 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -392,7 +392,7 @@ if (ticker && ticker.current_state >= GAME_STATE_PLAYING) var/dat = "Round Status

Round Status

" dat += "Current Game Mode: [ticker.mode.name]
" - dat += "Round Duration: [round_duration_as_text()]
" + dat += "Round Duration: [roundduration2text()]
" dat += "Emergency shuttle
" if (!emergency_shuttle.online()) dat += "Call Shuttle
" diff --git a/code/modules/economy/ATM.dm b/code/modules/economy/ATM.dm index bc0388d40d..37a93f2c2e 100644 --- a/code/modules/economy/ATM.dm +++ b/code/modules/economy/ATM.dm @@ -131,7 +131,7 @@ log transactions T.amount = I:worth T.source_terminal = machine_id T.date = current_date_string - T.time = worldtime2text() + T.time = stationtime2text() authenticated_account.transaction_log.Add(T) user << "You insert [I] into [src]." @@ -260,7 +260,7 @@ log transactions T.purpose = transfer_purpose T.source_terminal = machine_id T.date = current_date_string - T.time = worldtime2text() + T.time = stationtime2text() T.amount = "([transfer_amount])" authenticated_account.transaction_log.Add(T) else @@ -302,7 +302,7 @@ log transactions T.purpose = "Unauthorised login attempt" T.source_terminal = machine_id T.date = current_date_string - T.time = worldtime2text() + T.time = stationtime2text() failed_account.transaction_log.Add(T) else usr << "\red \icon[src] Incorrect pin/account combination entered, [max_pin_attempts - number_incorrect_tries] attempts remaining." @@ -322,7 +322,7 @@ log transactions T.purpose = "Remote terminal access" T.source_terminal = machine_id T.date = current_date_string - T.time = worldtime2text() + T.time = stationtime2text() authenticated_account.transaction_log.Add(T) usr << "\blue \icon[src] Access granted. Welcome user '[authenticated_account.owner_name].'" @@ -350,7 +350,7 @@ log transactions T.amount = "([amount])" T.source_terminal = machine_id T.date = current_date_string - T.time = worldtime2text() + T.time = stationtime2text() authenticated_account.transaction_log.Add(T) else usr << "\icon[src]You don't have enough funds to do that!" @@ -375,7 +375,7 @@ log transactions T.amount = "([amount])" T.source_terminal = machine_id T.date = current_date_string - T.time = worldtime2text() + T.time = stationtime2text() authenticated_account.transaction_log.Add(T) else usr << "\icon[src]You don't have enough funds to do that!" @@ -387,7 +387,7 @@ log transactions R.info += "Account holder: [authenticated_account.owner_name]
" R.info += "Account number: [authenticated_account.account_number]
" R.info += "Balance: $[authenticated_account.money]
" - R.info += "Date and time: [worldtime2text()], [current_date_string]

" + R.info += "Date and time: [stationtime2text()], [current_date_string]

" R.info += "Service terminal ID: [machine_id]
" //stamp the paper @@ -410,7 +410,7 @@ log transactions R.info = "Transaction logs
" R.info += "Account holder: [authenticated_account.owner_name]
" R.info += "Account number: [authenticated_account.account_number]
" - R.info += "Date and time: [worldtime2text()], [current_date_string]

" + R.info += "Date and time: [stationtime2text()], [current_date_string]

" R.info += "Service terminal ID: [machine_id]
" R.info += "" R.info += "" @@ -486,7 +486,7 @@ log transactions T.purpose = "Remote terminal access" T.source_terminal = machine_id T.date = current_date_string - T.time = worldtime2text() + T.time = stationtime2text() authenticated_account.transaction_log.Add(T) view_screen = NO_SCREEN diff --git a/code/modules/economy/Accounts.dm b/code/modules/economy/Accounts.dm index 712c591741..cfd720d4dc 100644 --- a/code/modules/economy/Accounts.dm +++ b/code/modules/economy/Accounts.dm @@ -40,7 +40,7 @@ M.account_number = rand(111111, 999999) else T.date = current_date_string - T.time = worldtime2text() + T.time = stationtime2text() T.source_terminal = source_db.machine_id M.account_number = next_account_number @@ -57,7 +57,7 @@ R.info += "Account number: [M.account_number]
" R.info += "Account pin: [M.remote_access_pin]
" R.info += "Starting balance: $[M.money]
" - R.info += "Date and time: [worldtime2text()], [current_date_string]

" + R.info += "Date and time: [stationtime2text()], [current_date_string]

" R.info += "Creation terminal ID: [source_db.machine_id]
" R.info += "Authorised NT officer overseeing creation: [source_db.held_card.registered_name]
" @@ -80,7 +80,7 @@ for(var/datum/money_account/D in all_money_accounts) if(D.account_number == attempt_account_number && !D.suspended) D.money += amount - + //create a transaction log entry var/datum/transaction/T = new() T.target_name = source_name @@ -90,12 +90,12 @@ else T.amount = "[amount]" T.date = current_date_string - T.time = worldtime2text() + T.time = stationtime2text() T.source_terminal = terminal_id D.transaction_log.Add(T) - + return 1 - + return 0 //this returns the first account datum that matches the supplied accnum/pin combination, it returns null if the combination did not match any account diff --git a/code/modules/economy/Accounts_DB.dm b/code/modules/economy/Accounts_DB.dm index 20278d0757..200c3c8320 100644 --- a/code/modules/economy/Accounts_DB.dm +++ b/code/modules/economy/Accounts_DB.dm @@ -28,7 +28,7 @@ T.purpose = reason T.amount = amount T.date = current_date_string - T.time = worldtime2text() + T.time = stationtime2text() T.source_terminal = machine_id return T diff --git a/code/modules/economy/EFTPOS.dm b/code/modules/economy/EFTPOS.dm index 003816e04c..21ef8b4bfa 100644 --- a/code/modules/economy/EFTPOS.dm +++ b/code/modules/economy/EFTPOS.dm @@ -140,7 +140,7 @@ T.amount = transaction_amount T.source_terminal = machine_id T.date = current_date_string - T.time = worldtime2text() + T.time = stationtime2text() linked_account.transaction_log.Add(T) else usr << "\icon[src]\The [O] doesn't have that much money!" @@ -264,7 +264,7 @@ T.amount = "[transaction_amount]" T.source_terminal = machine_id T.date = current_date_string - T.time = worldtime2text() + T.time = stationtime2text() D.transaction_log.Add(T) // T = new() @@ -273,7 +273,7 @@ T.amount = "[transaction_amount]" T.source_terminal = machine_id T.date = current_date_string - T.time = worldtime2text() + T.time = stationtime2text() linked_account.transaction_log.Add(T) else usr << "\icon[src]You don't have that much money!" diff --git a/code/modules/economy/cash_register.dm b/code/modules/economy/cash_register.dm index 109572ffc0..87f7b53a7f 100644 --- a/code/modules/economy/cash_register.dm +++ b/code/modules/economy/cash_register.dm @@ -256,7 +256,7 @@ T.amount = "([transaction_amount])" T.source_terminal = machine_id T.date = current_date_string - T.time = worldtime2text() + T.time = stationtime2text() D.transaction_log.Add(T) // Create log entry in owner's account @@ -266,7 +266,7 @@ T.amount = "[transaction_amount]" T.source_terminal = machine_id T.date = current_date_string - T.time = worldtime2text() + T.time = stationtime2text() linked_account.transaction_log.Add(T) // Save log @@ -304,7 +304,7 @@ T.amount = "[transaction_amount]" T.source_terminal = machine_id T.date = current_date_string - T.time = worldtime2text() + T.time = stationtime2text() linked_account.transaction_log.Add(T) // Save log @@ -414,7 +414,7 @@ - +
Customer[c_name]
Pay Method[p_method]
Station Time[worldtime2text()]
Station Time[stationtime2text()]
"} diff --git a/code/modules/economy/retail_scanner.dm b/code/modules/economy/retail_scanner.dm index 0a79ad5018..4ddf058de2 100644 --- a/code/modules/economy/retail_scanner.dm +++ b/code/modules/economy/retail_scanner.dm @@ -231,7 +231,7 @@ T.amount = "([transaction_amount])" T.source_terminal = machine_id T.date = current_date_string - T.time = worldtime2text() + T.time = stationtime2text() D.transaction_log.Add(T) // Create log entry in owner's account @@ -241,7 +241,7 @@ T.amount = "[transaction_amount]" T.source_terminal = machine_id T.date = current_date_string - T.time = worldtime2text() + T.time = stationtime2text() linked_account.transaction_log.Add(T) // Save log @@ -274,7 +274,7 @@ T.amount = "[transaction_amount]" T.source_terminal = machine_id T.date = current_date_string - T.time = worldtime2text() + T.time = stationtime2text() linked_account.transaction_log.Add(T) // Save log @@ -348,7 +348,7 @@ - +
Customer[c_name]
Pay Method[p_method]
Station Time[worldtime2text()]
Station Time[stationtime2text()]
"} diff --git a/code/modules/events/event_manager.dm b/code/modules/events/event_manager.dm index 4fca5eb3d9..127ae5898e 100644 --- a/code/modules/events/event_manager.dm +++ b/code/modules/events/event_manager.dm @@ -44,7 +44,7 @@ if(EM.add_to_queue) EC.available_events += EM - log_debug("Event '[EM.name]' has completed at [worldtime2text()].") + log_debug("Event '[EM.name]' has completed at [stationtime2text()].") /datum/event_manager/proc/delay_events(var/severity, var/delay) var/list/datum/event_container/EC = event_containers[severity] @@ -67,12 +67,12 @@ var/datum/event_meta/EM = E.event_meta if(EM.name == "Nothing") continue - var/message = "'[EM.name]' began at [worldtime2text(E.startedAt)] " + var/message = "'[EM.name]' began at [stationtime2text(E.startedAt)] " if(E.isRunning) message += "and is still running." else if(E.endedAt - E.startedAt > MinutesToTicks(5)) // Only mention end time if the entire duration was more than 5 minutes - message += "and ended at [worldtime2text(E.endedAt)]." + message += "and ended at [stationtime2text(E.endedAt)]." else message += "and ran to completion." @@ -130,7 +130,7 @@ var/next_event_at = max(0, EC.next_event_time - world.time) html += "" html += "" - html += "" + html += "" html += "" html += "" html += "" html += "" - html += "" + html += "" html += "" html += "" html += "" diff --git a/code/modules/events/money_hacker.dm b/code/modules/events/money_hacker.dm index 07d18c2746..b0304d4f88 100644 --- a/code/modules/events/money_hacker.dm +++ b/code/modules/events/money_hacker.dm @@ -15,15 +15,15 @@ kill() /datum/event/money_hacker/announce() - var/message = "A brute force hack has been detected (in progress since [worldtime2text()]). The target of the attack is: Financial account #[affected_account.account_number], \ + var/message = "A brute force hack has been detected (in progress since [stationtime2text()]). The target of the attack is: Financial account #[affected_account.account_number], \ without intervention this attack will succeed in approximately 10 minutes. Required intervention: temporary suspension of affected accounts until the attack has ceased. \ Notifications will be sent as updates occur.
" var/my_department = "[station_name()] firewall subroutines" - + for(var/obj/machinery/message_server/MS in world) if(!MS.active) continue MS.send_rc_message("Head of Personnel's Desk", my_department, message, "", "", 2) - + /datum/event/money_hacker/tick() if(world.time >= end_time) @@ -51,7 +51,7 @@ T.date = pick("", current_date_string, date1, date2) var/time1 = rand(0, 99999999) var/time2 = "[round(time1 / 36000)+12]:[(time1 / 600 % 60) < 10 ? add_zero(time1 / 600 % 60, 1) : time1 / 600 % 60]" - T.time = pick("", worldtime2text(), time2) + T.time = pick("", stationtime2text(), time2) T.source_terminal = pick("","[pick("Biesel","New Gibson")] GalaxyNet Terminal #[rand(111,999)]","your mums place","nantrasen high CommanD") affected_account.transaction_log.Add(T) diff --git a/code/modules/events/money_lotto.dm b/code/modules/events/money_lotto.dm index b905dd576c..df7f8d1674 100644 --- a/code/modules/events/money_lotto.dm +++ b/code/modules/events/money_lotto.dm @@ -16,7 +16,7 @@ T.purpose = "Winner!" T.amount = winner_sum T.date = current_date_string - T.time = worldtime2text() + T.time = stationtime2text() T.source_terminal = "Sif TCD Terminal #[rand(111,333)]" D.transaction_log.Add(T) diff --git a/code/modules/events/prison_break.dm b/code/modules/events/prison_break.dm index 5173236627..2f5d099e8d 100644 --- a/code/modules/events/prison_break.dm +++ b/code/modules/events/prison_break.dm @@ -4,7 +4,7 @@ var/releaseWhen = 60 var/list/area/areas = list() //List of areas to affect. Filled by start() - + var/eventDept = "Security" //Department name in announcement var/list/areaName = list("Brig") //Names of areas mentioned in AI and Engineering announcements var/list/areaType = list(/area/security/prison, /area/security/brig) //Area types to include. @@ -47,7 +47,7 @@ if(areas && areas.len > 0) var/my_department = "[station_name()] firewall subroutines" - var/rc_message = "An unknown malicious program has been detected in the [english_list(areaName)] lighting and airlock control systems at [worldtime2text()]. Systems will be fully compromised within approximately three minutes. Direct intervention is required immediately.
" + var/rc_message = "An unknown malicious program has been detected in the [english_list(areaName)] lighting and airlock control systems at [stationtime2text()]. Systems will be fully compromised within approximately three minutes. Direct intervention is required immediately.
" for(var/obj/machinery/message_server/MS in world) MS.send_rc_message("Engineering", my_department, rc_message, "", "", 2) for(var/mob/living/silicon/ai/A in player_list) diff --git a/code/modules/mob/death.dm b/code/modules/mob/death.dm index 9fe7f221e1..5e7cfe2603 100644 --- a/code/modules/mob/death.dm +++ b/code/modules/mob/death.dm @@ -78,7 +78,7 @@ healths.icon_state = "health6" timeofdeath = world.time - if(mind) mind.store_memory("Time of death: [worldtime2text()]", 0) + if(mind) mind.store_memory("Time of death: [stationtime2text()]", 0) living_mob_list -= src dead_mob_list |= src diff --git a/code/modules/mob/hear_say.dm b/code/modules/mob/hear_say.dm index 4f14216747..93f6ceb47e 100644 --- a/code/modules/mob/hear_say.dm +++ b/code/modules/mob/hear_say.dm @@ -194,7 +194,7 @@ on_hear_radio(part_a, speaker_name, track, part_b, formatted) /proc/say_timestamp() - return "\[[worldtime2text()]\]" + return "\[[stationtime2text()]\]" /mob/proc/on_hear_radio(part_a, speaker_name, track, part_b, formatted) src << "[part_a][speaker_name][part_b][formatted]" diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 081eb39a5c..9d7ba1bc63 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -654,8 +654,8 @@ if(.) if(statpanel("Status") && ticker && ticker.current_state != GAME_STATE_PREGAME) - stat("Station Time", worldtime2text()) - stat("Round Duration", round_duration_as_text()) + stat("Station Time", stationtime2text()) + stat("Round Duration", roundduration2text()) if(client.holder) if(statpanel("Status")) diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 46cead5a3b..7f385c1645 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -362,7 +362,7 @@ var/dat = "
" dat += "Welcome, [name].
" - dat += "Round Duration: [round_duration_as_text()]
" + dat += "Round Duration: [roundduration2text()]
" if(emergency_shuttle) //In case Nanotrasen decides reposess CentComm's shuttles. if(emergency_shuttle.going_to_centcom()) //Shuttle is going to centcomm, not recalled diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 1e85563ee8..4ad309a79c 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -232,8 +232,8 @@ t = replacetext(t, "\[/i\]", "") t = replacetext(t, "\[u\]", "") t = replacetext(t, "\[/u\]", "") - t = replacetext(t, "\[time\]", "[worldtime2text()]") - t = replacetext(t, "\[date\]", "[worlddate2text()]") + t = replacetext(t, "\[time\]", "[stationtime2text()]") + t = replacetext(t, "\[date\]", "[stationtime2text()]") t = replacetext(t, "\[large\]", "") t = replacetext(t, "\[/large\]", "") t = replacetext(t, "\[sign\]", "[get_signature(P, user)]") diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm index ac054b224f..0d83a5725c 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm @@ -133,7 +133,7 @@ M.adjustOxyLoss(3 * removed) M.Weaken(10) M.silent = max(M.silent, 10) - M.tod = worldtime2text() + M.tod = stationtime2text() /datum/reagent/toxin/zombiepowder/Destroy() if(holder && holder.my_atom && ismob(holder.my_atom)) diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index 186c869ad3..24e0c7ae4e 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -389,7 +389,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, PR.name = "list of researched technologies" PR.info = "
[station_name()] Science Laboratories" PR.info += "

[ (text2num(href_list["print"]) == 2) ? "Detailed" : ] Research Progress Report

" - PR.info += "report prepared at [worldtime2text()] station time

" + PR.info += "report prepared at [stationtime2text()] station time

" if(text2num(href_list["print"]) == 2) PR.info += GetResearchListInfo() else diff --git a/code/modules/research/xenoarchaeology/tools/tools_depthscanner.dm b/code/modules/research/xenoarchaeology/tools/tools_depthscanner.dm index e242838a1e..3b124cd5c6 100644 --- a/code/modules/research/xenoarchaeology/tools/tools_depthscanner.dm +++ b/code/modules/research/xenoarchaeology/tools/tools_depthscanner.dm @@ -32,7 +32,7 @@ //create a new scanlog entry var/datum/depth_scan/D = new() D.coords = "[M.x].[rand(0,9)]:[M.y].[rand(0,9)]:[10 * M.z].[rand(0,9)]" - D.time = worldtime2text() + D.time = stationtime2text() D.record_index = positive_locations.len + 1 D.material = M.mineral ? M.mineral.display_name : "Rock" @@ -54,7 +54,7 @@ //create a new scanlog entry var/datum/depth_scan/D = new() D.coords = "[10 * B.x].[rand(0,9)]:[10 * B.y].[rand(0,9)]:[10 * B.z].[rand(0,9)]" - D.time = worldtime2text() + D.time = stationtime2text() D.record_index = positive_locations.len + 1 //these values are arbitrary diff --git a/code/world.dm b/code/world.dm index 1d439428d2..672715baf5 100644 --- a/code/world.dm +++ b/code/world.dm @@ -157,8 +157,8 @@ var/world_topic_spam_protect_time = world.timeofday // This is dumb, but spacestation13.com's banners break if player count isn't the 8th field of the reply, so... this has to go here. s["players"] = 0 - s["stationtime"] = worldtime2text() - s["roundduration"] = round_duration_as_text() + s["stationtime"] = stationtime2text() + s["roundduration"] = roundduration2text() if(input["status"] == "2") var/list/players = list() From b42d46205fddd158eb51a59c1b1f752067247201 Mon Sep 17 00:00:00 2001 From: SinTwo Date: Sat, 30 Jul 2016 17:39:47 -0400 Subject: [PATCH 3/4] more time proc call fixes --- code/_helpers/time.dm | 14 +++++++++----- code/game/machinery/adv_med.dm | 2 +- code/game/machinery/computer/guestpass.dm | 10 +++++----- code/game/objects/items/devices/uplink.dm | 2 +- code/game/objects/items/weapons/autopsy.dm | 4 ++-- code/modules/events/event_manager.dm | 10 +++++----- 6 files changed, 23 insertions(+), 19 deletions(-) diff --git a/code/_helpers/time.dm b/code/_helpers/time.dm index 75842ca30f..991d64e20b 100644 --- a/code/_helpers/time.dm +++ b/code/_helpers/time.dm @@ -29,16 +29,16 @@ return wtime + (time_offset + wusage) * world.tick_lag -var/roundstart_hour = 0 +var/roundstart_hour var/station_date = "" var/next_station_date_change = 1 DAY -#define station_adjusted_time(time) time2text(time + station_time_in_ticks, "hh:mm") +#define duration2stationtime(time) time2text(station_time_in_ticks + time, "hh:mm") +#define worldtime2stationtime(time) time2text(roundstart_hour HOURS + time, "hh:mm") #define round_duration_in_ticks (round_start_time ? world.time - round_start_time : 0) #define station_time_in_ticks (roundstart_hour HOURS + round_duration_in_ticks) /proc/stationtime2text() - if(!roundstart_hour) roundstart_hour = pick(2,7,12,17) return time2text(station_time_in_ticks, "hh:mm") /proc/stationdate2text() @@ -53,7 +53,7 @@ var/next_station_date_change = 1 DAY return station_date /proc/time_stamp() - return time2text(world.timeofday, "hh:mm:ss") + return time2text(station_time_in_ticks, "hh:mm:ss") /* Returns 1 if it is the selected month and day */ proc/isDay(var/month, var/day) @@ -96,4 +96,8 @@ var/round_start_time = 0 //Can be useful for things dependent on process timing /proc/process_schedule_interval(var/process_name) var/datum/controller/process/process = processScheduler.getProcess(process_name) - return process.schedule_interval \ No newline at end of file + return process.schedule_interval + +/hook/startup/proc/set_roundstart_hour() + roundstart_hour = pick(2,7,12,17) + return 1 \ No newline at end of file diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index 27e0281e63..3fd49c4828 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -410,7 +410,7 @@ visible_message("\The [src] rattles and prints out a sheet of paper.") var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(loc) P.info = "
Body Scan - [href_list["name"]]

" - P.info += "Time of scan: [stationtime2text(world.time)]

" + P.info += "Time of scan: [worldtime2stationtime(world.time)]

" P.info += "[printing_text]" P.info += "

Notes:
" P.name = "Body Scan - [href_list["name"]]" diff --git a/code/game/machinery/computer/guestpass.dm b/code/game/machinery/computer/guestpass.dm index bb70d668bd..4c0f0591b2 100644 --- a/code/game/machinery/computer/guestpass.dm +++ b/code/game/machinery/computer/guestpass.dm @@ -20,17 +20,17 @@ /obj/item/weapon/card/id/guest/examine(mob/user) ..(user) if (world.time < expiration_time) - user << "This pass expires at [stationtime2text(expiration_time)]." + user << "This pass expires at [worldtime2stationtime(expiration_time)]." else - user << "It expired at [stationtime2text(expiration_time)]." + user << "It expired at [worldtime2stationtime(expiration_time)]." /obj/item/weapon/card/id/guest/read() if(!Adjacent(usr)) return //Too far to read if (world.time > expiration_time) - usr << "This pass expired at [stationtime2text(expiration_time)]." + usr << "This pass expired at [worldtime2stationtime(expiration_time)]." else - usr << "This pass expires at [stationtime2text(expiration_time)]." + usr << "This pass expires at [worldtime2stationtime(expiration_time)]." usr << "It grants access to following areas:" for (var/A in temp_access) @@ -213,7 +213,7 @@ if (A) var/area = get_access_desc(A) entry += "[i > 1 ? ", [area]" : "[area]"]" - entry += ". Expires at [stationtime2text(world.time + duration*10*60)]." + entry += ". Expires at [worldtime2stationtime(world.time + duration*10*60)]." internal_log.Add(entry) var/obj/item/weapon/card/id/guest/pass = new(src.loc) diff --git a/code/game/objects/items/devices/uplink.dm b/code/game/objects/items/devices/uplink.dm index 1c5e9c97d2..a68e65b6ea 100644 --- a/code/game/objects/items/devices/uplink.dm +++ b/code/game/objects/items/devices/uplink.dm @@ -158,7 +158,7 @@ nanoui_data["categories"] = categories nanoui_data["discount_name"] = discount_item ? discount_item.name : "" nanoui_data["discount_amount"] = (1-discount_amount)*100 - nanoui_data["offer_expiry"] = stationtime2text(next_offer_time) + nanoui_data["offer_expiry"] = worldtime2stationtime(next_offer_time) else if(nanoui_menu == 1) var/items[0] for(var/datum/uplink_item/item in category.items) diff --git a/code/game/objects/items/weapons/autopsy.dm b/code/game/objects/items/weapons/autopsy.dm index 65632493dc..3cbc75bfeb 100644 --- a/code/game/objects/items/weapons/autopsy.dm +++ b/code/game/objects/items/weapons/autopsy.dm @@ -86,7 +86,7 @@ var/scan_data = "" if(timeofdeath) - scan_data += "Time of death: [stationtime2text(timeofdeath)]

" + scan_data += "Time of death: [worldtime2stationtime(timeofdeath)]

" var/n = 1 for(var/wdata_idx in wdata) @@ -133,7 +133,7 @@ if(damaging_weapon) scan_data += "Severity: [damage_desc]
" scan_data += "Hits by weapon: [total_hits]
" - scan_data += "Approximate time of wound infliction: [stationtime2text(age)]
" + scan_data += "Approximate time of wound infliction: [worldtime2stationtime(age)]
" scan_data += "Affected limbs: [D.organ_names]
" scan_data += "Possible weapons:
" for(var/weapon_name in weapon_chances) diff --git a/code/modules/events/event_manager.dm b/code/modules/events/event_manager.dm index 127ae5898e..534c5aa56d 100644 --- a/code/modules/events/event_manager.dm +++ b/code/modules/events/event_manager.dm @@ -44,7 +44,7 @@ if(EM.add_to_queue) EC.available_events += EM - log_debug("Event '[EM.name]' has completed at [stationtime2text()].") + log_debug("Event '[EM.name]' has completed at [worldtime2stationtime(world.time)].") /datum/event_manager/proc/delay_events(var/severity, var/delay) var/list/datum/event_container/EC = event_containers[severity] @@ -67,12 +67,12 @@ var/datum/event_meta/EM = E.event_meta if(EM.name == "Nothing") continue - var/message = "'[EM.name]' began at [stationtime2text(E.startedAt)] " + var/message = "'[EM.name]' began at [worldtime2stationtime(E.startedAt)] " if(E.isRunning) message += "and is still running." else if(E.endedAt - E.startedAt > MinutesToTicks(5)) // Only mention end time if the entire duration was more than 5 minutes - message += "and ended at [stationtime2text(E.endedAt)]." + message += "and ended at [worldtime2stationtime(E.endedAt)]." else message += "and ran to completion." @@ -130,7 +130,7 @@ var/next_event_at = max(0, EC.next_event_time - world.time) html += "
" html += "" - html += "" + html += "" html += "" html += "" html += "" html += "" - html += "" + html += "" html += "" html += "" html += "" From bf9adfc1324e66bc20665b8947f2130603a96e1d Mon Sep 17 00:00:00 2001 From: SinTwo Date: Mon, 1 Aug 2016 23:17:17 -0400 Subject: [PATCH 4/4] changelog --- html/changelogs/Sin4 - 510scheduler.yml | 36 +++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 html/changelogs/Sin4 - 510scheduler.yml diff --git a/html/changelogs/Sin4 - 510scheduler.yml b/html/changelogs/Sin4 - 510scheduler.yml new file mode 100644 index 0000000000..d8d9fd2a71 --- /dev/null +++ b/html/changelogs/Sin4 - 510scheduler.yml @@ -0,0 +1,36 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +################################# + +# Your name. +author: Sin4 + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - tweak: "Scheduler ported from Baystation's port of Paradise's scheduler."
[severity_to_string[severity]][worldtime2text(max(EC.next_event_time, world.time))][stationtime2text(max(EC.next_event_time, world.time))][round(next_event_at / 600, 0.1)]" html += "--" @@ -178,7 +178,7 @@ html += "
[severity_to_string[EM.severity]][EM.name][worldtime2text(ends_at)][stationtime2text(ends_at)][ends_in]Stop
[severity_to_string[severity]][stationtime2text(max(EC.next_event_time, world.time))][worldtime2stationtime(max(EC.next_event_time, world.time))][round(next_event_at / 600, 0.1)]" html += "--" @@ -178,7 +178,7 @@ html += "
[severity_to_string[EM.severity]][EM.name][stationtime2text(ends_at)][worldtime2stationtime(ends_at)][ends_in]Stop