generalize rough cursor to be customizable for any terrain type
This commit is contained in:
@@ -23,6 +23,7 @@ namespace OpenRA.FileFormats
|
||||
public string[] AcceptsSmudgeType = { };
|
||||
public bool IsWater = false;
|
||||
public Color Color;
|
||||
public string CustomCursor;
|
||||
|
||||
public TerrainTypeInfo() {}
|
||||
public TerrainTypeInfo(MiniYaml my) { FieldLoader.Load(this, my); }
|
||||
|
||||
@@ -456,8 +456,10 @@ namespace OpenRA.Mods.RA.Move
|
||||
{
|
||||
IsQueued = forceQueued;
|
||||
cursor = "move";
|
||||
if (self.World.LocalPlayer.Shroud.IsExplored(location) && self.World.GetTerrainType(location) == "Rough")
|
||||
cursor = "move-rough";
|
||||
|
||||
if (self.World.LocalPlayer.Shroud.IsExplored(location))
|
||||
cursor = self.World.GetTerrainInfo(location).CustomCursor ?? cursor;
|
||||
|
||||
if (!self.World.Map.IsInMap(location) || (self.World.LocalPlayer.Shroud.IsExplored(location) &&
|
||||
unitType.MovementCostForCell(self.World, location) == int.MaxValue))
|
||||
cursor = "move-blocked";
|
||||
|
||||
@@ -31,6 +31,7 @@ Terrain:
|
||||
AcceptsSmudgeType:
|
||||
IsWater: False
|
||||
Color: 255,88,116,116
|
||||
CustomCursor: move-rough
|
||||
TerrainType@Concrete:
|
||||
Type: Concrete
|
||||
AcceptsSmudgeType:
|
||||
@@ -4788,4 +4789,4 @@ Templates:
|
||||
PickAny: False
|
||||
Tiles:
|
||||
0: Rough
|
||||
1: Rough
|
||||
1: Rough
|
||||
|
||||
Reference in New Issue
Block a user