(svn r20942) -Feature [NewGRF]: make it possible to distinguish player built/randomly placed industries in the location and land slope check callbacks
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user