update: Move sector type test into bank_income()
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
9a2e1ccd6c
commit
10c131549e
1 changed files with 4 additions and 2 deletions
|
@ -81,8 +81,7 @@ prepare_sects(int etu, struct bp *bp)
|
|||
populace(sp, etu);
|
||||
}
|
||||
tax(sp, etu);
|
||||
if (sp->sct_type == SCT_BANK)
|
||||
bank_income(sp, etu);
|
||||
bank_income(sp, etu);
|
||||
do_feed(sp, getnatp(sp->sct_own), etu, 0);
|
||||
if (!player->simulation)
|
||||
do_plague(sp, etu);
|
||||
|
@ -122,6 +121,9 @@ bank_income(struct sctstr *sp, int etu)
|
|||
{
|
||||
double income;
|
||||
|
||||
if (sp->sct_type != SCT_BANK)
|
||||
return;
|
||||
|
||||
income = sp->sct_item[I_BAR] * etu * bankint * sp->sct_effic / 100;
|
||||
nat_budget[sp->sct_own].bars.count += sp->sct_item[I_BAR];
|
||||
nat_budget[sp->sct_own].bars.money += income;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue