Add INotifyResourceDumped Interface
This commit is contained in:
committed by
abcdefg30
parent
1e99075c70
commit
feeae74455
@@ -113,6 +113,14 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
else
|
else
|
||||||
amount = playerResources.ChangeCash(amount);
|
amount = playerResources.ChangeCash(amount);
|
||||||
|
|
||||||
|
foreach (var notify in self.World.ActorsWithTrait<INotifyResourceAccepted>())
|
||||||
|
{
|
||||||
|
if (notify.Actor.Owner != self.Owner)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
notify.Trait.OnResourceAccepted(notify.Actor, self, amount);
|
||||||
|
}
|
||||||
|
|
||||||
if (info.ShowTicks)
|
if (info.ShowTicks)
|
||||||
currentDisplayValue += amount;
|
currentDisplayValue += amount;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -141,6 +141,9 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
public interface INotifyOtherProduction { void UnitProducedByOther(Actor self, Actor producer, Actor produced, string productionType, TypeDictionary init); }
|
public interface INotifyOtherProduction { void UnitProducedByOther(Actor self, Actor producer, Actor produced, string productionType, TypeDictionary init); }
|
||||||
public interface INotifyDelivery { void IncomingDelivery(Actor self); void Delivered(Actor self); }
|
public interface INotifyDelivery { void IncomingDelivery(Actor self); void Delivered(Actor self); }
|
||||||
public interface INotifyDocking { void Docked(Actor self, Actor harvester); void Undocked(Actor self, Actor harvester); }
|
public interface INotifyDocking { void Docked(Actor self, Actor harvester); void Undocked(Actor self, Actor harvester); }
|
||||||
|
|
||||||
|
[RequireExplicitImplementation]
|
||||||
|
public interface INotifyResourceAccepted { void OnResourceAccepted(Actor self, Actor refinery, int amount); }
|
||||||
public interface INotifyParachute { void OnParachute(Actor self); void OnLanded(Actor self, Actor ignore); }
|
public interface INotifyParachute { void OnParachute(Actor self); void OnLanded(Actor self, Actor ignore); }
|
||||||
|
|
||||||
[RequireExplicitImplementation]
|
[RequireExplicitImplementation]
|
||||||
|
|||||||
Reference in New Issue
Block a user