Skip to content

Commit 868eb77

Browse files
2 parents 79773bb + 199d717 commit 868eb77

File tree

17 files changed

+189
-10
lines changed

17 files changed

+189
-10
lines changed

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

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,11 @@ function DeliveryCreationHandler:Initialize(activity)
106106

107107
for i = 0, self.Activity.TeamCount - 1 do
108108
local moduleID = PresetMan:GetModuleID(self.Activity:GetTeamTech(i));
109-
self.teamTechTable[i] = PresetMan:GetDataModule(moduleID);
109+
if moduleID ~= -1 then
110+
self.teamTechTable[i] = PresetMan:GetDataModule(moduleID);
111+
else
112+
self.teamTechTable[i] = {["FileName"] = "All"}; -- master of ghetto
113+
end
110114
self.teamTechIDTable[i] = moduleID;
111115

112116
self.saveTable.teamRemovedPresets[i] = {};
@@ -149,6 +153,12 @@ function DeliveryCreationHandler:Initialize(activity)
149153
end
150154

151155
for team, module in pairs(self.teamTechTable) do
156+
157+
local iterator = module.Presets;
158+
-- handle -All-
159+
if not iterator then
160+
iterator = PresetMan:GetAllEntities();
161+
end
152162

153163
self.teamPresetTables[team] = {};
154164

@@ -179,7 +189,7 @@ function DeliveryCreationHandler:Initialize(activity)
179189
self.teamPresetTables[team]["Actors - Mecha"] = {};
180190
self.teamPresetTables[team]["Actors - Turrets"] = {};
181191

182-
for entity in module.Presets do
192+
for entity in iterator do
183193
if IsMOSRotating(entity) and ToMOSRotating(entity).IsBuyable and ToMOSRotating(entity).BuyableMode ~= 2 then
184194

185195
local entityInfoTable = {};
@@ -447,7 +457,7 @@ function DeliveryCreationHandler:SelectPresetByGroupPair(team, primaryGroup, sec
447457
local presetName = presetTable.PresetName;
448458
local className = presetTable.ClassName;
449459
local createFunc = "Create" .. className;
450-
local techName = actingTech.FileName;
460+
local techName = actingTech.FileName or "All";
451461

452462

453463
--print(presetName)
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
function Create(self)
2+
3+
self.doorParent = ToADoor(self:GetRootParent());
4+
self.lastFrame = 0;
5+
6+
end
7+
8+
function ThreadedUpdate(self)
9+
10+
if IsADoor(self.doorParent) then
11+
12+
-- handle frame wrapping
13+
if self.doorParent:GetDoorState() == ADoor.OPENING then
14+
if self.lastFrame == self.doorParent.FrameCount - 1 and self.doorParent.Frame == 0 then
15+
self.lastFrame = -1;
16+
end
17+
else
18+
if self.lastFrame == 0 and self.doorParent.Frame == self.doorParent.FrameCount - 1 then
19+
self.lastFrame = self.doorParent.FrameCount;
20+
end
21+
end
22+
23+
-- if our parent increased a frame, increase a frame, if our parent decreased, etc etc...
24+
self.Frame = (self.doorParent.Frame - self.lastFrame < 0 and self.Frame - 1 or self.doorParent.Frame - self.lastFrame > 0 and self.Frame + 1 or self.Frame) % self.FrameCount;
25+
self.lastFrame = self.doorParent.Frame ~= self.lastFrame and self.doorParent.Frame or self.lastFrame;
26+
end
27+
end

Data/Base.rte/Scenes/Objects/Bunkers/BunkerSystems/BlastDoors/BlastDoors.ini

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ AddEffect = Attachable
160160
Mass = 999
161161
HitsMOs = 1
162162
GetsHitByMOs = 1
163+
ScriptPath = Base.rte/Scenes/Objects/Bunkers/BunkerSystems/BlastDoors/BlastDoorHousing.lua
163164
SpriteFile = ContentFile
164165
FilePath = Base.rte/Scenes/Objects/Bunkers/BunkerSystems/BlastDoors/BlastDoorHousing.png
165166
FrameCount = 11
@@ -222,13 +223,13 @@ AddEffect = ADoor
222223
DrawMaterialLayerWhenOpen = 1
223224
DrawMaterialLayerWhenClosed = 1
224225
DoorMoveStartSound = SoundContainer
225-
CopyOf = Door Movement Start
226+
CopyOf = Blast Door Movement Start
226227
DoorMoveSound = SoundContainer
227-
CopyOf = Door Movement Loop
228+
CopyOf = Blast Door Movement Loop
228229
DoorDirectionChangeSound = SoundContainer
229230
CopyOf = Door Movement Change Direction
230231
DoorMoveEndSound = SoundContainer
231-
CopyOf = Door Movement End
232+
CopyOf = Blast Door Movement End
232233
GibImpulseLimit = 5000
233234
GibWoundLimit = 30
234235
GibBlastStrength = 50
@@ -337,7 +338,7 @@ AddActor = ADoor
337338
Y = 0
338339
OpenClosedAngle = Matrix
339340
AngleDegrees = 180
340-
DoorMoveTime = 60000
341+
DoorMoveTime = 20000
341342
ClosedByDefault = 1
342343
ResetDefaultDelay = 1500
343344
SensorInterval = 100

Data/Base.rte/Sounds.ini

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,7 @@ AddSoundContainer = SoundContainer
500500
AddSoundContainer = SoundContainer
501501
PresetName = Door Movement Loop
502502
AttenuationStartDistance = 90
503+
LoopSetting = -1
503504
AddSound = ContentFile
504505
FilePath = Base.rte/Sounds/Mechanisms/Doors/MovementLoop.flac
505506

@@ -516,6 +517,33 @@ AddSoundContainer = SoundContainer
516517
AttenuationStartDistance = 90
517518
AddSound = ContentFile
518519
FilePath = Base.rte/Sounds/Mechanisms/Doors/MovementEnd.flac
520+
521+
AddSoundContainer = SoundContainer
522+
PresetName = Blast Door Movement Start
523+
AttenuationStartDistance = 200
524+
AddSound = ContentFile
525+
FilePath = Base.rte/Sounds/Mechanisms/Doors/BlastDoorMovementStart1.flac
526+
AddSound = ContentFile
527+
FilePath = Base.rte/Sounds/Mechanisms/Doors/BlastDoorMovementStart2.flac
528+
529+
530+
AddSoundContainer = SoundContainer
531+
PresetName = Blast Door Movement Loop
532+
AttenuationStartDistance = 150
533+
LoopSetting = -1
534+
AddSound = ContentFile
535+
FilePath = Base.rte/Sounds/Mechanisms/Doors/BlastDoorMovementLoop1.flac
536+
AddSound = ContentFile
537+
FilePath = Base.rte/Sounds/Mechanisms/Doors/BlastDoorMovementLoop2.flac
538+
539+
540+
AddSoundContainer = SoundContainer
541+
PresetName = Blast Door Movement End
542+
AttenuationStartDistance = 200
543+
AddSound = ContentFile
544+
FilePath = Base.rte/Sounds/Mechanisms/Doors/BlastDoorMovementEnd1.flac
545+
AddSound = ContentFile
546+
FilePath = Base.rte/Sounds/Mechanisms/Doors/BlastDoorMovementEnd2.flac
519547

520548

521549
AddSoundContainer = SoundContainer
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)