Compare commits

...
Author SHA1 Message Date
admin cafd3b80cd minor cleanup to TradeCommandSelector 2025-09-20 07:05:49 -07:00
@@ -63,14 +63,19 @@ namespace eagle {
: -(int)Math.Ceiling(NetFood * TradeCommand.FoodSellPrice);
private int GoldAmount => TradeCommand.GoldAvailable + NetGold;
public override SelectedCommand Command => new() {
TradeCommand =
new TradeSelectedCommand {
Amount = Math.Abs(FoodAmount - TradeCommand.FoodAvailable),
TradeType = IsBuy ? TradeSelectedCommand.Types.TradeType.BuyFood
: TradeSelectedCommand.Types.TradeType.SellFood
}
};
public override SelectedCommand Command {
get {
var command = new SelectedCommand {
TradeCommand =
new() {
Amount = Math.Abs(FoodAmount - TradeCommand.FoodAvailable),
TradeType = IsBuy ? TradeSelectedCommand.Types.TradeType.BuyFood
: TradeSelectedCommand.Types.TradeType.SellFood
}
};
return command;
}
}
public void SetTextFields() {
goldText.text = GoldAmount.ToString();