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

Commit 9e85693

Browse files
committed
Preliminary formatting tweaks
Removed old negNum dependencies Removed unused files
1 parent 7ded942 commit 9e85693

File tree

5 files changed

+19
-271
lines changed

5 files changed

+19
-271
lines changed

Base.rte/Devices/Tools/Constructor/Constructor.ini

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -510,17 +510,6 @@ AddActor = Actor
510510
GibWoundLimit = 10000
511511

512512

513-
AddAmmo = Round
514-
PresetName = Round Constructor
515-
ParticleCount = 1
516-
Particle = MOPixel
517-
CopyOf = Null Bullet
518-
Shell = None
519-
FireVelocity = 100
520-
ShellVelocity = 10
521-
Separation = 10
522-
523-
524513
AddAmmo = Magazine
525514
PresetName = Magazine Constructor
526515
Mass = 1
@@ -562,7 +551,11 @@ AddAmmo = Magazine
562551
RoundCount = -1
563552
RTTRatio = 0
564553
RegularRound = Round
565-
CopyOf = Round Constructor
554+
CopyOf = Null Round
555+
556+
557+
////////////////////////////////////////////////////////////////////////
558+
// Constructor
566559

567560

568561
AddDevice = HDFirearm
@@ -649,7 +642,10 @@ AddDevice = HDFirearm
649642
Description = Cancel Construction
650643
Direction = 1
651644
Icon = Icon
652-
CopyOf = Grapple Gun Stop
645+
PresetName = Cancel
646+
FrameCount = 2
647+
BitmapFile = ContentFile
648+
FilePath = Base.rte/GUIs/PieIcons/Cancel.bmp
653649
ScriptPath = Base.rte/Devices/Tools/Constructor/ConstructorPie.lua
654650
FunctionName = ConstructorModeCancel
655651
AddPieSlice = Slice

Base.rte/Devices/Tools/Constructor/Constructor.lua

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -99,17 +99,16 @@ function Create(self)
9999

100100
self.buildTimer = Timer();
101101
self.buildlist = {};
102-
self.resperbit = 80; -- how much resource is required per one build bit
103-
-- concrete collect/build ratio is 1:1
104-
-- one block requires 65 bits of resource
105-
self.fullBlock = 65 * self.resperbit;
102+
self.buildcost = 80; -- how much resource is required per one build 2 x 2 px piece
103+
104+
self.fullBlock = 65 * self.buildcost; -- one full block of concrete requires 65 units of resource
106105
self.resource = 1 + self.startresource * self.fullBlock;
107106
self.tunnelFillTimer = Timer();
108107

109108
self.clearer = CreateMOSRotating("Constructor Terrain Clearer");
110109

111-
self.digstrength = 100; -- is now the LIMIT of StructualIntegrity it can dig
112-
-- Stone = 80 Concrete = 90 Metal = 110
110+
self.digstrength = 100; -- the StructualIntegrity limit the device can harvest
111+
113112
self.diglength = 50;
114113
self.digspersecond = 100;
115114
self.buildspersecond = 100;
@@ -303,7 +302,7 @@ function Update(self)
303302

304303
if self:GetNumberValue("Constructor Mode") == 1 then
305304

306-
if self.resource > self.resperbit / 5 then
305+
if self.resource > self.buildcost / 5 then
307306
for i = 1, 4 do
308307
local hue = "Light";
309308
if math.random() < 0.5 then
@@ -316,7 +315,7 @@ function Update(self)
316315
spray.IgnoresTeamHits = true;
317316
MovableMan:AddParticle(spray);
318317
end
319-
self.resource = self.resource - self.resperbit / 5;
318+
self.resource = self.resource - self.buildcost / 5;
320319
else
321320
self:Deactivate();
322321
end
@@ -459,12 +458,12 @@ function Update(self)
459458
local buildamount = (self.buildTimer.ElapsedSimTimeMS/1000)*self.buildspersecond;
460459
self.buildTimer:Reset();
461460
for i = 1, buildamount do
462-
if self.resource > self.resperbit then
461+
if self.resource > self.buildcost then
463462
if self.buildlist[1] ~= nil then
464463

465464
if SceneMan:ShortestDistance(actor.Pos, Vector(self.buildlist[1][1],self.buildlist[1][2]), SceneMan.SceneWrapsX).Magnitude < self.builddistance then
466465

467-
self.resource = self.resource - self.resperbit;
466+
self.resource = self.resource - self.buildcost;
468467
if self.buildlist[1][3] < 64 then
469468
local by = math.floor(self.buildlist[1][3]/8);
470469
local bx = self.buildlist[1][3]-(by*8);

Base.rte/Devices/Tools/Constructor/ConstructorHeavy.lua

Lines changed: 0 additions & 246 deletions
This file was deleted.

Base.rte/Devices/Tools/Constructor/ConstructorMag.lua

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,13 @@ function Update(self)
88
self.Mass = 1 + self.RoundCount / (self.maxresource / 100); -- full mag is 101kg
99
self.Scale = 0.5 + (self.RoundCount / self.maxresource) * 0.5;
1010

11-
local negNum = self.HFlipped and -1 or 1;
1211
local fixNum = self.HFlipped and -1 or 0;
1312

1413
local parent = MovableMan:GetMOFromID(self:GetParent().RootID);
1514
if parent and IsActor(parent) then
1615
local parentWidth = ToMOSprite(parent):GetSpriteWidth();
1716
local parentHeight = ToMOSprite(parent):GetSpriteHeight();
18-
self.Pos = parent.Pos + Vector(-(self.Radius * 0.3 + parentWidth * 0.2 + fixNum) * negNum, -(self.Radius * 0.15 + parentHeight * 0.2)):RadRotate(parent.RotAngle);
17+
self.Pos = parent.Pos + Vector(-(self.Radius * 0.3 + parentWidth * 0.2 + fixNum) * self.FlipFactor, -(self.Radius * 0.15 + parentHeight * 0.2)):RadRotate(parent.RotAngle);
1918
self.RotAngle = parent.RotAngle;
2019
end
2120
end
Binary file not shown.

0 commit comments

Comments
 (0)