From bbd34bb6db40a1131be47b2c815bc257c3b12a18 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Thu, 22 Feb 2024 19:38:38 +0000 Subject: [PATCH] Increase information shown in getfulldate console command --- src/console_cmds.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp index 35673219c2..23d5b189f3 100644 --- a/src/console_cmds.cpp +++ b/src/console_cmds.cpp @@ -2687,12 +2687,16 @@ DEF_CONSOLE_CMD(ConRunTileLoopTile) DEF_CONSOLE_CMD(ConGetFullDate) { if (argc == 0) { - IConsoleHelp("Returns the current full date (year-month-day, date fract, tick skip counter/subtick) of the game. Usage: 'getfulldate'"); + IConsoleHelp("Returns the current full date/tick information of the game. Usage: 'getfulldate'"); return true; } - IConsolePrintF(CC_DEFAULT, "Calendar Date: %04d-%02d-%02d, %i, %i", CalTime::CurYear().base(), CalTime::CurMonth() + 1, CalTime::CurDay(), CalTime::CurDateFract(), CalTime::Detail::now.sub_date_fract); - IConsolePrintF(CC_DEFAULT, "Economy Date: %04d-%02d-%02d, %i, %i", EconTime::CurYear().base(), EconTime::CurMonth() + 1, EconTime::CurDay(), EconTime::CurDateFract(), TickSkipCounter()); + IConsolePrintF(CC_DEFAULT, "Calendar Date: %04d-%02d-%02d (%d), fract: %i, sub_fract: %i", CalTime::CurYear().base(), CalTime::CurMonth() + 1, CalTime::CurDay(), CalTime::CurDate().base(), CalTime::CurDateFract(), CalTime::Detail::now.sub_date_fract); + IConsolePrintF(CC_DEFAULT, "Economy Date: %04d-%02d-%02d (%d), fract: %i, tick skip: %i", EconTime::CurYear().base(), EconTime::CurMonth() + 1, EconTime::CurDay(), EconTime::CurDate().base(), EconTime::CurDateFract(), TickSkipCounter()); + IConsolePrintF(CC_DEFAULT, "Tick counter: " OTTD_PRINTF64, _tick_counter); + IConsolePrintF(CC_DEFAULT, "Tick counter (scaled): " OTTD_PRINTF64, _scaled_tick_counter); + IConsolePrintF(CC_DEFAULT, "State ticks: " OTTD_PRINTF64 " (offset: " OTTD_PRINTF64 ")", _state_ticks.base(), DateDetail::_state_ticks_offset.base()); + IConsolePrintF(CC_DEFAULT, "Effective day length: %d", DayLengthFactor()); return true; }