[Patch] Skip militia turns by holding SHIFT[message #251231]
|
Sun, 09 May 2010 15:29
|
|
bbun |
|
Messages:74
Registered:April 2004 Location: Amsterdam |
|
|
Very useful if you're in a sector under attack, and don't want the 20 militia to do anything. In addition to it taking ages, you prevent them from getting theirselves wounded or killed by instructing them to "hold position".
Will also work when militia's have begun moving already.
Index: Build/Tactical/TeamTurns.cc
===================================================================
--- Build/Tactical/TeamTurns.cc (revision 7063)
+++ Build/Tactical/TeamTurns.cc (working copy)
@@ -40,6 +40,8 @@
#include "NPC.h"
#include "Debug.h"
#include "Items.h"
+#include "Input.h"
+#include "English.h"
static SOLDIERTYPE* gOutOfTurnOrder[MAXMERCS];
@@ -285,6 +287,15 @@
{
while( 1 )
{
+ if ( ubTeam == MILITIA_TEAM && _KeyDown( SHIFT ) )
+ {
+ // player wants to skip militia turn
+ ubTeam++;
+ gTacticalStatus.ubCurrentTeam++;
+ // skip back to the top, as we are processing another team now.
+ continue;
+ }
+
if ( ubTeam > LAST_TEAM )
{
if ( HandleAirRaidEndTurn( ubTeam ) )
Index: Build/TacticalAI/AIMain.cc
===================================================================
--- Build/TacticalAI/AIMain.cc (revision 7063)
+++ Build/TacticalAI/AIMain.cc (working copy)
@@ -40,6 +40,8 @@
#include "Quests.h"
#include "Queen_Command.h"
#include "Debug.h"
+#include "Input.h"
+#include "English.h"
#define AI_DELAY 100
@@ -642,6 +644,14 @@
DebugAI(String("Ending control for %d", s.ubID));
#endif
+ if (s.bTeam == MILITIA_TEAM && _KeyDown( SHIFT ))
+ {
+ while ( RemoveFirstAIListEntry() )
+ {
+ // we are simply looping through them all to empty the stack of militia AI
+ }
+ }
+
// Find the next AI guy
if (SOLDIERTYPE* const s = RemoveFirstAIListEntry())
{
[Updated on: Sun, 09 May 2010 15:35] by Moderator Report message to a moderator
|
Corporal
|
|
|