OpenTTD Source: SlCompanySettings Class Reference

OpenTTD Source 13.1

Public Member Functions | Static Public Attributes
SlCompanySettings Class Reference
Inheritance diagram for SlCompanySettings:

## Public Member Functions
void | Save (CompanyProperties *c) const override
void | Load (CompanyProperties *c) const override
void | FixPointers (CompanyProperties *c) const override
void | LoadCheck (CompanyProperties *c) const override
Public Member Functions inherited from DefaultSaveLoadHandler< SlCompanySettings, CompanyProperties >
SaveLoadTable | GetDescription () const override
| Get the description of the fields in the savegame.
SaveLoadCompatTable | GetCompatDescription () const override
| Get the pre-header description of the fields in the savegame.
void | Save (void *object) const override
| Save the object to disk. More...
void | Load (void *object) const override
| Load the object from disk. More...
void | LoadCheck (void *object) const override
| Similar to load, but used only to validate savegames. More...
void | FixPointers (void *object) const override
| A post-load callback to fix SL_REF integers into pointers. More...
Public Member Functions inherited from SaveLoadHandler
virtual SaveLoadTable | GetDescription () const =0
| Get the description of the fields in the savegame.
virtual SaveLoadCompatTable | GetCompatDescription () const =0
| Get the pre-header description of the fields in the savegame.
SaveLoadTable | GetLoadDescription () const
| Get the description for how to load the chunk. More...

## Static Public Attributes
static const SaveLoad | description []
const static SaveLoadCompatTable | compat_description = _company_settings_compat

## Additional Inherited Members
Data Fields inherited from SaveLoadHandler
std::optional< std::vector< SaveLoad > > | load_description

## Detailed Description

Definition at line 282 of file company_sl.cpp.

## Field Documentation

## ◆ description

const SaveLoad SlCompanySettings::description[]
| inlinestatic

Initial value:
= {
SLE_CONDREF(CompanyProperties, engine_renew_list, REF_ENGINE_RENEWS, SLV_19, SL_MAX_VERSION),
SLE_CONDVAR(CompanyProperties, settings.engine_renew, SLE_BOOL, SLV_16, SL_MAX_VERSION),
SLE_CONDVAR(CompanyProperties, settings.engine_renew_months, SLE_INT16, SLV_16, SL_MAX_VERSION),
SLE_CONDVAR(CompanyProperties, settings.engine_renew_money, SLE_UINT32, SLV_16, SL_MAX_VERSION),
SLE_CONDVAR(CompanyProperties, settings.renew_keep_length, SLE_BOOL, SLV_2, SL_MAX_VERSION),
SLE_CONDVAR(CompanyProperties, settings.vehicle.servint_ispercent, SLE_BOOL, SLV_120, SL_MAX_VERSION),
SLE_CONDVAR(CompanyProperties, settings.vehicle.servint_trains, SLE_UINT16, SLV_120, SL_MAX_VERSION),
SLE_CONDVAR(CompanyProperties, settings.vehicle.servint_roadveh, SLE_UINT16, SLV_120, SL_MAX_VERSION),
SLE_CONDVAR(CompanyProperties, settings.vehicle.servint_aircraft, SLE_UINT16, SLV_120, SL_MAX_VERSION),
SLE_CONDVAR(CompanyProperties, settings.vehicle.servint_ships, SLE_UINT16, SLV_120, SL_MAX_VERSION),
}

Definition at line 284 of file company_sl.cpp.

The documentation for this class was generated from the following file:

- src/saveload/company_sl.cpp

SLE_CONDVAR
#define SLE_CONDVAR(base, variable, type, from, to)
Storage of a variable in some savegame versions.
Definition: saveload.h:708
SLE_CONDREF
#define SLE_CONDREF(base, variable, type, from, to)
Storage of a reference in some savegame versions.
Definition: saveload.h:718
SLV_120
@ SLV_120
120 16439
Definition: saveload.h:191
settings
fluid_settings_t * settings
FluidSynth settings handle.
Definition: fluidsynth.cpp:21
REF_ENGINE_RENEWS
@ REF_ENGINE_RENEWS
Load/save a reference to an engine renewal (autoreplace).
Definition: saveload.h:547
SLV_2
@ SLV_2
2.0 0.3.0 2.1 0.3.1, 0.3.2
Definition: saveload.h:38
SL_MAX_VERSION
@ SL_MAX_VERSION
Highest possible saveload version.
Definition: saveload.h:348
SLV_16
@ SLV_16
16.0 2817 16.1 3155
Definition: saveload.h:64
SLV_19
@ SLV_19
19 3396
Definition: saveload.h:69
CompanyProperties
Statically loadable part of Company pool item.
Definition: company_base.h:56