Skip to content

Commit 6486d37

Browse files
committed
tweak(gui): Configure player money per minute in GameData
1 parent 8d675a8 commit 6486d37

File tree

6 files changed

+12
-2
lines changed

6 files changed

+12
-2
lines changed

Generals/Code/GameEngine/Include/Common/GlobalData.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,7 @@ class GlobalData : public SubsystemInterface
410410

411411
// TheSuperHackers @feature L3-M 21/08/2025 toggle the money per minute display, false shows only the original current money
412412
Bool m_showMoneyPerMinute;
413+
Bool m_enablePlayerMoneyPerMinute;
413414

414415
Real m_shakeSubtleIntensity; ///< Intensity for shaking a camera with SHAKE_SUBTLE
415416
Real m_shakeNormalIntensity; ///< Intensity for shaking a camera with SHAKE_NORMAL

Generals/Code/GameEngine/Source/Common/GlobalData.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,9 @@ GlobalData* GlobalData::m_theOriginal = NULL;
442442

443443
{ "CameraAudibleRadius", INI::parseReal, NULL, offsetof( GlobalData, m_cameraAudibleRadius ) },
444444
{ "GroupMoveClickToGatherAreaFactor", INI::parseReal, NULL, offsetof( GlobalData, m_groupMoveClickToGatherFactor ) },
445+
446+
{ "EnablePlayerMoneyPerMinute", INI::parseBool, NULL, offsetof( GlobalData, m_enablePlayerMoneyPerMinute ) },
447+
445448
{ "ShakeSubtleIntensity", INI::parseReal, NULL, offsetof( GlobalData, m_shakeSubtleIntensity ) },
446449
{ "ShakeNormalIntensity", INI::parseReal, NULL, offsetof( GlobalData, m_shakeNormalIntensity ) },
447450
{ "ShakeStrongIntensity", INI::parseReal, NULL, offsetof( GlobalData, m_shakeStrongIntensity ) },
@@ -943,6 +946,7 @@ GlobalData::GlobalData()
943946
m_gameTimeFontSize = 8;
944947

945948
m_showMoneyPerMinute = FALSE;
949+
m_enablePlayerMoneyPerMinute = FALSE;
946950

947951
m_debugShowGraphicalFramerate = FALSE;
948952

Generals/Code/GameEngine/Source/GameClient/InGameUI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1880,7 +1880,7 @@ void InGameUI::update( void )
18801880
if( moneyPlayer)
18811881
{
18821882
Money *money = moneyPlayer->getMoney();
1883-
Bool showIncome = TheGlobalData->m_showMoneyPerMinute;
1883+
Bool showIncome = TheGlobalData->m_showMoneyPerMinute && TheGlobalData->m_enablePlayerMoneyPerMinute;
18841884
if (!showIncome)
18851885
{
18861886
UnsignedInt currentMoney = money->countMoney();

GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,7 @@ class GlobalData : public SubsystemInterface
417417

418418
// TheSuperHackers @feature L3-M 21/08/2025 toggle the money per minute display, false shows only the original current money
419419
Bool m_showMoneyPerMinute;
420+
Bool m_enablePlayerMoneyPerMinute;
420421

421422
Real m_shakeSubtleIntensity; ///< Intensity for shaking a camera with SHAKE_SUBTLE
422423
Real m_shakeNormalIntensity; ///< Intensity for shaking a camera with SHAKE_NORMAL

GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,9 @@ GlobalData* GlobalData::m_theOriginal = NULL;
442442

443443
{ "CameraAudibleRadius", INI::parseReal, NULL, offsetof( GlobalData, m_cameraAudibleRadius ) },
444444
{ "GroupMoveClickToGatherAreaFactor", INI::parseReal, NULL, offsetof( GlobalData, m_groupMoveClickToGatherFactor ) },
445+
446+
{ "EnablePlayerMoneyPerMinute", INI::parseBool, NULL, offsetof( GlobalData, m_enablePlayerMoneyPerMinute ) },
447+
445448
{ "ShakeSubtleIntensity", INI::parseReal, NULL, offsetof( GlobalData, m_shakeSubtleIntensity ) },
446449
{ "ShakeNormalIntensity", INI::parseReal, NULL, offsetof( GlobalData, m_shakeNormalIntensity ) },
447450
{ "ShakeStrongIntensity", INI::parseReal, NULL, offsetof( GlobalData, m_shakeStrongIntensity ) },
@@ -952,6 +955,7 @@ GlobalData::GlobalData()
952955
m_gameTimeFontSize = 8;
953956

954957
m_showMoneyPerMinute = FALSE;
958+
m_enablePlayerMoneyPerMinute = FALSE;
955959

956960
m_debugShowGraphicalFramerate = FALSE;
957961

GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1936,7 +1936,7 @@ void InGameUI::update( void )
19361936
if( moneyPlayer)
19371937
{
19381938
Money *money = moneyPlayer->getMoney();
1939-
Bool showIncome = TheGlobalData->m_showMoneyPerMinute;
1939+
Bool showIncome = TheGlobalData->m_showMoneyPerMinute && TheGlobalData->m_enablePlayerMoneyPerMinute;
19401940
if (!showIncome)
19411941
{
19421942
UnsignedInt currentMoney = money->countMoney();

0 commit comments

Comments
 (0)