… | |
… | |
69 | my $deduct = cf::ceil $pl->{rent}{balance}; |
69 | my $deduct = cf::ceil $pl->{rent}{balance}; |
70 | |
70 | |
71 | my $deduct_string = cf::cost_string_from_value $deduct; |
71 | my $deduct_string = cf::cost_string_from_value $deduct; |
72 | |
72 | |
73 | if ($deduct <= $pl->ob->{bank_balance}) { |
73 | if ($deduct <= $pl->ob->{bank_balance}) { |
|
|
74 | cf::db_put rent => balance => $deduct + cf::db_get rent => "balance"; |
74 | $pl->ob->{bank_balance} -= $deduct; |
75 | $pl->ob->{bank_balance} -= $deduct; |
75 | $pl->{rent}{balance} -= $deduct; |
76 | $pl->{rent}{balance} -= $deduct; |
76 | $pl->ob->reply (undef, "Something whispers into your ear:\n" |
77 | $pl->ob->reply (undef, "Something whispers into your ear:\n" |
77 | . "Sir, we deducted your apartment rent ($deduct_string) from your bank account."); |
78 | . "Sir, we deducted your apartment rent ($deduct_string) from your bank account."); |
78 | } else { |
79 | } else { |