generalize rough cursor to be customizable for any terrain type

This commit is contained in:
Chris Forbes
2012-07-01 12:47:28 +12:00
parent 63d21eac8c
commit f2ab8a8541
3 changed files with 7 additions and 3 deletions

View File

@@ -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";