1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-06 06:32:56 +01:00

Fix currency formatting in the in game console (#23349)

This commit is contained in:
mrmbernardi
2024-12-09 18:22:17 +11:00
committed by GitHub
parent 29a11f652c
commit 9c0cc28d7f
2 changed files with 16 additions and 18 deletions

View File

@@ -1,6 +1,7 @@
0.4.18 (in development)
------------------------------------------------------------------------
- Improved: [#23260] Add diagonal (block) brakes to LSM Launched Roller Coaster.
- Fix: [#23286] Currency formatted incorrectly in the in game console.
0.4.17 (2024-12-08)
------------------------------------------------------------------------

View File

@@ -559,32 +559,39 @@ static int32_t ConsoleCommandGet(InteractiveConsole& console, const arguments_t&
}
else if (argv[0] == "park_value")
{
console.WriteFormatLine("park_value %d", gameState.Park.Value / 10);
console.WriteLine(FormatString("park_value {CURRENCY2DP}", gameState.Park.Value));
}
else if (argv[0] == "company_value")
{
console.WriteFormatLine("company_value %d", gameState.CompanyValue / 10);
console.WriteLine(FormatString("company_value {CURRENCY2DP}", gameState.CompanyValue));
}
else if (argv[0] == "money")
{
console.WriteFormatLine("money %d.%d0", gameState.Cash / 10, gameState.Cash % 10);
console.WriteLine(FormatString("money {CURRENCY2DP}", gameState.Cash));
}
else if (argv[0] == "scenario_initial_cash")
{
console.WriteFormatLine("scenario_initial_cash %d", gameState.InitialCash / 10);
console.WriteLine(FormatString("scenario_initial_cash {CURRENCY2DP}", gameState.InitialCash));
}
else if (argv[0] == "current_loan")
{
console.WriteFormatLine("current_loan %d", gameState.BankLoan / 10);
console.WriteLine(FormatString("current_loan {CURRENCY2DP}", gameState.BankLoan));
}
else if (argv[0] == "max_loan")
{
console.WriteFormatLine("max_loan %d", gameState.MaxBankLoan / 10);
console.WriteLine(FormatString("max_loan {CURRENCY2DP}", gameState.MaxBankLoan));
}
else if (argv[0] == "guest_initial_cash")
{
console.WriteFormatLine(
"guest_initial_cash %d.%d0", gameState.GuestInitialCash / 10, gameState.GuestInitialCash % 10);
console.WriteLine(FormatString("guest_initial_cash {CURRENCY2DP}", gameState.GuestInitialCash));
}
else if (argv[0] == "land_rights_cost")
{
console.WriteLine(FormatString("land_rights_cost {CURRENCY2DP}", gameState.LandPrice));
}
else if (argv[0] == "construction_rights_cost")
{
console.WriteLine(FormatString("construction_rights_cost {CURRENCY2DP}", gameState.ConstructionRightsPrice));
}
else if (argv[0] == "guest_initial_happiness")
{
@@ -664,16 +671,6 @@ static int32_t ConsoleCommandGet(InteractiveConsole& console, const arguments_t&
{
console.WriteFormatLine("park_open %d", (gameState.Park.Flags & PARK_FLAGS_PARK_OPEN) != 0);
}
else if (argv[0] == "land_rights_cost")
{
console.WriteFormatLine("land_rights_cost %d.%d0", gameState.LandPrice / 10, gameState.LandPrice % 10);
}
else if (argv[0] == "construction_rights_cost")
{
console.WriteFormatLine(
"construction_rights_cost %d.%d0", gameState.ConstructionRightsPrice / 10,
gameState.ConstructionRightsPrice % 10);
}
else if (argv[0] == "climate")
{
console.WriteFormatLine(