OpenTTD Game API
Public Types | Static Public Member Functions
GSGame Class Reference

Class that handles some game related functions. More...

Inheritance diagram for GSGame:

Public Types

enum  LandscapeType {
  LT_TEMPERATE,
  LT_ARCTIC,
  LT_TROPIC,
  LT_TOYLAND
}
 Type of landscapes known in the game. More...
 

Static Public Member Functions

static bool Pause ()
 Pause the server. More...
 
static bool Unpause ()
 Unpause the server. More...
 
static bool IsPaused ()
 Check if the game is paused. More...
 
static LandscapeType GetLandscape ()
 Get the current landscape.
 
static bool IsMultiplayer ()
 Is this a multiplayer game? More...
 

Detailed Description

Class that handles some game related functions.

Member Enumeration Documentation

◆ LandscapeType

Type of landscapes known in the game.

Enumerator
LT_TEMPERATE 

Temperate climate.

LT_ARCTIC 

Arctic climate.

LT_TROPIC 

Tropic climate.

LT_TOYLAND 

Toyland climate.

Member Function Documentation

◆ IsMultiplayer()

static bool GSGame::IsMultiplayer ( )
static

Is this a multiplayer game?

Returns
True if this is a server in a multiplayer game.

◆ IsPaused()

static bool GSGame::IsPaused ( )
static

Check if the game is paused.

Returns
True if and only if the game is paused (by which-ever means).
Note
That a game is paused, doesn't always means you can unpause it. If the game has been manually paused, or because of the pause_on_join in Multiplayer for example, you cannot unpause the game.

◆ Pause()

static bool GSGame::Pause ( )
static

Pause the server.

Returns
True if the action succeeded.

◆ Unpause()

static bool GSGame::Unpause ( )
static

Unpause the server.

Returns
True if the action succeeded.