Skip to content

Commit c8c7b44

Browse files
committed
some sounds, fix progression up to s5
1 parent 0b75da0 commit c8c7b44

File tree

13 files changed

+105
-15
lines changed

13 files changed

+105
-15
lines changed
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Data/Browncoats.rte/Activities/RefineryAssaultFunctions.lua

Lines changed: 80 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,20 @@ function RefineryAssault:HandleMessage(message, object)
9494

9595
for k, v in pairs(self.saveTable.buyDoorTables.S3_1) do
9696
v.Team = object;
97+
end
98+
99+
-- dupe code woo
100+
if object == self.humanTeam then
101+
local pos;
102+
for particle in MovableMan.Particles do
103+
if particle.PresetName == "Refinery S3 Buy Door Console 1" then
104+
pos = particle.Pos;
105+
break;
106+
end
107+
end
108+
self.tacticsHandler:AddTask("Attack S3 Buy Door Console 1", self.aiTeam, pos, "Attack", 20);
109+
else
110+
self.tacticsHandler:RemoveTask("Attack S3 Buy Door Console 1", self.aiTeam);
97111
end
98112

99113
elseif message == "Captured_RefineryS3BuyDoorConsole2" then
@@ -104,7 +118,21 @@ function RefineryAssault:HandleMessage(message, object)
104118

105119
for k, v in pairs(self.saveTable.buyDoorTables.S3_2) do
106120
v.Team = object;
107-
end
121+
end
122+
123+
-- dupe code woo
124+
if object == self.humanTeam then
125+
local pos;
126+
for particle in MovableMan.Particles do
127+
if particle.PresetName == "Refinery S3 Buy Door Console 2" then
128+
pos = particle.Pos;
129+
break;
130+
end
131+
end
132+
self.tacticsHandler:AddTask("Attack S3 Buy Door Console 2", self.aiTeam, pos, "Attack", 20);
133+
else
134+
self.tacticsHandler:RemoveTask("Attack S3 Buy Door Console 2", self.aiTeam);
135+
end
108136

109137
elseif message == "Captured_RefineryS3BuyDoorConsole3" then
110138

@@ -116,6 +144,20 @@ function RefineryAssault:HandleMessage(message, object)
116144
v.Team = object;
117145
end
118146

147+
-- dupe code woo
148+
if object == self.humanTeam then
149+
local pos;
150+
for particle in MovableMan.Particles do
151+
if particle.PresetName == "Refinery S3 Buy Door Console 3" then
152+
pos = particle.Pos;
153+
break;
154+
end
155+
end
156+
self.tacticsHandler:AddTask("Attack S3 Buy Door Console 3", self.aiTeam, pos, "Attack", 20);
157+
else
158+
self.tacticsHandler:RemoveTask("Attack S3 Buy Door Console 3", self.aiTeam);
159+
end
160+
119161
elseif message == "Captured_RefineryS3BuyDoorConsole4" then
120162

121163
table.insert(self.saveTable.buyDoorTables.teamAreas[object], "S3_4");
@@ -124,7 +166,21 @@ function RefineryAssault:HandleMessage(message, object)
124166

125167
for k, v in pairs(self.saveTable.buyDoorTables.S3_4) do
126168
v.Team = object;
127-
end
169+
end
170+
171+
-- dupe code woo
172+
if object == self.humanTeam then
173+
local pos;
174+
for particle in MovableMan.Particles do
175+
if particle.PresetName == "Refinery S3 Buy Door Console 4" then
176+
pos = particle.Pos;
177+
break;
178+
end
179+
end
180+
self.tacticsHandler:AddTask("Attack S3 Buy Door Console 4", self.aiTeam, pos, "Attack", 20);
181+
else
182+
self.tacticsHandler:RemoveTask("Attack S3 Buy Door Console 4", self.aiTeam);
183+
end
128184

129185
elseif message == "Captured_RefineryS3OilCapturable" then
130186

@@ -204,6 +260,20 @@ function RefineryAssault:HandleMessage(message, object)
204260

205261
self.tacticsHandler:RemoveTask("Patrol Stage 3", self.humanTeam);
206262
self.tacticsHandler:RemoveTask("Patrol Stage 3", self.aiTeam);
263+
264+
-- Straighten up the buy door situation
265+
266+
self:SendMessage("Captured_RefineryS3BuyDoorConsole1", self.humanTeam);
267+
self:SendMessage("Captured_RefineryS3BuyDoorConsole2", self.humanTeam);
268+
self:SendMessage("Captured_RefineryS3BuyDoorConsole3", self.humanTeam);
269+
270+
self.tacticsHandler:RemoveTask("Attack S3 Buy Door Console 1", self.aiTeam);
271+
self.tacticsHandler:RemoveTask("Attack S3 Buy Door Console 2", self.aiTeam);
272+
self.tacticsHandler:RemoveTask("Attack S3 Buy Door Console 3", self.aiTeam);
273+
274+
MovableMan:SendGlobalMessage("DeactivateCapturable_RefineryS3BuyDoorConsole1");
275+
MovableMan:SendGlobalMessage("DeactivateCapturable_RefineryS3BuyDoorConsole2");
276+
MovableMan:SendGlobalMessage("DeactivateCapturable_RefineryS3BuyDoorConsole3");
207277

208278
end
209279

@@ -812,13 +882,16 @@ function RefineryAssault:MonitorStage3()
812882

813883
if not self.stage3AllConsolesBroken then
814884

815-
for i, console in ipairs(self.saveTable.stage3Consoles) do
885+
for k, console in pairs(self.saveTable.stage3Consoles) do
816886
if not console or not MovableMan:ValidMO(console) then
817-
self.saveTable.stage3Consoles[i] = false;
887+
self.saveTable.stage3Consoles[k] = nil;
818888

819-
self.tacticsHandler:RemoveTask("Defend Refinery Console " .. i, self.aiTeam);
820-
self.tacticsHandler:RemoveTask("Attack Refinery Console " .. i, self.humanTeam);
889+
self.tacticsHandler:RemoveTask("Defend Refinery Console " .. k, self.aiTeam);
890+
self.tacticsHandler:RemoveTask("Attack Refinery Console " .. k, self.humanTeam);
821891

892+
else
893+
print(console)
894+
print(k)
822895
end
823896
end
824897

@@ -924,7 +997,7 @@ function RefineryAssault:MonitorStage5()
924997
for i, generator in ipairs(self.saveTable.stage5Generators) do
925998
if not generator or not MovableMan:ValidMO(generator) then
926999
self.saveTable.stage5Generators[i] = false;
927-
self.HUDHandler:RemoveObjective(self.humanTeam, "S1KillEnemies" .. i);
1000+
self.HUDHandler:RemoveObjective(self.humanTeam, "S5DestroyGenerators" .. i);
9281001
else
9291002
noGenerators = false;
9301003
end

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

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,17 @@ AddEffect = MOSRotating
3939
GibImpulseLimit = 100000
4040
GibWoundLimit = 200
4141
GibSound = SoundContainer
42-
AttenuationStartDistance = 400
43-
AddSound = ContentFile
44-
FilePath = Browncoats.rte/Scenes/Objects/Breakables/RefineryConsole/TestBreak.flac
42+
AttenuationStartDistance = 200
43+
SoundSelectionCycleMode = 2
44+
AddSoundSet = SoundSet
45+
AddSound = Base.rte/Sounds/Explosions/Ballistic/ExplodeBassy1.flac
46+
AddSound = Base.rte/Sounds/Explosions/Ballistic/ExplodeBassy2.flac
47+
AddSound = Base.rte/Sounds/Explosions/Ballistic/ExplodeBassy3.flac
48+
AddSound = Base.rte/Sounds/Explosions/Ballistic/ExplodeBassy4.flac
49+
AddSoundSet = SoundSet
50+
AddSound = Base.rte/Sounds/Explosions/Machinery/LargeMachineryBreak1.flac
51+
AddSound = Base.rte/Sounds/Explosions/Machinery/LargeMachineryBreak2.flac
52+
AddSound = Base.rte/Sounds/Explosions/Machinery/LargeMachineryBreak3.flac
53+
AddSound = Base.rte/Sounds/Explosions/Machinery/LargeMachineryBreak4.flac
4554
AddCustomValue = NumberValue
4655
SceneObject = 1

0 commit comments

Comments
 (0)