Resolve Lua language server diagnosed problems.
This commit is contained in:
committed by
abcdefg30
parent
3d0efa1cbe
commit
378f66a1ff
@@ -93,13 +93,13 @@ end
|
||||
|
||||
Attack = 0
|
||||
ProduceInfantry = function()
|
||||
if SovietBarracks.IsDead or SovietBarracks.Owner ~= ussr then
|
||||
if SovietBarracks.IsDead or SovietBarracks.Owner ~= USSR then
|
||||
return
|
||||
end
|
||||
|
||||
Attack = Attack + 1
|
||||
local toBuild = Utils.Random(InfTypes)
|
||||
ussr.Build(toBuild, function(units)
|
||||
USSR.Build(toBuild, function(units)
|
||||
if Attack == 2 and not AttackTank1.IsDead then
|
||||
units[#units + 1] = AttackTank1
|
||||
elseif Attack == 4 and not AttackTank2.IsDead then
|
||||
@@ -112,10 +112,10 @@ ProduceInfantry = function()
|
||||
end
|
||||
|
||||
ProduceVehicles = function()
|
||||
if WarFactory.IsDead or WarFactory.Owner ~= ussr then
|
||||
if WarFactory.IsDead or WarFactory.Owner ~= USSR then
|
||||
return
|
||||
end
|
||||
ussr.Build(VehicleTypes, function(units)
|
||||
USSR.Build(VehicleTypes, function(units)
|
||||
Utils.Do(units, function(unit)
|
||||
if unit.Type ~= "harv" then
|
||||
IdlingTanks[#IdlingTanks + 1] = unit
|
||||
@@ -125,18 +125,18 @@ ProduceVehicles = function()
|
||||
end
|
||||
|
||||
ProduceNaval = function()
|
||||
if SubPen.IsDead or SubPen.Owner ~= ussr then
|
||||
if SubPen.IsDead or SubPen.Owner ~= USSR then
|
||||
return
|
||||
end
|
||||
|
||||
if not shouldProduce and #Utils.Where(Map.ActorsInWorld, function(self) return self.Owner == player and self.Type == "syrd" end) < 1 then
|
||||
if not ShouldProduce and #Utils.Where(Map.ActorsInWorld, function(self) return self.Owner == Greece and self.Type == "syrd" end) < 1 then
|
||||
Trigger.AfterDelay(DateTime.Minutes(1), ProduceNaval)
|
||||
return
|
||||
end
|
||||
|
||||
shouldProduce = true
|
||||
ShouldProduce = true
|
||||
|
||||
ussr.Build(WaterAttackTypes, function(units)
|
||||
USSR.Build(WaterAttackTypes, function(units)
|
||||
Utils.Do(units, function(unit)
|
||||
IdlingNavalUnits[#IdlingNavalUnits + 1] = unit
|
||||
end)
|
||||
@@ -151,11 +151,11 @@ ProduceNaval = function()
|
||||
end
|
||||
|
||||
ProduceAircraft = function()
|
||||
if (Airfield1.IsDead or Airfield1.Owner ~= ussr) and (Airfield2.IsDead or Airfield2.Owner ~= ussr) then
|
||||
if (Airfield1.IsDead or Airfield1.Owner ~= USSR) and (Airfield2.IsDead or Airfield2.Owner ~= USSR) then
|
||||
return
|
||||
end
|
||||
|
||||
ussr.Build(SovietAircraftType, function(units)
|
||||
USSR.Build(SovietAircraftType, function(units)
|
||||
local yak = units[1]
|
||||
Yaks[#Yaks + 1] = yak
|
||||
|
||||
@@ -166,7 +166,7 @@ ProduceAircraft = function()
|
||||
Trigger.AfterDelay(DateTime.Seconds(BuildDelays / 2), ProduceAircraft)
|
||||
end
|
||||
|
||||
InitializeAttackAircraft(yak, player)
|
||||
InitializeAttackAircraft(yak, Greece)
|
||||
end)
|
||||
end
|
||||
|
||||
@@ -197,7 +197,7 @@ end
|
||||
WTransWaves = function()
|
||||
local way = Utils.Random(WTransWays)
|
||||
local units = Utils.Random(WTransUnits)
|
||||
local attackUnits = Reinforcements.ReinforceWithTransport(ussr, "lst", units , way, { way[2], way[1] })[2]
|
||||
local attackUnits = Reinforcements.ReinforceWithTransport(USSR, "lst", units , way, { way[2], way[1] })[2]
|
||||
Utils.Do(attackUnits, function(a)
|
||||
Trigger.OnAddedToWorld(a, function()
|
||||
a.AttackMove(SovietBaseAttack.Location)
|
||||
|
||||
Reference in New Issue
Block a user