File diff r15609:02b794721f9c → r15610:623a23fb6560
src/economy.cpp
Show inline comments
 
@@ -153,13 +153,14 @@ Money CalculateCompanyValue(const Compan
 
	if (including_loan) value -= c->current_loan;
 
	value += c->money;
 

	
 
	return max(value, (Money)1);
 
}
 

	
 
/** if update is set to true, the economy is updated with this score
 
/**
 
 * if update is set to true, the economy is updated with this score
 
 *  (also the house is updated, should only be true in the on-tick event)
 
 * @param update the economy with calculated score
 
 * @param c company been evaluated
 
 * @return actual score of this company
 
 * */
 
int UpdateCompanyRatingAndValue(Company *c, bool update)
 
@@ -1482,13 +1483,14 @@ static void DoAcquireCompany(Company *c)
 

	
 
	delete c;
 
}
 

	
 
extern int GetAmountOwnedBy(const Company *c, Owner owner);
 

	
 
/** Acquire shares in an opposing company.
 
/**
 
 * Acquire shares in an opposing company.
 
 * @param tile unused
 
 * @param flags type of operation
 
 * @param p1 company to buy the shares from
 
 * @param p2 unused
 
 * @param text unused
 
 * @return the cost of this operation or an error
 
@@ -1529,13 +1531,14 @@ CommandCost CmdBuyShareInCompany(TileInd
 
		}
 
		SetWindowDirty(WC_COMPANY, target_company);
 
	}
 
	return cost;
 
}
 

	
 
/** Sell shares in an opposing company.
 
/**
 
 * Sell shares in an opposing company.
 
 * @param tile unused
 
 * @param flags type of operation
 
 * @param p1 company to sell the shares from
 
 * @param p2 unused
 
 * @param text unused
 
 * @return the cost of this operation or an error
 
@@ -1562,13 +1565,14 @@ CommandCost CmdSellShareInCompany(TileIn
 
		*b = COMPANY_SPECTATOR;
 
		SetWindowDirty(WC_COMPANY, target_company);
 
	}
 
	return CommandCost(EXPENSES_OTHER, cost);
 
}
 

	
 
/** Buy up another company.
 
/**
 
 * Buy up another company.
 
 * When a competing company is gone bankrupt you get the chance to purchase
 
 * that company.
 
 * @todo currently this only works for AI companies
 
 * @param tile unused
 
 * @param flags type of operation
 
 * @param p1 company to buy up