15#include "table/strings.h"
29 for (uint i = 0; i < num; i++) {
33 if (grfid != _cur_gps.grfconfig->ident.grfid) {
50 for (uint i = 0; i < num; i++) {
55 if (file !=
nullptr && file != _cur_gps.grfconfig) {
56 GrfMsg(2,
"GRFInhibit: Deactivating file '{}'", file->
filename);
58 error->
data = _cur_gps.grfconfig->GetName();
63template <>
void GrfActionHandler<0x0E>::FileScan(
ByteReader &) { }
64template <>
void GrfActionHandler<0x0E>::SafetyScan(
ByteReader &buf) { SafeGRFInhibit(buf); }
65template <>
void GrfActionHandler<0x0E>::LabelScan(
ByteReader &) { }
66template <>
void GrfActionHandler<0x0E>::Init(
ByteReader &buf) { GRFInhibit(buf); }
67template <>
void GrfActionHandler<0x0E>::Reserve(
ByteReader &buf) { GRFInhibit(buf); }
68template <>
void GrfActionHandler<0x0E>::Activation(
ByteReader &buf) { GRFInhibit(buf); }
Class to read from a NewGRF file.
uint32_t ReadDWord()
Read a single DWord (32 bits).
uint8_t ReadByte()
Read a single byte (8 bits).
Functions related to debugging.
void GRFUnsafe(ByteReader &)
Set the current NewGRF as unsafe for static use.
GRFError * DisableGrf(StringID message, GRFConfig *config)
Disable a GRF.
NewGRF buffer reader definition.
GRFConfig * GetGRFConfig(uint32_t grfid, uint32_t mask)
Retrieve a NewGRF from the current config by its grfid.
NewGRF internal processing state.
A number of safeguards to prevent using unsafe methods.
Definition of base types and functions in a cross-platform compatible way.
Information about GRF, used in the game and (part of it) in savegames.
std::string filename
Filename - either with or without full path.
Information about why GRF had problems during initialisation.
std::string data
Additional data for message and custom_message.