mirror of
https://github.com/1dot13/gamedir.git
synced 2026-08-19 14:20:34 +02:00
Fix: missing lua functions for UB
git-svn-id: https://ja2svn.mooo.com/source/ja2_v1.13_data@2538 4f8fa57e-7814-0410-bad4-adc449f26b7c
This commit is contained in:
@@ -174,6 +174,100 @@ Profil =
|
||||
MADLAB = 146,
|
||||
ROBOT = 62,
|
||||
}
|
||||
|
||||
Flags1 =
|
||||
{
|
||||
PROFILE_MISC_FLAG_RECRUITED = 1,
|
||||
PROFILE_MISC_FLAG_HAVESEENCREATURE = 2,
|
||||
PROFILE_MISC_FLAG_FORCENPCQUOTE = 4,
|
||||
PROFILE_MISC_FLAG_WOUNDEDBYPLAYER = 8,
|
||||
PROFILE_MISC_FLAG_TEMP_NPC_QUOTE_DATA_EXISTS = 16,
|
||||
PROFILE_MISC_FLAG_SAID_HOSTILE_QUOTE = 32,
|
||||
PROFILE_MISC_FLAG_EPCACTIVE = 64,
|
||||
PROFILE_MISC_FLAG_ALREADY_USED_ITEMS = 128,
|
||||
}
|
||||
|
||||
SoldierClass =
|
||||
{
|
||||
SOLDIER_CLASS_NONE = 0,
|
||||
SOLDIER_CLASS_ADMINISTRATOR = 1,
|
||||
SOLDIER_CLASS_ELITE = 2,
|
||||
SOLDIER_CLASS_ARMY = 3,
|
||||
}
|
||||
|
||||
CivGroup =
|
||||
{
|
||||
REBEL_CIV_GROUP = 1,
|
||||
KINGPIN_CIV_GROUP = 2,
|
||||
WARDEN_CIV_GROUP = 11,
|
||||
BOUNTYHUNTER_CIV_GROUP = 25,
|
||||
SCIENTIST_GROUP = 27,
|
||||
RADAR_TECHNICIAN_GROUP = 28,
|
||||
AIRPORT_STAFF_GROUP = 29,
|
||||
BARRACK_STAFF_GROUP = 30,
|
||||
FACTORY_GROUP = 31,
|
||||
ADMINISTRATIVE_STAFF_GROUP = 32,
|
||||
LOYAL_CIV_GROUP = 33,
|
||||
BLACKMARKET_GROUP = 34,
|
||||
}
|
||||
|
||||
Bodytype =
|
||||
{
|
||||
REGMALE = 0,
|
||||
BIGMALE = 1,
|
||||
STOCKYMALE = 2,
|
||||
REGFEMALE = 3,
|
||||
FATCIV = 11,
|
||||
MANCIV = 12,
|
||||
MINICIV = 13,
|
||||
DRESSCIV = 14,
|
||||
HATKIDCIV = 15,
|
||||
KIDCIV = 16,
|
||||
CRIPPLECIV = 17,
|
||||
}
|
||||
|
||||
Skin =
|
||||
{
|
||||
PINKSKIN = 0,
|
||||
TANSKIN = 1,
|
||||
DARKSKIN = 2,
|
||||
BLACKSKIN = 3,
|
||||
}
|
||||
|
||||
Hair =
|
||||
{
|
||||
WHITEHEAD = 0,
|
||||
BLACKHEAD = 1,
|
||||
BROWNHEAD = 2,
|
||||
BLONDEHEAD = 3,
|
||||
REDHEAD = 4,
|
||||
}
|
||||
|
||||
Vest =
|
||||
{
|
||||
WHITEVEST = 0,
|
||||
GYELLOWSHIRT = 1,
|
||||
YELLOWVEST = 2,
|
||||
GREYVEST = 3,
|
||||
BROWNVEST = 4,
|
||||
PURPLESHIRT = 5,
|
||||
BLUEVEST = 6,
|
||||
JEANVEST = 7,
|
||||
GREENVEST = 8,
|
||||
REDVEST = 9,
|
||||
BLACKSHIRT = 10,
|
||||
}
|
||||
|
||||
Pants =
|
||||
{
|
||||
BLUEPANTS = 0,
|
||||
BLACKPANTS = 1,
|
||||
JEANPANTS = 2,
|
||||
TANPANTS = 3,
|
||||
BEIGEPANTS = 4,
|
||||
GREENPANTS = 5,
|
||||
}
|
||||
|
||||
local gsRobotGridNo
|
||||
|
||||
function HandleQuestCodeOnSectorEntry( sNewSectorX, sNewSectorY, bNewSectorZ )
|
||||
@@ -259,4 +353,172 @@ local pSoldier
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
-- text colours
|
||||
FontColour =
|
||||
{
|
||||
FONT_MCOLOR_DKWHITE = 134,
|
||||
FONT_MCOLOR_LTYELLOW = 144,
|
||||
FONT_MCOLOR_RED = 163,
|
||||
FONT_MCOLOR_DKRED = 164,
|
||||
FONT_MCOLOR_LTGREEN = 184,
|
||||
}
|
||||
|
||||
-- these numbers aren't used in the code - we only use them in LUA
|
||||
Languages =
|
||||
{
|
||||
LANGUAGE_ENGLISH = 0,
|
||||
LANGUAGE_GERMAN = 1,
|
||||
LANGUAGE_RUSSIAN = 2,
|
||||
LANGUAGE_DUTCH = 3,
|
||||
LANGUAGE_POLISH = 4,
|
||||
LANGUAGE_FRENCH = 5,
|
||||
LANGUAGE_ITALIAN = 6,
|
||||
LANGUAGE_CHINESE = 7,
|
||||
}
|
||||
|
||||
-- We have an array of 1000 signed integers that a modder can use to set whatever data he wants.
|
||||
-- We simply set up some enums here to make it easier for us to remember what is what
|
||||
ModSpecificFacts =
|
||||
{
|
||||
-- |||||||||||||||||||||||||||||||||| factories |||||||||||||||||||||||||||||||||||||
|
||||
-- |||||||||||||||||||||||||||||||||| factories |||||||||||||||||||||||||||||||||||||
|
||||
}
|
||||
|
||||
FactorySpecialValues =
|
||||
{
|
||||
FACTORY_PROGRESS_DRASSEN_TSHIRTFACTORY_UPGRADE = 6,
|
||||
}
|
||||
|
||||
-- sSectorX, sSectorY and bSectorZ indicate the sector coordinates
|
||||
-- usFacilityType is facility number from FacilitTypes.xml
|
||||
-- usProductionNumber denotes which FACTORY of the facility this is for
|
||||
-- sProgressLeft is the progress to be saved.
|
||||
--
|
||||
-- As factories can be added or removed in the xml at will, we can't hardcode their progress in the savegame.
|
||||
-- Therefore we let the modder store their progress in here via LUAFacts into the modder-administered part of the savefile.
|
||||
-- We also want factories to be deactivated initially (so the player doesn't suddenly lose money if he takes their sector). Initially all values are 0.
|
||||
-- In the code, values < 0 indicate a factory is offline, >= 0 online.
|
||||
-- We thus add '1' to every value, so we store the progress as 1 + sProgressLeft, this means a luafact value of <= 0 is offline, > 0 is online
|
||||
--
|
||||
-- We also use the Getter to check for other conditions, like quest progress. For example, even if we control Drassen, we can only use the T-Shirt factory once Doreen is gone.
|
||||
-- We achieve that by returning a value < -10 if these extra conditions are not satisfied.
|
||||
-- The code checks that too and won't allow us to even turn a factory on in this case, so the player knows he has something else to do first.
|
||||
function SetFactoryLeftoverProgress(sSectorX, sSectorY, bSectorZ, usFacilityType, usProductionNumber, sProgressLeft)
|
||||
|
||||
end
|
||||
|
||||
function GetFactoryLeftoverProgress(sSectorX, sSectorY, bSectorZ, usFacilityType, usProductionNumber, sProgressLeft)
|
||||
|
||||
CANT_ACTIVATE_FACTORY = -20
|
||||
|
||||
val = -1
|
||||
|
||||
return val
|
||||
|
||||
end
|
||||
|
||||
-- this function is called whenever we liberate a sector. If fFirstTime is true, this is the first time we liberate this sector
|
||||
function HandleSectorLiberation( sNewSectorX, sNewSectorY, bNewSectorZ, fFirstTime )
|
||||
|
||||
end
|
||||
|
||||
-- this function is called whenever we recruit a RPC
|
||||
function RecruitRPCAdditionalHandling( usProfile )
|
||||
|
||||
end
|
||||
|
||||
-- this function is called whenever we enter a sector in tactical
|
||||
function HandleSectorTacticalEntry( sSectorX, sSectorY, bSectorZ, fHasEverBeenPlayerControlled )
|
||||
|
||||
end
|
||||
|
||||
-- these colours can be used in the map
|
||||
-- if you want to know how they look, test them on the map
|
||||
-- if you want more colours, check whether you feel lucky and ask a coder
|
||||
MapColour = {
|
||||
MAP_SHADE_BLACK = 0,
|
||||
|
||||
MAP_SHADE_LT_GREEN = 1,
|
||||
MAP_SHADE_MD_GREEN = 2,
|
||||
MAP_SHADE_DK_GREEN = 3,
|
||||
|
||||
MAP_SHADE_LT_RED = 4,
|
||||
MAP_SHADE_MD_RED = 5,
|
||||
MAP_SHADE_DK_RED = 6,
|
||||
|
||||
MAP_SHADE_LT_YELLOW = 7,
|
||||
MAP_SHADE_MD_YELLOW = 8,
|
||||
MAP_SHADE_DK_YELLOW = 9,
|
||||
|
||||
MAP_SHADE_LT_CYAN = 10,
|
||||
MAP_SHADE_MD_CYAN = 11,
|
||||
MAP_SHADE_DK_CYAN = 12,
|
||||
|
||||
MAP_SHADE_LT_GREY = 13,
|
||||
MAP_SHADE_MD_GREY = 14,
|
||||
MAP_SHADE_DK_GREY = 15,
|
||||
|
||||
MAP_SHADE_LT_BLUE = 16,
|
||||
MAP_SHADE_MD_BLUE = 17,
|
||||
MAP_SHADE_DK_BLUE = 18,
|
||||
|
||||
MAP_SHADE_LT_PINK = 19,
|
||||
MAP_SHADE_ORANGE = 20,
|
||||
|
||||
MAP_SHADE_MIX_RED = 21,
|
||||
MAP_SHADE_MIX_GREEN = 22,
|
||||
MAP_SHADE_MIX_BLUE = 23,
|
||||
MAP_SHADE_MIX_YELLOW = 24,
|
||||
|
||||
MAP_SHADE_MIX_RED_GREEN = 25,
|
||||
MAP_SHADE_MIX_RED_BLUE = 26,
|
||||
MAP_SHADE_MIX_RED_YELLOW = 27,
|
||||
MAP_SHADE_MIX_GREEN_BLUE = 28,
|
||||
MAP_SHADE_MIX_GREEN_YELLOW = 29,
|
||||
MAP_SHADE_MIX_BLUE_YELLOW = 30,
|
||||
|
||||
MAP_SHADE_MIX_RED_GREEN_BLUE = 31,
|
||||
MAP_SHADE_MIX_RED_GREEN_YELLOW = 32,
|
||||
MAP_SHADE_MIX_RED_BLUE_YELLOW = 33,
|
||||
|
||||
MAP_SHADE_MIX_GREEN_BLUE_YELLOW = 34,
|
||||
MAP_SHADE_MIX_RED_GREEN_BLUE_YELLOW = 35,
|
||||
}
|
||||
|
||||
|
||||
-- These symbols are stored in Interface/IntelMapSymbols.sti
|
||||
-- if you want more symbols, add them
|
||||
MapSymbols = {
|
||||
BLOODCAT_ATTACK = 0,
|
||||
ZOMBIE_ATTACK = 1,
|
||||
BANDIT_ATTACK = 2,
|
||||
TERRORIST_LOCATION = 3,
|
||||
CHALICE = 4,
|
||||
ASSASSINATION_TARGET = 5,
|
||||
HELI = 6,
|
||||
PRISON = 7,
|
||||
CHURCH = 8,
|
||||
RECRUITMENT = 9,
|
||||
FLAG = 10,
|
||||
QUESTIONMARK_BLUE = 11, -- sector might be relevant for a quest
|
||||
EXCLAMATIONMARK_BLUE = 12, -- sector is definetely relevant for a quest
|
||||
QUESTIONMARK_GREEN = 13, -- alternate colours for other uses
|
||||
EXCLAMATIONMARK_GREEN = 14,
|
||||
QUESTIONMARK_RED = 15,
|
||||
EXCLAMATIONMARK_RED = 16,
|
||||
QUESTIONMARK_YELLOW = 17,
|
||||
EXCLAMATIONMARK_YELLOW = 18,
|
||||
FACTORY_YELLOW = 19,
|
||||
FACTORY_GREEN = 20,
|
||||
FACTORY_RED = 21,
|
||||
FACTORY_NOCONTROL = 22,
|
||||
}
|
||||
|
||||
-- this function allows us to data for the intel/quest map
|
||||
-- aLevel is the world level (0: surface)
|
||||
-- set data by using SetIntelAndQuestMapDataForSector(sectorx, sextory, MapColour, symbol, text for description window, short text for map)
|
||||
function GetIntelAndQuestMapData( aLevel )
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user