more wiring for selling
This commit is contained in:
@@ -182,6 +182,7 @@ namespace OpenRa.Game
|
|||||||
case "Capture": return Cursor.Capture;
|
case "Capture": return Cursor.Capture;
|
||||||
case "Harvest": return Cursor.Attack; // TODO: special harvest cursor?
|
case "Harvest": return Cursor.Attack; // TODO: special harvest cursor?
|
||||||
case "PlaceBuilding": return Cursor.Default;
|
case "PlaceBuilding": return Cursor.Default;
|
||||||
|
case "Sell": return Cursor.Sell;
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,5 +26,6 @@ namespace OpenRa.Game
|
|||||||
public static Cursor C4 { get { return new Cursor("c4"); } }
|
public static Cursor C4 { get { return new Cursor("c4"); } }
|
||||||
public static Cursor Capture { get { return new Cursor("capture"); } }
|
public static Cursor Capture { get { return new Cursor("capture"); } }
|
||||||
public static Cursor Heal { get { return new Cursor("heal"); } }
|
public static Cursor Heal { get { return new Cursor("heal"); } }
|
||||||
|
public static Cursor Sell { get { return new Cursor("sell"); } }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
using OpenRa.Game.GameRules;
|
using OpenRa.Game.GameRules;
|
||||||
|
using OpenRa.Game.Traits.Activities;
|
||||||
|
|
||||||
namespace OpenRa.Game.Traits
|
namespace OpenRa.Game.Traits
|
||||||
{
|
{
|
||||||
class Building : INotifyDamage
|
class Building : INotifyDamage, IOrder
|
||||||
{
|
{
|
||||||
public readonly BuildingInfo unitInfo;
|
public readonly BuildingInfo unitInfo;
|
||||||
|
|
||||||
@@ -18,5 +19,19 @@ namespace OpenRa.Game.Traits
|
|||||||
if (e.DamageState == DamageState.Dead)
|
if (e.DamageState == DamageState.Dead)
|
||||||
Sound.Play("kaboom22.aud");
|
Sound.Play("kaboom22.aud");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Order IssueOrder(Actor self, int2 xy, MouseInput mi, Actor underCursor)
|
||||||
|
{
|
||||||
|
return null; // sell/repair orders are issued through Chrome, not here.
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ResolveOrder(Actor self, Order order)
|
||||||
|
{
|
||||||
|
if (order.OrderString == "Sell")
|
||||||
|
{
|
||||||
|
self.CancelActivity();
|
||||||
|
self.QueueActivity(new Sell());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user