Replace ResourceType with strings in interfaces/public methods.

This commit is contained in:
Paul Chote
2021-01-25 22:21:48 +00:00
committed by reaperrr
parent dcd8eccee4
commit 80e92849da
21 changed files with 226 additions and 186 deletions

View File

@@ -37,7 +37,7 @@ namespace OpenRA.Mods.Common.Traits.Render
wsb = init.Self.TraitsImplementing<WithSpriteBody>().Single(w => w.Info.Name == Info.Body);
}
void INotifyHarvesterAction.Harvested(Actor self, ResourceType resource)
void INotifyHarvesterAction.Harvested(Actor self, string resourceType)
{
var sequence = wsb.NormalizeSequence(self, Info.HarvestSequence);
if (wsb.DefaultAnimation.HasSequence(sequence) && wsb.DefaultAnimation.CurrentSequence.Name != sequence)

View File

@@ -51,7 +51,7 @@ namespace OpenRA.Mods.Common.Traits.Render
p => ZOffsetFromCenter(self, p, 0)), info.Palette);
}
void INotifyHarvesterAction.Harvested(Actor self, ResourceType resource)
void INotifyHarvesterAction.Harvested(Actor self, string resourceType)
{
if (visible)
return;

View File

@@ -65,7 +65,7 @@ namespace OpenRA.Mods.Common.Traits.Render
{
if (n < rt.Value)
{
if (!Info.ResourceSequences.TryGetValue(rt.Key.Type, out var sequence))
if (!Info.ResourceSequences.TryGetValue(rt.Key, out var sequence))
sequence = Info.FullSequence;
return sequence;