Skip to content

Commit 9cbb487

Browse files
committed
blast door tweaks, refinery copies
1 parent c61e466 commit 9cbb487

File tree

4 files changed

+81
-1
lines changed

4 files changed

+81
-1
lines changed
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: 2 additions & 1 deletion
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
@@ -337,7 +338,7 @@ AddActor = ADoor
337338
Y = 0
338339
OpenClosedAngle = Matrix
339340
AngleDegrees = 180
340-
DoorMoveTime = 10000
341+
DoorMoveTime = 20000
341342
ClosedByDefault = 1
342343
ResetDefaultDelay = 1500
343344
SensorInterval = 100
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
// copies with custom values for easy identification
2+
3+
AddActor = ADoor
4+
CopyOf = Blast Door Motor A
5+
PresetName = Refinery Objective Blast Door Opening
6+
AddCustomValue = NumberValue
7+
BlastDoorOpening = 1
8+
9+
AddActor = ADoor
10+
CopyOf = Blast Door Motor A
11+
PresetName = Refinery Objective Blast Door Stuck
12+
AddCustomValue = NumberValue
13+
BlastDoorStuck = 1
14+
15+
AddTerrainObject = TerrainObject
16+
PresetName = Refinery Objective Blast Door Opening TerrainObject
17+
AddToGroup = Bunker Systems
18+
GoldValue = 50
19+
FGColorFile = ContentFile
20+
FilePath = Base.rte/Scenes/Objects/Bunkers/BunkerSystems/BlastDoors/BlastDoorAFG.png
21+
MaterialFile = ContentFile
22+
FilePath = Base.rte/Scenes/Objects/Bunkers/BunkerSystems/BlastDoors/BlastDoorAMat.png
23+
BGColorFile = ContentFile
24+
FilePath = Base.rte/Scenes/Objects/Bunkers/BunkerSystems/BlastDoors/BlastDoorABG.png
25+
AddChildObject = SOPlacer
26+
PlacedObject = ADoor
27+
CopyOf = Refinery Objective Blast Door Opening
28+
Offset = Vector
29+
X = 0
30+
Y = -224
31+
Rotation = Matrix
32+
AngleDegrees = 90
33+
34+
AddTerrainObject = TerrainObject
35+
PresetName = Refinery Objective Blast Door Stuck TerrainObject
36+
AddToGroup = Bunker Systems
37+
GoldValue = 50
38+
FGColorFile = ContentFile
39+
FilePath = Base.rte/Scenes/Objects/Bunkers/BunkerSystems/BlastDoors/BlastDoorAFG.png
40+
MaterialFile = ContentFile
41+
FilePath = Base.rte/Scenes/Objects/Bunkers/BunkerSystems/BlastDoors/BlastDoorAMat.png
42+
BGColorFile = ContentFile
43+
FilePath = Base.rte/Scenes/Objects/Bunkers/BunkerSystems/BlastDoors/BlastDoorABG.png
44+
AddChildObject = SOPlacer
45+
PlacedObject = ADoor
46+
CopyOf = Refinery Objective Blast Door Stuck
47+
Offset = Vector
48+
X = 0
49+
Y = -224
50+
Rotation = Matrix
51+
AngleDegrees = 90

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
IncludeFile = Browncoats.rte/Scenes/Objects/Breakables/Breakables.ini
22
IncludeFile = Browncoats.rte/Scenes/Objects/Capturables/Capturables.ini
33
IncludeFile = Browncoats.rte/Scenes/Objects/ItemDispensers/ItemDispensers.ini
4+
IncludeFile = Browncoats.rte/Scenes/Objects/BlastDoors/BlastDoors.ini
45

56
IncludeFile = Browncoats.rte/Scenes/Objects/BunkerSystems/UndersideHangar/UndersideHangar.ini
67

0 commit comments

Comments
 (0)