Public Types | Static Public Member Functions

ScriptGame Class Reference

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

#include <script_game.hpp>

Inheritance diagram for ScriptGame:
ScriptObject SimpleCountedObject

Public Types

enum  LandscapeType { LT_TEMPERATE = ::LT_TEMPERATE, LT_ARCTIC = ::LT_ARCTIC, LT_TROPIC = ::LT_TROPIC, LT_TOYLAND = ::LT_TOYLAND }
 

Type of landscapes known in the game.

More...

Static Public Member Functions

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

Detailed Description

Class that handles some game related functions.

game

Definition at line 22 of file script_game.hpp.


Member Enumeration Documentation

Type of landscapes known in the game.

Enumerator:
LT_TEMPERATE 

Temperate climiate.

LT_ARCTIC 

Arctic climate.

LT_TROPIC 

Tropic climate.

LT_TOYLAND 

Toyland climate.

Definition at line 27 of file script_game.hpp.


Member Function Documentation

bool ScriptGame::IsMultiplayer (  )  [static]

Is this a multiplayer game?

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

Definition at line 39 of file script_game.cpp.

References _network_server.

Referenced by ScriptWindow::Close(), ScriptWindow::Highlight(), ScriptWindow::IsOpen(), and ScriptViewport::ScrollTo().

bool ScriptGame::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.

Definition at line 29 of file script_game.cpp.

References _pause_mode.

bool ScriptGame::Pause (  )  [static]

Pause the server.

Returns:
True if the action succeeded.

Definition at line 19 of file script_game.cpp.

References CMD_PAUSE, ScriptObject::DoCommand(), and PM_PAUSED_GAME_SCRIPT.

bool ScriptGame::Unpause (  )  [static]

Unpause the server.

Returns:
True if the action succeeded.

Definition at line 24 of file script_game.cpp.

References CMD_PAUSE, ScriptObject::DoCommand(), and PM_PAUSED_GAME_SCRIPT.


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