equal
deleted
inserted
replaced
265 case 0x43: return GetClosestWaterDistance(tile, (indspec->behaviour & INDUSTRYBEH_BUILT_ONWATER) == 0); |
265 case 0x43: return GetClosestWaterDistance(tile, (indspec->behaviour & INDUSTRYBEH_BUILT_ONWATER) == 0); |
266 |
266 |
267 /* Layout number */ |
267 /* Layout number */ |
268 case 0x44: return industry->selected_layout; |
268 case 0x44: return industry->selected_layout; |
269 |
269 |
270 /* player info */ |
270 /* Company info */ |
271 case 0x45: { |
271 case 0x45: { |
272 byte colours; |
272 byte colours; |
273 bool is_ai = false; |
273 bool is_ai = false; |
274 |
274 |
275 if (IsValidPlayerID(industry->founder)) { |
275 if (IsValidCompanyID(industry->founder)) { |
276 const Player *p = GetPlayer(industry->founder); |
276 const Company *c = GetCompany(industry->founder); |
277 const Livery *l = &p->livery[LS_DEFAULT]; |
277 const Livery *l = &c->livery[LS_DEFAULT]; |
278 |
278 |
279 is_ai = p->is_ai; |
279 is_ai = c->is_ai; |
280 colours = l->colour1 + l->colour2 * 16; |
280 colours = l->colour1 + l->colour2 * 16; |
281 } else { |
281 } else { |
282 colours = GB(Random(), 0, 8); |
282 colours = GB(Random(), 0, 8); |
283 } |
283 } |
284 |
284 |