Merge pull request #9711 from penev92/fixMapEditor
Fix D2kEditorResourceLayer starting NetWorth
This commit is contained in:
@@ -38,7 +38,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
readonly Dictionary<PaletteReference, TerrainSpriteLayer> spriteLayers = new Dictionary<PaletteReference, TerrainSpriteLayer>();
|
||||
|
||||
public int NetWorth { get; private set; }
|
||||
public int NetWorth { get; protected set; }
|
||||
|
||||
public EditorResourceLayer(Actor self)
|
||||
{
|
||||
|
||||
@@ -8,10 +8,7 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Mods.Common.Traits;
|
||||
using OpenRA.Traits;
|
||||
|
||||
@@ -42,8 +39,12 @@ namespace OpenRA.Mods.D2k.Traits
|
||||
return t;
|
||||
}
|
||||
|
||||
NetWorth -= t.Density * t.Type.Info.ValuePerUnit;
|
||||
|
||||
t.Density = ResourceDensityAt(c);
|
||||
|
||||
NetWorth += t.Density * t.Type.Info.ValuePerUnit;
|
||||
|
||||
int index;
|
||||
var clear = FindClearSides(t.Type, c);
|
||||
if (clear == ClearSides.None)
|
||||
|
||||
Reference in New Issue
Block a user