summaryrefslogtreecommitdiff
path: root/src/subsidy_type.h
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-08-08 16:42:55 +0000
committersmatz <smatz@openttd.org>2009-08-08 16:42:55 +0000
commit2a430d981f680485b9d4f9e5fab8bc642952b9bf (patch)
treee37f617ae610677d7c92aad77b5f184545599102 /src/subsidy_type.h
parenteff8cb839072c3aa80d1e54b189810061160669a (diff)
downloadopenttd-2a430d981f680485b9d4f9e5fab8bc642952b9bf.tar.xz
(svn r17113) -Change [FS#265][FS#2094][FS#2589]: apply the subsidy when subsidy's destination is in station's catchment area and cargo packets originate from subsidy's source
-Change [FS#1134]: subsidies aren't bound to stations after awarding anymore, they still apply to town or industry, no matter what station is used for loading and unloading. Awarded subsidies from older savegames are lost -Change [NoAI]: due to these changes, AISubsidy::GetSource and AISubsidy::GetDestination now return STATION_INVALID for awarded subsidies
Diffstat (limited to 'src/subsidy_type.h')
-rw-r--r--src/subsidy_type.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/subsidy_type.h b/src/subsidy_type.h
new file mode 100644
index 000000000..db7f989eb
--- /dev/null
+++ b/src/subsidy_type.h
@@ -0,0 +1,22 @@
+/* $Id$ */
+
+/** @file subsidy_type.h basic types related to subsidies */
+
+#ifndef SUBSIDY_TYPE_H
+#define SUBSIDY_TYPE_H
+
+#include "core/enum_type.hpp"
+
+enum PartOfSubsidy {
+ POS_NONE = 0,
+ POS_SRC = 1 << 0, ///< bit 0 set -> town/industry is source of subsidised path
+ POS_DST = 1 << 1, ///< bit 1 set -> town/industry is destination of subsidised path
+};
+typedef SimpleTinyEnumT<PartOfSubsidy, byte> PartOfSubsidyByte;
+
+DECLARE_ENUM_AS_BIT_SET(PartOfSubsidy);
+
+typedef uint16 SubsidyID; ///< ID of a subsidy
+struct Subsidy;
+
+#endif /* SUBSIDY_TYPE_H */