summaryrefslogtreecommitdiff
path: root/src/industry.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-01-15 13:19:49 +0000
committerrubidium <rubidium@openttd.org>2008-01-15 13:19:49 +0000
commit26c621945d36e18cce2e86e0edbac9e525ba77db (patch)
tree674e51d7f086d490a4dcb2fded3e60d9f94042d3 /src/industry.h
parent0078fd1699fc594b46827d3680b31fd79f0d9bd2 (diff)
downloadopenttd-26c621945d36e18cce2e86e0edbac9e525ba77db.tar.xz
(svn r11862) -Fix [FS#1559]: when two NewGRFs 'fight' to define the same cargo it could happen that the strings are defined by one cargo and the 'action2' by another and when one assumes that both come from the same NewGRF... So store the GRF ID with the strings. To be extra sure add the same protection mechanism to industries and towns too.
Diffstat (limited to 'src/industry.h')
-rw-r--r--src/industry.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/industry.h b/src/industry.h
index b754fff2c..95d6da3cb 100644
--- a/src/industry.h
+++ b/src/industry.h
@@ -15,7 +15,7 @@
#include "date_type.h"
#include "town_type.h"
#include "industry_type.h"
-#include "strings_type.h"
+#include "newgrf_string_type.h"
enum {
INVALID_INDUSTRY = 0xFFFF,
@@ -174,11 +174,11 @@ struct IndustrySpec {
byte climate_availability; ///< Bitmask, giving landscape enums as bit position
IndustryBehaviour behaviour; ///< How this industry will behave, and how others entities can use it
byte map_colour; ///< colour used for the small map
- StringID name; ///< Displayed name of the industry
- StringID new_industry_text; ///< Message appearing when the industry is built
- StringID closure_text; ///< Message appearing when the industry closes
- StringID production_up_text; ///< Message appearing when the industry's production is increasing
- StringID production_down_text; ///< Message appearing when the industry's production is decreasing
+ GRFMappedStringID name; ///< Displayed name of the industry
+ GRFMappedStringID new_industry_text; ///< Message appearing when the industry is built
+ GRFMappedStringID closure_text; ///< Message appearing when the industry closes
+ GRFMappedStringID production_up_text; ///< Message appearing when the industry's production is increasing
+ GRFMappedStringID production_down_text; ///< Message appearing when the industry's production is decreasing
byte appear_ingame[NUM_LANDSCAPE]; ///< Probability of appearance in game
byte appear_creation[NUM_LANDSCAPE]; ///< Probability of appearance during map creation
uint8 number_of_sounds; ///< Number of sounds available in the sounds array