Skip to content

Commit ed41b9f

Browse files
committed
cleanup, prepare mission stage 4 some more
1 parent 501fe17 commit ed41b9f

File tree

6 files changed

+255
-14
lines changed

6 files changed

+255
-14
lines changed

Data/Browncoats.rte/Activities/RefineryAssault.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function RefineryAssault:SetupBuyDoorAreaTable(self, area)
3737
-- end
3838

3939
for mo in MovableMan.AddedActors do
40-
if mo.PresetName == "Reinforcement Door" and area:IsInside(mo.Pos) then
40+
if mo.PresetName == "Reinforcement Door" and area:IsInside(mo.Pos) and not mo:NumberValueExists("SubcommanderDoor") then
4141
table.insert(self.saveTable.buyDoorTables.All, mo)
4242
self.saveTable.buyDoorTables[areaKey][tonumber(#self.saveTable.buyDoorTables.All)] = mo;
4343
end

Data/Browncoats.rte/Activities/RefineryAssaultFunctions.lua

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -133,14 +133,6 @@ function RefineryAssault:HandleMessage(message, object)
133133

134134
local soundContainer = CreateSoundContainer("Yskely Refinery Oil Spout Engage", "Browncoats.rte");
135135
soundContainer:Play(Vector(0, 0));
136-
137-
elseif message == "RefineryAssault_RefineryConsoleBroken" then
138-
139-
self.stage3ConsolesBroken = self.stage3ConsolesBroken + 1;
140-
141-
if self.stage3ConsolesBroken == 3 then
142-
self.HUDHandler:RemoveObjective(self.humanTeam, "S3DestroyConsoles");
143-
end
144136

145137
elseif message == "Captured_RefineryS3FireWeaponryConsole" then
146138

@@ -168,6 +160,8 @@ function RefineryAssault:HandleMessage(message, object)
168160
self.stage4DoorExploDistSoundContainer = CreateSoundContainer("Yskely Refinery S4 Doors Explo Distant");
169161
self.stage4DoorExploDistSoundContainer:Play(pos);
170162

163+
CameraMan:AddScreenShake(50, pos);
164+
171165
-- Stage 5 generator stuff
172166

173167
self.saveTable.stage5Generators = {};
@@ -203,6 +197,13 @@ function RefineryAssault:HandleMessage(message, object)
203197
false,
204198
true,
205199
true);
200+
201+
local taskArea = SceneMan.Scene:GetOptionalArea("TacticsPatrolArea_MissionStage4");
202+
local task = self.tacticsHandler:AddTask("Patrol Stage 4", self.humanTeam, taskArea, "PatrolArea", 10);
203+
local task = self.tacticsHandler:AddTask("Patrol Stage 4", self.aiTeam, taskArea, "PatrolArea", 10);
204+
205+
self.tacticsHandler:RemoveTask("Patrol Stage 3", self.humanTeam);
206+
self.tacticsHandler:RemoveTask("Patrol Stage 3", self.aiTeam);
206207

207208
end
208209

@@ -225,7 +226,7 @@ function RefineryAssault:HandleMessage(message, object)
225226
self.stage2HoldingBothConsoles = true;
226227
self.stage2TimeToHoldConsoles = 0;
227228
elseif message == "SkipStage3" then
228-
self.stage3ConsolesBroken = 3
229+
self.stage3AllConsolesBroken = true;
229230
self.HUDHandler:RemoveObjective(self.humanTeam, "S3DestroyConsoles");
230231
self.saveTable.enemyActorTables.stage3FacilityOperator = {};
231232
self.stage3DrillOverloaded = true;
@@ -683,14 +684,14 @@ function RefineryAssault:MonitorStage2()
683684

684685
-- Setup stage 3 consoles
685686

686-
self.stage3Consoles = {};
687+
self.saveTable.stage3Consoles = {};
687688

688689
local i = 1;
689690

690691
for particle in MovableMan.Particles do
691692
if particle.PresetName == "Browncoat Refinery Console Breakable Objective" then
692693
particle.MissionCritical = false;
693-
table.insert(self.stage3Consoles, particle)
694+
table.insert(self.saveTable.stage3Consoles, particle)
694695
self.tacticsHandler:AddTask("Defend Refinery Console " .. i, self.aiTeam, particle, "Defend", 10);
695696
self.tacticsHandler:AddTask("Attack Refinery Console " .. i, self.humanTeam, particle, "Attack", 10);
696697
i = i + 1;
@@ -802,14 +803,33 @@ function RefineryAssault:MonitorStage3()
802803
end
803804
end
804805

805-
if #self.saveTable.enemyActorTables.stage3FacilityOperator == 0 and not self.stage3FacilityOperatorKilled then
806+
if #self.saveTable.enemyActorTables.stage3FacilityOperator == 0 then
806807
self.HUDHandler:RemoveObjective(self.humanTeam, "S3DefeatOperator");
807808
self.stage3FacilityOperatorKilled = true;
808809
end
809810

810811
end
812+
813+
if not self.stage3AllConsolesBroken then
814+
815+
for i, console in ipairs(self.saveTable.stage3Consoles) do
816+
if not console or not MovableMan:ValidMO(console) then
817+
self.saveTable.stage3Consoles[i] = false;
818+
819+
self.tacticsHandler:RemoveTask("Defend Refinery Console " .. i, self.aiTeam);
820+
self.tacticsHandler:RemoveTask("Attack Refinery Console " .. i, self.humanTeam);
821+
822+
end
823+
end
824+
825+
if #self.saveTable.stage3Consoles == 0 then
826+
self.stage3AllConsolesBroken = true;
827+
self.HUDHandler:RemoveObjective(self.humanTeam, "S3DestroyConsoles");
828+
end
829+
830+
end
811831

812-
if self.stage3ConsolesBroken == 3 and self.stage3FacilityOperatorKilled and self.stage3DrillOverloaded and not self.stage3DoorSequenceTimer then
832+
if self.stage3AllConsolesBroken and self.stage3FacilityOperatorKilled and self.stage3DrillOverloaded and not self.stage3DoorSequenceTimer then
813833

814834
-- initiate scripted sequence
815835

Data/Browncoats.rte/Scenes/Objects/Breakables/RefineryFuelTankLarge/RefineryS4FuelTankMain.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ function Update(self)
2424

2525
self.MissionCritical = false;
2626
self:GibThis();
27+
CameraMan:AddScreenShake(30, self.Pos);
2728

2829
for k, door in pairs(self.doorsTable) do
2930
if MovableMan:ValidMO(door) then
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
AddActor = Actor
2+
CopyOf = Reinforcement Door
3+
PresetName = Refinery Subcommander Door
4+
AddCustomValue = NumberValue
5+
SubcommanderDoor = 1

Data/Browncoats.rte/Scenes/Objects/Objects.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ IncludeFile = Browncoats.rte/Scenes/Objects/BlastDoors/BlastDoors.ini
55

66
IncludeFile = Browncoats.rte/Scenes/Objects/BunkerSystems/UndersideHangar/UndersideHangar.ini
77

8+
IncludeFile = Browncoats.rte/Scenes/Objects/BunkerSystems/RefinerySubcommanderDoor/RefinerySubcommanderDoor.ini
89
IncludeFile = Browncoats.rte/Scenes/Objects/BunkerSystems/RefineryAmbienceController/RefineryAmbienceController.ini

Data/Browncoats.rte/Scenes/Yskely Refineryv3.ini

Lines changed: 214 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132690,6 +132690,20 @@ AddScene = Scene
132690132690
HFlipped = 0
132691132691
AddCustomValue = NumberValue
132692132692
SceneObject = 1
132693+
PlaceSceneObject = Actor
132694+
CopyOf = Browncoats.rte/Refinery Subcommander Door
132695+
Position = Vector
132696+
X = 16248
132697+
Y = 2028
132698+
Team = 0
132699+
PlacedByPlayer = 0
132700+
HFlipped = 0
132701+
AddCustomValue = NumberValue
132702+
StayOpenDuration = 2000
132703+
AddCustomValue = NumberValue
132704+
SubcommanderDoor = 1
132705+
Health = 100
132706+
MaxHealth = 100
132693132707
PlaceAIPlanObject = TerrainObject
132694132708
CopyOf = Base.rte/T-Junction D
132695132709
Position = Vector
@@ -136051,6 +136065,206 @@ AddScene = Scene
136051136065
Width = 120
136052136066
Height = 81
136053136067
Name = RefineryAssault_S3DoorSequenceArea
136068+
AddArea = Area
136069+
AddBox = Box
136070+
Corner = Vector
136071+
X = 12693.4
136072+
Y = 4473.4
136073+
Width = 184
136074+
Height = 4
136075+
AddBox = Box
136076+
Corner = Vector
136077+
X = 13161.4
136078+
Y = 3628.6
136079+
Width = 116
136080+
Height = 7
136081+
AddBox = Box
136082+
Corner = Vector
136083+
X = 12685.9
136084+
Y = 4098.7
136085+
Width = 94
136086+
Height = 6
136087+
AddBox = Box
136088+
Corner = Vector
136089+
X = 13048.3
136090+
Y = 2866.6
136091+
Width = 168
136092+
Height = 6
136093+
AddBox = Box
136094+
Corner = Vector
136095+
X = 15741.1
136096+
Y = 3385.3
136097+
Width = 298
136098+
Height = 4
136099+
AddBox = Box
136100+
Corner = Vector
136101+
X = 15769.6
136102+
Y = 4000.9
136103+
Width = 339
136104+
Height = 6
136105+
AddBox = Box
136106+
Corner = Vector
136107+
X = 16635.4
136108+
Y = 3804.4
136109+
Width = 66
136110+
Height = 6
136111+
AddBox = Box
136112+
Corner = Vector
136113+
X = 16998.4
136114+
Y = 3239.8
136115+
Width = 109
136116+
Height = 4
136117+
AddBox = Box
136118+
Corner = Vector
136119+
X = 16990.6
136120+
Y = 3007
136121+
Width = 567
136122+
Height = 9
136123+
AddBox = Box
136124+
Corner = Vector
136125+
X = 18082.6
136126+
Y = 2683.9
136127+
Width = 237
136128+
Height = 4
136129+
AddBox = Box
136130+
Corner = Vector
136131+
X = 18718.3
136132+
Y = 2779.9
136133+
Width = 205
136134+
Height = 5
136135+
AddBox = Box
136136+
Corner = Vector
136137+
X = 17332
136138+
Y = 2299.3
136139+
Width = 300
136140+
Height = 4
136141+
AddBox = Box
136142+
Corner = Vector
136143+
X = 16092.4
136144+
Y = 2300.5
136145+
Width = 178
136146+
Height = 4
136147+
AddBox = Box
136148+
Corner = Vector
136149+
X = 16155.1
136150+
Y = 2024.5
136151+
Width = 184
136152+
Height = 3
136153+
AddBox = Box
136154+
Corner = Vector
136155+
X = 17097.1
136156+
Y = 1915.3
136157+
Width = 208
136158+
Height = 5
136159+
AddBox = Box
136160+
Corner = Vector
136161+
X = 17898.7
136162+
Y = 1876.9
136163+
Width = 292
136164+
Height = 5
136165+
AddBox = Box
136166+
Corner = Vector
136167+
X = 18434.2
136168+
Y = 2039.5
136169+
Width = 75
136170+
Height = 5
136171+
AddBox = Box
136172+
Corner = Vector
136173+
X = 18271.3
136174+
Y = 1140.4
136175+
Width = 161
136176+
Height = 6
136177+
AddBox = Box
136178+
Corner = Vector
136179+
X = 16067.5
136180+
Y = 980.196
136181+
Width = 599
136182+
Height = 11
136183+
AddBox = Box
136184+
Corner = Vector
136185+
X = 15760.9
136186+
Y = 1342.3
136187+
Width = 369
136188+
Height = 4
136189+
AddBox = Box
136190+
Corner = Vector
136191+
X = 15854.8
136192+
Y = 1681.9
136193+
Width = 241
136194+
Height = 4
136195+
AddBox = Box
136196+
Corner = Vector
136197+
X = 15329.2
136198+
Y = 2673.4
136199+
Width = 126
136200+
Height = 8
136201+
AddBox = Box
136202+
Corner = Vector
136203+
X = 15552.7
136204+
Y = 3017.2
136205+
Width = 229
136206+
Height = 5
136207+
AddBox = Box
136208+
Corner = Vector
136209+
X = 18652.3
136210+
Y = 3162.69
136211+
Width = 377
136212+
Height = 5
136213+
AddBox = Box
136214+
Corner = Vector
136215+
X = 17866.3
136216+
Y = 3261.7
136217+
Width = 90
136218+
Height = 3
136219+
AddBox = Box
136220+
Corner = Vector
136221+
X = 18601.6
136222+
Y = 2469.4
136223+
Width = 98
136224+
Height = 5
136225+
AddBox = Box
136226+
Corner = Vector
136227+
X = 15329.5
136228+
Y = 1885.8
136229+
Width = 108
136230+
Height = 4
136231+
AddBox = Box
136232+
Corner = Vector
136233+
X = 16267.9
136234+
Y = 2727.4
136235+
Width = 95
136236+
Height = 5
136237+
AddBox = Box
136238+
Corner = Vector
136239+
X = 16230.7
136240+
Y = 3028.6
136241+
Width = 103
136242+
Height = 3
136243+
AddBox = Box
136244+
Corner = Vector
136245+
X = 16045
136246+
Y = 3679.6
136247+
Width = 121
136248+
Height = 1
136249+
AddBox = Box
136250+
Corner = Vector
136251+
X = 18908.2
136252+
Y = 2166.4
136253+
Width = 122
136254+
Height = 2
136255+
AddBox = Box
136256+
Corner = Vector
136257+
X = 18562
136258+
Y = 1878.1
136259+
Width = 52
136260+
Height = 2
136261+
AddBox = Box
136262+
Corner = Vector
136263+
X = 16776.7
136264+
Y = 2306.2
136265+
Width = 69
136266+
Height = 3
136267+
Name = TacticsPatrolArea_MissionStage4
136054136268
GlobalAcceleration = Vector
136055136269
X = 0
136056136270
Y = 20

0 commit comments

Comments
 (0)