From 4a4737130bcebe31d8b15ff66d7664f6ba493151 Mon Sep 17 00:00:00 2001
From: Allanis <allanis@saracraft.net>
Date: Mon, 10 Mar 2014 18:26:20 +0000
Subject: [PATCH] [Add] Doing some checks about refuel button when player loses
 money in case she doesn't keep enough.

---
 src/land.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/land.c b/src/land.c
index dd7692e..479d47e 100644
--- a/src/land.c
+++ b/src/land.c
@@ -210,6 +210,7 @@ static void commodity_buy(unsigned int wid, char* str) {
 
   q = pilot_addCargo(player, com, q);
   player->credits -= q * com->medium;
+  land_checkAddRefuel();
   commodity_update(wid, NULL);
 }
 
@@ -702,6 +703,7 @@ static void shipyard_buy(unsigned int wid, char* str) {
   }
 
   player->credits -= ship->price; /* Auch! Paying is hard! */
+  land_checkAddRefuel();
 
   shipyard_update(wid, NULL);
 }
@@ -939,6 +941,7 @@ static void shipyard_yoursTransport(unsigned int wid, char* str) {
 
   /* Success. */
   player->credits -= price;
+  land_checkAddRefuel();
   player_setLoc(shipname, land_planet->name);
 
   /* Update the window to reflect the change. */