Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00012 #ifndef ECONOMY_FUNC_H
00013 #define ECONOMY_FUNC_H
00014
00015 #include "economy_type.h"
00016 #include "station_type.h"
00017 #include "cargo_type.h"
00018 #include "vehicle_type.h"
00019 #include "company_type.h"
00020
00021 void ResetPriceBaseMultipliers();
00022 void SetPriceBaseMultiplier(Price price, int factor);
00023
00024 extern const ScoreInfo _score_info[];
00025 extern int _score_part[MAX_COMPANIES][SCORE_END];
00026 extern Economy _economy;
00027
00028 extern Prices _price;
00029
00030 int UpdateCompanyRatingAndValue(Company *c, bool update);
00031 void StartupIndustryDailyChanges(bool init_counter);
00032
00033 Money GetTransportedGoodsIncome(uint num_pieces, uint dist, byte transit_days, CargoID cargo_type);
00034 uint MoveGoodsToStation(CargoID type, uint amount, SourceType source_type, SourceID source_id, const StationList *all_stations);
00035
00036 void PrepareUnload(Vehicle *front_v);
00037 void LoadUnloadStation(Station *st);
00038
00039 Money GetPrice(Price index, uint cost_factor, const struct GRFFile *grf_file, int shift = 0);
00040
00041 void InitializeEconomy();
00042 void RecomputePrices();
00043 void AddInflation(bool check_year = true);
00044
00049 static inline bool EconomyIsInRecession()
00050 {
00051 return _economy.fluct <= 0;
00052 }
00053
00054 #endif