Remove selling from Infilitration
It is weird, unsatisfying for the player and inconsistent with the rest of our missions
This commit is contained in:
@@ -282,8 +282,7 @@ end
|
|||||||
|
|
||||||
SovietBaseMaintenanceSetup = function()
|
SovietBaseMaintenanceSetup = function()
|
||||||
local sovietbuildings = Utils.Where(Map.NamedActors, function(a)
|
local sovietbuildings = Utils.Where(Map.NamedActors, function(a)
|
||||||
return a.Owner == soviets
|
return a.Owner == soviets and a.HasProperty("StartBuildingRepairs")
|
||||||
and a.HasProperty("StartBuildingRepairs") and a.HasProperty("Sell")
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
Trigger.OnAllKilledOrCaptured(sovietbuildings, function()
|
Trigger.OnAllKilledOrCaptured(sovietbuildings, function()
|
||||||
@@ -294,15 +293,9 @@ SovietBaseMaintenanceSetup = function()
|
|||||||
|
|
||||||
Utils.Do(sovietbuildings, function(sovietbuilding)
|
Utils.Do(sovietbuildings, function(sovietbuilding)
|
||||||
Trigger.OnDamaged(sovietbuilding, function(building)
|
Trigger.OnDamaged(sovietbuilding, function(building)
|
||||||
if building.Owner ~= soviets then
|
if building.Owner == soviets and building.Health < building.MaxHealth * 3/4 then
|
||||||
return
|
|
||||||
end
|
|
||||||
if building.Health < building.MaxHealth * 3/4 then
|
|
||||||
building.StartBuildingRepairs()
|
building.StartBuildingRepairs()
|
||||||
end
|
end
|
||||||
if building.Health < building.MaxHealth * 1/4 then
|
|
||||||
building.Sell()
|
|
||||||
end
|
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user