mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-04 06:00:15 +00:00
(svn r12041) -Codechange: Add the loader and the property for action 00 industries, prop 24, nearby station name.
No assignation yet, no real work either.
This commit is contained in:
parent
33e63a3adc
commit
6e761a18d6
@ -179,6 +179,7 @@ struct IndustrySpec {
|
||||
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
|
||||
GRFMappedStringID station_name; ///< Default name for nearby station
|
||||
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
|
||||
|
@ -2126,6 +2126,10 @@ static bool IndustriesChangeInfo(uint indid, int numinfo, int prop, byte **bufp,
|
||||
indsp->removal_cost_multiplier = grf_load_dword(&buf);
|
||||
break;
|
||||
|
||||
case 0x24: // name for nearby station
|
||||
indsp->station_name = GRFMappedStringID(grf_load_dword(&buf), _cur_grffile->grfid);
|
||||
break;
|
||||
|
||||
default:
|
||||
ret = true;
|
||||
break;
|
||||
@ -5421,6 +5425,14 @@ static void FinaliseIndustriesArray()
|
||||
strid = GetGRFStringID(indsp->grf_prop.grffile->grfid, indsp->new_industry_text);
|
||||
if (strid != STR_UNDEFINED) indsp->new_industry_text = strid;
|
||||
|
||||
indsp->station_name.MapString();
|
||||
if (indsp->station_name != STR_NULL) {
|
||||
/* STR_NULL (0) can be set by grf. It has a meaning regarding assignation of the
|
||||
* station's name. Don't wont to loose the value, therefor, do not process. */
|
||||
strid = GetGRFStringID(indsp->grf_prop.grffile->grfid, indsp->station_name);
|
||||
if (strid != STR_UNDEFINED) indsp->station_name = strid;
|
||||
}
|
||||
|
||||
_industry_mngr.SetEntitySpec(indsp);
|
||||
_loaded_newgrf_features.has_newindustries = true;
|
||||
}
|
||||
|
@ -1176,7 +1176,7 @@ enum {
|
||||
#define MI(tbl, sndc, snd, d, pc, ai1, ai2, ai3, ai4, ag1, ag2, ag3, ag4, col, \
|
||||
c1, c2, c3, proc, p1, r1, p2, r2, m, a1, im1, a2, im2, a3, im3, pr, clim, bev, in, intx, s1, s2, s3) \
|
||||
{tbl, lengthof(tbl), min(255, d), 0, d, pc, {c1, c2, c3}, proc, {p1, p2}, {r1, r2}, m, \
|
||||
{a1, a2, a3}, {{im1, 0}, {im2, 0}, {im3, 0}}, pr, clim, bev, col, GRFMappedStringID(in, 0), GRFMappedStringID(intx, 0), GRFMappedStringID(s1, 0), GRFMappedStringID(s2, 0), GRFMappedStringID(s3, 0), {ai1, ai2, ai3, ai4}, {ag1, ag2, ag3, ag4}, \
|
||||
{a1, a2, a3}, {{im1, 0}, {im2, 0}, {im3, 0}}, pr, clim, bev, col, GRFMappedStringID(in, 0), GRFMappedStringID(intx, 0), GRFMappedStringID(s1, 0), GRFMappedStringID(s2, 0), GRFMappedStringID(s3, 0), GRFMappedStringID(STR_UNDEFINED, 0), {ai1, ai2, ai3, ai4}, {ag1, ag2, ag3, ag4}, \
|
||||
sndc, snd, 0, 0, true, {INVALID_INDUSTRYTYPE, 0, NULL, NULL, INVALID_INDUSTRYTYPE}}
|
||||
/* Format:
|
||||
tile table count and sounds table
|
||||
|
Loading…
Reference in New Issue
Block a user