Files
VOREStation/code/__defines/time.dm
T
Selis f4bf017921 Unit Test rework & Master/Ticker update (#17912)
* Unit Test rework & Master/Ticker update

* Fixes and working unit testing

* Fixes

* Test fixes and FA update

* Fixed runtimes

* Radio subsystem

* move that glob wherever later

* ident

* CIBUILDING compile option

* Fixed runtimes

* Some changes to the workflow

* CI Split

* More split

* Pathing

* Linters and Annotators

* ci dir fix

* Missing undef fixed

* Enable grep checks

* More test conversions

* More split

* Correct file

* Removes unneeded inputs

* oop

* More dependency changes

* More conversions

* Conversion fixes

* Fixes

* Some assert fixes

* Corrects start gate

* Converted some README.dms to README.mds

* Removes duplicate proc

* Removes unused defines

* Example configs

* fix dll access viol by double calling

* Post-rebase fixes

* Cleans up names global list

* Undef restart counter

* More code/game/ cleanup

* Statpanel update

* Skybox

* add

* Fix ticker

* Roundend fix

* Persistence dependency update

* Reordering

* Reordering

* Reordering

* Initstage fix

* .

* .

* Reorder

* Reorder

* Circle

* Mobs

* Air

* Test fix

* CI Script Fix

* Configs

* More ticker stuff

* This is now in 'reboot world'

* Restart world announcements

* no glob in PreInit

* to define

* Update

* Removed old include

* Make this file normal again

* moved

* test

* shared unit testing objects

* Updates batched_spritesheets and universal_icon

* .

* job data debug

* rm that

* init order

* show us

* .

* i wonder

* .

* .

* urg

* do we not have a job ID?

* .

* rm sleep for now

* updated rust-g linux binaries

* binaries update 2

* binaries update 3

* testing something

* change that

* test something

* .

* .

* .

* locavar

* test

* move that

* .

* debug

* don't run this test

* strack trace it

* cleaner

* .

* .

* cras again

* also comment this out

* return to official rust g

* Update robot_icons.dm

* monitor the generation

* .

---------

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
2025-08-10 01:37:23 +02:00

135 lines
3.1 KiB
Plaintext

///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 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)
/*Timezones*/
/// Line Islands Time
#define TIMEZONE_LINT 14
// Chatham Daylight Time
#define TIMEZONE_CHADT 13.75
/// Tokelau Time
#define TIMEZONE_TKT 13
/// Tonga Time
#define TIMEZONE_TOT 13
/// New Zealand Daylight Time
#define TIMEZONE_NZDT 13
/// New Zealand Standard Time
#define TIMEZONE_NZST 12
/// Norfolk Time
#define TIMEZONE_NFT 11
/// Lord Howe Standard Time
#define TIMEZONE_LHST 10.5
/// Australian Eastern Standard Time
#define TIMEZONE_AEST 10
/// Australian Central Standard Time
#define TIMEZONE_ACST 9.5
/// Australian Central Western Standard Time
#define TIMEZONE_ACWST 8.75
/// Australian Western Standard Time
#define TIMEZONE_AWST 8
/// Christmas Island Time
#define TIMEZONE_CXT 7
/// Cocos Islands Time
#define TIMEZONE_CCT 6.5
/// Central European Summer Time
#define TIMEZONE_CEST 2
/// Coordinated Universal Time
#define TIMEZONE_UTC 0
/// Eastern Daylight Time
#define TIMEZONE_EDT -4
/// Eastern Standard Time
#define TIMEZONE_EST -5
/// Central Daylight Time
#define TIMEZONE_CDT -5
/// Central Standard Time
#define TIMEZONE_CST -6
/// Mountain Daylight Time
#define TIMEZONE_MDT -6
/// Mountain Standard Time
#define TIMEZONE_MST -7
/// Pacific Daylight Time
#define TIMEZONE_PDT -7
/// Pacific Standard Time
#define TIMEZONE_PST -8
/// Alaska Daylight Time
#define TIMEZONE_AKDT -8
/// Alaska Standard Time
#define TIMEZONE_AKST -9
/// Hawaii-Aleutian Daylight Time
#define TIMEZONE_HDT -9
/// Hawaii Standard Time
#define TIMEZONE_HST -10
/// Cook Island Time
#define TIMEZONE_CKT -10
/// Niue Time
#define TIMEZONE_NUT -11
/// Anywhere on Earth
#define TIMEZONE_ANYWHERE_ON_EARTH -12
/// in the grim darkness of the thirteenth space station there is no timezones, since they break IC game times. Use this for all IC/round time values
#define NO_TIMEZONE 0