mirror of
https://github.com/1dot13/source.git
synced 2026-09-16 14:47:17 +02:00
- Lua function HandleSectorLiberation(...) is called whenever we liberate a sector
- Lua function RecruitRPCAdditionalHandling(...) is called whenever we recruit a RPC For the moment, both functions add volunteers once important prisons are liberated or Miguel is recruited. git-svn-id: https://ja2svn.mooo.com/source/ja2_v1.13_data@2246 4f8fa57e-7814-0410-bad4-adc449f26b7c
This commit is contained in:
@@ -169,6 +169,7 @@ Profil =
|
|||||||
CARMEN = 78,
|
CARMEN = 78,
|
||||||
MADLAB = 146,
|
MADLAB = 146,
|
||||||
ROBOT = 62,
|
ROBOT = 62,
|
||||||
|
MIGUEL = 57,
|
||||||
}
|
}
|
||||||
local gsRobotGridNo
|
local gsRobotGridNo
|
||||||
|
|
||||||
@@ -232,3 +233,31 @@ function HandleQuestCodeOnSectorExit( sOldSectorX, sOldSectorY, bOldSectorZ )
|
|||||||
SetFactFalse( Facts.FACT_MUSEUM_ALARM_WENT_OFF )
|
SetFactFalse( Facts.FACT_MUSEUM_ALARM_WENT_OFF )
|
||||||
|
|
||||||
end
|
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 )
|
||||||
|
|
||||||
|
-- are we liberating this sector for the first time?
|
||||||
|
if ( fFirstTime ) then
|
||||||
|
-- we get a few volunteers for liberating prisons - we assume prisoners would be more than eager to fight against the regime
|
||||||
|
-- due to code limitations, fFirstTime is only used in surface sectors
|
||||||
|
if ( bNewSectorZ == 0 ) then
|
||||||
|
-- Tixa
|
||||||
|
if ( sNewSectorX == 9 and sNewSectorY == SectorY.MAP_ROW_J ) then
|
||||||
|
AddVolunteers( 30 )
|
||||||
|
-- Alma
|
||||||
|
elseif ( sNewSectorX == 13 and sNewSectorY == SectorY.MAP_ROW_I ) then
|
||||||
|
AddVolunteers( 10 )
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- this function is called whenever we recruit a RPC
|
||||||
|
function RecruitRPCAdditionalHandling( usProfile )
|
||||||
|
|
||||||
|
-- if Miguel joins us, the rest of the rebels joins us too
|
||||||
|
if ( usProfile == Profil.MIGUEL ) then
|
||||||
|
AddVolunteers( 10 )
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user