Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit 22a562e

Browse files
GacyrGacyr
authored andcommitted
Merge branch '4zk-content' into cf-143-data-version
2 parents 08dd419 + 10580e1 commit 22a562e

File tree

27 files changed

+175
-78
lines changed

27 files changed

+175
-78
lines changed

Base.rte/Activities/Siege.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ function Siege:StartActivity()
7777
for actor in MovableMan.AddedActors do
7878
if actor.Team == self.PlayerTeam and actor:IsInGroup("Brains") then
7979
playerBrainsLocation = actor.Pos
80+
break
8081
end
8182
end
8283
end
@@ -108,10 +109,9 @@ function Siege:StartActivity()
108109
-- Set all useless actors, i.e. those who should guard brain in the brain chamber but their brain is in another castle
109110
-- to delete themselves, because otherwise they are most likely to stand there for the whole battle and waste MOs
110111
for actor in MovableMan.AddedActors do
111-
if actor.Team == self.PlayerTeam and self.BrainChamber:IsInside(actor.Pos) and
112-
SceneMan:ShortestDistance(actor.Pos, playerBrainsLocation, false).Magnitude > 200 and
113-
actor.ClassName == "AHuman" or actor.ClassName == "ACrab" then
114-
-- actor.AIMode = Actor.AIMODE_BRAINHUNT;
112+
if actor.Team == self.PlayerTeam and self.BrainChamber:IsInside(actor.Pos)
113+
and SceneMan:ShortestDistance(actor.Pos, playerBrainsLocation, false).Magnitude > 200
114+
and not actor:HasObjectInGroup("Brains") and (actor.ClassName == "AHuman" or actor.ClassName == "ACrab") then
115115
actor.ToDelete = true
116116
end
117117
end

Base.rte/Craft/Shared/ScuttleExplosions.lua

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,14 @@ function Create(self)
44
self.height = ToMOSprite(self):GetSpriteHeight();
55
self.width = ToMOSprite(self):GetSpriteWidth();
66

7-
if self:NumberValueExists("ScuttleExplosionDelay") then
8-
self.explosionDelay = self:GetNumberValue("ScuttleExplosionDelay");
9-
else
10-
self.explosionDelay = 5000/math.sqrt(self.width + self.height);
11-
end
7+
self.explosionDelay = self:NumberValueExists("ScuttleExplosionDelay") and self:GetNumberValue("ScuttleExplosionDelay") or 5000/math.sqrt(self.width + self.height);
128
end
139
function Update(self)
1410
if self.Status > Actor.INACTIVE or self.AIMode == Actor.AIMODE_SCUTTLE then
1511
if self.explosionTimer:IsPastSimMS(self.explosionDelay) then
1612
self.explosionTimer:Reset();
1713
local explosion = CreateAEmitter("Scuttle Explosion");
18-
explosion.Pos = self.Pos + Vector(self.width/2 * RangeRand(-0.9, 0.9), self.height * 0.5 * RangeRand(-0.9, 0.9)):RadRotate(self.RotAngle);
14+
explosion.Pos = self.Pos + Vector(self.width * 0.5 * RangeRand(-0.9, 0.9), self.height * 0.5 * RangeRand(-0.9, 0.9)):RadRotate(self.RotAngle);
1915
explosion.Vel = self.Vel;
2016
MovableMan:AddParticle(explosion);
2117
end

Base.rte/Devices/Explosives/RemoteExplosive/RemoteExplosiveDeploy.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function Update(self)
1010
self.user = ToAHuman(parent);
1111
elseif self:IsActivated() then
1212

13-
local explosive = CreateMOSRotating("Remote Explosive Active");
13+
local explosive = CreateMOSRotating(self.PresetName .. " Active");
1414
explosive.Pos = self.Pos;
1515
explosive.Vel = self.Vel;
1616
explosive.RotAngle = self.Vel.AbsRadAngle;
Binary file not shown.

Base.rte/Scenes/Objects/Bunkers/BunkerBits/BunkerBits.ini

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
AddTerrainObject = TerrainObject
66
PresetName = Tut Tiny Block
7+
AddToGroup = Bunker Bits
8+
GoldValue = 5
79
FGColorFile = ContentFile
810
FilePath = Base.rte/Scenes/Objects/Bunkers/BunkerBits/TutTinyBlockFG.bmp
911
MaterialFile = ContentFile
@@ -18,6 +20,7 @@ AddTerrainObject = TerrainObject
1820
AddTerrainObject = TerrainObject
1921
PresetName = Tut Tiny Dummy Block
2022
AddToGroup = Bunker Bits
23+
GoldValue = 5
2124
FGColorFile = ContentFile
2225
FilePath = Base.rte/Scenes/Objects/Bunkers/BunkerBits/TutTinyDummyBlockFG.bmp
2326
MaterialFile = ContentFile
@@ -31,6 +34,8 @@ AddTerrainObject = TerrainObject
3134

3235
AddTerrainObject = TerrainObject
3336
PresetName = Tut Entry Floor
37+
AddToGroup = Bunker Bits
38+
GoldValue = 30
3439
FGColorFile = ContentFile
3540
FilePath = Base.rte/Scenes/Objects/Bunkers/BunkerBits/TutEntryFloorFG.bmp
3641
MaterialFile = ContentFile
@@ -44,6 +49,8 @@ AddTerrainObject = TerrainObject
4449

4550
AddTerrainObject = TerrainObject
4651
PresetName = Tut Entry Roof
52+
AddToGroup = Bunker Bits
53+
GoldValue = 30
4754
FGColorFile = ContentFile
4855
FilePath = Base.rte/Scenes/Objects/Bunkers/BunkerBits/TutEntryRoofFG.bmp
4956
MaterialFile = ContentFile
@@ -57,6 +64,8 @@ AddTerrainObject = TerrainObject
5764

5865
AddTerrainObject = TerrainObject
5966
PresetName = Tut Left Bit
67+
AddToGroup = Bunker Bits
68+
GoldValue = 20
6069
FGColorFile = ContentFile
6170
FilePath = Base.rte/Scenes/Objects/Bunkers/BunkerBits/TutLeftBitFG.bmp
6271
MaterialFile = ContentFile
@@ -70,6 +79,8 @@ AddTerrainObject = TerrainObject
7079

7180
AddTerrainObject = TerrainObject
7281
PresetName = Tut Corner Bit
82+
AddToGroup = Bunker Bits
83+
GoldValue = 20
7384
FGColorFile = ContentFile
7485
FilePath = Base.rte/Scenes/Objects/Bunkers/BunkerBits/TutCornerBitFG.bmp
7586
MaterialFile = ContentFile
@@ -83,6 +94,8 @@ AddTerrainObject = TerrainObject
8394

8495
AddTerrainObject = TerrainObject
8596
PresetName = Tut Up-Left Corner
97+
AddToGroup = Bunker Bits
98+
GoldValue = 20
8699
FGColorFile = ContentFile
87100
FilePath = Base.rte/Scenes/Objects/Bunkers/BunkerBits/TutUpLeftCornerFG.bmp
88101
MaterialFile = ContentFile
@@ -96,6 +109,8 @@ AddTerrainObject = TerrainObject
96109

97110
AddTerrainObject = TerrainObject
98111
PresetName = Tut Up-Right Corner
112+
AddToGroup = Bunker Bits
113+
GoldValue = 20
99114
FGColorFile = ContentFile
100115
FilePath = Base.rte/Scenes/Objects/Bunkers/BunkerBits/TutUpRightCornerFG.bmp
101116
MaterialFile = ContentFile
@@ -109,6 +124,8 @@ AddTerrainObject = TerrainObject
109124

110125
AddTerrainObject = TerrainObject
111126
PresetName = Tut Down-Left Corner
127+
AddToGroup = Bunker Bits
128+
GoldValue = 20
112129
FGColorFile = ContentFile
113130
FilePath = Base.rte/Scenes/Objects/Bunkers/BunkerBits/TutDownLeftCornerFG.bmp
114131
MaterialFile = ContentFile
@@ -122,6 +139,8 @@ AddTerrainObject = TerrainObject
122139

123140
AddTerrainObject = TerrainObject
124141
PresetName = Tut Down-Right Corner
142+
AddToGroup = Bunker Bits
143+
GoldValue = 20
125144
FGColorFile = ContentFile
126145
FilePath = Base.rte/Scenes/Objects/Bunkers/BunkerBits/TutDownRightCornerFG.bmp
127146
MaterialFile = ContentFile
@@ -135,6 +154,8 @@ AddTerrainObject = TerrainObject
135154

136155
AddTerrainObject = TerrainObject
137156
PresetName = Tut Stairs
157+
AddToGroup = Bunker Bits
158+
GoldValue = 50
138159
FGColorFile = ContentFile
139160
FilePath = Base.rte/Scenes/Objects/Bunkers/BunkerBits/TutStairsFG.bmp
140161
MaterialFile = ContentFile
@@ -148,6 +169,8 @@ AddTerrainObject = TerrainObject
148169

149170
AddTerrainObject = TerrainObject
150171
PresetName = Tut Floor Roof
172+
AddToGroup = Bunker Bits
173+
GoldValue = 75
151174
FGColorFile = ContentFile
152175
FilePath = Base.rte/Scenes/Objects/Bunkers/BunkerBits/TutFloorRoofFG.bmp
153176
MaterialFile = ContentFile
@@ -161,6 +184,8 @@ AddTerrainObject = TerrainObject
161184

162185
AddTerrainObject = TerrainObject
163186
PresetName = Tut Top Long Outer
187+
AddToGroup = Bunker Bits
188+
GoldValue = 75
164189
FGColorFile = ContentFile
165190
FilePath = Base.rte/Scenes/Objects/Bunkers/BunkerBits/TutTopLongOuterFG.bmp
166191
MaterialFile = ContentFile
@@ -174,6 +199,8 @@ AddTerrainObject = TerrainObject
174199

175200
AddTerrainObject = TerrainObject
176201
PresetName = Tut Bottom Long Outer
202+
AddToGroup = Bunker Bits
203+
GoldValue = 75
177204
FGColorFile = ContentFile
178205
FilePath = Base.rte/Scenes/Objects/Bunkers/BunkerBits/TutBottomLongOuterFG.bmp
179206
MaterialFile = ContentFile
@@ -187,6 +214,8 @@ AddTerrainObject = TerrainObject
187214

188215
AddTerrainObject = TerrainObject
189216
PresetName = Tut Left Long Inner
217+
AddToGroup = Bunker Bits
218+
GoldValue = 50
190219
FGColorFile = ContentFile
191220
FilePath = Base.rte/Scenes/Objects/Bunkers/BunkerBits/TutLeftLongInnerFG.bmp
192221
MaterialFile = ContentFile
@@ -200,6 +229,8 @@ AddTerrainObject = TerrainObject
200229

201230
AddTerrainObject = TerrainObject
202231
PresetName = Tut Right Long Inner
232+
AddToGroup = Bunker Bits
233+
GoldValue = 50
203234
FGColorFile = ContentFile
204235
FilePath = Base.rte/Scenes/Objects/Bunkers/BunkerBits/TutRightLongInnerFG.bmp
205236
MaterialFile = ContentFile
@@ -213,6 +244,8 @@ AddTerrainObject = TerrainObject
213244

214245
AddTerrainObject = TerrainObject
215246
PresetName = Tut Left Long Outer
247+
AddToGroup = Bunker Bits
248+
GoldValue = 75
216249
FGColorFile = ContentFile
217250
FilePath = Base.rte/Scenes/Objects/Bunkers/BunkerBits/TutLeftLongOuterFG.bmp
218251
MaterialFile = ContentFile
@@ -226,6 +259,8 @@ AddTerrainObject = TerrainObject
226259

227260
AddTerrainObject = TerrainObject
228261
PresetName = Tut Right Long Outer
262+
AddToGroup = Bunker Bits
263+
GoldValue = 75
229264
FGColorFile = ContentFile
230265
FilePath = Base.rte/Scenes/Objects/Bunkers/BunkerBits/TutRightLongOuterFG.bmp
231266
MaterialFile = ContentFile
@@ -239,6 +274,8 @@ AddTerrainObject = TerrainObject
239274

240275
AddTerrainObject = TerrainObject
241276
PresetName = Tut Left Inner Bit
277+
AddToGroup = Bunker Bits
278+
GoldValue = 20
242279
FGColorFile = ContentFile
243280
FilePath = Base.rte/Scenes/Objects/Bunkers/BunkerBits/TutLeftInnerBitFG.bmp
244281
MaterialFile = ContentFile
@@ -252,6 +289,8 @@ AddTerrainObject = TerrainObject
252289

253290
AddTerrainObject = TerrainObject
254291
PresetName = Tut Right Inner Bit
292+
AddToGroup = Bunker Bits
293+
GoldValue = 20
255294
FGColorFile = ContentFile
256295
FilePath = Base.rte/Scenes/Objects/Bunkers/BunkerBits/TutRightInnerBitFG.bmp
257296
MaterialFile = ContentFile
@@ -265,6 +304,8 @@ AddTerrainObject = TerrainObject
265304

266305
AddTerrainObject = TerrainObject
267306
PresetName = Tut Roof Attachment
307+
AddToGroup = Bunker Bits
308+
GoldValue = 10
268309
FGColorFile = ContentFile
269310
FilePath = Base.rte/Scenes/Objects/Bunkers/BunkerBits/TutRoofAttachmentFG.bmp
270311
MaterialFile = ContentFile
@@ -278,6 +319,8 @@ AddTerrainObject = TerrainObject
278319

279320
AddTerrainObject = TerrainObject
280321
PresetName = Tut Roof Thing
322+
AddToGroup = Bunker Bits
323+
GoldValue = 100
281324
FGColorFile = ContentFile
282325
FilePath = Base.rte/Scenes/Objects/Bunkers/BunkerBits/TutRoofThingFG.bmp
283326
MaterialFile = ContentFile
@@ -291,6 +334,8 @@ AddTerrainObject = TerrainObject
291334

292335
AddTerrainObject = TerrainObject
293336
PresetName = Tut Roof Light Bit
337+
AddToGroup = Bunker Bits
338+
GoldValue = 10
294339
FGColorFile = ContentFile
295340
FilePath = Base.rte/Scenes/Objects/Bunkers/BunkerBits/TutRoofLightBitFG.bmp
296341
MaterialFile = ContentFile
@@ -304,6 +349,8 @@ AddTerrainObject = TerrainObject
304349

305350
AddTerrainObject = TerrainObject
306351
PresetName = Tut Flat Concrete Bit
352+
AddToGroup = Bunker Bits
353+
GoldValue = 5
307354
FGColorFile = ContentFile
308355
FilePath = Base.rte/Scenes/Objects/Bunkers/BunkerBits/TutFlatConcreteBitFG.bmp
309356
MaterialFile = ContentFile
@@ -317,6 +364,8 @@ AddTerrainObject = TerrainObject
317364

318365
AddTerrainObject = TerrainObject
319366
PresetName = Tut Tiny Flat Concrete Bit
367+
AddToGroup = Bunker Bits
368+
GoldValue = 5
320369
FGColorFile = ContentFile
321370
FilePath = Base.rte/Scenes/Objects/Bunkers/BunkerBits/TutTinyFlatConcreteBitFG.bmp
322371
MaterialFile = ContentFile
@@ -334,6 +383,7 @@ AddTerrainObject = TerrainObject
334383

335384
AddTerrainObject = TerrainObject
336385
PresetName = Metal Block
386+
AddToGroup = Bunker Bits
337387
GoldValue = 40
338388
FGColorFile = ContentFile
339389
FilePath = Base.rte/Scenes/Objects/Bunkers/BunkerBits/MetalBlockFG.bmp
@@ -348,6 +398,7 @@ AddTerrainObject = TerrainObject
348398

349399
AddTerrainObject = TerrainObject
350400
PresetName = Concrete Block
401+
AddToGroup = Bunker Bits
351402
GoldValue = 20
352403
FGColorFile = ContentFile
353404
FilePath = Base.rte/Scenes/Objects/Bunkers/BunkerBits/ConcreteBlockFG.bmp

0 commit comments

Comments
 (0)