Add INotifyResourceDumped Interface

This commit is contained in:
Mustafa Alperen Seki
2018-11-17 14:16:44 +03:00
committed by abcdefg30
parent 1e99075c70
commit feeae74455
2 changed files with 11 additions and 0 deletions

View File

@@ -113,6 +113,14 @@ namespace OpenRA.Mods.Common.Traits
else
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)
currentDisplayValue += amount;
}