make give/take gold/food DRY

This commit is contained in:
2025-02-15 23:15:34 -06:00
committed by Celtic Minstrel
parent 9dcfa511a5
commit cff8200f02
4 changed files with 16 additions and 31 deletions

View File

@@ -141,17 +141,6 @@ void edit_day() {
univ.party.age = (long long) (3700) * (long long) (dialog_answer);
}
void give_gold(short amount,bool /*print_result*/) {
univ.party.gold = univ.party.gold + amount;
}
bool take_gold(short amount,bool /*print_result*/) {
if(univ.party.gold < amount)
return false;
univ.party.gold = univ.party.gold - amount;
return true;
}
void edit_xp(cPlayer *pc) {
location view_loc;

View File

@@ -1,8 +1,6 @@
class cDialog;
void give_gold(short amount,bool print_result);
bool take_gold(short amount,bool print_result);
void give_spec_items();
void pick_race_abil(cPlayer *pc,short mode,cDialog* parent = nullptr);
void reset_boats();