Class that handles all NewGRF related functions.
More...
#include <script_newgrf.hpp>
|
| static bool | IsLoaded (int grfid) |
| | Check if a NewGRF with a given grfid is loaded.
|
| |
| static int | GetVersion (int grfid) |
| | Get the version of a loaded NewGRF.
|
| |
| static string | GetName (int grfid) |
| | Get the name of a loaded NewGRF.
|
| |
Class that handles all NewGRF related functions.
◆ GetName()
| static string AINewGRF::GetName |
( |
int |
grfid | ) |
|
|
static |
Get the name of a loaded NewGRF.
- Parameters
-
| grfid | The NewGRF to query. |
- Precondition
- AINewGRF::IsLoaded(grfid).
- Returns
- The name of the NewGRF or null if no name is defined.
◆ GetVersion()
| static int AINewGRF::GetVersion |
( |
int |
grfid | ) |
|
|
static |
Get the version of a loaded NewGRF.
- Parameters
-
| grfid | The NewGRF to query. |
- Precondition
- AINewGRF::IsLoaded(grfid).
- Returns
- Version of the NewGRF or 0 if the NewGRF specifies no version.
◆ IsLoaded()
| static bool AINewGRF::IsLoaded |
( |
int |
grfid | ) |
|
|
static |
Check if a NewGRF with a given grfid is loaded.
- Parameters
-
- Returns
- True if and only if a NewGRF with the given grfid is loaded in the game.