2007-12-21 21:50:46 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
|
|
|
/** @file economy_func.h Functions related to the economy. */
|
|
|
|
|
|
|
|
#ifndef ECONOMY_FUNC_H
|
|
|
|
#define ECONOMY_FUNC_H
|
|
|
|
|
2007-12-22 23:30:28 +00:00
|
|
|
#include "core/geometry_type.hpp"
|
2007-12-21 21:50:46 +00:00
|
|
|
#include "economy_type.h"
|
2007-12-21 22:50:51 +00:00
|
|
|
#include "cargo_type.h"
|
|
|
|
#include "vehicle_type.h"
|
2007-12-25 23:42:52 +00:00
|
|
|
#include "tile_type.h"
|
2008-01-07 14:02:26 +00:00
|
|
|
#include "town_type.h"
|
|
|
|
#include "industry_type.h"
|
2008-01-12 14:10:35 +00:00
|
|
|
#include "player_type.h"
|
2008-03-28 16:33:28 +00:00
|
|
|
#include "station_type.h"
|
2007-12-21 21:50:46 +00:00
|
|
|
|
|
|
|
struct Player;
|
|
|
|
|
|
|
|
void ResetPriceBaseMultipliers();
|
|
|
|
void SetPriceBaseMultiplier(uint price, byte factor);
|
|
|
|
|
|
|
|
extern const ScoreInfo _score_info[];
|
|
|
|
extern int _score_part[MAX_PLAYERS][SCORE_END];
|
|
|
|
extern Economy _economy;
|
|
|
|
extern Subsidy _subsidies[MAX_PLAYERS];
|
|
|
|
/* Prices and also the fractional part. */
|
|
|
|
extern Prices _price;
|
|
|
|
extern uint16 _price_frac[NUM_PRICES];
|
2007-12-21 22:50:51 +00:00
|
|
|
extern Money _cargo_payment_rates[NUM_CARGO];
|
|
|
|
extern uint16 _cargo_payment_rates_frac[NUM_CARGO];
|
2007-12-21 21:50:46 +00:00
|
|
|
|
|
|
|
int UpdateCompanyRatingAndValue(Player *p, bool update);
|
|
|
|
Pair SetupSubsidyDecodeParam(const Subsidy *s, bool mode);
|
|
|
|
void DeleteSubsidyWithTown(TownID index);
|
|
|
|
void DeleteSubsidyWithIndustry(IndustryID index);
|
|
|
|
void DeleteSubsidyWithStation(StationID index);
|
|
|
|
|
|
|
|
Money GetTransportedGoodsIncome(uint num_pieces, uint dist, byte transit_days, CargoID cargo_type);
|
|
|
|
uint MoveGoodsToStation(TileIndex tile, int w, int h, CargoID type, uint amount);
|
|
|
|
|
|
|
|
void VehiclePayment(Vehicle *front_v);
|
|
|
|
void LoadUnloadStation(Station *st);
|
|
|
|
|
2008-02-21 19:09:10 +00:00
|
|
|
Money GetPriceByIndex(uint8 index);
|
|
|
|
|
2007-12-21 21:50:46 +00:00
|
|
|
#endif /* ECONOMY_FUNC_H */
|