Changeset - r7650:d12631d10c9c
[Not reviewed]
master
0 2 0
glx - 17 years ago 2007-09-28 17:09:50
glx@openttd.org
(svn r11181) -Codechange: add support for newgrf callback 14A (Belugas)
2 files changed with 6 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/industry_cmd.cpp
Show inline comments
 
@@ -1459,6 +1459,11 @@ static void DoCreateNewIndustry(Industry
 
	i->last_month_production[1] = i->production_rate[1] * 8;
 
	i->founder = _current_player;
 

	
 
	if (HASBIT(indspec->callback_flags, CBM_IND_DECIDE_COLOUR)) {
 
		uint16 res = GetIndustryCallback(CBID_INDUSTRY_DECIDE_COLOUR, 0, 0, i, type, INVALID_TILE);
 
		if (res != CALLBACK_FAILED) i->random_color = GB(res, 0, 4);
 
	}
 

	
 
	if (HASBIT(indspec->callback_flags, CBM_IND_INPUT_CARGO_TYPES)) {
 
		for (j = 0; j < lengthof(i->accepts_cargo); j++) i->accepts_cargo[j] = CT_INVALID;
 
		for (j = 0; j < lengthof(i->accepts_cargo); j++) {
src/newgrf_callbacks.h
Show inline comments
 
@@ -193,7 +193,7 @@ enum CallbackID {
 
	CBID_STATION_LAND_SLOPE_CHECK        = 0x149, // not implemented
 

	
 
	/** Called to determine the color of an industry. */
 
	CBID_INDUSTRY_DECIDE_COLOUR          = 0x14A, // not implemented
 
	CBID_INDUSTRY_DECIDE_COLOUR          = 0x14A,
 

	
 
	/** Customize the input cargo types of a newly build industry. */
 
	CBID_INDUSTRY_INPUT_CARGO_TYPES      = 0x14B,
0 comments (0 inline, 0 general)