[Add] Doing some checks about refuel button when player loses money in

case she doesn't keep enough.
This commit is contained in:
Allanis 2014-03-10 18:26:20 +00:00
parent e5f4efc62b
commit 4a4737130b

View File

@ -210,6 +210,7 @@ static void commodity_buy(unsigned int wid, char* str) {
q = pilot_addCargo(player, com, q); q = pilot_addCargo(player, com, q);
player->credits -= q * com->medium; player->credits -= q * com->medium;
land_checkAddRefuel();
commodity_update(wid, NULL); 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! */ player->credits -= ship->price; /* Auch! Paying is hard! */
land_checkAddRefuel();
shipyard_update(wid, NULL); shipyard_update(wid, NULL);
} }
@ -939,6 +941,7 @@ static void shipyard_yoursTransport(unsigned int wid, char* str) {
/* Success. */ /* Success. */
player->credits -= price; player->credits -= price;
land_checkAddRefuel();
player_setLoc(shipname, land_planet->name); player_setLoc(shipname, land_planet->name);
/* Update the window to reflect the change. */ /* Update the window to reflect the change. */