New Feature: Different Mineral Types for Mines (by Jazz & Buggler)

- Instead of only having Gold and Silver for Mines, we can now add more mineral types (-> TableData\Map\Minerals.xml)
- The initialization of the mineral types of the mines is done in LUA (Scripts\initmines.lua)

- Example: https://ja2svn.dyndns.org/source/ja2/trunk/Documents/1.13%20Modding/Modding%20Examples/New%20Minerals-Mines%20Example.zip
o In this example we have a new mineral type (Oil) and the Cambria Mine (H8) becomes a Refinery


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6584 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2013-11-12 09:58:18 +00:00
parent c85471ecd6
commit 010e967948
11 changed files with 254 additions and 10 deletions
+3 -1
View File
@@ -416,6 +416,7 @@ UINT32 guiMapBorderHeliSectors;
// list of map sectors that player isn't allowed to even highlight
BOOLEAN sBadSectorsList[ WORLD_MAP_X ][ WORLD_MAP_X ];
MINERALS_VALUES MineralsName[255];
INT16 sBaseSectorList[ MAX_TOWNS - 1 ];/*={
// NOTE: These co-ordinates must match the top left corner of the 3x3 town tiles cutouts in Interface/MilitiaMaps.sti!
@@ -5068,7 +5069,8 @@ void BlitMineText( INT16 sMapX, INT16 sMapY )
ubMineIndex = GetMineIndexForSector( sMapX, sMapY );
// display associated town name, followed by "mine"
swprintf( wString, L"%s %s", pTownNames[ GetTownAssociatedWithMine( GetMineIndexForSector( sMapX, sMapY ) ) ], pwMineStrings[ 0 ] );
//swprintf( wString, L"%s %s", pTownNames[ GetTownAssociatedWithMine( GetMineIndexForSector( sMapX, sMapY ) ) ], pwMineStrings[ 0 ] );
swprintf( wString, L"%s %s", pTownNames[ GetTownAssociatedWithMine( GetMineIndexForSector( sMapX, sMapY ) ) ], MineralsName[gMineStatus[ubMineIndex].ubMineType].sType );
AdjustXForLeftMapEdge(wString, &sScreenX, MapMineLabelsFont);
mprintf( ( sScreenX - StringPixLength( wString, MapMineLabelsFont ) / 2 ) , sScreenY + ubLineCnt * GetFontHeight( MapMineLabelsFont ) , wString );
ubLineCnt++;