mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
Revamped <scrounging>-tag of Backgrounds.xml: instead of hoarding items, mercs steal small amounts of money from the locals, which can lower loyalty.
For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=21308&goto=358321&#msg_358321 git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8699 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -100,6 +100,7 @@ SectorNameStartElementHandle(void *userData, const XML_Char *name, const char **
|
||||
strcmp(name, "snakechance" ) == 0 ||
|
||||
strcmp(name, "numsnakes" ) == 0 ||
|
||||
strcmp(name, "maxworkers" ) == 0 ||
|
||||
strcmp(name, "wealth" ) == 0 ||
|
||||
strcmp(name, "bloodcatraidpossible" ) == 0 ||
|
||||
strcmp(name, "zombieraidpossible" ) == 0 ||
|
||||
strcmp(name, "banditraidpossible" ) == 0 ))
|
||||
@@ -234,6 +235,11 @@ SectorNameEndElementHandle(void *userData, const XML_Char *name)
|
||||
SectorExternalData[ubSectorId][2].maxworkers = 0;
|
||||
SectorExternalData[ubSectorId][3].maxworkers = 0;
|
||||
|
||||
SectorExternalData[ubSectorId][0].wealth = pData->sectordata.wealth;
|
||||
SectorExternalData[ubSectorId][1].wealth = 0;
|
||||
SectorExternalData[ubSectorId][2].wealth = 0;
|
||||
SectorExternalData[ubSectorId][3].wealth = 0;
|
||||
|
||||
SectorExternalData[ubSectorId][0].usSectorFlagMask = pData->sectordata.usSectorFlagMask;
|
||||
SectorExternalData[ubSectorId][1].usSectorFlagMask = 0;
|
||||
SectorExternalData[ubSectorId][2].usSectorFlagMask = 0;
|
||||
@@ -263,6 +269,7 @@ SectorNameEndElementHandle(void *userData, const XML_Char *name)
|
||||
pData->sectordata.snakechance = 0;
|
||||
pData->sectordata.numsnakes = 0;
|
||||
pData->sectordata.maxworkers = 0;
|
||||
pData->sectordata.wealth = 0;
|
||||
pData->sectordata.usSectorFlagMask = 0;
|
||||
}
|
||||
else
|
||||
@@ -387,6 +394,11 @@ SectorNameEndElementHandle(void *userData, const XML_Char *name)
|
||||
pData->curElement = ELEMENT;
|
||||
pData->sectordata.maxworkers = (UINT8)atoi( pData->szCharData );
|
||||
}
|
||||
else if ( strcmp( name, "wealth" ) == 0 )
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->sectordata.wealth = (UINT16)atoi( pData->szCharData );
|
||||
}
|
||||
else if ( strcmp( name, "bloodcatraidpossible" ) == 0 )
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
|
||||
Reference in New Issue
Block a user