Skip to content

Commit bc2a745

Browse files
committed
door blowing up sequence to s5
1 parent d07d465 commit bc2a745

File tree

10 files changed

+258
-14
lines changed

10 files changed

+258
-14
lines changed

Data/Base.rte/Activities/Utility/TacticsHandler.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ end
158158

159159
function TacticsHandler:ApplyTaskToSquadActors(squad, task)
160160
if task then
161-
print("Applying Task:" .. task.Name)
161+
--print("Applying Task:" .. task.Name)
162162
squad.taskName = task.Name;
163163
local randomPatrolPoint;
164164
if task.Type == "PatrolArea" then
@@ -187,7 +187,7 @@ function TacticsHandler:ApplyTaskToSquadActors(squad, task)
187187
elseif task.Type == "PatrolArea" then
188188
actor.AIMode = Actor.AIMODE_GOTO;
189189
actor:AddAISceneWaypoint(randomPatrolPoint);
190-
print("officially changed ai mode")
190+
--print("officially changed ai mode")
191191
actor:UpdateMovePath();
192192
elseif task.Type == "Sentry" then
193193
actor.AIMode = Actor.AIMODE_SENTRY;

Data/Base.rte/Scenes/Objects/Bunkers/BunkerSystems/GenericCapturable/GenericCapturable.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ function Create(self)
3434

3535
self.Activity = ToGameActivity(ActivityMan:GetActivity());
3636
self.Scene = SceneMan.Scene;
37-
print(self:GetStringValue("SceneCaptureArea"))
37+
--print(self:GetStringValue("SceneCaptureArea"))
3838
if self:StringValueExists("SceneCaptureArea") then
3939
if self.Scene:HasArea(self:GetStringValue("SceneCaptureArea")) then
4040
self.captureArea = self.Scene:GetArea(self:GetStringValue("SceneCaptureArea"));
41-
print("foundarea")
41+
--print("foundarea")
4242
end
4343
end
4444

Data/Browncoats.rte/Activities/RefineryAssault.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ function RefineryAssault:StartActivity(newGame)
147147
self.goldTimer = Timer();
148148
self.goldIncreaseDelay = 4000;
149149

150-
self.playerGoldIncreaseAmount = 5;
150+
self.playerGoldIncreaseAmount = 5000;
151151
self.humanAIGoldIncreaseAmount = 50;
152152

153153
self.aiTeamGoldIncreaseAmount = 0;

Data/Browncoats.rte/Activities/RefineryAssaultFunctions.lua

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,10 @@ function RefineryAssault:HandleMessage(message, object)
179179
self.saveTable.enemyActorTables.stage3FacilityOperator = {};
180180
self.stage3DrillOverloaded = true;
181181
self.HUDHandler:RemoveObjective(self.humanTeam, "S3OverloadDrill");
182+
elseif message == "SkipStage4" then
183+
for k, door in pairs(self.saveTable.stage4Door) do
184+
door:GibThis();
185+
end
182186
end
183187

184188

@@ -269,8 +273,8 @@ function RefineryAssault:SendBuyDoorDelivery(team, task, squadType, specificInde
269273
end
270274
end
271275
end
272-
print("found closest area to task:");
273-
print(area);
276+
--print("found closest area to task:");
277+
--print(area);
274278
-- actually get the Area
275279
areaThisIsIn = SceneMan.Scene:GetOptionalArea("BuyDoorArea_" .. areaThisIsIn);
276280
else
@@ -770,14 +774,14 @@ function RefineryAssault:MonitorStage3()
770774
local pos = SceneMan.Scene:GetOptionalArea("RefineryAssault_S3DoorSequenceArea").Center;
771775
CameraMan:AddScreenShake(10, pos);
772776
end
773-
774-
for k, door in pairs(self.saveTable.stage3Doors) do
777+
778+
for k, door in pairs(self.saveTable.stage4Door) do
775779
if MovableMan:ValidMO(door) then
776780
ToADoor(door):OpenDoor();
777781
end
778782
end
779783

780-
for k, door in pairs(self.saveTable.stage4Door) do
784+
for k, door in pairs(self.saveTable.stage3Doors) do
781785
if MovableMan:ValidMO(door) then
782786
ToADoor(door):OpenDoor();
783787
end
@@ -791,6 +795,19 @@ function RefineryAssault:MonitorStage3()
791795
local soundContainer = CreateSoundContainer("Yskely Refinery Blast Door Stop", "Browncoats.rte");
792796
soundContainer:Play(door.Pos);
793797
CameraMan:AddScreenShake(20, door.Pos);
798+
799+
self.HUDHandler:RemoveAllObjectives(self.humanTeam);
800+
801+
self.HUDHandler:AddObjective(self.humanTeam,
802+
"S4DestroyDoor",
803+
"Find a way to open the door",
804+
"Attack",
805+
"Find a way to open the door",
806+
"They've jammed the last door! Find a way around and let our main force through.",
807+
nil,
808+
false,
809+
true);
810+
794811
end
795812
end
796813
end
@@ -810,6 +827,15 @@ function RefineryAssault:MonitorStage4()
810827
for k, door in pairs(self.saveTable.stage4Door) do
811828
if not door or not MovableMan:ValidMO(door) then
812829
-- stage 5 crap
830+
self.Stage = 5;
831+
self.HUDHandler:RemoveAllObjectives(self.humanTeam);
832+
else
833+
ToADoor(door):ResetSensorTimer();
834+
end
835+
end
836+
837+
for k, door in pairs(self.saveTable.stage3Doors) do
838+
if not door or not MovableMan:ValidMO(door) then
813839
else
814840
ToADoor(door):ResetSensorTimer();
815841
end

Data/Browncoats.rte/Scenes.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,5 @@ IncludeFile = Data/Browncoats.rte/Scenes/Yskely Refineryv3.ini
2424

2525

2626

27+
28+
IncludeFile = Data/Browncoats.rte/Scenes/Yskely Refineryv3.ini

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

Lines changed: 89 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,100 @@
1-
// copies with custom values for easy identification
1+
// copies with custom values for easy identification and ungibbable crap
22

33
AddActor = ADoor
4-
CopyOf = Blast Door Motor A
4+
CopyOf = Blast Door Motor
55
PresetName = Refinery Objective Blast Door Opening
6+
PinStrength = 10000
7+
SpriteAnimMode = 5
8+
SpriteAnimDuration = 250
9+
Health = 100
10+
Mechanical = 1
11+
HUDVisible = 0
12+
Perceptiveness = 0
13+
Rotation = Matrix
14+
AngleDegrees = 0
15+
AddAttachable = Attachable
16+
CopyOf = Blast Door Housing
17+
GibWoundLimit = 9999999
18+
GibImpulseLimit = 9999999
19+
JointStrength = 9999999
20+
GibWithParentChance = 1
21+
Door = Attachable
22+
CopyOf = Blast Door Slide
23+
GibWoundLimit = 9999999
24+
GibImpulseLimit = 9999999
25+
JointStrength = 9999999
26+
GibWithParentChance = 1
27+
OpenOffset = Vector
28+
X = -110
29+
Y = 0
30+
ClosedOffset = Vector
31+
X = -396
32+
Y = 0
33+
OpenClosedAngle = Matrix
34+
AngleDegrees = 180
35+
DoorMoveTime = 20000
36+
ClosedByDefault = 1
37+
ResetDefaultDelay = 1500
38+
SensorInterval = 100
39+
AddSensor = Sensor
40+
StartOffset = Vector
41+
X = -500
42+
Y = -52
43+
SensorRay = Vector
44+
X = 0
45+
Y = 104
46+
SkipPixels = 8
47+
GibWoundLimit = 9999999
48+
GibImpulseLimit = 9999999
649
AddCustomValue = NumberValue
750
BlastDoorOpening = 1
851

952
AddActor = ADoor
10-
CopyOf = Blast Door Motor A
53+
CopyOf = Blast Door Motor
1154
PresetName = Refinery Objective Blast Door Stuck
55+
PinStrength = 10000
56+
SpriteAnimMode = 5
57+
SpriteAnimDuration = 250
58+
Health = 100
59+
Mechanical = 1
60+
HUDVisible = 0
61+
Perceptiveness = 0
62+
Rotation = Matrix
63+
AngleDegrees = 0
64+
AddAttachable = Attachable
65+
CopyOf = Blast Door Housing
66+
GibWoundLimit = 9999999
67+
GibImpulseLimit = 9999999
68+
JointStrength = 9999999
69+
GibWithParentChance = 1
70+
Door = Attachable
71+
CopyOf = Blast Door Slide
72+
GibWoundLimit = 9999999
73+
GibImpulseLimit = 9999999
74+
JointStrength = 9999999
75+
GibWithParentChance = 1
76+
OpenOffset = Vector
77+
X = -110
78+
Y = 0
79+
ClosedOffset = Vector
80+
X = -396
81+
Y = 0
82+
OpenClosedAngle = Matrix
83+
AngleDegrees = 180
84+
DoorMoveTime = 20000
85+
ClosedByDefault = 1
86+
ResetDefaultDelay = 1500
87+
SensorInterval = 100
88+
AddSensor = Sensor
89+
StartOffset = Vector
90+
X = -500
91+
Y = -52
92+
SensorRay = Vector
93+
X = 0
94+
Y = 104
95+
SkipPixels = 8
96+
GibWoundLimit = 9999999
97+
GibImpulseLimit = 9999999
1298
AddCustomValue = NumberValue
1399
BlastDoorStuck = 1
14100

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

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,4 +182,22 @@ AddActor = MOSRotating
182182
FilePath = Browncoats.rte/Scenes/Objects/Breakables/RefineryFuelTankLarge/RefineryFuelTankLargeB.png
183183
SpriteOffset = Vector
184184
X = -72
185-
Y = -114
185+
Y = -114
186+
187+
188+
///////////////////////////////////////////////////////////////////////////////////////////////////////
189+
// Scripted variations
190+
191+
AddActor = MOSRotating
192+
CopyOf = Browncoat Refinery Fuel Tank Large Vertical
193+
PresetName = Browncoat Refinery Fuel Tank Large Vertical S4 Main
194+
ScriptPath = Browncoats.rte/Scenes/Objects/Breakables/RefineryFuelTankLarge/RefineryS4FuelTankMain.lua
195+
GibWoundLimit = 9999999
196+
GibImpulseLimit = 9999999
197+
198+
AddActor = MOSRotating
199+
CopyOf = Browncoat Refinery Fuel Tank Large Vertical
200+
PresetName = Browncoat Refinery Fuel Tank Large Vertical S4 Auxiliary
201+
ScriptPath = Browncoats.rte/Scenes/Objects/Breakables/RefineryFuelTankLarge/RefineryS4FuelTankAuxiliary.lua
202+
GibWoundLimit = 9999999
203+
GibImpulseLimit = 9999999
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
function OnMessage(self, message)
2+
3+
if message == "RefineryAssault_S4TankBlownUp" then
4+
self.blowUpTimer = Timer();
5+
self.randTime = math.random(200, 400);
6+
end
7+
8+
end
9+
10+
function Create(self)
11+
12+
self.doorsTable = {};
13+
for actor in MovableMan.Actors do
14+
if actor.PresetName == "Refinery Objective Blast Door Opening" then
15+
table.insert(self.doorsTable, actor);
16+
end
17+
end
18+
19+
end
20+
21+
function Update(self)
22+
23+
if self.blowUpTimer and self.blowUpTimer:IsPastSimMS(self.randTime) then
24+
self.MissionCritical = false;
25+
self:GibThis();
26+
for k, door in pairs(self.doorsTable) do
27+
-- one of these 2 extra tanks will blow up earlier, we expect a validmo check to fail on one of em
28+
if MovableMan:ValidMO(door) then
29+
door:GibThis();
30+
end
31+
end
32+
end
33+
34+
end
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
function Create(self)
2+
3+
-- TODO figure out something better than having all these mosrotatings in Actors
4+
self.auxiliaryTanksTable = {};
5+
for par in MovableMan.Particles do
6+
if par.PresetName == "Browncoat Refinery Fuel Tank Large Vertical S4 Auxiliary" then
7+
table.insert(self.auxiliaryTanksTable, par);
8+
end
9+
end
10+
11+
self.doorsTable = {};
12+
for actor in MovableMan.Actors do
13+
if actor.PresetName == "Refinery Objective Blast Door Stuck" then
14+
table.insert(self.doorsTable, actor);
15+
end
16+
end
17+
18+
end
19+
20+
function Update(self)
21+
22+
if self.blowUpTimer then
23+
if self.blowUpTimer:IsPastSimMS(2000) then
24+
25+
self.MissionCritical = false;
26+
self:GibThis();
27+
28+
for k, door in pairs(self.doorsTable) do
29+
if MovableMan:ValidMO(door) then
30+
door:GibThis();
31+
end
32+
end
33+
34+
local activity = ActivityMan:GetActivity();
35+
activity:SendMessage("RefineryAssault_S4TankBlownUp");
36+
for k, tank in pairs(self.auxiliaryTanksTable) do
37+
if MovableMan:ValidMO(tank) then
38+
tank:SendMessage("RefineryAssault_S4TankBlownUp");
39+
end
40+
end
41+
42+
end
43+
elseif self.WoundCount > 100 then
44+
self.blowUpTimer = Timer();
45+
-- do fx here
46+
end
47+
48+
end

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

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132570,6 +132570,36 @@ AddScene = Scene
132570132570
Y = 4944
132571132571
Team = 0
132572132572
PlacedByPlayer = 0
132573+
PlaceSceneObject = MOSRotating
132574+
CopyOf = Browncoats.rte/Browncoat Refinery Fuel Tank Large Vertical S4 Main
132575+
Position = Vector
132576+
X = 12288
132577+
Y = 5052
132578+
Team = 0
132579+
PlacedByPlayer = 0
132580+
HFlipped = 0
132581+
AddCustomValue = NumberValue
132582+
SceneObject = 1
132583+
PlaceSceneObject = MOSRotating
132584+
CopyOf = Browncoats.rte/Browncoat Refinery Fuel Tank Large Vertical S4 Auxiliary
132585+
Position = Vector
132586+
X = 12000
132587+
Y = 5052
132588+
Team = 0
132589+
PlacedByPlayer = 0
132590+
HFlipped = 0
132591+
AddCustomValue = NumberValue
132592+
SceneObject = 1
132593+
PlaceSceneObject = MOSRotating
132594+
CopyOf = Browncoats.rte/Browncoat Refinery Fuel Tank Large Vertical S4 Auxiliary
132595+
Position = Vector
132596+
X = 11736
132597+
Y = 5052
132598+
Team = 0
132599+
PlacedByPlayer = 0
132600+
HFlipped = 0
132601+
AddCustomValue = NumberValue
132602+
SceneObject = 1
132573132603
PlaceAIPlanObject = TerrainObject
132574132604
CopyOf = Base.rte/T-Junction D
132575132605
Position = Vector

0 commit comments

Comments
 (0)