Permalink
Browse files

Do not show cyborg repair template early.

The cyborg repair component no longer is automatically given to players. Researching the mobile repair turret
is necessary to manufacture the cyborg mechanic. Nexus and SemperFi AI have been updated to account for this change.
  • Loading branch information...
KJeff01 committed Jan 26, 2018
1 parent 42db8f7 commit 4091112e7a58fee02a5b2511f3da773d2e9c2ec4
@@ -372,7 +372,7 @@ event initialisedEvent(CALL_GAMEINIT)
}
fundamentalBeingBuilt = derrick; // to avoid ever being null
if(aiResponsibleForPlayer(me))
{
bRunning = true;
@@ -385,7 +385,7 @@ event initialisedEvent(CALL_GAMEINIT)
}
// check whether we have at least one structure of that type
function bool haveStructure(STRUCTURESTAT type)
function bool haveStructure(STRUCTURESTAT type)
{
return getStructure(type, me) != NULLOBJECT;
}
@@ -1106,7 +1106,7 @@ event buildExpand( buildExpandTr )
// Structure (fac/res/pow) upgrades
event upgradeStructures(upgradeStructuresTr )
{
if (not havePowerSource())
if (not havePowerSource())
{
exit;
}
@@ -1377,7 +1377,7 @@ event droidBuiltAssign(droidBuiltTr)
{
numRepairUnits = numRepairUnits + 1;
}
if((droid.droidType == DROID_CONSTRUCT)
or (droid.droidType == DROID_CYBORG_CONSTRUCT)) // if constructor droid
{
@@ -1606,16 +1606,16 @@ event conDroids(conDroidsTr)
_maxTruckFactories = 3; //max factories to use for truck production
_haveTrucks = buildGroup.members;
//Find out how many trucks and combat engineers are already in production
_numBuilding = numTemplatesInProduction(constructor,me); //trucks
_numBuilding = _numBuilding + numTemplatesInProduction(cybEngineer,me); //engineers
_totalTrucks = _numBuilding + _haveTrucks;
initEnumStruct(FALSE,factory,me,me);
_factory = enumStruct();
while ((_factory != NULLOBJECT) and (_numBuilding < _maxTruckFactories) and (_totalTrucks < _maxTrucks))
{
//Try to build a truck
@@ -1627,17 +1627,17 @@ event conDroids(conDroidsTr)
{
_bStartedBuilding = buildUnit(constructor, _factory, factory, FALSE); //build truck even if not idle
}
//Update statistics if started building a truck
if(_bStartedBuilding)
{
_numBuilding++;
_totalTrucks++;
}
_factory = enumStruct();
}
//build cyborg engineers if needed, no building structure limit here
initEnumStruct(FALSE,cybFactory,me,me);
_factory = enumStruct();
@@ -1647,7 +1647,7 @@ event conDroids(conDroidsTr)
if( skCanBuildTemplate(me,_factory, cybEngineer) ) //make sure we have researched cyb engineer
{
_bStartedBuilding = buildUnit(cybEngineer, _factory, cybFactory, FALSE); //build a cyb eng even if not idle
//Update statistics if started building a cyborg engineer
if(_bStartedBuilding)
{
@@ -1705,7 +1705,7 @@ function STRUCTURE findIdleStructure(STRUCTURESTAT _structType, bool _bIdleOnly)
_structure = enumStruct();
}
return NULLOBJECT; //none found
}
@@ -1755,7 +1755,7 @@ function bool needTank()
{
return FALSE;
}
if((defendGroup.members < maxDefenders[curTech]) or (maxDefenders[curTech] == UNLIMITED))
{
return TRUE;
@@ -1850,7 +1850,10 @@ function void cybFactorBuildCyborg(STRUCTURE _factory)
{
if(random(5) == 1)
{
buildDroid(cybMechanic,_factory,me,1);
if(skCanBuildTemplate(me, _factory, cybMechanic))
{
buildDroid(cybMechanic, _factory, me, 1);
}
}
else
{
@@ -2250,7 +2253,7 @@ event doResearch(doResearchTr)
setEventTrigger(doResearch, doResearchTr);
exit;
}
_techIndex = 0; //research start
_numResearching = numStructBusyByType(resLab);
@@ -4127,7 +4130,7 @@ event consoleEv(consoleTr)
if(bRunning) //make sure this AI is active
{
console(getPlayerName(me) & " is deactivated");
shutDownAI();
}
}
@@ -56,7 +56,7 @@ run
uplink STRUCTURESTAT "A0Sat-linkCentre"
//number of research topics for each research branch
techCount[0] int 6
techCount[0] int 7
//how many res facilities to use when finished researching all specified research topics
maxIdleRes[0] int -1
@@ -66,37 +66,39 @@ run
tech[0][2] RESEARCHSTAT "R-Wpn-Rocket02-MRL" //mini rocket artillery
tech[0][3] RESEARCHSTAT "R-Wpn-Rocket-ROF03"
tech[0][4] RESEARCHSTAT "R-Wpn-MG-Damage03"
tech[0][5] RESEARCHSTAT "R-Defense-Pillbox06" //lancer bunker
tech[0][5] RESEARCHSTAT "R-Sys-MobileRepairTurret01" //repair turret
tech[0][6] RESEARCHSTAT "R-Defense-Pillbox06" //lancer bunker
//other tech: R-Vehicle-Prop-VTOL, R-Struc-VTOLPad, R-Struc-VTOLFactory
techCount[1] int 19
techCount[1] int 20
//how many res facilities to use when finished researching all specified research topics
maxIdleRes[1] int 3
tech[1][0] RESEARCHSTAT "R-Struc-VTOLFactory"
tech[1][1] RESEARCHSTAT "R-Struc-VTOLPad"
tech[1][2] RESEARCHSTAT "R-Wpn-MG3Mk1" //HMG
tech[1][3] RESEARCHSTAT "R-Wpn-Rocket02-MRL" //mini rocket artillery
tech[1][4] RESEARCHSTAT "R-Wpn-Rocket-ROF03"
tech[1][5] RESEARCHSTAT "R-Wpn-Flamer-Damage03" //flamer damage 03
tech[1][6] RESEARCHSTAT "R-Wpn-Flamer-ROF03" //flamer ROF 03
tech[1][7] RESEARCHSTAT "R-Wpn-Rocket01-LtAT" //Lancer
tech[1][8] RESEARCHSTAT "R-Vehicle-Body08" //Scorpion body
tech[1][9] RESEARCHSTAT "R-Struc-Power-Upgrade03a" //power upgrade 03a
tech[1][10] RESEARCHSTAT "R-Wpn-Missile-Accuracy02" //lancer accuracy
tech[1][11] RESEARCHSTAT "R-Wpn-Missile-Damage03" //lancer damage
tech[1][12] RESEARCHSTAT "R-Wpn-Rocket03-HvAT" //BB
tech[1][13] RESEARCHSTAT "R-Struc-VTOLPad-Upgrade06"
tech[1][14] RESEARCHSTAT "R-Struc-Factory-Upgrade04"
tech[1][15] RESEARCHSTAT "R-Sys-Autorepair-General" //autorepair
tech[1][16] RESEARCHSTAT "R-Sys-Sensor-UpLink"
tech[1][17] RESEARCHSTAT "R-Sys-VTOLCBS-Turret01"
tech[1][18] RESEARCHSTAT "R-Sys-VTOLStrike-Tower01"
tech[1][3] RESEARCHSTAT "R-Sys-MobileRepairTurret01" //repair turret
tech[1][4] RESEARCHSTAT "R-Wpn-Rocket02-MRL" //mini rocket artillery
tech[1][5] RESEARCHSTAT "R-Wpn-Rocket-ROF03"
tech[1][6] RESEARCHSTAT "R-Wpn-Flamer-Damage03" //flamer damage 03
tech[1][7] RESEARCHSTAT "R-Wpn-Flamer-ROF03" //flamer ROF 03
tech[1][8] RESEARCHSTAT "R-Wpn-Rocket01-LtAT" //Lancer
tech[1][9] RESEARCHSTAT "R-Vehicle-Body08" //Scorpion body
tech[1][10] RESEARCHSTAT "R-Struc-Power-Upgrade03a" //power upgrade 03a
tech[1][11] RESEARCHSTAT "R-Wpn-Missile-Accuracy02" //lancer accuracy
tech[1][12] RESEARCHSTAT "R-Wpn-Missile-Damage03" //lancer damage
tech[1][13] RESEARCHSTAT "R-Wpn-Rocket03-HvAT" //BB
tech[1][14] RESEARCHSTAT "R-Struc-VTOLPad-Upgrade06"
tech[1][15] RESEARCHSTAT "R-Struc-Factory-Upgrade04"
tech[1][16] RESEARCHSTAT "R-Sys-Autorepair-General" //autorepair
tech[1][17] RESEARCHSTAT "R-Sys-Sensor-UpLink"
tech[1][18] RESEARCHSTAT "R-Sys-VTOLCBS-Turret01"
tech[1][19] RESEARCHSTAT "R-Sys-VTOLStrike-Tower01"
maxVtolFacs[0] int 1
maxVtolFacs[1] int 4
@@ -212,7 +212,6 @@ function eventGameInit()
// enable cyborgs components that can't be enabled with research
makeComponentAvailable("CyborgSpade", playnum);
makeComponentAvailable("CyborgRepair", playnum);
if (baseType == CAMP_CLEAN)
{
@@ -379,7 +379,7 @@ event initialisedEvent(CALL_GAMEINIT)
}
// check whether we have at least one structure of that type
function bool haveStructure(STRUCTURESTAT type)
function bool haveStructure(STRUCTURESTAT type)
{
return getStructure(type, me) != NULLOBJECT;
}
@@ -695,7 +695,7 @@ event arrived(reachedTr)
function bool tryUpgrade()
{
local STRUCTURE struct;
if (not havePowerSource())
{
return false;
@@ -1691,7 +1691,7 @@ event droidBuiltAssign(droidBuiltTr)
{
numRepairUnits = numRepairUnits + 1;
}
if((droid.droidType == DROID_CONSTRUCT)
or (droid.droidType == DROID_CYBORG_CONSTRUCT)) // if constructor droid
{
@@ -1701,7 +1701,7 @@ event droidBuiltAssign(droidBuiltTr)
{
if(droid.droidType == DROID_CYBORG)
{
if (random(2) == 1)
if (random(2) == 1)
{
groupAddDroid(attackGroup, droid);
}
@@ -1937,16 +1937,16 @@ event conDroids(conDroidsTr)
_maxTruckFactories = 3; //max factories to use for truck production
_haveTrucks = buildGroup.members;
//Find out how many trucks and combat engineers are already in production
_numBuilding = numTemplatesInProduction(constructor,me); //trucks
_numBuilding = _numBuilding + numTemplatesInProduction(cybEngineer,me); //engineers
_totalTrucks = _numBuilding + _haveTrucks;
initEnumStruct(FALSE,factory,me,me);
_factory = enumStruct();
while ((_factory != NULLOBJECT) and (_numBuilding < _maxTruckFactories) and (_totalTrucks < _maxTrucks))
{
//Try to build a truck
@@ -1958,17 +1958,17 @@ event conDroids(conDroidsTr)
{
_bStartedBuilding = buildUnit(constructor, _factory, factory, FALSE); //build truck even if not idle
}
//Update statistics if started building a truck
if(_bStartedBuilding)
{
_numBuilding++;
_totalTrucks++;
}
_factory = enumStruct();
}
//build cyborg engineers if needed, no building structure limit here
initEnumStruct(FALSE,cybFactory,me,me);
_factory = enumStruct();
@@ -1978,7 +1978,7 @@ event conDroids(conDroidsTr)
if( skCanBuildTemplate(me,_factory, cybEngineer) ) //make sure we have researched cyb engineer
{
_bStartedBuilding = buildUnit(cybEngineer, _factory, cybFactory, FALSE); //build a cyb eng even if not idle
//Update statistics if started building a cyborg engineer
if(_bStartedBuilding)
{
@@ -2036,7 +2036,7 @@ function STRUCTURE findIdleStructure(STRUCTURESTAT _structType, bool _bIdleOnly)
_structure = enumStruct();
}
return NULLOBJECT; //none found
}
@@ -2086,7 +2086,7 @@ function bool needTank()
{
return FALSE;
}
if((defendGroup.members < maxDefenders[curTech]) or (maxDefenders[curTech] == UNLIMITED))
{
return TRUE;
@@ -2180,7 +2180,10 @@ function void cybFactorBuildCyborg(STRUCTURE _factory)
{
if(random(5) == 1)
{
buildDroid(cybMechanic,_factory,me,1);
if(skCanBuildTemplate(me, _factory, cybMechanic))
{
buildDroid(cybMechanic, _factory, me, 1);
}
}
else
{
@@ -2613,7 +2616,7 @@ event doResearch(doResearchTr)
setEventTrigger(doResearch, doResearchTr);
exit;
}
_techIndex = 0; //research start
_numResearching = numStructBusyByType(resLab);
@@ -4494,7 +4497,7 @@ event consoleEv(consoleTr)
if(bRunning) //make sure this AI is active
{
console(getPlayerName(me) & " is deactivated");
shutDownAI();
}
}
Oops, something went wrong.

0 comments on commit 4091112

Please sign in to comment.