new feature: CHEAT_MODE, new option in Ja2_Options.ini to automatically enable cheat mode in every loaded game or new replay

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9096 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Shadooow
2021-06-21 16:50:14 +00:00
parent f779c0cb37
commit fd528e418c
4 changed files with 9 additions and 2 deletions
+1
View File
@@ -885,6 +885,7 @@ void LoadGameExternalOptions()
gGameExternalOptions.usWorkerTrainingPoints = iniReader.ReadInteger( "Financial Settings", "WORKER_TRAINING_POINTS", 100, 1, 250 );
//################# Troubleshooting Settings #################
gGameExternalOptions.gfCheatMode = iniReader.ReadBoolean("Troubleshooting Settings", "CHEAT_MODE", FALSE, false);
gGameExternalOptions.gubDeadLockDelay = (UINT8) iniReader.ReadInteger("Troubleshooting Settings","DEAD_LOCK_DELAY",15, 5, 50);
gGameExternalOptions.gfEnableEmergencyButton_SkipStrategicEvents = iniReader.ReadBoolean("Troubleshooting Settings","ENABLE_EMERGENCY_BUTTON_NUMLOCK_TO_SKIP_STRATEGIC_EVENTS",0);
+1
View File
@@ -403,6 +403,7 @@ typedef struct
///////////////////////////////////////
// System settings
BOOLEAN gfCheatMode;
UINT8 gubDeadLockDelay;
BOOLEAN gfEnableEmergencyButton_SkipStrategicEvents;
+4 -1
View File
@@ -6733,7 +6733,10 @@ BOOLEAN LoadSavedGame( int ubSavedGameID )
//}
#ifndef JA2TESTVERSION
RESET_CHEAT_LEVEL( );
if (gGameExternalOptions.gfCheatMode)
ACTIVATE_CHEAT_LEVEL();
else
RESET_CHEAT_LEVEL();
#endif
#ifdef JA2BETAVERSION
+3 -1
View File
@@ -1224,7 +1224,9 @@ void ReStartingGame()
gpCustomizableTimerCallback = NULL;
// WANNE - MP: Set cheat level to 0 for mp
if (!is_networked)
if (gGameExternalOptions.gfCheatMode)
gubCheatLevel = 6;
else if (!is_networked)
gubCheatLevel = STARTING_CHEAT_LEVEL;
else
gubCheatLevel = 0;