Add ore capping to MissionUtils. Add world.CreateActor extension in MissionUtils.
This commit is contained in:
@@ -167,7 +167,7 @@ namespace OpenRA.Mods.RA.Missions
|
||||
foreach (var patrol in patrols)
|
||||
patrol.DoPatrol();
|
||||
|
||||
ManageSovietOre();
|
||||
MissionUtils.CapOre(soviets);
|
||||
|
||||
BaseGuardTick();
|
||||
|
||||
@@ -218,13 +218,6 @@ namespace OpenRA.Mods.RA.Missions
|
||||
MissionFailed("The Soviet research laboratory was not secured in time.");
|
||||
}
|
||||
|
||||
void ManageSovietOre()
|
||||
{
|
||||
var res = soviets.PlayerActor.Trait<PlayerResources>();
|
||||
if (res.Ore > res.OreCapacity * 0.8)
|
||||
res.TakeOre(res.OreCapacity / 10);
|
||||
}
|
||||
|
||||
void BaseGuardTick()
|
||||
{
|
||||
if (baseGuardTicks <= 0 || baseGuard.IsDead() || !baseGuard.IsInWorld) return;
|
||||
|
||||
Reference in New Issue
Block a user