OpenTTD Source 20250331-master-g3c15e0c889
|
NewGRF Action 0x00 handler for industries and industrytiles. More...
#include "../stdafx.h"
#include "../debug.h"
#include "../newgrf_cargo.h"
#include "../industry.h"
#include "../industrytype.h"
#include "../industry_map.h"
#include "../newgrf_industries.h"
#include "newgrf_bytereader.h"
#include "newgrf_internal.h"
#include "newgrf_stringmapping.h"
#include "table/strings.h"
#include "../table/build_industry.h"
#include "../safeguards.h"
Go to the source code of this file.
Functions | |
static ChangeInfoResult | IgnoreIndustryTileProperty (int prop, ByteReader &buf) |
Ignore an industry tile property. | |
static ChangeInfoResult | IndustrytilesChangeInfo (uint first, uint last, int prop, ByteReader &buf) |
Define properties for industry tiles. | |
static ChangeInfoResult | IgnoreIndustryProperty (int prop, ByteReader &buf) |
Ignore an industry property. | |
static bool | ValidateIndustryLayout (const IndustryTileLayout &layout) |
Validate the industry layout; e.g. | |
static ChangeInfoResult | IndustriesChangeInfo (uint first, uint last, int prop, ByteReader &buf) |
Define properties for industries. | |
NewGRF Action 0x00 handler for industries and industrytiles.
Definition in file newgrf_act0_industries.cpp.
|
static |
Ignore an industry property.
prop | The property to ignore. |
buf | The property value. |
Definition at line 210 of file newgrf_act0_industries.cpp.
References CIR_SUCCESS, CIR_UNKNOWN, INDUSTRY_ORIGINAL_NUM_INPUTS, ByteReader::ReadByte(), ByteReader::ReadDWord(), ByteReader::ReadWord(), and SkipBadgeList().
Referenced by IndustriesChangeInfo().
|
static |
Ignore an industry tile property.
prop | The property to ignore. |
buf | The property value. |
Definition at line 32 of file newgrf_act0_industries.cpp.
References CIR_SUCCESS, CIR_UNKNOWN, ByteReader::ReadByte(), and ByteReader::ReadWord().
Referenced by IndustrytilesChangeInfo().
|
static |
Define properties for industries.
first | Local ID of the first industry. |
last | Local ID of the last industry. |
prop | The property to change. |
buf | The property value. |
Definition at line 337 of file newgrf_act0_industries.cpp.
References _settings_game, OverrideManagerBase::Add(), AddStringForMapping(), CHECK_NOTHING, CIR_DISABLED, CIR_INVALID_ID, CIR_SUCCESS, CIR_UNKNOWN, CT_INVALID, DisableGrf(), IndustrySpec::enabled, GameSettings::game_creation, GB(), GetCargoTranslation(), OverrideManagerBase::GetID(), GFX_WATERTILE_SPECIALCHECK, GrfProcessingState::grffile, IgnoreIndustryProperty(), INDUSTRY_ORIGINAL_NUM_INPUTS, INDUSTRY_ORIGINAL_NUM_OUTPUTS, INVALID_INDUSTRYTILE, GameCreationSettings::landscape, lengthof, NEW_INDUSTRYOFFSET, NUM_INDUSTRYTYPES_PER_GRF, GRFError::param_value, ReadBadgeList(), ByteReader::ReadByte(), ByteReader::ReadDWord(), ByteReader::ReadWord(), SB(), to_underlying(), ValidateIndustryLayout(), TileIndexDiffC::x, and TileIndexDiffC::y.
|
static |
Define properties for industry tiles.
first | Local ID of the first industry tile. |
last | Local ID of the last industry tile. |
prop | The property to change. |
buf | The property value. |
Definition at line 72 of file newgrf_act0_industries.cpp.
References OverrideManagerBase::Add(), OverrideManagerBase::AddEntityID(), CIR_DISABLED, CIR_INVALID_ID, CIR_SUCCESS, CIR_UNKNOWN, Clamp(), CT_INVALID, DisableGrf(), GB(), GetCargoTranslation(), GrfProcessingState::grffile, IgnoreIndustryTileProperty(), INDUSTRYTILE_NOANIM, NEW_INDUSTRYTILEOFFSET, NUM_INDUSTRYTILES_PER_GRF, GRFError::param_value, ReadBadgeList(), ByteReader::ReadByte(), and ByteReader::ReadWord().
|
static |
Validate the industry layout; e.g.
to prevent duplicate tiles.
layout | The layout to check. |
Definition at line 304 of file newgrf_act0_industries.cpp.
References GFX_WATERTILE_SPECIALCHECK.
Referenced by IndustriesChangeInfo().