Skip to content

Commit 95ade2a

Browse files
committed
Merge remote-tracking branch 'data/ModuleMan-Followup' into ModuleMan
2 parents fa53af4 + 3af3a7f commit 95ade2a

16 files changed

+51
-51
lines changed

Data/Base.rte/Activities/BrainVsBrain.lua

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function BrainvsBrain:StartActivity(isNewGame)
4040
self.TechName[Activity.TEAM_2] = self:GetTeamTech(Activity.TEAM_2);
4141

4242
if self.CPUTeam ~= Activity.NOTEAM then
43-
self.CPUTechID = PresetMan:GetModuleID(self.TechName[self.CPUTeam]);
43+
self.CPUTechID = ModuleMan:GetModuleID(self.TechName[self.CPUTeam]);
4444
end
4545

4646
if isNewGame then
@@ -553,7 +553,7 @@ function BrainvsBrain:CreateHeavyDrop(xPosLZ)
553553
Craft.Pos = Vector(xPosLZ, -30); -- Set the spawn point of the craft
554554

555555
for i = 1, Craft.MaxPassengers do
556-
if math.random() < self:GetCrabToHumanSpawnRatio(PresetMan:GetModuleID(self.TechName[self.CPUTeam])) then
556+
if math.random() < self:GetCrabToHumanSpawnRatio(ModuleMan:GetModuleID(self.TechName[self.CPUTeam])) then
557557
Passenger = self:CreateCrab(self.CPUTeam);
558558
elseif RangeRand(0, 105) < self.Difficulty then
559559
Passenger = self:CreateHeavyInfantry(self.CPUTeam);
@@ -838,7 +838,7 @@ end
838838

839839
function BrainvsBrain:CreateLightInfantry(team, mode)
840840
local Passenger = RandomAHuman("Actors - Light", self.TechName[team]);
841-
if Passenger.ModuleID ~= PresetMan:GetModuleID(self.TechName[team]) then
841+
if Passenger.ModuleID ~= ModuleMan:GetModuleID(self.TechName[team]) then
842842
Passenger = RandomAHuman("Actors", self.TechName[team]);
843843
end
844844

@@ -863,7 +863,7 @@ end
863863

864864
function BrainvsBrain:CreateDefender(team)
865865
local Passenger = RandomAHuman("Actors - Light", self.TechName[team]);
866-
if Passenger.ModuleID ~= PresetMan:GetModuleID(self.TechName[team]) then
866+
if Passenger.ModuleID ~= ModuleMan:GetModuleID(self.TechName[team]) then
867867
Passenger = RandomAHuman("Actors", self.TechName[team]);
868868
end
869869

@@ -883,7 +883,7 @@ end
883883

884884
function BrainvsBrain:CreateHeavyInfantry(team, mode)
885885
local Passenger = RandomAHuman("Actors - Heavy", self.TechName[team]);
886-
if Passenger.ModuleID ~= PresetMan:GetModuleID(self.TechName[team]) then
886+
if Passenger.ModuleID ~= ModuleMan:GetModuleID(self.TechName[team]) then
887887
Passenger = RandomAHuman("Actors", self.TechName[team]);
888888
end
889889

@@ -915,7 +915,7 @@ end
915915

916916
function BrainvsBrain:CreateMediumInfantry(team, mode)
917917
local Passenger = RandomAHuman("Actors - Heavy", self.TechName[team]);
918-
if Passenger.ModuleID ~= PresetMan:GetModuleID(self.TechName[team]) then
918+
if Passenger.ModuleID ~= ModuleMan:GetModuleID(self.TechName[team]) then
919919
Passenger = RandomAHuman("Actors", self.TechName[team]);
920920
end
921921

@@ -940,7 +940,7 @@ end
940940

941941
function BrainvsBrain:CreateScoutInfantry(team, mode)
942942
local Passenger = RandomAHuman("Actors - Light", self.TechName[team]);
943-
if Passenger.ModuleID ~= PresetMan:GetModuleID(self.TechName[team]) then
943+
if Passenger.ModuleID ~= ModuleMan:GetModuleID(self.TechName[team]) then
944944
Passenger = RandomAHuman("Actors", self.TechName[team]);
945945
end
946946

@@ -965,7 +965,7 @@ end
965965

966966
function BrainvsBrain:CreateEngineer(team, mode)
967967
local Passenger = RandomAHuman("Actors - Light", self.TechName[team]);
968-
if Passenger.ModuleID ~= PresetMan:GetModuleID(self.TechName[team]) then
968+
if Passenger.ModuleID ~= ModuleMan:GetModuleID(self.TechName[team]) then
969969
Passenger = RandomAHuman("Actors", self.TechName[team]);
970970
end
971971

Data/Base.rte/Activities/BunkerBreach.lua

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ function BunkerBreach:SetupDefenderBrains()
138138
end
139139

140140
function BunkerBreach:SetupDefenderActors()
141-
local techID = PresetMan:GetModuleID(self:GetTeamTech(self.defenderTeam));
141+
local techID = ModuleMan:GetModuleID(self:GetTeamTech(self.defenderTeam));
142142
local crabToHumanSpawnRatio = self:GetCrabToHumanSpawnRatio(techID);
143143

144144
local loadoutNames = {"Light", "Heavy", "Sniper", "Engineer", "Mecha", "Turret"};
@@ -645,7 +645,7 @@ function BunkerBreach:CreateInternalReinforcements(loadout, numberOfReinforcemen
645645
loadout = nil;
646646
end
647647
local team = self.CPUTeam;
648-
local techID = PresetMan:GetModuleID(self:GetTeamTech(team));
648+
local techID = ModuleMan:GetModuleID(self:GetTeamTech(team));
649649
local crabToHumanSpawnRatio = self:GetCrabToHumanSpawnRatio(techID);
650650

651651
local internalReinforcementPositionsToEnemyTargets = self:CalculateInternalReinforcementPositionsToEnemyTargets(numberOfReinforcementsToCreate);
@@ -666,7 +666,7 @@ function BunkerBreach:CreateInternalReinforcements(loadout, numberOfReinforcemen
666666
numberOfInternalReinforcementsToCreateAtPosition = 3;
667667
end
668668
end
669-
669+
670670
for i = 1, numberOfInternalReinforcementsToCreateAtPosition do
671671
local internalReinforcement;
672672
if loadout then
@@ -707,7 +707,7 @@ function BunkerBreach:CreateDrop(loadout, aiMode, passengerCount, avoidPreviousC
707707
loadout = nil;
708708
end
709709
local team = self.CPUTeam;
710-
local techID = PresetMan:GetModuleID(self:GetTeamTech(team));
710+
local techID = ModuleMan:GetModuleID(self:GetTeamTech(team));
711711
local crabToHumanSpawnRatio = self:GetCrabToHumanSpawnRatio(techID);
712712

713713
local craft = RandomACDropShip("Craft", techID);
@@ -872,7 +872,7 @@ function BunkerBreach:CreateCrab(techID, createTurret)
872872
end
873873

874874
function BunkerBreach:CreateBrainBot(team, techID)
875-
local techID = PresetMan:GetModuleID(self:GetTeamTech(team));
875+
local techID = ModuleMan:GetModuleID(self:GetTeamTech(team));
876876
local actor;
877877
if techID ~= -1 and team == self.attackerTeam then
878878
actor = PresetMan:GetLoadout("Infantry Brain", techID, false);

Data/Base.rte/Activities/Harvester.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ function Harvester:UpdateActivity()
253253
for i = 1, actorsInCargo do
254254
-- Get any Actor from the CPU's native tech
255255
local passenger = nil;
256-
if math.random() >= self:GetCrabToHumanSpawnRatio(PresetMan:GetModuleID(self.CPUTechName)) then
256+
if math.random() >= self:GetCrabToHumanSpawnRatio(ModuleMan:GetModuleID(self.CPUTechName)) then
257257
passenger = RandomAHuman("Any", self.CPUTechName);
258258
else
259259
passenger = RandomACrab("Actors - Mecha", self.CPUTechName);

Data/Base.rte/Activities/KeepieUppie.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ function KeepieUppie:ResumeLoadedGame()
104104
end
105105
end
106106
end
107-
107+
108108
if not self.playerRocketSpawned then
109109
for player = Activity.PLAYER_1, Activity.MAXPLAYERCOUNT - 1 do
110110
if self:PlayerActive(player) and self:PlayerHuman(player) then
@@ -206,7 +206,7 @@ function KeepieUppie:UpdateActivity()
206206
for i = 1, actorsInCargo do
207207
-- Get any Actor from the CPU's native tech
208208
local passenger = nil;
209-
if math.random() >= self:GetCrabToHumanSpawnRatio(PresetMan:GetModuleID(self.CPUTechName)) then
209+
if math.random() >= self:GetCrabToHumanSpawnRatio(ModuleMan:GetModuleID(self.CPUTechName)) then
210210
passenger = RandomAHuman("Any", self.CPUTechName);
211211
else
212212
passenger = RandomACrab("Any", self.CPUTechName);

Data/Base.rte/Activities/Massacre.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ function Massacre:UpdateActivity()
249249
for i = 1, actorsInCargo do
250250
-- Get any Actor from the CPU's native tech
251251
local passenger = nil;
252-
if math.random() >= self:GetCrabToHumanSpawnRatio(PresetMan:GetModuleID(self.CPUTechName)) then
252+
if math.random() >= self:GetCrabToHumanSpawnRatio(ModuleMan:GetModuleID(self.CPUTechName)) then
253253
passenger = RandomAHuman("Any", self.CPUTechName);
254254
else
255255
passenger = RandomACrab("Actors - Mecha", self.CPUTechName);

Data/Base.rte/Activities/OneManArmy.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,11 @@ function OneManArmy:SetupHumanPlayerBrains(actorGroup, primaryGroup, secondaryGr
105105

106106
--If we can't find an unassigned brain in the scene to give the player, create one
107107
if not foundBrain then
108-
local tech = PresetMan:GetModuleID(self:GetTeamTech(team));
108+
local tech = ModuleMan:GetModuleID(self:GetTeamTech(team));
109109
foundBrain = CreateAHuman(defaultActor);
110110
--If a faction was chosen, pick the first item from faction listing
111111
if tech ~= -1 then
112-
local module = PresetMan:GetDataModule(tech);
112+
local module = ModuleMan:GetDataModule(tech);
113113
local primaryWeapon, secondaryWeapon, throwable, actor;
114114
for entity in module.Presets do
115115
local picked; --Prevent duplicates
@@ -333,9 +333,9 @@ function OneManArmy:UpdateActivity()
333333
for i = 1, actorsInCargo do
334334
--Get any Actor from the CPU's native tech
335335
local passenger = nil;
336-
if math.random() >= self:GetCrabToHumanSpawnRatio(PresetMan:GetModuleID(self.CPUTechName)) then
336+
if math.random() >= self:GetCrabToHumanSpawnRatio(ModuleMan:GetModuleID(self.CPUTechName)) then
337337
passenger = RandomAHuman("Actors - Light", self.CPUTechName);
338-
if passenger.ModuleID ~= PresetMan:GetModuleID(self.CPUTechName) then
338+
if passenger.ModuleID ~= ModuleMan:GetModuleID(self.CPUTechName) then
339339
passenger = RandomAHuman("Actors", self.CPUTechName);
340340
end
341341
else

Data/Base.rte/Activities/OneManArmyDiggers.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,11 @@ function OneManArmy:SetupHumanPlayerBrains(actorGroup, primaryGroup, secondaryGr
106106
local foundBrain = MovableMan:GetUnassignedBrain(team);
107107
-- If we can't find an unassigned brain in the scene to give the player, create one
108108
if not foundBrain then
109-
local tech = PresetMan:GetModuleID(self:GetTeamTech(team));
109+
local tech = ModuleMan:GetModuleID(self:GetTeamTech(team));
110110
foundBrain = CreateAHuman(defaultActor);
111111
-- If a faction was chosen, pick the first item from faction listing
112112
if tech ~= -1 then
113-
local module = PresetMan:GetDataModule(tech);
113+
local module = ModuleMan:GetDataModule(tech);
114114
local primaryWeapon, secondaryWeapon, throwable, actor;
115115
for entity in module.Presets do
116116
local picked; -- Prevent duplicates
@@ -287,7 +287,7 @@ function OneManArmy:UpdateActivity()
287287
-- Set the ship up with a cargo of a few armed and equipped actors
288288
for i = 1, actorsInCargo do
289289
local passenger = RandomAHuman("Actors - " .. ((self.Difficulty > 75 and math.random() > 0.5) and "Heavy" or "Light"), self.CPUTechName);
290-
if passenger.ModuleID ~= PresetMan:GetModuleID(self.CPUTechName) then
290+
if passenger.ModuleID ~= ModuleMan:GetModuleID(self.CPUTechName) then
291291
passenger = RandomAHuman("Actors", self.CPUTechName);
292292
end
293293

Data/Base.rte/Activities/OneManArmyZeroG.lua

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function OneManArmyZeroG:StartActivity(isNewGame)
88
self.winTimer = Timer();
99

1010
self.CPUTechName = self:GetTeamTech(self.CPUTeam);
11-
11+
1212
self.isDiggersOnly = self.PresetName:find("Diggers") ~= nil;
1313

1414
if isNewGame then
@@ -85,7 +85,7 @@ function OneManArmyZeroG:StartNewGame()
8585
self.timeLimit = (timeLimitMinutes * 60000) + 5000;
8686
self.timeDisplay = timeLimitText .. " minutes";
8787
self.enemySpawnTimeLimit = 500;
88-
88+
8989
local automoverController = CreateActor("Invisible Automover Controller", "Base.rte");
9090
automoverController.Team = -1;
9191
automoverController:SetNumberValue("MovementSpeed", 16);
@@ -121,11 +121,11 @@ function OneManArmyZeroG:SetupHumanPlayerBrains(actorGroup, primaryGroup, second
121121

122122
--If we can't find an unassigned brain in the scene to give the player, create one
123123
if not foundBrain then
124-
local tech = PresetMan:GetModuleID(self:GetTeamTech(team));
124+
local tech = ModuleMan:GetModuleID(self:GetTeamTech(team));
125125
foundBrain = CreateAHuman(defaultActor);
126126
--If a faction was chosen, pick the first item from faction listing
127127
if tech ~= -1 then
128-
local dataModule = PresetMan:GetDataModule(tech);
128+
local dataModule = ModuleMan:GetDataModule(tech);
129129
local primaryWeapon, secondaryWeapon, tertiaryWeapon, actor;
130130
for entity in dataModule.Presets do
131131
local picked; --Prevent duplicates
@@ -248,14 +248,14 @@ function OneManArmyZeroG:ResumeLoadedGame()
248248
end
249249
end
250250
end
251-
251+
252252
for particle in MovableMan.AddedParticles do
253253
if particle.PresetName == "Automover Node 1x1" then
254254
particle.Scale = 0;
255255
break;
256256
end
257257
end
258-
258+
259259
for actor in MovableMan.AddedActors do
260260
if actor.Team ~= Activity.TEAM_1 then
261261
actor.AIMode = Actor.AIMODE_BRAINHUNT;
@@ -343,7 +343,7 @@ function OneManArmyZeroG:UpdateActivity()
343343
if self.CPUTeam ~= Activity.NOTEAM and self.enemySpawnTimer:LeftTillSimMS(self.enemySpawnTimeLimit) <= 0 then
344344
for i = 1, math.random(1, 3) do
345345
local actor = RandomAHuman("Actors - Light", self.CPUTechName);
346-
if actor.ModuleID ~= PresetMan:GetModuleID(self.CPUTechName) then
346+
if actor.ModuleID ~= ModuleMan:GetModuleID(self.CPUTechName) then
347347
actor = RandomAHuman("Actors", self.CPUTechName);
348348
end
349349

Data/Base.rte/Activities/Siege.lua

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function Siege:StartActivity()
2727
self.CPUTechName = self:GetTeamTech(self.CPUTeam); -- Select a tech for the CPU player
2828
self.PlayerTechName = self:GetTeamTech(self.PlayerTeam);
2929
gPrevAITech = self.CPUTechName -- Store the AI tech in a global so we don't pick the same tech again next round
30-
self.CPUTechID = PresetMan:GetModuleID(self.CPUTechName);
30+
self.CPUTechID = ModuleMan:GetModuleID(self.CPUTechName);
3131

3232
self:SetTeamFunds(math.ceil((3000 + self.Difficulty * 175) * rte.StartingFundsScale), self.CPUTeam);
3333
if self.Difficulty == 100 then
@@ -477,7 +477,7 @@ function Siege:CreateHeavyDrop(xPosLZ, techName)
477477
Craft.Pos = Vector(xPosLZ, -30); -- Set the spawn point of the craft
478478

479479
for i = 1, Craft.MaxPassengers do
480-
if math.random() < self:GetCrabToHumanSpawnRatio(PresetMan:GetModuleID(techName)) then
480+
if math.random() < self:GetCrabToHumanSpawnRatio(ModuleMan:GetModuleID(techName)) then
481481
Passenger = self:CreateCrab(Actor.AIMODE_GOTO, techName);
482482
elseif RangeRand(0, 105) < self.Difficulty then
483483
Passenger = self:CreateHeavyInfantry(Actor.AIMODE_GOTO,techName);
@@ -497,7 +497,7 @@ function Siege:CreateHeavyDrop(xPosLZ, techName)
497497
end
498498

499499
-- Subtract the total value of the craft+cargo from the CPU team's funds
500-
self:ChangeTeamFunds(-Craft:GetTotalValue(PresetMan:GetModuleID(techName), 2), self.CPUTeam);
500+
self:ChangeTeamFunds(-Craft:GetTotalValue(ModuleMan:GetModuleID(techName), 2), self.CPUTeam);
501501

502502
-- Spawn the Craft onto the scene
503503
MovableMan:AddActor(Craft);
@@ -534,7 +534,7 @@ function Siege:CreateSWATDrop(xPosLZ, techName)
534534
end
535535

536536
-- Subtract the total value of the craft+cargo from the CPU team's funds
537-
self:ChangeTeamFunds(-Craft:GetTotalValue(PresetMan:GetModuleID(techName), 2), self.CPUTeam);
537+
self:ChangeTeamFunds(-Craft:GetTotalValue(ModuleMan:GetModuleID(techName), 2), self.CPUTeam);
538538

539539
-- Spawn the Craft onto the scene
540540
MovableMan:AddActor(Craft);
@@ -571,7 +571,7 @@ function Siege:CreateArtilleryDrop(xPosLZ, techName)
571571
end
572572

573573
-- Subtract the total value of the craft+cargo from the CPU team's funds
574-
self:ChangeTeamFunds(-Craft:GetTotalValue(PresetMan:GetModuleID(techName), 2), self.CPUTeam);
574+
self:ChangeTeamFunds(-Craft:GetTotalValue(ModuleMan:GetModuleID(techName), 2), self.CPUTeam);
575575

576576
-- Spawn the Craft onto the scene
577577
MovableMan:AddActor(Craft);
@@ -625,7 +625,7 @@ function Siege:CreateMediumDrop(xPosLZ, techName)
625625
end
626626

627627
-- Subtract the total value of the craft+cargo from the CPU team's funds
628-
self:ChangeTeamFunds(-Craft:GetTotalValue(PresetMan:GetModuleID(techName), 2), self.CPUTeam);
628+
self:ChangeTeamFunds(-Craft:GetTotalValue(ModuleMan:GetModuleID(techName), 2), self.CPUTeam);
629629

630630
-- Spawn the Craft onto the scene
631631
MovableMan:AddActor(Craft);
@@ -677,7 +677,7 @@ function Siege:CreateLightDrop(xPosLZ, techName)
677677
end
678678

679679
-- Subtract the total value of the craft+cargo from the CPU team's funds
680-
self:ChangeTeamFunds(-Craft:GetTotalValue(PresetMan:GetModuleID(techName), 2), self.CPUTeam);
680+
self:ChangeTeamFunds(-Craft:GetTotalValue(ModuleMan:GetModuleID(techName), 2), self.CPUTeam);
681681

682682
-- Spawn the Craft onto the scene
683683
MovableMan:AddActor(Craft);
@@ -725,7 +725,7 @@ function Siege:CreateEngineerDrop(xPosLZ, techName)
725725
end
726726

727727
-- Subtract the total value of the craft+cargo from the CPU team's funds
728-
self:ChangeTeamFunds(-Craft:GetTotalValue(PresetMan:GetModuleID(techName), 2), self.CPUTeam);
728+
self:ChangeTeamFunds(-Craft:GetTotalValue(ModuleMan:GetModuleID(techName), 2), self.CPUTeam);
729729

730730
-- Spawn the Craft onto the scene
731731
MovableMan:AddActor(Craft);

Data/Base.rte/Activities/SkirmishDefense.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function SkirmishDefense:StartActivity(isNewGame)
5757
end
5858
end
5959

60-
self.AI[team].TechID = PresetMan:GetModuleID(self:GetTeamTech(team));
60+
self.AI[team].TechID = ModuleMan:GetModuleID(self:GetTeamTech(team));
6161
end
6262

6363
if isNewGame then

0 commit comments

Comments
 (0)