From 4f5a8906c65160caac169d6540502d91d69850e4 Mon Sep 17 00:00:00 2001 From: Tastyfish Date: Sat, 29 Oct 2022 23:46:09 -0400 Subject: [PATCH] [MISSED MIRROR] Macro Defines the On-Station Year (#17236) Missed mirror 70827 --- code/__DEFINES/time.dm | 5 +++++ code/datums/memory/memory.dm | 4 ++-- code/game/gamemodes/dynamic/dynamic.dm | 2 +- code/game/machinery/computer/medical.dm | 2 +- code/game/machinery/computer/security.dm | 2 +- code/game/objects/structures/signs/signs_interactive.dm | 2 +- code/modules/mob/living/carbon/human/human.dm | 2 +- code/modules/modular_computers/computers/item/computer.dm | 2 +- code/modules/reagents/reagent_containers/cups/glassbottle.dm | 4 ++-- modular_skyrat/modules/lorecaster/code/archive_viewer.dm | 2 +- 10 files changed, 16 insertions(+), 11 deletions(-) diff --git a/code/__DEFINES/time.dm b/code/__DEFINES/time.dm index 5e56e3e7a4c..847eddcf25c 100644 --- a/code/__DEFINES/time.dm +++ b/code/__DEFINES/time.dm @@ -4,6 +4,11 @@ ///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 ( "[world.time - SSticker.round_start_time > MIDNIGHT_ROLLOVER ? "[round((world.time - SSticker.round_start_time)/MIDNIGHT_ROLLOVER)]:[worldtime2text()]" : worldtime2text()]" ) +/// 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) + +/// 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 diff --git a/code/datums/memory/memory.dm b/code/datums/memory/memory.dm index 300e6fca33b..f9a8129c4ab 100644 --- a/code/datums/memory/memory.dm +++ b/code/datums/memory/memory.dm @@ -190,9 +190,9 @@ //after replacement section for performance if(story_flags & STORY_FLAG_DATED) if(memory_flags & MEMORY_FLAG_NOSTATIONNAME) - parsed_story += "This took place in [time2text(world.realtime, "Month")] of [GLOB.year_integer+540]." + parsed_story += "This took place in [time2text(world.realtime, "Month")] of [CURRENT_STATION_YEAR]." else - parsed_story += "This took place in [time2text(world.realtime, "Month")] of [GLOB.year_integer+540] on [station_name()]." + parsed_story += "This took place in [time2text(world.realtime, "Month")] of [CURRENT_STATION_YEAR] on [station_name()]." parsed_story = trim_right(parsed_story) diff --git a/code/game/gamemodes/dynamic/dynamic.dm b/code/game/gamemodes/dynamic/dynamic.dm index a9c0442d1a2..0be1e1b89f1 100644 --- a/code/game/gamemodes/dynamic/dynamic.dm +++ b/code/game/gamemodes/dynamic/dynamic.dm @@ -294,7 +294,7 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1) return ..() /datum/game_mode/dynamic/proc/send_intercept() - . = "Nanotrasen Department of Intelligence Threat Advisory, Spinward Sector, TCD [time2text(world.realtime, "DDD, MMM DD")], [GLOB.year_integer+540]:
" + . = "Nanotrasen Department of Intelligence Threat Advisory, Spinward Sector, TCD [time2text(world.realtime, "DDD, MMM DD")], [CURRENT_STATION_YEAR]:
" switch(round(shown_threat)) if(0 to 19) var/show_core_territory = (GLOB.current_living_antags.len > 0) diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index df3407b0d1c..c1aaa4d4d3c 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -498,7 +498,7 @@ var/counter = 1 while(active2.fields[text("com_[]", counter)]) counter++ - active2.fields[text("com_[]", counter)] = text("Made by [] ([]) on [] [], []
[]", authenticated, rank, station_time_timestamp(), time2text(world.realtime, "MMM DD"), GLOB.year_integer+540, t1) + active2.fields[text("com_[]", counter)] = text("Made by [] ([]) on [] [], []
[]", authenticated, rank, station_time_timestamp(), time2text(world.realtime, "MMM DD"), CURRENT_STATION_YEAR, t1) else if(href_list["del_c"]) if((istype(active2, /datum/data/record) && 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 a40cbd6a085..8f4be42ed30 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -640,7 +640,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(), time2text(world.realtime, "MMM DD"), CURRENT_STATION_YEAR, t1) if("Delete Record (ALL)") if(active1) diff --git a/code/game/objects/structures/signs/signs_interactive.dm b/code/game/objects/structures/signs/signs_interactive.dm index be076934f14..3e017a6ebd6 100644 --- a/code/game/objects/structures/signs/signs_interactive.dm +++ b/code/game/objects/structures/signs/signs_interactive.dm @@ -19,7 +19,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/sign/calendar, 32) /obj/structure/sign/calendar/examine(mob/user) . = ..() - . += span_info("The current date is: [time2text(world.realtime, "DDD, MMM DD")], [GLOB.year_integer+540].") + . += span_info("The current date is: [time2text(world.realtime, "DDD, MMM DD")], [CURRENT_STATION_YEAR].") if(SSevents.holidays) . += span_info("Events:") for(var/holidayname in SSevents.holidays) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 0226851850b..82a775218ee 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -400,7 +400,7 @@ var/counter = 1 while(sec_record.fields[text("com_[]", counter)]) //SKYRAT EDIT CHANGE - EXAMINE RECORDS counter++ - sec_record.fields[text("com_[]", counter)] = text("Made by [] on [] [], []
[]", allowed_access, station_time_timestamp(), time2text(world.realtime, "MMM DD"), GLOB.year_integer+540, t1) //SKYRAT EDIT CHANGE - EXAMINE RECORDS + sec_record.fields[text("com_[]", counter)] = text("Made by [] on [] [], []
[]", allowed_access, station_time_timestamp(), time2text(world.realtime, "MMM DD"), CURRENT_STATION_YEAR, t1) //SKYRAT EDIT CHANGE - EXAMINE RECORDS to_chat(human_user, span_notice("Successfully added comment.")) return diff --git a/code/modules/modular_computers/computers/item/computer.dm b/code/modules/modular_computers/computers/item/computer.dm index c9c961da3b3..0d6595d4709 100644 --- a/code/modules/modular_computers/computers/item/computer.dm +++ b/code/modules/modular_computers/computers/item/computer.dm @@ -592,7 +592,7 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar data["PC_programheaders"] = program_headers data["PC_stationtime"] = station_time_timestamp() - data["PC_stationdate"] = "[time2text(world.realtime, "DDD, Month DD")], [GLOB.year_integer+540]" + data["PC_stationdate"] = "[time2text(world.realtime, "DDD, Month DD")], [CURRENT_STATION_YEAR]" data["PC_showexitprogram"] = !!active_program // Hides "Exit Program" button on mainscreen return data diff --git a/code/modules/reagents/reagent_containers/cups/glassbottle.dm b/code/modules/reagents/reagent_containers/cups/glassbottle.dm index e1e111c106a..e2c4b7c2430 100644 --- a/code/modules/reagents/reagent_containers/cups/glassbottle.dm +++ b/code/modules/reagents/reagent_containers/cups/glassbottle.dm @@ -309,14 +309,14 @@ LAZYSET(located_wine.data, "vintage", wine_info) /obj/item/reagent_containers/cup/glass/bottle/wine/proc/generate_vintage() - return "[GLOB.year_integer + 540] Nanotrasen Light Red" + return "[CURRENT_STATION_YEAR] Nanotrasen Light Red" /obj/item/reagent_containers/cup/glass/bottle/wine/unlabeled name = "unlabeled wine bottle" desc = "There's no label on this wine bottle." /obj/item/reagent_containers/cup/glass/bottle/wine/unlabeled/generate_vintage() - var/current_year = GLOB.year_integer + 540 + var/current_year = CURRENT_STATION_YEAR var/year = rand(current_year-50,current_year) var/type = pick("Sparkling","Dry White","Sweet White","Rich White","Rose","Light Red","Medium Red","Bold Red","Dessert") var/origin = pick("Nanotrasen","Syndicate","Local") diff --git a/modular_skyrat/modules/lorecaster/code/archive_viewer.dm b/modular_skyrat/modules/lorecaster/code/archive_viewer.dm index 6df146525a3..c428c3af2e3 100644 --- a/modular_skyrat/modules/lorecaster/code/archive_viewer.dm +++ b/modular_skyrat/modules/lorecaster/code/archive_viewer.dm @@ -45,7 +45,7 @@ if(!("text" in uncompiled_stories[story])) uncompiled_stories[story]["text"] = "Someone forgot to fill out the article!" if(!("year" in uncompiled_stories[story])) - uncompiled_stories[story]["year"] = "[GLOB.year_integer + 540]" + uncompiled_stories[story]["year"] = "[CURRENT_STATION_YEAR]" if(!("month" in uncompiled_stories[story])) uncompiled_stories[story]["month"] = "[time2text(world.timeofday, "MM")]]" if(!("day" in uncompiled_stories[story]))