Codechange: Revenue is not the same as Income
Income is revenue minus costs. Let's name things correctly (without breaking the script API).
This commit is contained in:

committed by
Patric Stout

parent
e79724ea22
commit
f4ca94d3f6
@@ -219,17 +219,17 @@ static void SubtractMoneyFromAnyCompany(Company *c, const CommandCost &cost)
|
||||
c->money -= cost.GetCost();
|
||||
c->yearly_expenses[0][cost.GetExpensesType()] += cost.GetCost();
|
||||
|
||||
if (HasBit(1 << EXPENSES_TRAIN_INC |
|
||||
1 << EXPENSES_ROADVEH_INC |
|
||||
1 << EXPENSES_AIRCRAFT_INC |
|
||||
1 << EXPENSES_SHIP_INC, cost.GetExpensesType())) {
|
||||
if (HasBit(1 << EXPENSES_TRAIN_REVENUE |
|
||||
1 << EXPENSES_ROADVEH_REVENUE |
|
||||
1 << EXPENSES_AIRCRAFT_REVENUE |
|
||||
1 << EXPENSES_SHIP_REVENUE, cost.GetExpensesType())) {
|
||||
c->cur_economy.income -= cost.GetCost();
|
||||
} else if (HasBit(1 << EXPENSES_TRAIN_RUN |
|
||||
1 << EXPENSES_ROADVEH_RUN |
|
||||
1 << EXPENSES_AIRCRAFT_RUN |
|
||||
1 << EXPENSES_SHIP_RUN |
|
||||
1 << EXPENSES_PROPERTY |
|
||||
1 << EXPENSES_LOAN_INT, cost.GetExpensesType())) {
|
||||
1 << EXPENSES_LOAN_INTEREST, cost.GetExpensesType())) {
|
||||
c->cur_economy.expenses -= cost.GetCost();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user