[Add] Doing some checks about refuel button when player loses money in
case she doesn't keep enough.
This commit is contained in:
parent
e5f4efc62b
commit
4a4737130b
@ -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. */
|
||||||
|
Loading…
Reference in New Issue
Block a user