From aa4dc568350909c0bacccd5f7181ef452cc25018 Mon Sep 17 00:00:00 2001
From: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Date: Sat, 25 Apr 2026 16:13:31 -0400
Subject: [PATCH] Removes Station-time (more time changes) (#95744)
## About The Pull Request
Removes Station-Time entirely
Server Time is now NST (Nanotrasen Standard Time). SS13 takes place
exactly 540 years in the future of the current day, so every second is 1
second in-game.
Round Time is now PT (Pay-Time), how Nanotrasen keeps track of how long
the current rotation of Employees has been working for.
Telecomms uses NST due to its importance of being the communication to
the blackbox.
Autopsy report, clocks, scientific reports and requisitions use both
timestamps due to them being more official documents that NT may need to
know beyond just the current round (just for flavortext).
Pretty much everything else (Det scanner, PDA, IC logs, Time-of-Death,
AI law changes, Cyborg file downloading) uses PT
PT
https://github.com/user-attachments/assets/29445051-c98b-4af3-a657-812083aab91a
Clock (Literate)
Clock (Illiterate)
New paperwork time working properly
NST
# Other changes
1. Circuit time checker will now get the value of the given input (Hour,
Minute, Second) rather than the full dedisecond time converted into
hour/minutes/seconds
2. Turns nightshift into a round event that'll last approximately 22
minutes
3. 12-hour pref (doesn't apply to the stat panel because it's global
info) & removal of "TCT" time
4. The chocolate pudding negative moodlet is now based on the server's
IRL time.
5. Admins can now use ``class``, ``style`` and ``background`` (they were
already given perms to use ``img`` so hiding background, which was
removed to prevent image embedding, is pointless)
6. Also fixes ``year`` being off on localhost.
## Why It's Good For The Game
Server Time is approximately 1s = 12s converted, not including it
desyncing from lag (I believe?).
This makes it pretty much impossible for people to actually use this as
a unit of measurement for in-game actions.
Different things also uses different timestamps which is a bit more
confusing.
The main change here is for accessibility and, hopefully, using time as
a source of immersion. "20 minutes ago" is no longer OOC, they're just
speaking in PT. There's no timezones in space, Nanotrasen Standard Time
is the closest there is, but Pay Time is how NT considers when you get
your paychecks, so it's what is more commonly used.
It also fixes major inconsistencies between "IC time" and "Station
time", things like breakfast moodlet was the first 15mins of the round
despite the round starting like 7 hours in? Nukies with an L6 SAW firing
down the halls was shooting like 1 bullet every 3 seconds (assuming 4
bullets per second), overall there was just a disconnect between how
long time actually is in the universe.
The secondary reason for this change (though it is what pushed me to
actually get around to making this change) is the greater stat-panel
removal. This hopes to lessen the dependence on the stat panel for
station-time by making it easier to understand, and the end-goal I have
is for this information to be limited to Admins & the AI (AI will get
the IC version with the accurate year), so until that happens I would
like to improve the use of station-time by making it consistent (for
example, you should only care for PT for IC, which is also what your PDA
displays), so that when it gets removed it won't leave players timeless.
If you haven't already, and is interested in helping remove the stat
panel, every entry that needs to be removed can be found here -
https://hackmd.io/443_dE5lRWeEAp9bjGcKYw?view
Closes https://github.com/tgstation/tgstation/issues/94988
## Changelog
:cl:
del: Removed Station Time, now we use NST (Nanotrasen Standard Time),
which is IRL server time +540 years, and PT (Pay Time), the amount of
time since the round has started.
del: Station nightshift is now a Station event rather than being based
on Server time.
balance: Time circuit's Unit of Measure now tells the amount of time in
hour/minute/seconds rather than giving the whole time translated to
hours/minutes/seconds.
qol: Added a 12-hour clock pref for people who prefer it.
qol: Hovering over NST timestamps on official documents will now
translate how much it is in PT/Shift Time.
admin: Admins can now use style/class/background in their papercode.
/:cl:
---------
Co-authored-by: Isratosh
---
code/__DEFINES/paper.dm | 4 +
code/__DEFINES/time.dm | 10 +--
code/__HELPERS/logging/mob.dm | 2 +-
code/__HELPERS/logging/research.dm | 2 +-
code/__HELPERS/time.dm | 35 +++------
code/_globalvars/time_vars.dm | 5 +-
.../_onclick/hud/screen_objects/new_player.dm | 2 +-
.../configuration/entries/game_options.dm | 9 ---
code/controllers/subsystem/economy.dm | 2 +-
code/controllers/subsystem/explosions.dm | 2 +-
.../subsystem/networks/modular_computers.dm | 2 +-
code/controllers/subsystem/nightshift.dm | 66 ----------------
code/controllers/subsystem/security_level.dm | 3 -
code/controllers/subsystem/statpanel.dm | 5 +-
code/controllers/subsystem/tgui.dm | 2 +-
code/controllers/subsystem/ticker.dm | 20 ++---
code/datums/records/crime.dm | 2 +-
code/datums/request_message.dm | 2 +-
code/datums/status_effects/debuffs/debuffs.dm | 2 +-
code/game/machinery/computer/accounting.dm | 2 +-
code/game/machinery/computer/apc_control.dm | 2 +-
.../machinery/computer/records/medical.dm | 2 +-
code/game/machinery/digital_clock.dm | 4 +-
code/game/machinery/doors/airlock.dm | 6 +-
.../machinery/newscaster/newscaster_data.dm | 4 +-
.../telecomms/machines/message_server.dm | 2 +-
.../objects/items/AI_modules/_AI_modules.dm | 2 +-
.../items/devices/scanners/autopsy_scanner.dm | 7 +-
.../items/devices/scanners/health_analyzer.dm | 11 +--
.../game/objects/items/devices/table_clock.dm | 5 +-
code/game/objects/items/toys.dm | 4 +-
.../structures/signs/signs_interactive.dm | 7 +-
code/game/world.dm | 15 ++--
code/modules/admin/admin_investigate.dm | 2 +-
code/modules/admin/verbs/admin_newscaster.dm | 2 +-
code/modules/admin/verbs/adminhelp.dm | 14 ++--
code/modules/admin/verbs/secrets.dm | 15 ----
code/modules/admin/verbs/sprite_auditor.dm | 2 +-
.../antagonists/heretic/heretic_knowledge.dm | 6 +-
code/modules/cargo/order.dm | 4 +-
code/modules/cargo/orderconsole.dm | 6 +-
code/modules/client/preferences/time.dm | 5 ++
code/modules/detectivework/scanner.dm | 2 +-
code/modules/error_handler/error_handler.dm | 4 +-
code/modules/error_handler/error_viewer.dm | 10 +--
code/modules/escape_menu/details.dm | 36 ++-------
code/modules/escape_menu/escape_menu.dm | 12 ++-
code/modules/events/nightshift.dm | 78 +++++++++++++++++++
.../food_and_drinks/recipes/food_mixtures.dm | 3 +-
code/modules/forensics/_forensics.dm | 2 +-
code/modules/mining/machine_silo.dm | 2 +-
code/modules/mob/living/death.dm | 2 +-
code/modules/mob/living/silicon/silicon.dm | 2 +-
code/modules/mob/living/status_procs.dm | 2 +-
code/modules/mod/modules/modules_general.dm | 2 +-
.../computers/item/computer.dm | 2 +-
.../programs/chatroom/conversation.dm | 4 +-
.../file_system/programs/crewmanifest.dm | 2 +-
.../programs/messenger/messenger_program.dm | 4 +-
code/modules/paperwork/fax.dm | 2 +-
code/modules/paperwork/paper.dm | 4 +-
code/modules/power/apc/apc_main.dm | 6 +-
code/modules/requests/request_manager.dm | 2 +-
code/modules/research/ordnance/_scipaper.dm | 2 +-
.../research/ordnance/doppler_array.dm | 2 +-
.../research/ordnance/tank_compressor.dm | 2 +-
code/modules/reta/reta_system.dm | 2 +-
.../wiremod/components/utility/timepiece.dm | 10 +--
config/game_options.txt | 9 ---
tgstation.dme | 3 +-
.../AccountingConsole/AuditScreen.tsx | 2 +-
.../interfaces/AccountingConsole/index.tsx | 2 +-
.../game_preferences/accessibility.tsx | 10 +++
tgui/packages/tgui/interfaces/Secrets.jsx | 12 +--
tgui/packages/tgui/sanitize.ts | 3 +-
75 files changed, 248 insertions(+), 300 deletions(-)
delete mode 100644 code/controllers/subsystem/nightshift.dm
create mode 100644 code/modules/client/preferences/time.dm
create mode 100644 code/modules/events/nightshift.dm
diff --git a/code/__DEFINES/paper.dm b/code/__DEFINES/paper.dm
index e77086a40e5..ff4c4a50856 100644
--- a/code/__DEFINES/paper.dm
+++ b/code/__DEFINES/paper.dm
@@ -43,3 +43,7 @@
#define LIST_PAPER_STAMP_X "x"
#define LIST_PAPER_STAMP_Y "y"
#define LIST_PAPER_ROTATION "rotation"
+
+///Use in conjunction with `advanced_html` to have underlined text that, when hovered over, will let you see additional text.
+///Would be appreciated if you avoided dotted underlined (and underlined in general) text elsewhere so players don't get confused.
+#define UNDERLINED_HTML_TEXT(text_displayed, revealed_text) "[text_displayed]"
diff --git a/code/__DEFINES/time.dm b/code/__DEFINES/time.dm
index d445b4ec461..0ac278a4f86 100644
--- a/code/__DEFINES/time.dm
+++ b/code/__DEFINES/time.dm
@@ -1,8 +1,8 @@
///number of deciseconds in a day
#define MIDNIGHT_ROLLOVER 864000
-///displays the current time into the round, with a lot of extra code just there for ensuring it looks okay after an entire day passes
-#define ROUND_TIME(...) ( "[STATION_TIME_PASSED() > MIDNIGHT_ROLLOVER ? "[round(STATION_TIME_PASSED()/MIDNIGHT_ROLLOVER)]:[gameTimestamp(wtime = STATION_TIME_PASSED())]" : gameTimestamp(wtime = STATION_TIME_PASSED())]" )
+/// In-universe, SS13 is set 540 years in the future from the real-world day, hence this number for determining the year-offset for the in-game year.
+#define STATION_YEAR_OFFSET 540
///Returns the time that has passed since the game started
#define STATION_TIME_PASSED(...) (world.time - SSticker.round_start_time)
@@ -10,12 +10,6 @@
/// Define that just has the current in-universe year for use in whatever context you might want to display that in. (For example, 2022 -> 2562 given a 540 year offset)
#define CURRENT_STATION_YEAR (GLOB.year_integer + STATION_YEAR_OFFSET)
-/// Used in the GLOB year and tgui PreInit
-#define UTC_YEAR time2text(world.realtime,"YYYY",NO_TIMEZONE)
-
-/// In-universe, SS13 is set 540 years in the future from the real-world day, hence this number for determining the year-offset for the in-game year.
-#define STATION_YEAR_OFFSET 540
-
#define JANUARY 1
#define FEBRUARY 2
#define MARCH 3
diff --git a/code/__HELPERS/logging/mob.dm b/code/__HELPERS/logging/mob.dm
index f5f51256f32..d4ab156bcd9 100644
--- a/code/__HELPERS/logging/mob.dm
+++ b/code/__HELPERS/logging/mob.dm
@@ -46,7 +46,7 @@
if(LOG_RADIO_EMOTE)
colored_message = "(RADIOEMOTE) [colored_message]"
- var/list/timestamped_message = list("\[[time_stamp(format = "YYYY-MM-DD hh:mm:ss")]\] [key_name_and_tag(src)] [loc_name(src)] (Event #[LAZYLEN(logging[smessage_type])])" = colored_message)
+ var/list/timestamped_message = list("\[[server_timestamp(format = "YYYY-MM-DD hh:mm:ss")]\] [key_name_and_tag(src)] [loc_name(src)] (Event #[LAZYLEN(logging[smessage_type])])" = colored_message)
logging[smessage_type] += timestamped_message
diff --git a/code/__HELPERS/logging/research.dm b/code/__HELPERS/logging/research.dm
index f352123f9a2..704e8cb6c45 100644
--- a/code/__HELPERS/logging/research.dm
+++ b/code/__HELPERS/logging/research.dm
@@ -3,4 +3,4 @@
if(!text)
return
var/html_file = file("[GLOB.log_directory]/[INVESTIGATE_RESEARCH].html")
- WRITE_FILE(html_file, "[time_stamp(format = "YYYY-MM-DD hh:mm:ss")] [text] ")
+ WRITE_FILE(html_file, "[server_timestamp(format = "YYYY-MM-DD hh:mm:ss")] [text] ")
diff --git a/code/__HELPERS/time.dm b/code/__HELPERS/time.dm
index 59e95ad8e85..eab1103fc81 100644
--- a/code/__HELPERS/time.dm
+++ b/code/__HELPERS/time.dm
@@ -1,30 +1,14 @@
-/// Returns UTC timestamp with the specifified format and optionally deciseconds
-/proc/time_stamp(format = "hh:mm:ss", show_ds)
- var/time_string = time2text(world.timeofday, format, TIMEZONE_UTC)
+/// Returns UTC timestamp with the specifified format, with optionally deciseconds or optional IC time (year offset), AKA Nanotrasen Standard Time (NST)
+/proc/server_timestamp(format = "hh:mm:ss", show_ds, ic_time, twelve_hour_clock)
+ var/time_string = twelve_hour_clock ? time_to_twelve_hour(format, world.timeofday, world.timezone) : time2text(world.timeofday, format, world.timezone)
+ if(ic_time && findtext(format, "YYYY")) //if we have a year, replace the year
+ time_string = replacetext_char(time_string, "[GLOB.year_integer]", CURRENT_STATION_YEAR)
return show_ds ? "[time_string]:[world.timeofday % 10]" : time_string
-/// Returns timestamp since the server started, for use with world.time
-/proc/gameTimestamp(format = "hh:mm:ss", wtime=world.time)
+/// Returns timestamp since the round started, AKA Pay Time (PT)
+/proc/round_timestamp(format = "hh:mm:ss", wtime = STATION_TIME_PASSED())
return time2text(wtime, format, NO_TIMEZONE)
-///returns the current IC station time in a world.time format
-/proc/station_time(wtime = world.time)
- return (((wtime - SSticker.round_start_time) * SSticker.station_time_rate_multiplier) + SSticker.gametime_offset) % (24 HOURS)
-
-///returns the current IC station time in a human readable format
-/proc/station_time_timestamp(format = "hh:mm:ss", wtime)
- return time2text(station_time(wtime), format, NO_TIMEZONE)
-
-/proc/station_time_debug(force_set)
- if(isnum(force_set))
- SSticker.gametime_offset = force_set
- return
- SSticker.gametime_offset = rand(0, 24 HOURS) //hours in day * minutes in hour * seconds in minute * deciseconds in second
- if(prob(50))
- SSticker.gametime_offset = FLOOR(SSticker.gametime_offset, 1 HOURS)
- else
- SSticker.gametime_offset = CEILING(SSticker.gametime_offset, 1 HOURS)
-
///returns timestamp in a sql and a not-quite-compliant ISO 8601 friendly format. Do not use for SQL, use NOW() instead
/proc/ISOtime(timevar)
return time2text(timevar || world.timeofday, "YYYY-MM-DD hh:mm:ss", world.timezone)
@@ -128,7 +112,7 @@ GLOBAL_VAR_INIT(rollovercheck_last_timeofday, 0)
* the format arg is the format passed down to time2text() (e.g. "hh:mm" is hours and minutes but not seconds).
* the timezone is the time value offset from the local time. It's to be applied outside time2text() to get the AM/PM right.
*/
-/proc/time_to_twelve_hour(time, format = "hh:mm:ss", timezone = TIMEZONE_UTC)
+/proc/time_to_twelve_hour(format = "hh:mm:ss", time = STATION_TIME_PASSED(), timezone = NO_TIMEZONE)
time = MODULUS(time + (timezone * (1 HOURS)), 24 HOURS)
var/am_pm = "AM"
if(time > 12 HOURS)
@@ -137,4 +121,5 @@ GLOBAL_VAR_INIT(rollovercheck_last_timeofday, 0)
time -= 12 HOURS // e.g. 4:16 PM but not 00:42 PM
else if (time < 1 HOURS)
time += 12 HOURS // e.g. 12.23 AM
- return "[time2text(time, format)] [am_pm]"
+ //set NO_TIMEZONE because we've already applied the timezone above.
+ return "[time2text(time, format, NO_TIMEZONE)] [am_pm]"
diff --git a/code/_globalvars/time_vars.dm b/code/_globalvars/time_vars.dm
index fd9b925e0d4..a006a4bc699 100644
--- a/code/_globalvars/time_vars.dm
+++ b/code/_globalvars/time_vars.dm
@@ -1,6 +1,3 @@
-/// The difference betwen midnight (of the host computer) and 0 world.ticks.
-GLOBAL_VAR_INIT(timezoneOffset, 0)
-
-GLOBAL_VAR_INIT(year, UTC_YEAR)
+GLOBAL_VAR_INIT(year, time2text(world.timeofday, "YYYY", TIMEZONE_UTC))
GLOBAL_VAR_INIT(year_integer, text2num(year)) // = 2013???
diff --git a/code/_onclick/hud/screen_objects/new_player.dm b/code/_onclick/hud/screen_objects/new_player.dm
index 5a17abfc5d9..47977aab8eb 100644
--- a/code/_onclick/hud/screen_objects/new_player.dm
+++ b/code/_onclick/hud/screen_objects/new_player.dm
@@ -695,7 +695,7 @@
if(round_started)
new_maptext = "[SSmapping.current_map.map_name] \
[LAZYLEN(GLOB.clients)] player\s online \
- [ROUND_TIME()] in "
+ [round_timestamp()] in "
new_maptext += ""
else
if(hud.mymob.client?.holder)
diff --git a/code/controllers/configuration/entries/game_options.dm b/code/controllers/configuration/entries/game_options.dm
index 0ccde360e3b..4191f5c6fcd 100644
--- a/code/controllers/configuration/entries/game_options.dm
+++ b/code/controllers/configuration/entries/game_options.dm
@@ -396,15 +396,6 @@
/datum/config_entry/flag/enable_night_shifts
-/datum/config_entry/flag/randomize_shift_time
-
-/datum/config_entry/flag/shift_time_realtime
-
-/datum/config_entry/number/shift_time_start_hour
- default = 12
- min_val = 0
- max_val = 23
-
/datum/config_entry/number/monkeycap
default = 64
min_val = 0
diff --git a/code/controllers/subsystem/economy.dm b/code/controllers/subsystem/economy.dm
index 750cdfc7d7c..02cea10cdc8 100644
--- a/code/controllers/subsystem/economy.dm
+++ b/code/controllers/subsystem/economy.dm
@@ -217,7 +217,7 @@ SUBSYSTEM_DEF(economy)
"account" = "[account.account_holder]",
"cost" = price_to_use,
"vendor" = "[astype(vendor, /atom)?.name || vendor]",
- "stationtime" = station_time_timestamp("hh:mm"),
+ "stationtime" = round_timestamp("hh:mm"),
))
/**
diff --git a/code/controllers/subsystem/explosions.dm b/code/controllers/subsystem/explosions.dm
index f5c733c0fd6..4e7d0d5fb8a 100644
--- a/code/controllers/subsystem/explosions.dm
+++ b/code/controllers/subsystem/explosions.dm
@@ -367,7 +367,7 @@ ADMIN_VERB(check_bomb_impacts, R_DEBUG, "Check Bomb Impact", "See what the effec
var/y0 = epicenter.y
var/z0 = epicenter.z
var/area/areatype = get_area(epicenter)
- SSblackbox.record_feedback("associative", "explosion", 1, list("dev" = devastation_range, "heavy" = heavy_impact_range, "light" = light_impact_range, "flame" = flame_range, "flash" = flash_range, "orig_dev" = orig_dev_range, "orig_heavy" = orig_heavy_range, "orig_light" = orig_light_range, "x" = x0, "y" = y0, "z" = z0, "area" = areatype.type, "time" = time_stamp("YYYY-MM-DD hh:mm:ss", 1), "possible_cause" = explosion_cause, "possible_suspect" = who_did_it_game_log))
+ SSblackbox.record_feedback("associative", "explosion", 1, list("dev" = devastation_range, "heavy" = heavy_impact_range, "light" = light_impact_range, "flame" = flame_range, "flash" = flash_range, "orig_dev" = orig_dev_range, "orig_heavy" = orig_heavy_range, "orig_light" = orig_light_range, "x" = x0, "y" = y0, "z" = z0, "area" = areatype.type, "time" = server_timestamp("YYYY-MM-DD hh:mm:ss", 1), "possible_cause" = explosion_cause, "possible_suspect" = who_did_it_game_log))
// Play sounds; we want sounds to be different depending on distance so we will manually do it ourselves.
// Stereo users will also hear the direction of the explosion!
diff --git a/code/controllers/subsystem/networks/modular_computers.dm b/code/controllers/subsystem/networks/modular_computers.dm
index eb25e0c97ae..40ce21c51cd 100644
--- a/code/controllers/subsystem/networks/modular_computers.dm
+++ b/code/controllers/subsystem/networks/modular_computers.dm
@@ -146,7 +146,7 @@ SUBSYSTEM_DEF(modular_computers)
*/
/datum/controller/subsystem/modular_computers/proc/add_log(log_string)
var/list/log_text = list()
- log_text += "\[[station_time_timestamp()]\]"
+ log_text += "\[[round_timestamp()]\]"
log_text += "*SYSTEM* - "
log_text += log_string
log_string = log_text.Join()
diff --git a/code/controllers/subsystem/nightshift.dm b/code/controllers/subsystem/nightshift.dm
deleted file mode 100644
index 170f1269614..00000000000
--- a/code/controllers/subsystem/nightshift.dm
+++ /dev/null
@@ -1,66 +0,0 @@
-SUBSYSTEM_DEF(nightshift)
- name = "Night Shift"
- wait = 10 MINUTES
-
- var/nightshift_active = FALSE
- var/nightshift_start_time = 702000 //7:30 PM, station time
- var/nightshift_end_time = 270000 //7:30 AM, station time
- var/nightshift_first_check = 30 SECONDS
-
- var/high_security_mode = FALSE
- var/list/currentrun
-
-/datum/controller/subsystem/nightshift/Initialize()
- if(!CONFIG_GET(flag/enable_night_shifts))
- can_fire = FALSE
- return SS_INIT_SUCCESS
-
-/datum/controller/subsystem/nightshift/fire(resumed = FALSE)
- if(resumed)
- update_nightshift(resumed = TRUE)
- return
- if(world.time - SSticker.round_start_time < nightshift_first_check)
- return
- check_nightshift()
-
-/datum/controller/subsystem/nightshift/proc/announce(message)
- priority_announce(
- text = message,
- sound = 'sound/announcer/notice/notice2.ogg',
- sender_override = "Automated Lighting System Announcement",
- color_override = "grey",
- )
-
-/datum/controller/subsystem/nightshift/proc/check_nightshift()
- var/emergency = SSsecurity_level.get_current_level_as_number() >= SEC_LEVEL_RED
- var/announcing = TRUE
- var/time = station_time()
- var/night_time = (time < nightshift_end_time) || (time > nightshift_start_time)
- if(high_security_mode != emergency)
- high_security_mode = emergency
- if(night_time)
- announcing = FALSE
- if(!emergency)
- announce("Restoring night lighting configuration to normal operation.")
- else
- announce("Disabling night lighting: Station is in a state of emergency.")
- if(emergency)
- night_time = FALSE
- if(nightshift_active != night_time)
- update_nightshift(night_time, announcing)
-
-/datum/controller/subsystem/nightshift/proc/update_nightshift(active, announce = TRUE, resumed = FALSE, forced = FALSE)
- if(!resumed)
- currentrun = SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/power/apc)
- nightshift_active = active
- if(announce)
- if (active)
- announce("Good evening, crew. To reduce power consumption and stimulate the circadian rhythms of some species, all of the lights aboard the station have been dimmed for the night.")
- else
- announce("Good morning, crew. As it is now day time, all of the lights aboard the station have been restored to their former brightness.")
- for(var/obj/machinery/power/apc/APC as anything in currentrun)
- currentrun -= APC
- if (APC.area && (APC.area.type in GLOB.the_station_areas))
- APC.set_nightshift(nightshift_active)
- if(MC_TICK_CHECK && !forced) // subsystem will be in state SS_IDLE if forced by an admin
- return
diff --git a/code/controllers/subsystem/security_level.dm b/code/controllers/subsystem/security_level.dm
index 2e48d593fae..c88237ec7ea 100644
--- a/code/controllers/subsystem/security_level.dm
+++ b/code/controllers/subsystem/security_level.dm
@@ -42,9 +42,6 @@ SUBSYSTEM_DEF(security_level)
if(!selected_level)
CRASH("set_level was called with an invalid security level([new_level])")
- if(SSnightshift.can_fire && (selected_level.number_level >= SEC_LEVEL_RED || current_security_level.number_level >= SEC_LEVEL_RED))
- SSnightshift.next_fire = world.time + 7 SECONDS // Fire nightshift after the security level announcement is complete
-
if(announce)
level_announce(selected_level, current_security_level.number_level) // We want to announce BEFORE updating to the new level
diff --git a/code/controllers/subsystem/statpanel.dm b/code/controllers/subsystem/statpanel.dm
index 27c0b2d597d..191d270dbbd 100644
--- a/code/controllers/subsystem/statpanel.dm
+++ b/code/controllers/subsystem/statpanel.dm
@@ -37,9 +37,8 @@ SUBSYSTEM_DEF(statpanels)
global_data += list(
"Round ID: [GLOB.round_id ? GLOB.round_id : "NULL"]",
- "Server Time: [time2text(world.timeofday, "YYYY-MM-DD hh:mm:ss", world.timezone)]",
- "Round Time: [ROUND_TIME()]",
- "Station Time: [station_time_timestamp()]",
+ "Server Time/NST: [server_timestamp(format = "YYYY-MM-DD hh:mm:ss")]",
+ "Shift Time/PT: [(SSticker.round_start_time == 0) ? "Pre-Game" : round_timestamp()]",
"Time Dilation: [round(SStime_track.time_dilation_current,1)]% AVG:([round(SStime_track.time_dilation_avg_fast,1)]%, [round(SStime_track.time_dilation_avg,1)]%, [round(SStime_track.time_dilation_avg_slow,1)]%)",
)
diff --git a/code/controllers/subsystem/tgui.dm b/code/controllers/subsystem/tgui.dm
index 9f5d518b6c2..df33cf68c8c 100644
--- a/code/controllers/subsystem/tgui.dm
+++ b/code/controllers/subsystem/tgui.dm
@@ -37,7 +37,7 @@ SUBSYSTEM_DEF(tgui)
ntos_error = ""
basehtml = replacetextEx(basehtml, "", ntos_error)
- basehtml = replacetextEx(basehtml, "", "Nanotrasen (c) 2525-[text2num(UTC_YEAR) + STATION_YEAR_OFFSET]") // This can't use the GLOB as it runs before those are populated
+ basehtml = replacetextEx(basehtml, "", "Nanotrasen (c) 2525-[CURRENT_STATION_YEAR]")
/datum/controller/subsystem/tgui/OnConfigLoad()
var/storage_iframe = CONFIG_GET(string/storage_cdn_iframe)
diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm
index 6bd850c3d08..9c5f67ec601 100644
--- a/code/controllers/subsystem/ticker.dm
+++ b/code/controllers/subsystem/ticker.dm
@@ -38,9 +38,6 @@ SUBSYSTEM_DEF(ticker)
var/timeLeft //pregame timer
var/start_at
- var/gametime_offset = 432000 //Deciseconds to add to world.time for station time.
- var/station_time_rate_multiplier = 12 //factor of station time progressal vs real time.
-
/// Num of players, used for pregame stats on statpanel
var/totalPlayers = 0
/// Num of ready players, used for pregame stats on statpanel (only viewable by admins)
@@ -131,21 +128,14 @@ SUBSYSTEM_DEF(ticker)
GLOB.syndicate_code_response_regex = codeword_match
start_at = world.time + (CONFIG_GET(number/lobby_countdown) * (1 SECONDS))
- round_start_time = start_at // May be changed later, but prevents the time from jumping back when the round actually starts
- if(CONFIG_GET(flag/randomize_shift_time))
- gametime_offset = rand(0, 23) * (1 HOURS)
- else if(CONFIG_GET(flag/shift_time_realtime))
- gametime_offset = world.timeofday + GLOB.timezoneOffset
- station_time_rate_multiplier = 1
- else
- gametime_offset = (CONFIG_GET(number/shift_time_start_hour) * (1 HOURS))
+
return SS_INIT_SUCCESS
/datum/controller/subsystem/ticker/fire()
switch(current_state)
if(GAME_STATE_STARTUP)
if(Master.initializations_finished_with_no_players_logged_in)
- start_at = world.time + (CONFIG_GET(number/lobby_countdown) * 10)
+ start_at = world.time + (CONFIG_GET(number/lobby_countdown) * (1 SECONDS))
for(var/client/C in GLOB.clients)
window_flash(C, ignorepref = TRUE) //let them know lobby has opened up.
to_chat(world, span_notice("Welcome to [station_name()]!"))
@@ -156,9 +146,9 @@ SUBSYSTEM_DEF(ticker)
fire()
if(GAME_STATE_PREGAME)
- //lobby stats for statpanels
+ //lobby stats for statpanels
if(isnull(timeLeft))
- timeLeft = max(0,start_at - world.time)
+ timeLeft = max(0, start_at - world.time)
totalPlayers = LAZYLEN(GLOB.new_player_list)
totalPlayersReady = 0
total_admins_ready = 0
@@ -191,7 +181,7 @@ SUBSYSTEM_DEF(ticker)
if(!setup())
//setup failed
current_state = GAME_STATE_STARTUP
- start_at = world.time + (CONFIG_GET(number/lobby_countdown) * 10)
+ start_at = world.time + (CONFIG_GET(number/lobby_countdown) * (1 SECONDS))
timeLeft = null
Master.SetRunLevel(RUNLEVEL_LOBBY)
SEND_SIGNAL(src, COMSIG_TICKER_ERROR_SETTING_UP)
diff --git a/code/datums/records/crime.dm b/code/datums/records/crime.dm
index 729b85c56b8..a403923ab80 100644
--- a/code/datums/records/crime.dm
+++ b/code/datums/records/crime.dm
@@ -19,7 +19,7 @@
src.author = author
src.details = details
src.name = name
- src.time = station_time_timestamp()
+ src.time = round_timestamp()
/datum/crime/citation
/// Fine for the crime
diff --git a/code/datums/request_message.dm b/code/datums/request_message.dm
index 18feada06cb..c88433e5ca9 100644
--- a/code/datums/request_message.dm
+++ b/code/datums/request_message.dm
@@ -21,7 +21,7 @@
/datum/request_message/New(data)
sender_department = data["sender_department"]
- received_time = station_time_timestamp()
+ received_time = round_timestamp()
content = data["message"]
message_verified_by = data["verified"]
message_stamped_by = data["stamped"]
diff --git a/code/datums/status_effects/debuffs/debuffs.dm b/code/datums/status_effects/debuffs/debuffs.dm
index b55a385e237..08f36ff7036 100644
--- a/code/datums/status_effects/debuffs/debuffs.dm
+++ b/code/datums/status_effects/debuffs/debuffs.dm
@@ -289,7 +289,7 @@
var/delta = world.time - last_dead_time
var/new_timeofdeath = owner.timeofdeath + delta
owner.timeofdeath = new_timeofdeath
- owner.station_timestamp_timeofdeath = station_time_timestamp(wtime=new_timeofdeath)
+ owner.station_timestamp_timeofdeath = round_timestamp(wtime=new_timeofdeath)
last_dead_time = null
if(owner.stat == DEAD)
last_dead_time = world.time
diff --git a/code/game/machinery/computer/accounting.dm b/code/game/machinery/computer/accounting.dm
index 05a1d12ed40..6ccc1d2c7b3 100644
--- a/code/game/machinery/computer/accounting.dm
+++ b/code/game/machinery/computer/accounting.dm
@@ -37,7 +37,7 @@
data["accounts"] = player_accounts
data["audit_log"] = SSeconomy.audit_log
data["crashing"] = HAS_TRAIT(SSeconomy, TRAIT_MARKET_CRASHING)
- data["station_time"] = station_time_timestamp("hh:mm")
+ data["station_time"] = round_timestamp("hh:mm")
return data
/obj/machinery/computer/accounting/ui_static_data(mob/user)
diff --git a/code/game/machinery/computer/apc_control.dm b/code/game/machinery/computer/apc_control.dm
index 6c56f6e2aa6..a7add4639c3 100644
--- a/code/game/machinery/computer/apc_control.dm
+++ b/code/game/machinery/computer/apc_control.dm
@@ -48,7 +48,7 @@
/obj/machinery/computer/apc_control/proc/log_activity(log_text)
if(!should_log)
return
- LAZYADD(logs, "([station_time_timestamp()]): [auth_id] [log_text]")
+ LAZYADD(logs, "([round_timestamp()]): [auth_id] [log_text]")
///Resets the console's emagged state and re-enables logging of activity
/obj/machinery/computer/apc_control/proc/restore_comp(mob/user)
diff --git a/code/game/machinery/computer/records/medical.dm b/code/game/machinery/computer/records/medical.dm
index d148b5bd262..108abd8fbf9 100644
--- a/code/game/machinery/computer/records/medical.dm
+++ b/code/game/machinery/computer/records/medical.dm
@@ -100,7 +100,7 @@
if(!content)
return FALSE
- var/datum/medical_note/new_note = new(usr.name, content, station_time_timestamp())
+ var/datum/medical_note/new_note = new(usr.name, content, round_timestamp())
while(length(target.medical_notes) > 2)
target.medical_notes.Cut(1, 2)
diff --git a/code/game/machinery/digital_clock.dm b/code/game/machinery/digital_clock.dm
index 57c58083aae..e43ed60c32f 100644
--- a/code/game/machinery/digital_clock.dm
+++ b/code/game/machinery/digital_clock.dm
@@ -110,7 +110,7 @@
if(obj_flags & EMAGGED)
station_minutes = rand(0, 99)
else
- station_minutes = text2num(station_time_timestamp(format = "mm"))
+ station_minutes = text2num(round_timestamp(format = "mm"))
// tenth / the '3' in '31' / 31 -> 3.1 -> 3
var/station_minute_tenth = station_minutes >= 10 ? round(station_minutes * 0.1) : 0
@@ -122,7 +122,7 @@
if(obj_flags & EMAGGED)
station_hours = rand(0, 99)
else
- station_hours = text2num(station_time_timestamp(format = "hh"))
+ station_hours = text2num(round_timestamp(format = "hh"))
// one / the '1' in '12' / 12 -> 1.2 -> 1
var/station_hours_tenth = station_minutes >= 10 ? round(station_hours * 0.1) : 0
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index edce48f662d..3ff1662d99b 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -1575,7 +1575,7 @@
bolt() //Bolt it!
set_electrified(MACHINE_ELECTRIFIED_PERMANENT) //Shock it!
if(origin)
- LAZYADD(shockedby, "\[[time_stamp()]\] [key_name(origin)]")
+ LAZYADD(shockedby, "\[[server_timestamp()]\] [key_name(origin)]")
/obj/machinery/door/airlock/disable_lockdown()
@@ -1599,7 +1599,7 @@
return
if(prob(severity*10 - 20) && (secondsElectrified < 30) && (secondsElectrified != MACHINE_ELECTRIFIED_PERMANENT))
set_electrified(30)
- LAZYADD(shockedby, "\[[time_stamp()]\]EM Pulse")
+ LAZYADD(shockedby, "\[[server_timestamp()]\]EM Pulse")
/obj/machinery/door/airlock/proc/set_electrified(seconds, mob/user)
secondsElectrified = seconds
@@ -1616,7 +1616,7 @@
message = "unshocked"
else
message = "temp shocked for [secondsElectrified] seconds"
- LAZYADD(shockedby, "\[[time_stamp()]\] [key_name(user)] - ([uppertext(message)])")
+ LAZYADD(shockedby, "\[[server_timestamp()]\] [key_name(user)] - ([uppertext(message)])")
log_combat(user, src, message)
add_hiddenprint(user)
diff --git a/code/game/machinery/newscaster/newscaster_data.dm b/code/game/machinery/newscaster/newscaster_data.dm
index 59b8f09db47..6c91c94d6af 100644
--- a/code/game/machinery/newscaster/newscaster_data.dm
+++ b/code/game/machinery/newscaster/newscaster_data.dm
@@ -207,7 +207,7 @@ GLOBAL_LIST_EMPTY(request_list)
var/datum/feed_message/new_article = new /datum/feed_message
new_article.author = author
new_article.body = msg
- new_article.time_stamp = "[station_time_timestamp()]"
+ new_article.time_stamp = "[round_timestamp()]"
new_article.is_admin_message = adminMessage
new_article.locked = !allow_comments
@@ -243,7 +243,7 @@ GLOBAL_LIST_EMPTY(request_list)
var/datum/feed_comment/new_feed_comment = new/datum/feed_comment
new_feed_comment.author = newscaster_username
new_feed_comment.body = comment_text
- new_feed_comment.time_stamp = station_time_timestamp()
+ new_feed_comment.time_stamp = round_timestamp()
GLOB.news_network.last_action ++
current_message.comments += new_feed_comment
if(user)
diff --git a/code/game/machinery/telecomms/machines/message_server.dm b/code/game/machinery/telecomms/machines/message_server.dm
index f9fb183e53e..cb34bf1e813 100644
--- a/code/game/machinery/telecomms/machines/message_server.dm
+++ b/code/game/machinery/telecomms/machines/message_server.dm
@@ -105,7 +105,7 @@
if (calibrating)
calibrating += world.time
say("Calibrating... Estimated wait time: [rand(3, 9)] minutes.")
- pda_msgs += new /datum/data_tablet_msg("System Administrator", "system", "This is an automated message. System calibration started at [station_time_timestamp()].")
+ pda_msgs += new /datum/data_tablet_msg("System Administrator", "system", "This is an automated message. System calibration started at [server_timestamp(ic_time = TRUE)] (PT: [round_timestamp()]).")
else
pda_msgs += new /datum/data_tablet_msg("System Administrator", "system", MESSAGE_SERVER_FUNCTIONING_MESSAGE)
diff --git a/code/game/objects/items/AI_modules/_AI_modules.dm b/code/game/objects/items/AI_modules/_AI_modules.dm
index 3422f57ac3b..69c809c903e 100644
--- a/code/game/objects/items/AI_modules/_AI_modules.dm
+++ b/code/game/objects/items/AI_modules/_AI_modules.dm
@@ -89,7 +89,7 @@
else
to_chat(user, span_notice("Upload complete."))
- var/time = time2text(world.realtime,"hh:mm:ss", TIMEZONE_UTC)
+ var/time = round_timestamp()
var/ainame = law_datum.owner ? law_datum.owner.name : "empty AI core"
var/aikey = law_datum.owner ? law_datum.owner.ckey : "null"
diff --git a/code/game/objects/items/devices/scanners/autopsy_scanner.dm b/code/game/objects/items/devices/scanners/autopsy_scanner.dm
index c541e513a0d..5e0376879e7 100644
--- a/code/game/objects/items/devices/scanners/autopsy_scanner.dm
+++ b/code/game/objects/items/devices/scanners/autopsy_scanner.dm
@@ -54,8 +54,9 @@
var/obj/item/paper/autopsy_report = new(get_turf(src))
autopsy_report.color = "#99ccff"
- autopsy_report.name = "autopsy report of [scanned] - [station_time_timestamp()])"
- var/final_report_text = "
Autopsy report. Time of Autopsy: [station_time_timestamp()]