Skip to content

Commit

Permalink
Some minor alteration and stat reversions
Browse files Browse the repository at this point in the history
  • Loading branch information
MrRowey committed Jan 26, 2024
1 parent dc8fe05 commit 5a7391b
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 49 deletions.
13 changes: 6 additions & 7 deletions units/UAB3101/UAB3101_script.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,16 @@ UAB3101 = ClassUnit(ARadarUnit) {
end,

OnIntelEnabled = function(self, intel)
local rotator = self.Rotator1
local trash = self.Trash

ARadarUnit.OnIntelEnabled(self, intel)
if not rotator then
rotator= CreateRotator(self, 'B01', 'y')
TrashBagAdd(trash,rotator)
if not self.Rotator1 then
self.Rotator1 = CreateRotator(self, 'B01', 'y')
TrashBagAdd(trash, self.Rotator1)
end
rotator:SetSpinDown(false)
rotator:SetTargetSpeed(30)
rotator:SetAccel(20)
self.Rotator1:SetSpinDown(false)
self.Rotator1:SetTargetSpeed(30)
self.Rotator1:SetAccel(20)
end,
}

Expand Down
39 changes: 18 additions & 21 deletions units/UAB3104/UAB3104_script.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,34 +27,31 @@ UAB3104 = ClassUnit(ARadarUnit) {

OnIntelEnabled = function(self, intel)
ARadarUnit.OnIntelEnabled(self, intel)
local rotator1 = self.Rotator1
local rotator2 = self.Rotator2
local rotator3 = self.Rotator3
local trash = self.Trash

if not rotator1 then
rotator1 = CreateRotator(self, 'B03', 'y')
TrashBagAdd(trash,rotator1)
if not self.Rotator1 then
self.Rotator1 = CreateRotator(self, 'B03', 'y')
TrashBagAdd(trash,self.Rotator1)
end
rotator1:SetSpinDown(false)
rotator1:SetTargetSpeed(30)
rotator1:SetAccel(20)
self.Rotator1:SetSpinDown(false)
self.Rotator1:SetTargetSpeed(30)
self.Rotator1:SetAccel(20)

if not rotator2 then
rotator2 = CreateRotator(self, 'B02', 'y')
TrashBagAdd(trash,rotator2)
if not self.Rotator2 then
self.Rotator2 = CreateRotator(self, 'B02', 'y')
TrashBagAdd(trash,self.Rotator2)
end
rotator2:SetSpinDown(false)
rotator2:SetTargetSpeed(60)
rotator2:SetAccel(20)
self.Rotator2:SetSpinDown(false)
self.Rotator2:SetTargetSpeed(60)
self.Rotator2:SetAccel(20)

if not rotator3 then
rotator3 = CreateRotator(self, 'B01', 'y')
TrashBagAdd(trash,rotator3)
if not self.Rotator3 then
self.Rotator3 = CreateRotator(self, 'B01', 'y')
TrashBagAdd(trash,self.Rotator3)
end
rotator3:SetSpinDown(false)
rotator3:SetTargetSpeed(120)
rotator3:SetAccel(20)
self.Rotator3:SetSpinDown(false)
self.Rotator3:SetTargetSpeed(120)
self.Rotator3:SetAccel(20)
end,

}
Expand Down
37 changes: 16 additions & 21 deletions units/UAB3201/UAB3201_script.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,37 +19,32 @@ UAB3201 = ClassUnit(ARadarUnit) {

OnIntelDisabled = function(self, intel)
ARadarUnit.OnIntelDisabled(self, intel)
local rotator1 = self.Rotator1
local rotator2 = self.Rotator2

rotator1:SetSpinDown(true)
rotator1:SetAccel(60)
rotator2:SetSpinDown(true)
rotator2:SetAccel(60)
self.Rotator1:SetSpinDown(true)
self.Rotator1:SetAccel(60)
self.Rotator2:SetSpinDown(true)
self.Rotator2:SetAccel(60)
end,

OnIntelEnabled = function(self, intel)
ARadarUnit.OnIntelEnabled(self, intel)
local rotator1 = self.Rotator1
local rotator2 = self.Rotator2
local trash = self.Trash

if not rotator1 then
rotator1 = CreateRotator(self, 'B02', 'y')
TrashBagAdd(trash,rotator1)
if not self.Rotator1 then
self.Rotator1 = CreateRotator(self, 'B02', 'y')
TrashBagAdd(trash,self.Rotator1)
end
rotator1:SetSpinDown(false)
rotator1:SetTargetSpeed(30)
rotator1:SetAccel(20)
self.Rotator1:SetSpinDown(false)
self.Rotator1:SetTargetSpeed(30)
self.Rotator1:SetAccel(20)


if not rotator2 then
rotator2 = CreateRotator(self, 'B01', 'y')
TrashBagAdd(trash,rotator2)
if not self.Rotator2 then
self.Rotator2 = CreateRotator(self, 'B01', 'y')
TrashBagAdd(trash,self.Rotator2)
end
rotator2:SetSpinDown(false)
rotator2:SetTargetSpeed(60)
rotator2:SetAccel(20)
self.Rotator2:SetSpinDown(false)
self.Rotator2:SetTargetSpeed(60)
self.Rotator2:SetAccel(20)
end,
}

Expand Down

0 comments on commit 5a7391b

Please sign in to comment.