Rename ResourceType trait fields for consistency.

This commit is contained in:
Paul Chote
2016-09-25 13:36:06 +01:00
parent fdc6ea4564
commit 365bd5b9bd
14 changed files with 78 additions and 45 deletions

View File

@@ -76,7 +76,7 @@ namespace OpenRA.Mods.Common.Widgets
if (underCursor != null)
editorWidget.SetTooltip(underCursor.Tooltip);
else if (mapResources.Contains(cell) && resources.TryGetValue(mapResources[cell].Type, out type))
editorWidget.SetTooltip(type.Info.Name);
editorWidget.SetTooltip(type.Info.Type);
else
editorWidget.SetTooltip(null);

View File

@@ -36,7 +36,7 @@ namespace OpenRA.Mods.Common.Widgets
preview.GetScale = () => worldRenderer.Viewport.Zoom;
preview.IsVisible = () => editorWidget.CurrentBrush == this;
var variant = resource.Variants.FirstOrDefault();
var variant = resource.Sequences.FirstOrDefault();
var sequence = wr.World.Map.Rules.Sequences.GetSequence("resources", variant);
var sprite = sequence.GetSprite(resource.MaxDensity - 1);
preview.GetSprite = () => sprite;