diff options
author | smatz <smatz@openttd.org> | 2009-08-08 18:26:25 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-08-08 18:26:25 +0000 |
commit | 046be0a1992690e8d2c1369138fcf63eb25548ec (patch) | |
tree | d11829f4c6472e88b239b6d6e86e43ed9c749df9 /src/subsidy_base.h | |
parent | 134c5f3f9acaaad189f0f0dbd9917d319618d4ea (diff) | |
download | openttd-046be0a1992690e8d2c1369138fcf63eb25548ec.tar.xz |
(svn r17119) -Codechange: replace constants in subsidy.cpp by enum values
Diffstat (limited to 'src/subsidy_base.h')
-rw-r--r-- | src/subsidy_base.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/subsidy_base.h b/src/subsidy_base.h index 4750605bc..4367334cb 100644 --- a/src/subsidy_base.h +++ b/src/subsidy_base.h @@ -85,6 +85,16 @@ struct Subsidy { static void Clean(); }; +/** Constants related to subsidies */ +enum { + SUBSIDY_OFFER_MONTHS = 12, ///< Duration of subsidy offer + SUBSIDY_CONTRACT_MONTHS = 12, ///< Duration of subsidy after awarding + SUBSIDY_PAX_MIN_POPULATION = 400, ///< Min. population of towns for subsidised pax route + SUBSIDY_CARGO_MIN_POPULATION = 900, ///< Min. population of destination town for cargo route + SUBSIDY_MAX_PCT_TRANSPORTED = 42, ///< Subsidy will be created only for towns/industries with less % transported + SUBSIDY_MAX_DISTANCE = 70, ///< Max. length of subsidised route (DistanceManhattan) +}; + #define FOR_ALL_SUBSIDIES_FROM(var, start) for (size_t subsidy_index = start; var = NULL, subsidy_index < Subsidy::GetArraySize(); subsidy_index++) \ if ((var = Subsidy::Get(subsidy_index))->IsValid()) #define FOR_ALL_SUBSIDIES(var) FOR_ALL_SUBSIDIES_FROM(var, 0) |