Changeset - r20829:eec3989e3c47
[Not reviewed]
master
0 2 0
planetmaker - 11 years ago 2013-10-17 21:27:08
planetmaker@openttd.org
(svn r25873) -Codechange: Add property for the amount of generated objects upon map creation to default objects
2 files changed with 7 insertions and 6 deletions:
0 comments (0 inline, 0 general)
src/newgrf_object.h
Show inline comments
 
@@ -73,6 +73,7 @@ struct ObjectSpec {
 
	uint16 callback_mask;         ///< Bitmask of requested/allowed callbacks.
 
	uint8 height;                 ///< The height of this structure, in heightlevels; max MAX_TILE_HEIGHT.
 
	uint8 views;                  ///< The number of views.
 
	uint8 generate_amount;        ///< Number of objects which are attempted to be generated per 256^2 map during world generation.
 
	bool enabled;                 ///< Is this spec enabled?
 

	
 
	/**
src/table/object_land.h
Show inline comments
 
@@ -123,7 +123,7 @@ static const DrawTileSprites _object_hq[
 

	
 
#undef TILE_SPRITE_LINE
 

	
 
#define M(name, size, build_cost_multiplier, clear_cost_multiplier, height, climate, flags) { GRFFilePropsBase<2>(), INVALID_OBJECT_CLASS, name, climate, size, build_cost_multiplier, clear_cost_multiplier, 0, 0, flags, {0, 0, 0, 0}, 0, height, 1, true }
 
#define M(name, size, build_cost_multiplier, clear_cost_multiplier, height, climate, gen_amount, flags) { GRFFilePropsBase<2>(), INVALID_OBJECT_CLASS, name, climate, size, build_cost_multiplier, clear_cost_multiplier, 0, 0, flags, {0, 0, 0, 0}, 0, height, 1, gen_amount, true }
 

	
 
/* Climates
 
 * T = Temperate
 
@@ -136,11 +136,11 @@ static const DrawTileSprites _object_hq[
 
#define Y 8
 
/** Specification of the original object structures. */
 
extern const ObjectSpec _original_objects[] = {
 
	M(STR_LAI_OBJECT_DESCRIPTION_TRANSMITTER,          0x11,   0,   0, 10, T|A|S  , OBJECT_FLAG_CANNOT_REMOVE | OBJECT_FLAG_ONLY_IN_SCENEDIT),
 
	M(STR_LAI_OBJECT_DESCRIPTION_LIGHTHOUSE,           0x11,   0,   0,  8, T|A    , OBJECT_FLAG_CANNOT_REMOVE | OBJECT_FLAG_ONLY_IN_SCENEDIT),
 
	M(STR_TOWN_BUILDING_NAME_STATUE_1,                 0x11,   0,   0,  5, T|S|A|Y, OBJECT_FLAG_CANNOT_REMOVE | OBJECT_FLAG_ONLY_IN_GAME | OBJECT_FLAG_ONLY_IN_SCENEDIT), // Yes, we disallow building this everywhere. Happens in "special" case!
 
	M(STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND,   0x11,  10,  10,  0, T|S|A|Y, OBJECT_FLAG_AUTOREMOVE | OBJECT_FLAG_ONLY_IN_GAME | OBJECT_FLAG_CLEAR_INCOME | OBJECT_FLAG_HAS_NO_FOUNDATION ), // Only non-silly use case is to use it when you cannot build a station, so disallow bridges
 
	M(STR_LAI_OBJECT_DESCRIPTION_COMPANY_HEADQUARTERS, 0x22,   0,   0,  7, T|S|A|Y, OBJECT_FLAG_CANNOT_REMOVE | OBJECT_FLAG_ONLY_IN_GAME),
 
	M(STR_LAI_OBJECT_DESCRIPTION_TRANSMITTER,          0x11,   0,   0, 10, T|A|S  , 15, OBJECT_FLAG_CANNOT_REMOVE | OBJECT_FLAG_ONLY_IN_SCENEDIT),
 
	M(STR_LAI_OBJECT_DESCRIPTION_LIGHTHOUSE,           0x11,   0,   0,  8, T|A    ,  7, OBJECT_FLAG_CANNOT_REMOVE | OBJECT_FLAG_ONLY_IN_SCENEDIT),
 
	M(STR_TOWN_BUILDING_NAME_STATUE_1,                 0x11,   0,   0,  5, T|S|A|Y,  0, OBJECT_FLAG_CANNOT_REMOVE | OBJECT_FLAG_ONLY_IN_GAME | OBJECT_FLAG_ONLY_IN_SCENEDIT), // Yes, we disallow building this everywhere. Happens in "special" case!
 
	M(STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND,   0x11,  10,  10,  0, T|S|A|Y,  0, OBJECT_FLAG_AUTOREMOVE | OBJECT_FLAG_ONLY_IN_GAME | OBJECT_FLAG_CLEAR_INCOME | OBJECT_FLAG_HAS_NO_FOUNDATION ), // Only non-silly use case is to use it when you cannot build a station, so disallow bridges
 
	M(STR_LAI_OBJECT_DESCRIPTION_COMPANY_HEADQUARTERS, 0x22,   0,   0,  7, T|S|A|Y,  0, OBJECT_FLAG_CANNOT_REMOVE | OBJECT_FLAG_ONLY_IN_GAME),
 
};
 

	
 
#undef M
0 comments (0 inline, 0 general)