diff --git a/code/__defines/time.dm b/code/__defines/time.dm new file mode 100644 index 0000000000..c2a3632c74 --- /dev/null +++ b/code/__defines/time.dm @@ -0,0 +1,33 @@ +/// 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 300 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 300 + +#define MILISECOND * 0.01 +#define MILLISECONDS * 0.01 + +#define DECISECONDS *1 //the base unit all of these defines are scaled by, because byond uses that as a unit of measurement for some reason + +#define SECOND *10 +#define SECONDS *10 + +#define MINUTE *600 +#define MINUTES *600 + +#define HOUR *36000 +#define HOURS *36000 + +#define DAY *864000 +#define DAYS *864000 + +#define TICK *world.tick_lag +#define TICKS *world.tick_lag + +#define DS2TICKS(DS) ((DS)/world.tick_lag) + +#define TICKS2DS(T) ((T) TICKS) + +#define MS2DS(T) ((T) MILLISECONDS) + +#define DS2MS(T) ((T) * 100) diff --git a/code/_global_vars/time_vars.dm b/code/_global_vars/time_vars.dm new file mode 100644 index 0000000000..f05384ca49 --- /dev/null +++ b/code/_global_vars/time_vars.dm @@ -0,0 +1,2 @@ +GLOBAL_VAR_INIT(year, time2text(world.realtime,"YYYY")) +GLOBAL_VAR_INIT(year_integer, text2num(year)) // = 2013??? diff --git a/code/_helpers/time.dm b/code/_helpers/time.dm index 863354a46c..1a6c2dadf2 100644 --- a/code/_helpers/time.dm +++ b/code/_helpers/time.dm @@ -1,32 +1,8 @@ -#define MILISECOND * 0.01 -#define MILLISECONDS * 0.01 - -#define SECOND *10 -#define SECONDS *10 - -#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 (TICK_USAGE*0.01*world.tick_lag) -#define TICK *world.tick_lag -#define TICKS *world.tick_lag - -#define DS2TICKS(DS) ((DS)/world.tick_lag) // Convert deciseconds to ticks -#define TICKS2DS(T) ((T) TICKS) // Convert ticks to deciseconds #define DS2NEARESTTICK(DS) TICKS2DS(-round(-(DS2TICKS(DS)))) -#define MS2DS(T) ((T) MILLISECONDS) - -#define DS2MS(T) ((T) * 100) - var/world_startup_time /proc/get_game_time() diff --git a/code/controllers/subsystems/tgui.dm b/code/controllers/subsystems/tgui.dm index d70d06017a..eb0d566f4b 100644 --- a/code/controllers/subsystems/tgui.dm +++ b/code/controllers/subsystems/tgui.dm @@ -27,6 +27,7 @@ SUBSYSTEM_DEF(tgui) var/polyfill = file2text('tgui/public/tgui-polyfill.min.js') polyfill = "" basehtml = replacetextEx(basehtml, "", polyfill) + basehtml = replacetextEx(basehtml, "", "Nanotrasen (c) 2284-[CURRENT_STATION_YEAR]") /datum/controller/subsystem/tgui/Shutdown() close_all_uis() @@ -344,4 +345,4 @@ SUBSYSTEM_DEF(tgui) target.tgui_open_uis.Add(ui) // Clear the old list. source.tgui_open_uis.Cut() - return TRUE \ No newline at end of file + return TRUE diff --git a/tgui/packages/tgui/interfaces/Biogenerator.js b/tgui/packages/tgui/interfaces/Biogenerator.js index b63b6c387d..8292adcf51 100644 --- a/tgui/packages/tgui/interfaces/Biogenerator.js +++ b/tgui/packages/tgui/interfaces/Biogenerator.js @@ -3,7 +3,6 @@ import { Fragment } from 'inferno'; import { useBackend, useLocalState } from '../backend'; import { Box, Button, Collapsible, Dropdown, Flex, Input, Section } from '../components'; import { Window } from '../layouts'; -import { refocusLayout } from '../layouts'; const sortTypes = { 'Alphabetical': (a, b) => a - b, @@ -68,8 +67,17 @@ const BiogeneratorItems = (props, context) => { }); return ( +<<<<<<< HEAD
refocusLayout()}> {has_contents ? contents : No items matching your criteria was found!} +======= +
+ {has_contents ? ( + contents + ) : ( + No items matching your criteria was found! + )} +>>>>>>> dd49b83167... Merge pull request #14964 from ItsSelis/selis-tgui-patch
); diff --git a/tgui/packages/tgui/interfaces/CasinoPrizeDispenserCh.js b/tgui/packages/tgui/interfaces/CasinoPrizeDispenserCh.js index 500b6ed0ab..d8f3778f8a 100644 --- a/tgui/packages/tgui/interfaces/CasinoPrizeDispenserCh.js +++ b/tgui/packages/tgui/interfaces/CasinoPrizeDispenserCh.js @@ -3,7 +3,6 @@ import { Fragment } from 'inferno'; import { useBackend, useLocalState } from '../backend'; import { Box, Button, Collapsible, Dropdown, Flex, Input, Section } from '../components'; import { Window } from '../layouts'; -import { refocusLayout } from '../layouts'; const sortTypes = { 'Alphabetical': (a, b) => a - b, @@ -90,8 +89,17 @@ const CasinoPrizeDispenserChItems = (props, context) => { }); return ( +<<<<<<< HEAD:tgui/packages/tgui/interfaces/CasinoPrizeDispenserCh.js
refocusLayout()}> {has_contents ? contents : No items matching your criteria was found!} +======= +
+ {has_contents ? ( + contents + ) : ( + No items matching your criteria was found! + )} +>>>>>>> dd49b83167... Merge pull request #14964 from ItsSelis/selis-tgui-patch:tgui/packages/tgui/interfaces/CasinoPrizeDispenser.js
); diff --git a/tgui/packages/tgui/interfaces/ChemDispenser.js b/tgui/packages/tgui/interfaces/ChemDispenser.js index 51d7804ba0..7a7f4d4b22 100644 --- a/tgui/packages/tgui/interfaces/ChemDispenser.js +++ b/tgui/packages/tgui/interfaces/ChemDispenser.js @@ -26,24 +26,19 @@ const ChemDispenserSettings = (properties, context) => {
- - {dispenseAmounts.map((a, i) => ( - -