@@ -3307,6 +3307,7 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
3307
3307
AsciiString scriptName;
3308
3308
scriptName.format (" KEY_F%d" , script);
3309
3309
TheScriptEngine->runScript (scriptName);
3310
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE_FORMAT (" GUI:DebugRunScript" , L" Run script %d" , script) );
3310
3311
}
3311
3312
disp = DESTROY_MESSAGE;
3312
3313
}
@@ -3394,6 +3395,12 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
3394
3395
// Doesn't make a valid network message
3395
3396
Player *localPlayer = ThePlayerList->getLocalPlayer ();
3396
3397
localPlayer->toggleInstantBuild ();
3398
+
3399
+ if (localPlayer->buildsInstantly ())
3400
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE (" GUI:DebugInstantBuildOn" , L" Instant Build is ON" ) );
3401
+ else
3402
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE (" GUI:DebugInstantBuildOff" , L" Instant Build is OFF" ) );
3403
+
3397
3404
disp = DESTROY_MESSAGE;
3398
3405
}
3399
3406
break ;
@@ -3405,6 +3412,7 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
3405
3412
Player *localPlayer = ThePlayerList->getLocalPlayer ();
3406
3413
Money *money = localPlayer->getMoney ();
3407
3414
money->deposit ( 10000 );
3415
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE (" GUI:DebugAddCash" , L" Add Cash" ) );
3408
3416
}
3409
3417
break ;
3410
3418
}
@@ -3947,6 +3955,7 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
3947
3955
case GameMessage::MSG_META_DEMO_LOD_DECREASE:
3948
3956
{
3949
3957
TheGameClient->adjustLOD (-1 );
3958
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE_FORMAT (" GUI:DebugDecreaseLOD" , L" Decrease LOD" ) );
3950
3959
disp = DESTROY_MESSAGE;
3951
3960
break ;
3952
3961
}
@@ -3956,6 +3965,7 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
3956
3965
case GameMessage::MSG_META_DEMO_LOD_INCREASE:
3957
3966
{
3958
3967
TheGameClient->adjustLOD (1 );
3968
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE_FORMAT (" GUI:DebugIncreaseLOD" , L" Increase LOD" ) );
3959
3969
disp = DESTROY_MESSAGE;
3960
3970
break ;
3961
3971
}
@@ -4203,6 +4213,12 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
4203
4213
{
4204
4214
TheWritableGlobalData->m_useShadowVolumes = !TheGlobalData->m_useShadowVolumes ;
4205
4215
TheWritableGlobalData->m_useShadowDecals = !TheGlobalData->m_useShadowDecals ;
4216
+
4217
+ if (TheWritableGlobalData->m_useShadowVolumes )
4218
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE (" GUI:DebugShadowVolumesOn" , L" Shadow Volumes is ON" ) );
4219
+ else
4220
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE (" GUI:DebugShadowVolumesOff" , L" Shadow Volumes is OFF" ) );
4221
+
4206
4222
disp = DESTROY_MESSAGE;
4207
4223
break ;
4208
4224
}
@@ -4212,6 +4228,12 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
4212
4228
case GameMessage::MSG_META_DEMO_TOGGLE_FOGOFWAR:
4213
4229
{
4214
4230
TheWritableGlobalData->m_fogOfWarOn = !TheGlobalData->m_fogOfWarOn ;
4231
+
4232
+ if (TheWritableGlobalData->m_fogOfWarOn )
4233
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE (" GUI:DebugFogOfWarOn" , L" Fog of War is ON" ) );
4234
+ else
4235
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE (" GUI:DebugFogOfWarOff" , L" Fog of War is OFF" ) );
4236
+
4215
4237
disp = DESTROY_MESSAGE;
4216
4238
break ;
4217
4239
}
@@ -4431,10 +4453,12 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
4431
4453
TheDisplay->stopMovie ();
4432
4454
TheInGameUI->stopMovie ();
4433
4455
TheAudio->setOn (false , AudioAffect_All);
4456
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE (" GUI:DebugSoundOff" , L" Sound is OFF" ) );
4434
4457
}
4435
4458
else
4436
4459
{
4437
4460
TheAudio->setOn (true , AudioAffect_All);
4461
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE (" GUI:DebugSoundOn" , L" Sound is ON" ) );
4438
4462
}
4439
4463
disp = DESTROY_MESSAGE;
4440
4464
break ;
@@ -4445,6 +4469,12 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
4445
4469
case GameMessage::MSG_META_DEMO_TOGGLE_TRACKMARKS:
4446
4470
{
4447
4471
TheWritableGlobalData->m_makeTrackMarks = !TheGlobalData->m_makeTrackMarks ;
4472
+
4473
+ if (TheGlobalData->m_makeTrackMarks )
4474
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE (" GUI:DebugTrackMarksOn" , L" Track Marks is ON" ) );
4475
+ else
4476
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE (" GUI:DebugTrackMarksOff" , L" Track Marks is OFF" ) );
4477
+
4448
4478
disp = DESTROY_MESSAGE;
4449
4479
break ;
4450
4480
}
@@ -4454,6 +4484,12 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
4454
4484
case GameMessage::MSG_META_DEMO_TOGGLE_WATERPLANE:
4455
4485
{
4456
4486
TheWritableGlobalData->m_useWaterPlane = !TheGlobalData->m_useWaterPlane ;
4487
+
4488
+ if (TheGlobalData->m_useWaterPlane )
4489
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE (" GUI:DebugWaterPlaneOn" , L" Water Plane is ON" ) );
4490
+ else
4491
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE (" GUI:DebugWaterPlaneOff" , L" Water Plane is OFF" ) );
4492
+
4457
4493
disp = DESTROY_MESSAGE;
4458
4494
break ;
4459
4495
}
@@ -4463,7 +4499,7 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
4463
4499
case GameMessage::MSG_META_DEMO_TIME_OF_DAY:
4464
4500
{
4465
4501
TimeOfDay tod = TimeOfDay ((Int) TheGlobalData->m_timeOfDay + 1 );
4466
- if (tod >= TIME_OF_DAY_COUNT)
4502
+ if (tod < TIME_OF_DAY_FIRST || tod >= TIME_OF_DAY_COUNT)
4467
4503
tod = TIME_OF_DAY_FIRST;
4468
4504
if (TheWritableGlobalData->setTimeOfDay (tod))
4469
4505
{
@@ -4480,7 +4516,8 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
4480
4516
d->clearAndSetModelConditionFlags (empty, empty);
4481
4517
}
4482
4518
}
4483
- }
4519
+ }
4520
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE_FORMAT (" GUI:DebugTimeOfDay" , L" Time of Day set to %hs" , TimeOfDayNames[tod]) );
4484
4521
}
4485
4522
disp = DESTROY_MESSAGE;
4486
4523
break ;
@@ -4493,6 +4530,12 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
4493
4530
// Doesn't make a valid network message
4494
4531
Player *localPlayer = ThePlayerList->getLocalPlayer ();
4495
4532
localPlayer->toggleIgnorePrereqs ();
4533
+
4534
+ if (localPlayer->ignoresPrereqs ())
4535
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE (" GUI:DebugIgnorePrereqOn" , L" Ignore Prerequisites is ON" ) );
4536
+ else
4537
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE (" GUI:DebugIgnorePrereqOff" , L" Ignore Prerequisites is OFF" ) );
4538
+
4496
4539
disp = DESTROY_MESSAGE;
4497
4540
break ;
4498
4541
}
@@ -4504,6 +4547,12 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
4504
4547
// Doesn't make a valid network message
4505
4548
Player *localPlayer = ThePlayerList->getLocalPlayer ();
4506
4549
localPlayer->toggleInstantBuild ();
4550
+
4551
+ if (localPlayer->buildsInstantly ())
4552
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE (" GUI:DebugInstantBuildOn" , L" Instant Build is ON" ) );
4553
+ else
4554
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE (" GUI:DebugInstantBuildOff" , L" Instant Build is OFF" ) );
4555
+
4507
4556
disp = DESTROY_MESSAGE;
4508
4557
break ;
4509
4558
}
@@ -4515,6 +4564,12 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
4515
4564
// Doesn't make a valid network message
4516
4565
Player *localPlayer = ThePlayerList->getLocalPlayer ();
4517
4566
localPlayer->toggleFreeBuild ();
4567
+
4568
+ if (localPlayer->buildsForFree ())
4569
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE (" GUI:DebugFreeBuildOn" , L" Free Build is ON" ) );
4570
+ else
4571
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE (" GUI:DebugFreeBuildOff" , L" Free Build is OFF" ) );
4572
+
4518
4573
disp = DESTROY_MESSAGE;
4519
4574
break ;
4520
4575
}
@@ -4536,6 +4591,7 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
4536
4591
Player *localPlayer = ThePlayerList->getLocalPlayer ();
4537
4592
Money *money = localPlayer->getMoney ();
4538
4593
money->deposit ( 10000 );
4594
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE (" GUI:DebugAddCash" , L" Add Cash" ) );
4539
4595
}
4540
4596
break ;
4541
4597
}
@@ -4558,6 +4614,7 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
4558
4614
AsciiString scriptName;
4559
4615
scriptName.format (" KEY_F%d" , script);
4560
4616
TheScriptEngine->runScript (scriptName);
4617
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE_FORMAT (" GUI:DebugRunScript" , L" Run script %d" , script) );
4561
4618
}
4562
4619
disp = DESTROY_MESSAGE;
4563
4620
break ;
@@ -4603,6 +4660,7 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
4603
4660
AsciiString name;
4604
4661
name.format (" DemoObjective%02d" , m_objective);
4605
4662
TheInGameUI->playMovie (name);
4663
+ TheInGameUI->messageNoFormat ( TheGameText->FETCH_OR_SUBSTITUTE_FORMAT (" GUI:DebugObjectiveMove" , L" Objective Movie %d" , m_objective) );
4606
4664
}
4607
4665
disp = DESTROY_MESSAGE;
4608
4666
break ;
0 commit comments