mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
Deleted 'mobile militia feature', as 'militia strategic command' offered better ways to move militia.
For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=23649&goto=352592&#msg_352592 git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8542 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -714,7 +714,7 @@ void ChangeStat( MERCPROFILESTRUCT *pProfile, SOLDIERTYPE *pSoldier, UINT8 ubSta
|
||||
|
||||
//Madd: option to make mercs quiet during training / doctoring / repairing
|
||||
if ( ((pSoldier->bAssignment == TRAIN_BY_OTHER || pSoldier->bAssignment == TRAIN_TEAMMATE || pSoldier->bAssignment == TRAIN_SELF ||
|
||||
pSoldier->bAssignment == FACILITY_STAFF || pSoldier->bAssignment == TRAIN_TOWN || pSoldier->bAssignment == TRAIN_MOBILE
|
||||
pSoldier->bAssignment == FACILITY_STAFF || pSoldier->bAssignment == TRAIN_TOWN
|
||||
|| pSoldier->bAssignment == TRAIN_WORKERS || pSoldier->bAssignment == DRILL_MILITIA )
|
||||
&& !gGameSettings.fOptions[TOPTION_QUIET_TRAINING]) ||
|
||||
(IS_REPAIR(pSoldier->bAssignment) && !gGameSettings.fOptions[TOPTION_QUIET_REPAIRING]) ||
|
||||
|
||||
@@ -2311,8 +2311,6 @@ void HandleRenderFaceAdjustments( FACETYPE *pFace, BOOLEAN fDisplayBuffer, BOOLE
|
||||
|
||||
case TRAIN_SELF:
|
||||
case TRAIN_TOWN:
|
||||
// HEADROCK HAM 3.6: New assignment.
|
||||
case TRAIN_MOBILE:
|
||||
case TRAIN_TEAMMATE:
|
||||
case TRAIN_BY_OTHER:
|
||||
case TRAIN_WORKERS:
|
||||
@@ -2331,7 +2329,6 @@ void HandleRenderFaceAdjustments( FACETYPE *pFace, BOOLEAN fDisplayBuffer, BOOLE
|
||||
sPtsAvailable = GetSoldierStudentPts( MercPtrs[ pFace->ubSoldierID ], MercPtrs[ pFace->ubSoldierID ]->bTrainStat, &usMaximumPts );
|
||||
break;
|
||||
case( TRAIN_TOWN ):
|
||||
case( TRAIN_MOBILE ):
|
||||
case DRILL_MILITIA:
|
||||
sPtsAvailable = GetTownTrainPtsForCharacter( MercPtrs[ pFace->ubSoldierID ], &usMaximumPts );
|
||||
// divide both amounts by 10 to make the displayed numbers a little more user-palatable (smaller)
|
||||
|
||||
@@ -60,10 +60,8 @@ INT32 ghMilitiaControlBox = -1;
|
||||
INT16 gsMilitiaControlBoxesX, gsMilitiaControlBoxesY;
|
||||
//INT16 gsTalkToAllBoxesX, gsTalkToAllBoxesY;
|
||||
|
||||
|
||||
// assignment menu mouse regions
|
||||
MOUSE_REGION gMilitiaControlMenuRegion[ MAX_MILCON_STRING_COUNT ];
|
||||
//MOUSE_REGION gTalkToAllMenuRegion[ MAX_TRAIN_STRING_COUNT ];
|
||||
|
||||
MOUSE_REGION gMilitiaControlScreenMaskRegion;
|
||||
|
||||
|
||||
@@ -156,14 +156,12 @@ typedef PARSE_STAGE;
|
||||
#define ALTSECTORSFILENAME "Map\\AltSectors.xml"
|
||||
#define SAMSITESFILENAME "Map\\SamSites.xml"
|
||||
#define HELISITESFILENAME "Map\\HeliSites.xml"
|
||||
#define ROAMINGMILITIAFILENAME "Map\\RestrictedRoamingMilitia.xml"
|
||||
#define EXTRAITEMSFILENAME "Map\\A9_0_ExtraItems" // ".xml" will be added @runtime
|
||||
#define EXTRAITEMSFILENAME2 "Map\\A11_0_ExtraItems" // ".xml" will be added @runtime
|
||||
#define SHIPPINGDESTINATIONSFILENAME "Map\\ShippingDestinations.xml"
|
||||
#define DELIVERYMETHODSFILENAME "Map\\DeliveryMethods.xml"
|
||||
#define DELIVERYMETHODSFILENAME "Map\\DeliveryMethods.xml"
|
||||
#define SECTORFACILITIESFILENAME "Map\\Facilities.xml"
|
||||
#define DYNAMICROAMINGFILENAME "Map\\DynamicRestrictions.xml"
|
||||
#define FACILITYTYPESFILENAME "Map\\FacilityTypes.xml"
|
||||
#define SECTORNAMESFILENAME "Map\\SectorNames.xml"
|
||||
#define COOLNESSBYSECTORFILENAME "Map\\CoolnessBySector.xml"
|
||||
@@ -427,9 +425,6 @@ extern BOOLEAN WriteInPatrolInfo(STR fileName);
|
||||
extern BOOLEAN ReadInArmyCompositionInfo(STR fileName);
|
||||
extern BOOLEAN WriteInArmyCompositionInfo(STR fileName);
|
||||
|
||||
//Kaiden: Roaming Militia Restricted Sectors List
|
||||
extern BOOLEAN ReadInRoamingInfo(STR filename);
|
||||
|
||||
// Dealtar: New shipping system XMLs
|
||||
extern BOOLEAN ReadInShippingDestinations(STR fileName, BOOLEAN localizedVersion);
|
||||
extern BOOLEAN ReadInDeliveryMethods(STR fileName);
|
||||
@@ -459,9 +454,6 @@ extern BOOLEAN ReadInFuneralLocations(STR fileName);
|
||||
// HEADROCK HAM 3.4: Sector Facility Locations
|
||||
extern BOOLEAN ReadInSectorFacilities(STR fileName);
|
||||
|
||||
// HEADROCK HAM 3.4: Dynamic Roaming Restrictions
|
||||
extern BOOLEAN ReadInDynamicRoamingRestrictions(STR fileName);
|
||||
|
||||
// HEADROCK HAM 3.5: Facility Types and bonuses
|
||||
extern BOOLEAN ReadInFacilityTypes(STR fileName, BOOLEAN localizedVersion);
|
||||
|
||||
|
||||
@@ -1101,8 +1101,62 @@ profileEndElementHandle(void *userData, const XML_Char *name)
|
||||
pData->currentDepth--;
|
||||
}
|
||||
|
||||
// Flugente hack: analyze profiles and print out the result
|
||||
#include <vfs/Core/vfs_file_raii.h> // added by Flugente for vfs-stuff
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
|
||||
extern STR16 gzMercSkillTextNew[];
|
||||
|
||||
void AnalyzeProfiles()
|
||||
{
|
||||
INT32 relevantmerccntr = 0;
|
||||
INT32 traitcntr[NUM_SKILLTRAITS_NT] = { 0 };
|
||||
INT32 experttraitcntr[NUM_SKILLTRAITS_NT] = { 0 };
|
||||
|
||||
for ( int i = 0; i < NUM_PROFILES; ++i )
|
||||
{
|
||||
// we are only interested in AIM/MERC/RPCs
|
||||
if ( i != NO_PROFILE &&
|
||||
( tempProfiles[i].Type == 1 || tempProfiles[i].Type == 2 || tempProfiles[i].Type == 3 )
|
||||
)
|
||||
{
|
||||
++relevantmerccntr;
|
||||
|
||||
INT32 perstraitcntr[NUM_SKILLTRAITS_NT] = { 0 };
|
||||
|
||||
perstraitcntr[tempProfiles[i].bNewSkillTrait1] += 1;
|
||||
perstraitcntr[tempProfiles[i].bNewSkillTrait2] += 1;
|
||||
perstraitcntr[tempProfiles[i].bNewSkillTrait3] += 1;
|
||||
|
||||
for ( int j = 0; j < NUM_SKILLTRAITS_NT; ++j )
|
||||
{
|
||||
traitcntr[j] += perstraitcntr[j];
|
||||
|
||||
if ( perstraitcntr[j] > 1 )
|
||||
experttraitcntr[j] += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// write stuff
|
||||
{
|
||||
std::stringstream settings;
|
||||
const char endl[] = "\r\n";
|
||||
|
||||
settings << "AIM + MERC + RPC: " << relevantmerccntr << endl;
|
||||
settings << endl;
|
||||
settings << "Trait Total Single Experts" << endl;
|
||||
|
||||
for ( int j = 0; j < NUM_SKILLTRAITS_NT; ++j )
|
||||
{
|
||||
settings << j << " " << traitcntr[j] << " " << traitcntr[j] - 2 * experttraitcntr[j] << " " << experttraitcntr[j] << endl;
|
||||
}
|
||||
|
||||
vfs::COpenWriteFile wfile( "MercProfileAnalysis.txt", true, true );
|
||||
wfile->write( settings.str().c_str(), settings.str().length() );
|
||||
}
|
||||
}
|
||||
|
||||
BOOLEAN ReadInMercProfiles(STR fileName, BOOLEAN localizedVersion)
|
||||
{
|
||||
@@ -1164,6 +1218,9 @@ BOOLEAN ReadInMercProfiles(STR fileName, BOOLEAN localizedVersion)
|
||||
|
||||
XML_ParserFree(parser);
|
||||
|
||||
// Flugente hack: analyze profiles and print out the result
|
||||
//AnalyzeProfiles();
|
||||
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user