|
@@ -11,13 +11,13 @@
|
|
|
|
|
|
#include "stdafx.h"
|
|
|
#include "debug.h"
|
|
|
#include "tile_type.h"
|
|
|
#include "strings_type.h"
|
|
|
#include "company_type.h"
|
|
|
#include "industry_map.h"
|
|
|
#include "industry.h"
|
|
|
#include "newgrf.h"
|
|
|
#include "newgrf_industries.h"
|
|
|
#include "newgrf_commons.h"
|
|
|
#include "newgrf_text.h"
|
|
|
#include "newgrf_town.h"
|
|
|
#include "window_func.h"
|
|
@@ -239,21 +239,21 @@ uint32 IndustryGetVariable(const Resolve
|
|
|
/* Get industry ID at offset param */
|
|
|
case 0x60: return GetIndustryIDAtOffset(GetNearbyTile(parameter, industry->xy), industry);
|
|
|
|
|
|
/* Get random tile bits at offset param */
|
|
|
case 0x61:
|
|
|
tile = GetNearbyTile(parameter, tile);
|
|
|
return (IsTileType(tile, MP_INDUSTRY) && GetIndustryByTile(tile) == industry) ? GetIndustryRandomBits(tile) : 0;
|
|
|
return (IsTileType(tile, MP_INDUSTRY) && Industry::GetByTile(tile) == industry) ? GetIndustryRandomBits(tile) : 0;
|
|
|
|
|
|
/* Land info of nearby tiles */
|
|
|
case 0x62: return GetNearbyIndustryTileInformation(parameter, tile, INVALID_INDUSTRY);
|
|
|
|
|
|
/* Animation stage of nearby tiles */
|
|
|
case 0x63:
|
|
|
tile = GetNearbyTile(parameter, tile);
|
|
|
if (IsTileType(tile, MP_INDUSTRY) && GetIndustryByTile(tile) == industry) {
|
|
|
if (IsTileType(tile, MP_INDUSTRY) && Industry::GetByTile(tile) == industry) {
|
|
|
return GetIndustryAnimationState(tile);
|
|
|
}
|
|
|
return 0xFFFFFFFF;
|
|
|
|
|
|
/* Distance of nearest industry of given type */
|
|
|
case 0x64: return GetClosestIndustry(tile, MapNewGRFIndustryType(parameter, indspec->grf_prop.grffile->grfid), industry);
|