@@ -3304,6 +3304,7 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
3304
3304
AsciiString scriptName;
3305
3305
scriptName.format (" KEY_F%d" , script);
3306
3306
TheScriptEngine->runScript (scriptName);
3307
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE_FORMAT (" GUI:DebugRunScript" , L" Run script %d" , script) );
3307
3308
}
3308
3309
disp = DESTROY_MESSAGE;
3309
3310
}
@@ -3391,6 +3392,12 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
3391
3392
// Doesn't make a valid network message
3392
3393
Player *localPlayer = ThePlayerList->getLocalPlayer ();
3393
3394
localPlayer->toggleInstantBuild ();
3395
+
3396
+ if (localPlayer->buildsInstantly ())
3397
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE (" GUI:DebugInstantBuildOn" , L" Instant Build is ON" ) );
3398
+ else
3399
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE (" GUI:DebugInstantBuildOff" , L" Instant Build is OFF" ) );
3400
+
3394
3401
disp = DESTROY_MESSAGE;
3395
3402
}
3396
3403
break ;
@@ -3402,6 +3409,7 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
3402
3409
Player *localPlayer = ThePlayerList->getLocalPlayer ();
3403
3410
Money *money = localPlayer->getMoney ();
3404
3411
money->deposit ( 10000 );
3412
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE (" GUI:DebugAddCash" , L" Add Cash" ) );
3405
3413
}
3406
3414
break ;
3407
3415
}
@@ -3944,6 +3952,7 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
3944
3952
case GameMessage::MSG_META_DEMO_LOD_DECREASE:
3945
3953
{
3946
3954
TheGameClient->adjustLOD (-1 );
3955
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE_FORMAT (" GUI:DebugDecreaseLOD" , L" Decrease LOD" ) );
3947
3956
disp = DESTROY_MESSAGE;
3948
3957
break ;
3949
3958
}
@@ -3953,6 +3962,7 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
3953
3962
case GameMessage::MSG_META_DEMO_LOD_INCREASE:
3954
3963
{
3955
3964
TheGameClient->adjustLOD (1 );
3965
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE_FORMAT (" GUI:DebugIncreaseLOD" , L" Increase LOD" ) );
3956
3966
disp = DESTROY_MESSAGE;
3957
3967
break ;
3958
3968
}
@@ -4200,6 +4210,12 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
4200
4210
{
4201
4211
TheWritableGlobalData->m_useShadowVolumes = !TheGlobalData->m_useShadowVolumes ;
4202
4212
TheWritableGlobalData->m_useShadowDecals = !TheGlobalData->m_useShadowDecals ;
4213
+
4214
+ if (TheWritableGlobalData->m_useShadowVolumes )
4215
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE (" GUI:DebugShadowVolumesOn" , L" Shadow Volumes is ON" ) );
4216
+ else
4217
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE (" GUI:DebugShadowVolumesOff" , L" Shadow Volumes is OFF" ) );
4218
+
4203
4219
disp = DESTROY_MESSAGE;
4204
4220
break ;
4205
4221
}
@@ -4209,6 +4225,12 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
4209
4225
case GameMessage::MSG_META_DEMO_TOGGLE_FOGOFWAR:
4210
4226
{
4211
4227
TheWritableGlobalData->m_fogOfWarOn = !TheGlobalData->m_fogOfWarOn ;
4228
+
4229
+ if (TheWritableGlobalData->m_fogOfWarOn )
4230
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE (" GUI:DebugFogOfWarOn" , L" Fog of War is ON" ) );
4231
+ else
4232
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE (" GUI:DebugFogOfWarOff" , L" Fog of War is OFF" ) );
4233
+
4212
4234
disp = DESTROY_MESSAGE;
4213
4235
break ;
4214
4236
}
@@ -4428,10 +4450,12 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
4428
4450
TheDisplay->stopMovie ();
4429
4451
TheInGameUI->stopMovie ();
4430
4452
TheAudio->setOn (false , AudioAffect_All);
4453
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE (" GUI:DebugSoundOff" , L" Sound is OFF" ) );
4431
4454
}
4432
4455
else
4433
4456
{
4434
4457
TheAudio->setOn (true , AudioAffect_All);
4458
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE (" GUI:DebugSoundOn" , L" Sound is ON" ) );
4435
4459
}
4436
4460
disp = DESTROY_MESSAGE;
4437
4461
break ;
@@ -4442,6 +4466,12 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
4442
4466
case GameMessage::MSG_META_DEMO_TOGGLE_TRACKMARKS:
4443
4467
{
4444
4468
TheWritableGlobalData->m_makeTrackMarks = !TheGlobalData->m_makeTrackMarks ;
4469
+
4470
+ if (TheGlobalData->m_makeTrackMarks )
4471
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE (" GUI:DebugTrackMarksOn" , L" Track Marks is ON" ) );
4472
+ else
4473
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE (" GUI:DebugTrackMarksOff" , L" Track Marks is OFF" ) );
4474
+
4445
4475
disp = DESTROY_MESSAGE;
4446
4476
break ;
4447
4477
}
@@ -4451,6 +4481,12 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
4451
4481
case GameMessage::MSG_META_DEMO_TOGGLE_WATERPLANE:
4452
4482
{
4453
4483
TheWritableGlobalData->m_useWaterPlane = !TheGlobalData->m_useWaterPlane ;
4484
+
4485
+ if (TheGlobalData->m_useWaterPlane )
4486
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE (" GUI:DebugWaterPlaneOn" , L" Water Plane is ON" ) );
4487
+ else
4488
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE (" GUI:DebugWaterPlaneOff" , L" Water Plane is OFF" ) );
4489
+
4454
4490
disp = DESTROY_MESSAGE;
4455
4491
break ;
4456
4492
}
@@ -4460,7 +4496,7 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
4460
4496
case GameMessage::MSG_META_DEMO_TIME_OF_DAY:
4461
4497
{
4462
4498
TimeOfDay tod = TimeOfDay ((Int) TheGlobalData->m_timeOfDay + 1 );
4463
- if (tod >= TIME_OF_DAY_COUNT)
4499
+ if (tod < TIME_OF_DAY_FIRST || tod >= TIME_OF_DAY_COUNT)
4464
4500
tod = TIME_OF_DAY_FIRST;
4465
4501
if (TheWritableGlobalData->setTimeOfDay (tod))
4466
4502
{
@@ -4477,7 +4513,8 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
4477
4513
d->clearAndSetModelConditionFlags (empty, empty);
4478
4514
}
4479
4515
}
4480
- }
4516
+ }
4517
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE_FORMAT (" GUI:DebugTimeOfDay" , L" Time of Day set to %hs" , TimeOfDayNames[tod]) );
4481
4518
}
4482
4519
disp = DESTROY_MESSAGE;
4483
4520
break ;
@@ -4490,6 +4527,12 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
4490
4527
// Doesn't make a valid network message
4491
4528
Player *localPlayer = ThePlayerList->getLocalPlayer ();
4492
4529
localPlayer->toggleIgnorePrereqs ();
4530
+
4531
+ if (localPlayer->ignoresPrereqs ())
4532
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE (" GUI:DebugIgnorePrereqOn" , L" Ignore Prerequisites is ON" ) );
4533
+ else
4534
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE (" GUI:DebugIgnorePrereqOff" , L" Ignore Prerequisites is OFF" ) );
4535
+
4493
4536
disp = DESTROY_MESSAGE;
4494
4537
break ;
4495
4538
}
@@ -4501,6 +4544,12 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
4501
4544
// Doesn't make a valid network message
4502
4545
Player *localPlayer = ThePlayerList->getLocalPlayer ();
4503
4546
localPlayer->toggleInstantBuild ();
4547
+
4548
+ if (localPlayer->buildsInstantly ())
4549
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE (" GUI:DebugInstantBuildOn" , L" Instant Build is ON" ) );
4550
+ else
4551
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE (" GUI:DebugInstantBuildOff" , L" Instant Build is OFF" ) );
4552
+
4504
4553
disp = DESTROY_MESSAGE;
4505
4554
break ;
4506
4555
}
@@ -4512,6 +4561,12 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
4512
4561
// Doesn't make a valid network message
4513
4562
Player *localPlayer = ThePlayerList->getLocalPlayer ();
4514
4563
localPlayer->toggleFreeBuild ();
4564
+
4565
+ if (localPlayer->buildsForFree ())
4566
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE (" GUI:DebugFreeBuildOn" , L" Free Build is ON" ) );
4567
+ else
4568
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE (" GUI:DebugFreeBuildOff" , L" Free Build is OFF" ) );
4569
+
4515
4570
disp = DESTROY_MESSAGE;
4516
4571
break ;
4517
4572
}
@@ -4533,6 +4588,7 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
4533
4588
Player *localPlayer = ThePlayerList->getLocalPlayer ();
4534
4589
Money *money = localPlayer->getMoney ();
4535
4590
money->deposit ( 10000 );
4591
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE (" GUI:DebugAddCash" , L" Add Cash" ) );
4536
4592
}
4537
4593
break ;
4538
4594
}
@@ -4555,6 +4611,7 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
4555
4611
AsciiString scriptName;
4556
4612
scriptName.format (" KEY_F%d" , script);
4557
4613
TheScriptEngine->runScript (scriptName);
4614
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE_FORMAT (" GUI:DebugRunScript" , L" Run script %d" , script) );
4558
4615
}
4559
4616
disp = DESTROY_MESSAGE;
4560
4617
break ;
@@ -4600,6 +4657,7 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
4600
4657
AsciiString name;
4601
4658
name.format (" DemoObjective%02d" , m_objective);
4602
4659
TheInGameUI->playMovie (name);
4660
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE_FORMAT (" GUI:DebugObjectiveMove" , L" Objective Movie %d" , m_objective) );
4603
4661
}
4604
4662
disp = DESTROY_MESSAGE;
4605
4663
break ;
0 commit comments