- Externalized Kingpin money sector and Hospital sector (by Buggler)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6423 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2013-09-20 08:19:56 +00:00
parent 1e06d2a725
commit 8221472bc2
4 changed files with 43 additions and 6 deletions
+8
View File
@@ -2378,12 +2378,20 @@ void LoadModSettings(){
gModSettings.iBrothelDoor2 = iniReader.ReadInteger("San Mona", "BROTHEL_DOOR_2", 11176);
gModSettings.iBrothelDoor3 = iniReader.ReadInteger("San Mona", "BROTHEL_DOOR_3", 11177);
gModSettings.ubKingpinMoneySectorX = iniReader.ReadInteger("San Mona", "KINGPIN_MONEY_SECTOR_X", 5);
gModSettings.ubKingpinMoneySectorY = iniReader.ReadInteger("San Mona", "KINGPIN_MONEY_SECTOR_Y", 4);
gModSettings.ubKingpinMoneySectorZ = iniReader.ReadInteger("San Mona", "KINGPIN_MONEY_SECTOR_Z", 1);
gModSettings.ubOmertaDropOffX = iniReader.ReadInteger("Gear Dropoff", "OMERTA_DROPOFF_X", 9);
gModSettings.ubOmertaDropOffY = iniReader.ReadInteger("Gear Dropoff", "OMERTA_DROPOFF_Y", 1);
gModSettings.ubOmertaDropOffZ = iniReader.ReadInteger("Gear Dropoff", "OMERTA_DROPOFF_Z", 0);
gModSettings.iOmertaDropOff = iniReader.ReadInteger("Gear Dropoff", "OMERTA_DROPOFF_GRIDNO", 4868);
gModSettings.sRocketRifleGridNo = iniReader.ReadInteger("Alma", "ROCKETRIFLE_POSITION", 10472);
gModSettings.ubHospitalSectorX = iniReader.ReadInteger("Cambria", "HOSPITAL_SECTOR_X", 8);
gModSettings.ubHospitalSectorY = iniReader.ReadInteger("Cambria", "HOSPITAL_SECTOR_Y", 6);
gModSettings.ubHospitalSectorZ = iniReader.ReadInteger("Cambria", "HOSPITAL_SECTOR_Z", 0);
}
INT16 DynamicAdjustAPConstants(INT16 iniReadValue, INT16 iniDefaultValue, BOOLEAN reverse)
{
+10
View File
@@ -1716,6 +1716,11 @@ typedef struct
INT32 iBrothelDoor1;
INT32 iBrothelDoor2;
INT32 iBrothelDoor3;
// Kingpin Private Stash
UINT8 ubKingpinMoneySectorX;
UINT8 ubKingpinMoneySectorY;
UINT8 ubKingpinMoneySectorZ;
//Leave Stuff
UINT8 ubOmertaDropOffX;
@@ -1725,6 +1730,11 @@ typedef struct
INT32 sRocketRifleGridNo;
//Hospital Sector
UINT8 ubHospitalSectorX;
UINT8 ubHospitalSectorY;
UINT8 ubHospitalSectorZ;
}MOD_SETTINGS;
extern MOD_SETTINGS gModSettings;
+19
View File
@@ -360,6 +360,15 @@ void IniGlobalGameSetting(lua_State *L)
lua_pushinteger(L, gModSettings.iBrothelDoor3);
lua_setglobal(L, "iniBROTHEL_DOOR_3");
lua_pushinteger(L, gModSettings.ubKingpinMoneySectorX);
lua_setglobal(L, "iniKINGPIN_MONEY_SECTOR_X");
lua_pushinteger(L, gModSettings.ubKingpinMoneySectorY);
lua_setglobal(L, "iniKINGPIN_MONEY_SECTOR_Y");
lua_pushinteger(L, gModSettings.ubKingpinMoneySectorZ);
lua_setglobal(L, "iniKINGPIN_MONEY_SECTOR_Z");
//Gear Dropoff
lua_pushinteger(L, gModSettings.ubOmertaDropOffX);
lua_setglobal(L, "iniOMERTA_DROPOFF_X");
@@ -376,6 +385,16 @@ void IniGlobalGameSetting(lua_State *L)
//Alma
lua_pushinteger(L, gModSettings.sRocketRifleGridNo);
lua_setglobal(L, "iniROCKETRIFLE_POSITION");
//Hospital Sector
lua_pushinteger(L, gModSettings.ubHospitalSectorX);
lua_setglobal(L, "iniHOSPITAL_SECTOR_X");
lua_pushinteger(L, gModSettings.ubHospitalSectorY);
lua_setglobal(L, "iniHOSPITAL_SECTOR_Y");
lua_pushinteger(L, gModSettings.ubHospitalSectorZ);
lua_setglobal(L, "iniHOSPITAL_SECTOR_Z");
// -------------------------------
// Other global variables
+6 -6
View File
@@ -3,13 +3,13 @@
#include "Types.h"
#define KINGPIN_MONEY_SECTOR_X 5
#define KINGPIN_MONEY_SECTOR_Y MAP_ROW_D
#define KINGPIN_MONEY_SECTOR_Z 1
#define KINGPIN_MONEY_SECTOR_X gModSettings.ubKingpinMoneySectorX //5
#define KINGPIN_MONEY_SECTOR_Y gModSettings.ubKingpinMoneySectorY //MAP_ROW_D
#define KINGPIN_MONEY_SECTOR_Z gModSettings.ubKingpinMoneySectorZ //1
#define HOSPITAL_SECTOR_X 8
#define HOSPITAL_SECTOR_Y MAP_ROW_F
#define HOSPITAL_SECTOR_Z 0
#define HOSPITAL_SECTOR_X gModSettings.ubHospitalSectorX //8
#define HOSPITAL_SECTOR_Y gModSettings.ubHospitalSectorY //MAP_ROW_F
#define HOSPITAL_SECTOR_Z gModSettings.ubHospitalSectorZ //0
extern UINT8 gubCambriaMedicalObjects;