Pass the original init dict to UnitProducedByOther.

This commit is contained in:
Paul Chote
2018-10-28 18:22:17 +00:00
committed by abcdefg30
parent 5e5183549c
commit ea3731a7cc
7 changed files with 8 additions and 7 deletions

View File

@@ -11,6 +11,7 @@
using System.Collections.Generic;
using System.Linq;
using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
@@ -120,7 +121,7 @@ namespace OpenRA.Mods.Common.Traits
tokens[a] = external.GrantCondition(a, self);
}
public void UnitProducedByOther(Actor self, Actor producer, Actor produced, string productionType)
public void UnitProducedByOther(Actor self, Actor producer, Actor produced, string productionType, TypeDictionary init)
{
// If the produced Actor doesn't occupy space, it can't be in range
if (produced.OccupiesSpace == null)

View File

@@ -105,7 +105,7 @@ namespace OpenRA.Mods.Common.Traits
var notifyOthers = self.World.ActorsWithTrait<INotifyOtherProduction>();
foreach (var notify in notifyOthers)
notify.Trait.UnitProducedByOther(notify.Actor, self, newUnit, productionType);
notify.Trait.UnitProducedByOther(notify.Actor, self, newUnit, productionType, td);
});
}

View File

@@ -101,7 +101,7 @@ namespace OpenRA.Mods.Common.Traits
var notifyOthers = self.World.ActorsWithTrait<INotifyOtherProduction>();
foreach (var notify in notifyOthers)
notify.Trait.UnitProducedByOther(notify.Actor, self, newUnit, productionType);
notify.Trait.UnitProducedByOther(notify.Actor, self, newUnit, productionType, td);
});
return true;

View File

@@ -157,7 +157,7 @@ namespace OpenRA.Mods.Common.Traits
var notifyOthers = self.World.ActorsWithTrait<INotifyOtherProduction>();
foreach (var notify in notifyOthers)
notify.Trait.UnitProducedByOther(notify.Actor, self, newUnit, productionType);
notify.Trait.UnitProducedByOther(notify.Actor, self, newUnit, productionType, td);
});
}
}