Pass resource type and count to IAcceptResources instead of the value.

This commit is contained in:
Paul Chote
2021-03-07 20:16:48 +00:00
committed by reaperrr
parent 3dbc6400a6
commit 1dc26a9b8e
8 changed files with 84 additions and 72 deletions

View File

@@ -56,12 +56,12 @@ namespace OpenRA.Mods.Cnc.Traits
base.Created(self);
}
void INotifyResourceAccepted.OnResourceAccepted(Actor self, Actor refinery, int amount)
void INotifyResourceAccepted.OnResourceAccepted(Actor self, Actor refinery, ResourceTypeInfo resourceType, int count, int value)
{
if (IsTraitDisabled)
return;
var cash = OpenRA.Mods.Common.Util.ApplyPercentageModifiers(amount, modifier);
var cash = Common.Util.ApplyPercentageModifiers(value, modifier);
playerResources.GiveCash(cash);
if (Info.ShowTicks && self.Info.HasTraitInfo<IOccupySpaceInfo>())