diff options
author | rubidium <rubidium@openttd.org> | 2010-10-16 13:15:54 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-10-16 13:15:54 +0000 |
commit | 0b67a7ccd53725f7734cb4dd45cc24edae9b9702 (patch) | |
tree | b11501a1854e1865d002080bc8b9f1ffb45c21b2 /src/newgrf_industries.cpp | |
parent | a1b4f0b4c3b6d7074b338b4d7af4890eb16fdc65 (diff) | |
download | openttd-0b67a7ccd53725f7734cb4dd45cc24edae9b9702.tar.xz |
(svn r20942) -Feature [NewGRF]: make it possible to distinguish player built/randomly placed industries in the location and land slope check callbacks
Diffstat (limited to 'src/newgrf_industries.cpp')
-rw-r--r-- | src/newgrf_industries.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/newgrf_industries.cpp b/src/newgrf_industries.cpp index 453a3f288..a88a2d0a0 100644 --- a/src/newgrf_industries.cpp +++ b/src/newgrf_industries.cpp @@ -458,9 +458,10 @@ uint32 IndustryLocationGetVariable(const ResolverObject *object, byte variable, * @param seed Seed for the random generator. * @param initial_random_bits The random bits the industry is going to have after construction. * @param founder Industry founder + * @param creation_type The circumstances the industry is created under. * @return Succeeded or failed command. */ -CommandCost CheckIfCallBackAllowsCreation(TileIndex tile, IndustryType type, uint layout, uint32 seed, uint16 initial_random_bits, Owner founder) +CommandCost CheckIfCallBackAllowsCreation(TileIndex tile, IndustryType type, uint layout, uint32 seed, uint16 initial_random_bits, Owner founder, IndustryAvailabilityCallType creation_type) { const IndustrySpec *indspec = GetIndustrySpec(type); @@ -480,6 +481,7 @@ CommandCost CheckIfCallBackAllowsCreation(TileIndex tile, IndustryType type, uin NewIndustryResolver(&object, tile, &ind, type); object.GetVariable = IndustryLocationGetVariable; object.callback = CBID_INDUSTRY_LOCATION; + object.callback_param2 = creation_type; _industry_creation_random_bits = seed; group = SpriteGroup::Resolve(GetIndustrySpec(type)->grf_prop.spritegroup[0], &object); |