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

Commit be72315

Browse files
committed
Further implementation of new properties like SpreadMode and Reloadable
1 parent 93b4532 commit be72315

File tree

5 files changed

+30
-17
lines changed

5 files changed

+30
-17
lines changed

Base.rte/Devices/Explosives/FragGrenade/FragGrenade.ini

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,11 @@ AddDevice = TDExplosive
120120
InheritsVel = 0
121121
AddGib = Gib
122122
GibParticle = MOPixel
123-
CopyOf = Air Blast Scripted
124-
Spread = 0
125-
MaxVelocity = 50
126-
MinVelocity = 50
123+
CopyOf = Air Blast
124+
Count = 40
125+
MaxVelocity = 80
126+
MinVelocity = 70
127127
InheritsVel = 0
128+
SpreadMode = 1
128129
GibImpulseLimit = 50000
129130
GibWoundLimit = 2

Base.rte/Devices/Explosives/NapalmBomb/NapalmBomb.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ AddDevice = TDExplosive
209209
MinVelocity = 40
210210
MaxVelocity = 60
211211
InheritsVel = 0
212+
SpreadMode = 1
212213
AddGib = Gib
213214
GibParticle = MOPixel
214215
CopyOf = Particle Napalm Bomb
@@ -239,6 +240,7 @@ AddDevice = TDExplosive
239240
MaxVelocity = 40
240241
InheritsVel = 0
241242
LifeVariation = 0.20
243+
SpreadMode = 1
242244
AddGib = Gib
243245
GibParticle = PEmitter
244246
CopyOf = Ground Flame
@@ -247,6 +249,7 @@ AddDevice = TDExplosive
247249
MaxVelocity = 25
248250
InheritsVel = 0
249251
LifeVariation = 0.20
252+
SpreadMode = 1
250253
AddGib = Gib
251254
GibParticle = MOSParticle
252255
CopyOf = Flame Smoke 2

Base.rte/Devices/Special/Medikit/Medikit.ini

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,11 @@ AddDevice = HDFirearm
7979
Y = 2
8080
SharpLength = 5
8181
Magazine = Magazine
82-
CopyOf = Null Magazine Infinite
82+
CopyOf = Null Magazine
83+
PresetName = Magazine Medikit
84+
RoundCount = 3
8385
Loudness = 0
86+
Reloadable = 0
8487
RecoilTransmission = 0
8588
RateOfFire = 60
8689
ReloadTime = 250

Base.rte/Devices/Special/Medikit/Medikit.lua

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
function Create(self)
2-
self.uses = 3;
32
self.baseStrength = 10;
43

54
self.confirmSound = CreateSoundContainer("Confirm", "Base.rte");
@@ -21,7 +20,7 @@ function Update(self)
2120
end
2221
end
2322
if target and (target.Health < target.MaxHealth or target.WoundCount > 0) then
24-
local strength = self.baseStrength + math.ceil(3000/(1 + math.abs(target.Mass + target.Material.StructuralIntegrity) * 0.5));
23+
local strength = self.baseStrength + math.ceil(3000/(1 + math.abs(target.Mass - target.InventoryMass + target.Material.StructuralIntegrity) * 0.5));
2524
if target.Health < target.MaxHealth then
2625
target.Health = math.min(target.Health + strength, target.MaxHealth);
2726
end
@@ -42,17 +41,15 @@ function Update(self)
4241
local cross = CreateMOSParticle("Particle Heal Effect", "Base.rte");
4342
cross.Pos = target.AboveHUDPos + Vector(0, 5);
4443
MovableMan:AddParticle(cross);
45-
46-
self:Reload();
47-
self.uses = self.uses - 1;
4844
else
4945
self.errorSound:Play(self.Pos);
46+
if self.Magazine then
47+
self.Magazine.RoundCount = self.Magazine.RoundCount + self.RoundsFired;
48+
end
5049
end
5150
end
52-
end
53-
if self.uses == 0 then
54-
self.ToDelete = true;
55-
elseif self.Magazine then
56-
self.Magazine.RoundCount = self.uses;
51+
if self.RoundInMagCount == 0 then
52+
self.ToDelete = true;
53+
end
5754
end
5855
end

Coalition.rte/Devices/Explosives/FragGrenade/FragGrenade.ini

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,20 @@ AddDevice = MOSRotating
7070
InheritsVel = 0
7171
AddGib = Gib
7272
GibParticle = MOPixel
73-
CopyOf = Air Blast Scripted
74-
Spread = 0
73+
CopyOf = Air Blast
74+
Count = 50
75+
Spread = 3.14
7576
MaxVelocity = 90
7677
MinVelocity = 80
7778
InheritsVel = 0
79+
SpreadMode = 1
80+
AddGib = Gib
81+
GibParticle = MOPixel
82+
CopyOf = Air Blast Scripted
83+
Spread = 0
84+
MaxVelocity = 70
85+
MinVelocity = 60
86+
InheritsVel = 0
7887

7988

8089
AddDevice = TDExplosive

0 commit comments

Comments
 (0)