2 * This file is part of OpenTTD.
3 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
8 /** @file script_game.hpp Everything to manipulate the current running game. */
10 #ifndef SCRIPT_GAME_HPP
11 #define SCRIPT_GAME_HPP
13 #include "script_object.hpp"
14 #include "../../landscape_type.h"
17 * Class that handles some game related functions.
20 class ScriptGame
: public ScriptObject
{
23 * Type of landscapes known in the game.
26 /* Note: these values represent part of the in-game LandscapeType enum */
27 LT_TEMPERATE
= ::LT_TEMPERATE
, ///< Temperate climate.
28 LT_ARCTIC
= ::LT_ARCTIC
, ///< Arctic climate.
29 LT_TROPIC
= ::LT_TROPIC
, ///< Tropic climate.
30 LT_TOYLAND
= ::LT_TOYLAND
, ///< Toyland climate.
35 * @return True if the action succeeded.
41 * @return True if the action succeeded.
43 static bool Unpause();
46 * Check if the game is paused.
47 * @return True if and only if the game is paused (by which-ever means).
48 * @note That a game is paused, doesn't always means you can unpause it. If
49 * the game has been manually paused, or because of the pause_on_join in
50 * Multiplayer for example, you cannot unpause the game.
52 static bool IsPaused();
55 * Get the current landscape.
56 * @return The type of landscape.
58 static LandscapeType
GetLandscape();
61 * Is this a multiplayer game?
62 * @return True if this is a server in a multiplayer game.
64 static bool IsMultiplayer();
67 #endif /* SCRIPT_GAME_HPP */