diff --git a/code/__DEFINES/time.dm b/code/__DEFINES/time.dm index 27f6eae8b6..c5d6f3051e 100644 --- a/code/__DEFINES/time.dm +++ b/code/__DEFINES/time.dm @@ -25,3 +25,10 @@ When using time2text(), please use "DDD" to find the weekday. Refrain from using #define DS2TICKS(DS) ((DS)/world.tick_lag) #define TICKS2DS(T) ((T) TICKS) + +#define GAMETIMESTAMP(format, wtime) time2text(wtime, format) +#define WORLDTIME2TEXT(format) GAMETIMESTAMP(format, world.time) +#define WORLDTIMEOFDAY2TEXT(format) GAMETIMESTAMP(format, world.timeofday) +#define TIME_STAMP(format, showds) showds ? "[WORLDTIMEOFDAY2TEXT(format)]:[world.timeofday % 10]" : WORLDTIMEOFDAY2TEXT(format) +#define STATION_TIME(display_only) ((((world.time - SSticker.round_start_time) * SSticker.station_time_rate_multiplier) + SSticker.gametime_offset) % 864000) - (display_only? GLOB.timezoneOffset : 0) +#define STATION_TIME_TIMESTAMP(format) time2text(STATION_TIME(TRUE), format) \ No newline at end of file diff --git a/code/__HELPERS/text_vr.dm b/code/__HELPERS/text_vr.dm index fadc7b4513..64e13ef65b 100644 --- a/code/__HELPERS/text_vr.dm +++ b/code/__HELPERS/text_vr.dm @@ -24,8 +24,8 @@ GLOBAL_LIST_EMPTY(whitelisted_species_list) /proc/log_mentor(text) GLOB.mentorlog.Add(text) - WRITE_FILE(GLOB.world_game_log, "\[[time_stamp()]]MENTOR: [text]") + WRITE_FILE(GLOB.world_game_log, "\[[TIME_STAMP("hh:mm:ss", FALSE)]]MENTOR: [text]") /proc/log_looc(text) if (CONFIG_GET(flag/log_ooc)) - WRITE_FILE(GLOB.world_game_log, "\[[time_stamp()]]LOOC: [text]") \ No newline at end of file + WRITE_FILE(GLOB.world_game_log, "\[[TIME_STAMP("hh:mm:ss", FALSE)]]LOOC: [text]") \ No newline at end of file diff --git a/code/__HELPERS/time.dm b/code/__HELPERS/time.dm index 5fe65af8f3..200e1f907f 100644 --- a/code/__HELPERS/time.dm +++ b/code/__HELPERS/time.dm @@ -1,22 +1,3 @@ -//Returns the world time in english -/proc/worldtime2text() - return gameTimestamp("hh:mm:ss", world.time) - -/proc/time_stamp(format = "hh:mm:ss", show_ds) - var/time_string = time2text(world.timeofday, format) - return show_ds ? "[time_string]:[world.timeofday % 10]" : time_string - -/proc/gameTimestamp(format = "hh:mm:ss", wtime=null) - if(!wtime) - wtime = world.time - return time2text(wtime - GLOB.timezoneOffset, format) - -/proc/station_time(display_only = FALSE) - return ((((world.time - SSticker.round_start_time) * SSticker.station_time_rate_multiplier) + SSticker.gametime_offset) % 864000) - (display_only? GLOB.timezoneOffset : 0) - -/proc/station_time_timestamp(format = "hh:mm:ss") - return time2text(station_time(TRUE), format) - /proc/station_time_debug(force_set) if(isnum(force_set)) SSticker.gametime_offset = force_set diff --git a/code/controllers/subsystem/nightshift.dm b/code/controllers/subsystem/nightshift.dm index 325ba212c6..df406eed3c 100644 --- a/code/controllers/subsystem/nightshift.dm +++ b/code/controllers/subsystem/nightshift.dm @@ -26,7 +26,7 @@ SUBSYSTEM_DEF(nightshift) /datum/controller/subsystem/nightshift/proc/check_nightshift() var/emergency = GLOB.security_level >= SEC_LEVEL_RED var/announcing = TRUE - var/time = station_time() + var/time = STATION_TIME(FALSE) var/night_time = (time < nightshift_end_time) || (time > nightshift_start_time) if(high_security_mode != emergency) high_security_mode = emergency diff --git a/code/datums/components/forensics.dm b/code/datums/components/forensics.dm index 9a67d01c5c..c7a1f7eba5 100644 --- a/code/datums/components/forensics.dm +++ b/code/datums/components/forensics.dm @@ -130,7 +130,7 @@ var/mob/living/carbon/human/H = M if(H.gloves) hasgloves = "(gloves)" - var/current_time = time_stamp() + var/current_time = TIME_STAMP("hh:mm:ss", FALSE) if(!LAZYACCESS(hiddenprints, M.key)) LAZYSET(hiddenprints, M.key, "First: [M.real_name]\[[current_time]\][hasgloves]. Ckey: [M.ckey]") else diff --git a/code/datums/explosion.dm b/code/datums/explosion.dm index 0b3e431af6..fe16b9459f 100644 --- a/code/datums/explosion.dm +++ b/code/datums/explosion.dm @@ -92,7 +92,7 @@ GLOBAL_LIST_EMPTY(explosions) 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, "flash" = flash_range, "flame" = flame_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))) + SSblackbox.record_feedback("associative", "explosion", 1, list("dev" = devastation_range, "heavy" = heavy_impact_range, "light" = light_impact_range, "flash" = flash_range, "flame" = flame_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))) // 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/datums/wires/airlock.dm b/code/datums/wires/airlock.dm index 63140e6b25..26942a1ba6 100644 --- a/code/datums/wires/airlock.dm +++ b/code/datums/wires/airlock.dm @@ -79,7 +79,7 @@ if(!A.secondsElectrified) A.set_electrified(30) if(usr) - LAZYADD(A.shockedby, text("\[[time_stamp()]\] [key_name(usr)]")) + LAZYADD(A.shockedby, text("\[[TIME_STAMP("hh:mm:ss", FALSE)]\] [key_name(usr)]")) log_combat(usr, A, "electrified") if(WIRE_SAFETY) A.safe = !A.safe @@ -134,7 +134,7 @@ if(A.secondsElectrified != -1) A.set_electrified(-1) if(usr) - LAZYADD(A.shockedby, text("\[[time_stamp()]\] [key_name(usr)]")) + LAZYADD(A.shockedby, text("\[[TIME_STAMP("hh:mm:ss", FALSE)]\] [key_name(usr)]")) log_combat(usr, A, "electrified") if(WIRE_SAFETY) // Cut to disable safeties, mend to re-enable. A.safe = mend diff --git a/code/game/machinery/computer/apc_control.dm b/code/game/machinery/computer/apc_control.dm index 8615af205b..e51d623c2f 100644 --- a/code/game/machinery/computer/apc_control.dm +++ b/code/game/machinery/computer/apc_control.dm @@ -197,7 +197,7 @@ /obj/machinery/computer/apc_control/proc/log_activity(log_text) var/op_string = operator && !(obj_flags & EMAGGED) ? operator : "\[NULL OPERATOR\]" - LAZYADD(logs, "([station_time_timestamp()]) [op_string] [log_text]") + LAZYADD(logs, "([STATION_TIME_TIMESTAMP("hh:mm:ss")]) [op_string] [log_text]") /mob/proc/using_power_flow_console() for(var/obj/machinery/computer/apc_control/A in range(1, src)) diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index d65fb49161..8af83ae08e 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -493,7 +493,7 @@ var/counter = 1 while(src.active2.fields[text("com_[]", counter)]) counter++ - src.active2.fields[text("com_[]", counter)] = text("Made by [] ([]) on [] [], []
[]", src.authenticated, src.rank, station_time_timestamp(), time2text(world.realtime, "MMM DD"), GLOB.year_integer+540, t1) + src.active2.fields[text("com_[]", counter)] = text("Made by [] ([]) on [] [], []
[]", src.authenticated, src.rank, STATION_TIME_TIMESTAMP("hh:mm:ss"), time2text(world.realtime, "MMM DD"), GLOB.year_integer+540, t1) else 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 bacedad6c0..607f8dbe78 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -474,7 +474,7 @@ What a mess.*/ var/counter = 1 while(active2.fields[text("com_[]", counter)]) counter++ - active2.fields[text("com_[]", counter)] = text("Made by [] ([]) on [] [], []
[]", src.authenticated, src.rank, station_time_timestamp(), time2text(world.realtime, "MMM DD"), GLOB.year_integer+540, t1) + active2.fields[text("com_[]", counter)] = text("Made by [] ([]) on [] [], []
[]", src.authenticated, src.rank, STATION_TIME_TIMESTAMP("hh:mm:ss"), time2text(world.realtime, "MMM DD"), GLOB.year_integer+540, t1) if("Delete Record (ALL)") if(active1) @@ -652,7 +652,7 @@ What a mess.*/ var/t2 = stripped_input(usr, "Please input minor crime details:", "Secure. records", "", null) if(!canUseSecurityRecordsConsole(usr, t1, null, a2)) return - var/crime = GLOB.data_core.createCrimeEntry(t1, t2, authenticated, station_time_timestamp()) + var/crime = GLOB.data_core.createCrimeEntry(t1, t2, authenticated, STATION_TIME_TIMESTAMP("hh:mm:ss")) GLOB.data_core.addMinorCrime(active1.fields["id"], crime) investigate_log("New Minor Crime: [t1]: [t2] | Added to [active1.fields["name"]] by [key_name(usr)]", INVESTIGATE_RECORDS) if("mi_crim_delete") @@ -667,7 +667,7 @@ What a mess.*/ var/t2 = stripped_input(usr, "Please input major crime details:", "Secure. records", "", null) if(!canUseSecurityRecordsConsole(usr, t1, null, a2)) return - var/crime = GLOB.data_core.createCrimeEntry(t1, t2, authenticated, station_time_timestamp()) + var/crime = GLOB.data_core.createCrimeEntry(t1, t2, authenticated, STATION_TIME_TIMESTAMP("hh:mm:ss")) GLOB.data_core.addMajorCrime(active1.fields["id"], crime) investigate_log("New Major Crime: [t1]: [t2] | Added to [active1.fields["name"]] by [key_name(usr)]", INVESTIGATE_RECORDS) if("ma_crim_delete") diff --git a/code/game/machinery/computer/telecrystalconsoles.dm b/code/game/machinery/computer/telecrystalconsoles.dm index 43f84656f9..692bc8f038 100644 --- a/code/game/machinery/computer/telecrystalconsoles.dm +++ b/code/game/machinery/computer/telecrystalconsoles.dm @@ -136,7 +136,7 @@ GLOBAL_LIST_INIT(possible_uplinker_IDs, list("Alfa","Bravo","Charlie","Delta","E var/list/transferlog = list() /obj/machinery/computer/telecrystals/boss/proc/logTransfer(logmessage) - transferlog += ("[station_time_timestamp()] [logmessage]") + transferlog += ("[STATION_TIME_TIMESTAMP("hh:mm:ss")] [logmessage]") /obj/machinery/computer/telecrystals/boss/proc/scanUplinkers() for(var/obj/machinery/computer/telecrystals/uplinker/A in urange(scanrange, src.loc)) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 3d7e8dd00e..0183fcecd4 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -1327,7 +1327,7 @@ bolt() //Bolt it! set_electrified(ELECTRIFIED_PERMANENT) //Shock it! if(origin) - LAZYADD(shockedby, "\[[time_stamp()]\] [key_name(origin)]") + LAZYADD(shockedby, "\[[TIME_STAMP("hh:mm:ss", FALSE)]\] [key_name(origin)]") /obj/machinery/door/airlock/disable_lockdown() @@ -1596,7 +1596,7 @@ if(wires.is_cut(WIRE_SHOCK)) to_chat(user, "The electrification wire has been cut") else - LAZYADD(shockedby, "\[[time_stamp()]\] [key_name(user)]") + LAZYADD(shockedby, "\[[TIME_STAMP("hh:mm:ss", FALSE)]\] [key_name(user)]") log_combat(user, src, "electrified") set_electrified(AI_ELECTRIFY_DOOR_TIME) @@ -1606,7 +1606,7 @@ if(wires.is_cut(WIRE_SHOCK)) to_chat(user, "The electrification wire has been cut") else - LAZYADD(shockedby, text("\[[time_stamp()]\] [key_name(user)]")) + LAZYADD(shockedby, text("\[[TIME_STAMP("hh:mm:ss", FALSE)]\] [key_name(user)]")) log_combat(user, src, "electrified") set_electrified(ELECTRIFIED_PERMANENT) diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 9c01c186e1..a2da7de29a 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -223,7 +223,7 @@ if(prob(severity*10 - 20)) if(secondsElectrified == 0) secondsElectrified = -1 - LAZYADD(shockedby, "\[[time_stamp()]\]EM Pulse") + LAZYADD(shockedby, "\[[TIME_STAMP("hh:mm:ss", FALSE)]\]EM Pulse") addtimer(CALLBACK(src, .proc/unelectrify), 300) /obj/machinery/door/proc/unelectrify() diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index 86e8fc8af5..c37c607a6e 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -122,7 +122,7 @@ GLOBAL_LIST_EMPTY(allCasters) var/datum/newscaster/feed_message/newMsg = new /datum/newscaster/feed_message newMsg.author = author newMsg.body = msg - newMsg.time_stamp = "[station_time_timestamp()]" + newMsg.time_stamp = "[STATION_TIME_TIMESTAMP("hh:mm:ss")]" newMsg.is_admin_message = adminMessage newMsg.locked = !allow_comments if(picture) @@ -696,7 +696,7 @@ GLOBAL_LIST_EMPTY(allCasters) var/datum/newscaster/feed_comment/FC = new/datum/newscaster/feed_comment FC.author = scanned_user FC.body = cominput - FC.time_stamp = station_time_timestamp() + FC.time_stamp = STATION_TIME_TIMESTAMP("hh:mm:ss") FM.comments += FC usr.log_message("(as [scanned_user]) commented on message [FM.returnBody(-1)] -- [FC.body]", LOG_COMMENT) updateUsrDialog() diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index efa1b44445..d5de4a4898 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -1017,7 +1017,7 @@ /obj/mecha/log_message(message as text, message_type=LOG_GAME, color=null, log_globally) log.len++ - log[log.len] = list("time"="[station_time_timestamp()]","date","year"="[GLOB.year_integer+540]","message"="[color?"":null][message][color?"":null]") + log[log.len] = list("time"="[STATION_TIME_TIMESTAMP("hh:mm:ss")]","date","year"="[GLOB.year_integer+540]","message"="[color?"":null][message][color?"":null]") ..() return log.len diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index fc4bc32719..9ff717816c 100644 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -220,7 +220,7 @@ GLOBAL_LIST_EMPTY(PDAs) dat += text("ID: [id ? "[id.registered_name], [id.assignment]" : "----------"]") dat += text("
[id ? "Update PDA Info" : ""]

") - dat += "[station_time_timestamp()]
" //:[world.time / 100 % 6][world.time / 100 % 10]" + dat += "[STATION_TIME_TIMESTAMP("hh:mm:ss")]
" //:[world.time / 100 % 6][world.time / 100 % 10]" dat += "[time2text(world.realtime, "MMM DD")] [GLOB.year_integer+540]" dat += "

" diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 7aaee7c5d4..eabd9f1968 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -1089,7 +1089,7 @@ /obj/item/toy/clockwork_watch/examine(mob/user) ..() - to_chat(user, "Station Time: [station_time_timestamp()]") + to_chat(user, "Station Time: [STATION_TIME_TIMESTAMP("hh:mm:ss")]") /* * Toy Dagger diff --git a/code/game/world.dm b/code/game/world.dm index d8576206dd..dedf822597 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -6,7 +6,7 @@ GLOBAL_VAR(restart_counter) //So subsystems globals exist, but are not initialised /world/New() - log_world("World loaded at [time_stamp()]!") + log_world("World loaded at [TIME_STAMP("hh:mm:ss", FALSE)]!") SetupExternalRSC() @@ -90,7 +90,7 @@ GLOBAL_VAR(restart_counter) GLOB.picture_logging_prefix += "R_[GLOB.round_id]_" GLOB.picture_log_directory += "[GLOB.round_id]" else - var/timestamp = replacetext(time_stamp(), ":", ".") + var/timestamp = replacetext(TIME_STAMP("hh:mm:ss", FALSE), ":", ".") GLOB.log_directory += "[timestamp]" GLOB.picture_log_directory += "[timestamp]" GLOB.picture_logging_prefix += "T_[timestamp]_" @@ -226,11 +226,11 @@ GLOBAL_VAR(restart_counter) do_hard_reboot = FALSE if(do_hard_reboot) - log_world("World hard rebooted at [time_stamp()]") + log_world("World hard rebooted at [TIME_STAMP("hh:mm:ss", FALSE)]") shutdown_logging() // See comment below. TgsEndProcess() - log_world("World rebooted at [time_stamp()]") + log_world("World rebooted at [TIME_STAMP("hh:mm:ss", FALSE)]") shutdown_logging() // Past this point, no logging procs can be used, at risk of data loss. ..() diff --git a/code/modules/NTNet/network.dm b/code/modules/NTNet/network.dm index ae8948dafb..645f05ac90 100644 --- a/code/modules/NTNet/network.dm +++ b/code/modules/NTNet/network.dm @@ -133,14 +133,14 @@ return FALSE /datum/ntnet/proc/log_data_transfer(datum/netdata/data) - logs += "[station_time_timestamp()] - [data.generate_netlog()]" + logs += "[STATION_TIME_TIMESTAMP("hh:mm:ss")] - [data.generate_netlog()]" if(logs.len > setting_maxlogcount) logs = logs.Copy(logs.len - setting_maxlogcount, 0) return // Simplified logging: Adds a log. log_string is mandatory parameter, source is optional. /datum/ntnet/proc/add_log(log_string, obj/item/computer_hardware/network_card/source = null) - var/log_text = "[station_time_timestamp()] - " + var/log_text = "[STATION_TIME_TIMESTAMP("hh:mm:ss")] - " if(source) log_text += "[source.get_network_tag()] - " else diff --git a/code/modules/admin/admin_investigate.dm b/code/modules/admin/admin_investigate.dm index ebbef58cbb..8e1926115f 100644 --- a/code/modules/admin/admin_investigate.dm +++ b/code/modules/admin/admin_investigate.dm @@ -2,7 +2,7 @@ if(!message || !subject) return var/F = file("[GLOB.log_directory]/[subject].html") - WRITE_FILE(F, "[time_stamp()] [REF(src)] ([x],[y],[z]) || [src] [message]
") + WRITE_FILE(F, "[TIME_STAMP("hh:mm:ss", FALSE)] [REF(src)] ([x],[y],[z]) || [src] [message]
") /client/proc/investigate_show(subject in list("notes, memos, watchlist", INVESTIGATE_RESEARCH, INVESTIGATE_EXONET, INVESTIGATE_PORTAL, INVESTIGATE_SINGULO, INVESTIGATE_WIRES, INVESTIGATE_TELESCI, INVESTIGATE_GRAVITY, INVESTIGATE_RECORDS, INVESTIGATE_CARGO, INVESTIGATE_SUPERMATTER, INVESTIGATE_ATMOS, INVESTIGATE_EXPERIMENTOR, INVESTIGATE_BOTANY, INVESTIGATE_HALLUCINATIONS, INVESTIGATE_RADIATION, INVESTIGATE_CIRCUIT, INVESTIGATE_NANITES) ) set name = "Investigate" diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index c81c92bd0a..91fdc78d20 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -214,7 +214,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) if(heard_by_no_admins && usr && usr.ckey != initiator_ckey) heard_by_no_admins = FALSE send2irc(initiator_ckey, "Ticket #[id]: Answered by [key_name(usr)]") - _interactions += "[time_stamp()]: [formatted_message]" + _interactions += "[TIME_STAMP("hh:mm:ss", FALSE)]: [formatted_message]" //Removes the ahelp verb and returns it after 2 minutes /datum/admin_help/proc/TimeoutVerb() @@ -416,9 +416,9 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) dat += "[GLOB.TAB][TicketHref("Refresh", ref_src)][GLOB.TAB][TicketHref("Re-Title", ref_src, "retitle")]" if(state != AHELP_ACTIVE) dat += "[GLOB.TAB][TicketHref("Reopen", ref_src, "reopen")]" - dat += "

Opened at: [gameTimestamp(wtime = opened_at)] (Approx [DisplayTimeText(world.time - opened_at)] ago)" + dat += "

Opened at: [GAMETIMESTAMP("hh:mm:ss", closed_at)] (Approx [DisplayTimeText(world.time - opened_at)] ago)" if(closed_at) - dat += "
Closed at: [gameTimestamp(wtime = closed_at)] (Approx [DisplayTimeText(world.time - closed_at)] ago)" + dat += "
Closed at: [GAMETIMESTAMP("hh:mm:ss", closed_at)] (Approx [DisplayTimeText(world.time - closed_at)] ago)" dat += "

" if(initiator) dat += "Actions: [FullMonty(ref_src)]
" diff --git a/code/modules/antagonists/changeling/powers/fakedeath.dm b/code/modules/antagonists/changeling/powers/fakedeath.dm index 41438bcebd..c19eb50e7f 100644 --- a/code/modules/antagonists/changeling/powers/fakedeath.dm +++ b/code/modules/antagonists/changeling/powers/fakedeath.dm @@ -15,7 +15,7 @@ to_chat(user, "We begin our stasis, preparing energy to arise once more.") if(user.stat != DEAD) user.emote("deathgasp") - user.tod = station_time_timestamp() + user.tod = STATION_TIME_TIMESTAMP("hh:mm:ss") user.fakedeath("changeling") //play dead user.update_stat() user.update_canmove() diff --git a/code/modules/assembly/doorcontrol.dm b/code/modules/assembly/doorcontrol.dm index aa1ee8adbc..04b4e3ed3c 100644 --- a/code/modules/assembly/doorcontrol.dm +++ b/code/modules/assembly/doorcontrol.dm @@ -55,7 +55,7 @@ if(specialfunctions & SHOCK) if(D.secondsElectrified) D.secondsElectrified = -1 - LAZYADD(D.shockedby, "\[[time_stamp()]\] [key_name(usr)]") + LAZYADD(D.shockedby, "\[[TIME_STAMP("hh:mm:ss", FALSE)]\] [key_name(usr)]") log_combat(usr, D, "electrified") else D.secondsElectrified = 0 diff --git a/code/modules/detectivework/scanner.dm b/code/modules/detectivework/scanner.dm index ca746e74fd..fd7591db81 100644 --- a/code/modules/detectivework/scanner.dm +++ b/code/modules/detectivework/scanner.dm @@ -116,7 +116,7 @@ // We gathered everything. Create a fork and slowly display the results to the holder of the scanner. var/found_something = 0 - add_log("[station_time_timestamp()][get_timestamp()] - [target_name]", 0) + add_log("[STATION_TIME_TIMESTAMP("hh:mm:ss")][get_timestamp()] - [target_name]", 0) // Fingerprints if(length(fingerprints)) diff --git a/code/modules/error_handler/error_handler.dm b/code/modules/error_handler/error_handler.dm index 1c26a09c30..8b410130cb 100644 --- a/code/modules/error_handler/error_handler.dm +++ b/code/modules/error_handler/error_handler.dm @@ -76,7 +76,7 @@ GLOBAL_VAR_INIT(total_runtimes_skipped, 0) var/skipcount = abs(error_cooldown[erroruid]) - 1 error_cooldown[erroruid] = 0 if(skipcount > 0) - SEND_TEXT(world.log, "\[[time_stamp()]] Skipped [skipcount] runtimes in [E.file],[E.line].") + SEND_TEXT(world.log, "\[[TIME_STAMP("hh:mm:ss", FALSE)]] Skipped [skipcount] runtimes in [E.file],[E.line].") GLOB.error_cache.log_error(E, skip_count = skipcount) error_last_seen[erroruid] = world.time @@ -113,7 +113,7 @@ GLOBAL_VAR_INIT(total_runtimes_skipped, 0) if(GLOB.error_cache) GLOB.error_cache.log_error(E, desclines) - var/main_line = "\[[time_stamp()]] Runtime in [E.file],[E.line]: [E]" + var/main_line = "\[[TIME_STAMP("hh:mm:ss", FALSE)]] Runtime in [E.file],[E.line]: [E]" SEND_TEXT(world.log, main_line) for(var/line in desclines) SEND_TEXT(world.log, line) diff --git a/code/modules/error_handler/error_viewer.dm b/code/modules/error_handler/error_viewer.dm index adcbb8fb57..9ac65d26fb 100644 --- a/code/modules/error_handler/error_viewer.dm +++ b/code/modules/error_handler/error_viewer.dm @@ -131,10 +131,10 @@ GLOBAL_DATUM(error_cache, /datum/error_viewer/error_cache) /datum/error_viewer/error_source/New(exception/e) if (!istype(e)) - name = "\[[time_stamp()]] Uncaught exceptions" + name = "\[[TIME_STAMP("hh:mm:ss", FALSE)]] Uncaught exceptions" return - name = "\[[time_stamp()]] Runtime in [e.file], line [e.line]: [html_encode(e.name)]" + name = "\[[TIME_STAMP("hh:mm:ss", FALSE)]] Runtime in [e.file], line [e.line]: [html_encode(e.name)]" /datum/error_viewer/error_source/show_to(user, datum/error_viewer/back_to, linear) if (!istype(back_to)) @@ -156,15 +156,15 @@ GLOBAL_DATUM(error_cache, /datum/error_viewer/error_cache) /datum/error_viewer/error_entry/New(exception/e, list/desclines, skip_count) if (!istype(e)) - name = "\[[time_stamp()]] Uncaught exception: [html_encode(e.name)]" + name = "\[[TIME_STAMP("hh:mm:ss", FALSE)]] Uncaught exception: [html_encode(e.name)]" return if(skip_count) - name = "\[[time_stamp()]] Skipped [skip_count] runtimes in [e.file],[e.line]." + name = "\[[TIME_STAMP("hh:mm:ss", FALSE)]] Skipped [skip_count] runtimes in [e.file],[e.line]." is_skip_count = TRUE return - name = "\[[time_stamp()]] Runtime in [e.file], line [e.line]: [html_encode(e.name)]" + name = "\[[TIME_STAMP("hh:mm:ss", FALSE)]] Runtime in [e.file], line [e.line]: [html_encode(e.name)]" exc = e if (istype(desclines)) for (var/line in desclines) diff --git a/code/modules/integrated_electronics/subtypes/time.dm b/code/modules/integrated_electronics/subtypes/time.dm index 9f3265ed40..edb9e1ede3 100644 --- a/code/modules/integrated_electronics/subtypes/time.dm +++ b/code/modules/integrated_electronics/subtypes/time.dm @@ -175,7 +175,7 @@ desc = "Tells you what the time is, in terms and adjusted for your local station or planet" /obj/item/integrated_circuit/time/clock/station/get_time() - return station_time() + return STATION_TIME(FALSE) /obj/item/integrated_circuit/time/clock/bluespace name = "integrated clock (Bluespace Absolute Time)" diff --git a/code/modules/mining/machine_silo.dm b/code/modules/mining/machine_silo.dm index bd1da0a90f..8fdc50d2ac 100644 --- a/code/modules/mining/machine_silo.dm +++ b/code/modules/mining/machine_silo.dm @@ -197,7 +197,7 @@ GLOBAL_LIST_EMPTY(silo_access_logs) var/list/materials /datum/ore_silo_log/New(obj/machinery/M, _action, _amount, _noun, list/mats=list()) - timestamp = station_time_timestamp() + timestamp = STATION_TIME_TIMESTAMP("hh:mm:ss") machine_name = M.name area_name = get_area_name(M, TRUE) action = _action diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index fa66daf143..49d2722323 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -84,7 +84,7 @@ var/obj/item/clothing/suit/space/space_ninja/SN = wear_suit if(statpanel("SpiderOS")) stat("SpiderOS Status:","[SN.s_initialized ? "Initialized" : "Disabled"]") - stat("Current Time:", "[station_time_timestamp()]") + stat("Current Time:", "[STATION_TIME_TIMESTAMP("hh:mm:ss")]") if(SN.s_initialized) //Suit gear stat("Energy Charge:", "[round(SN.cell.charge/100)]%") @@ -438,7 +438,7 @@ return else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/security)) return - var/crime = GLOB.data_core.createCrimeEntry(t1, t2, allowed_access, station_time_timestamp()) + var/crime = GLOB.data_core.createCrimeEntry(t1, t2, allowed_access, STATION_TIME_TIMESTAMP("hh:mm:ss")) GLOB.data_core.addMinorCrime(R.fields["id"], crime) investigate_log("New Minor Crime: [t1]: [t2] | Added to [R.fields["name"]] by [key_name(usr)]", INVESTIGATE_RECORDS) to_chat(usr, "Successfully added a minor crime.") @@ -454,7 +454,7 @@ return else if (!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/security)) return - var/crime = GLOB.data_core.createCrimeEntry(t1, t2, allowed_access, station_time_timestamp()) + var/crime = GLOB.data_core.createCrimeEntry(t1, t2, allowed_access, STATION_TIME_TIMESTAMP("hh:mm:ss")) GLOB.data_core.addMajorCrime(R.fields["id"], crime) investigate_log("New Major Crime: [t1]: [t2] | Added to [R.fields["name"]] by [key_name(usr)]", INVESTIGATE_RECORDS) to_chat(usr, "Successfully added a major crime.") @@ -487,7 +487,7 @@ var/counter = 1 while(R.fields[text("com_[]", counter)]) counter++ - R.fields[text("com_[]", counter)] = text("Made by [] on [] [], []
[]", allowed_access, station_time_timestamp(), time2text(world.realtime, "MMM DD"), GLOB.year_integer+540, t1) + R.fields[text("com_[]", counter)] = text("Made by [] on [] [], []
[]", allowed_access, STATION_TIME_TIMESTAMP("hh:mm:ss"), time2text(world.realtime, "MMM DD"), GLOB.year_integer+540, t1) to_chat(usr, "Successfully added comment.") return to_chat(usr, "Unable to locate a data core entry for this person.") diff --git a/code/modules/mob/living/death.dm b/code/modules/mob/living/death.dm index 11e0c56d9e..f16572c5d0 100644 --- a/code/modules/mob/living/death.dm +++ b/code/modules/mob/living/death.dm @@ -53,7 +53,7 @@ stat = DEAD unset_machine() timeofdeath = world.time - tod = station_time_timestamp() + tod = STATION_TIME_TIMESTAMP("hh:mm:ss") var/turf/T = get_turf(src) for(var/obj/item/I in contents) I.on_mob_death(src, gibbed) diff --git a/code/modules/mob/living/status_procs.dm b/code/modules/mob/living/status_procs.dm index 43abe7c825..d1c72069ac 100644 --- a/code/modules/mob/living/status_procs.dm +++ b/code/modules/mob/living/status_procs.dm @@ -284,5 +284,5 @@ emote("deathgasp") add_trait(TRAIT_FAKEDEATH, source) add_trait(TRAIT_DEATHCOMA, source) - tod = station_time_timestamp() + tod = STATION_TIME_TIMESTAMP("hh:mm:ss") update_stat() \ No newline at end of file diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 30e58ebb44..9d662b1673 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -533,8 +533,8 @@ stat(null, "Next Map: [cached.map_name]") stat(null, "Round ID: [GLOB.round_id ? GLOB.round_id : "NULL"]") stat(null, "Server Time: [time2text(world.timeofday, "YYYY-MM-DD hh:mm:ss")]") - stat(null, "Round Time: [worldtime2text()]") - stat(null, "Station Time: [station_time_timestamp()]") + stat(null, "Round Time: [WORLDTIME2TEXT("hh:mm:ss")]") + stat(null, "Station Time: [STATION_TIME_TIMESTAMP("hh:mm:ss")]") stat(null, "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)]%)") if(SSshuttle.emergency) var/ETA = SSshuttle.emergency.getModeStr() diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index d041836f20..35b48afa28 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -474,7 +474,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp else colored_message = "[message]" - var/list/timestamped_message = list("[LAZYLEN(logging[smessage_type]) + 1]\[[time_stamp()]\] [key_name(src)] [loc_name(src)]" = colored_message) + var/list/timestamped_message = list("[LAZYLEN(logging[smessage_type]) + 1]\[[TIME_STAMP("hh:mm:ss", FALSE)]\] [key_name(src)] [loc_name(src)]" = colored_message) logging[smessage_type] += timestamped_message diff --git a/code/modules/modular_computers/NTNet/NTNRC/conversation.dm b/code/modules/modular_computers/NTNet/NTNRC/conversation.dm index 20ad05b8e3..7c4058ef39 100644 --- a/code/modules/modular_computers/NTNet/NTNRC/conversation.dm +++ b/code/modules/modular_computers/NTNet/NTNRC/conversation.dm @@ -19,12 +19,12 @@ return ..() /datum/ntnet_conversation/proc/add_message(message, username) - message = "[station_time_timestamp()] [username]: [message]" + message = "[STATION_TIME_TIMESTAMP("hh:mm:ss")] [username]: [message]" messages.Add(message) trim_message_list() /datum/ntnet_conversation/proc/add_status_message(message) - messages.Add("[station_time_timestamp()] -!- [message]") + messages.Add("[STATION_TIME_TIMESTAMP("hh:mm:ss")] -!- [message]") trim_message_list() /datum/ntnet_conversation/proc/trim_message_list() diff --git a/code/modules/modular_computers/computers/item/computer.dm b/code/modules/modular_computers/computers/item/computer.dm index bc5c711e60..580374c5c0 100644 --- a/code/modules/modular_computers/computers/item/computer.dm +++ b/code/modules/modular_computers/computers/item/computer.dm @@ -333,7 +333,7 @@ data["PC_programheaders"] = program_headers - data["PC_stationtime"] = station_time_timestamp() + data["PC_stationtime"] = STATION_TIME_TIMESTAMP("hh:mm:ss") data["PC_hasheader"] = 1 data["PC_showexitprogram"] = active_program ? 1 : 0 // Hides "Exit Program" button on mainscreen return data diff --git a/code/modules/modular_computers/file_system/programs/card.dm b/code/modules/modular_computers/file_system/programs/card.dm index def388c574..f8372dd2df 100644 --- a/code/modules/modular_computers/file_system/programs/card.dm +++ b/code/modules/modular_computers/file_system/programs/card.dm @@ -159,7 +159,7 @@
[GLOB.data_core ? GLOB.data_core.get_manifest(0) : ""] "} - if(!printer.print_text(contents,text("crew manifest ([])", station_time_timestamp()))) + if(!printer.print_text(contents,text("crew manifest ([])", STATION_TIME_TIMESTAMP("hh:mm:ss")))) to_chat(usr, "Hardware error: Printer was unable to print the file. It may be out of paper.") return else diff --git a/code/modules/modular_computers/file_system/programs/file_browser.dm b/code/modules/modular_computers/file_system/programs/file_browser.dm index fb90ecbfad..090d64e9d7 100644 --- a/code/modules/modular_computers/file_system/programs/file_browser.dm +++ b/code/modules/modular_computers/file_system/programs/file_browser.dm @@ -145,7 +145,7 @@ t = replacetext(t, "\[/i\]", "") t = replacetext(t, "\[u\]", "") t = replacetext(t, "\[/u\]", "") - t = replacetext(t, "\[time\]", "[station_time_timestamp()]") + t = replacetext(t, "\[time\]", "[STATION_TIME_TIMESTAMP("hh:mm:ss")]") t = replacetext(t, "\[date\]", "[time2text(world.realtime, "MMM DD")] [GLOB.year_integer+540]") t = replacetext(t, "\[large\]", "") t = replacetext(t, "\[/large\]", "")