money works
This commit is contained in:
@@ -7,11 +7,10 @@ namespace OpenRa.Game.Traits
|
||||
{
|
||||
class Harvester : IOrder
|
||||
{
|
||||
const int capacity = 28;
|
||||
public int oreCarried = 0; /* sum of these must not exceed capacity */
|
||||
public int gemsCarried = 0;
|
||||
|
||||
public bool IsFull { get { return oreCarried + gemsCarried == capacity; } }
|
||||
public bool IsFull { get { return oreCarried + gemsCarried == Rules.General.BailCount; } }
|
||||
public bool IsEmpty { get { return oreCarried == 0 && gemsCarried == 0; } }
|
||||
|
||||
public void AcceptResource(bool isGem)
|
||||
@@ -20,6 +19,14 @@ namespace OpenRa.Game.Traits
|
||||
else oreCarried++;
|
||||
}
|
||||
|
||||
public void Deliver(Actor self)
|
||||
{
|
||||
self.Owner.GiveCash(oreCarried * Rules.General.GoldValue);
|
||||
self.Owner.GiveCash(gemsCarried * Rules.General.GemValue);
|
||||
oreCarried = 0;
|
||||
gemsCarried = 0;
|
||||
}
|
||||
|
||||
public Order Order(Actor self, int2 xy, bool lmb, Actor underCursor)
|
||||
{
|
||||
if (lmb) return null;
|
||||
|
||||
Reference in New Issue
Block a user