1 /* $Id: script_game.hpp 24900 2013-01-08 22:46:42Z planetmaker $ */
4 * This file is part of OpenTTD.
5 * 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.
6 * 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.
7 * 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/>.
10 /** @file script_game.hpp Everything to manipulate the current running game. */
12 #ifndef SCRIPT_GAME_HPP
13 #define SCRIPT_GAME_HPP
15 #include "script_object.hpp"
16 #include "../../landscape_type.h"
19 * Class that handles some game related functions.
22 class ScriptGame
: public ScriptObject
{
25 * Type of landscapes known in the game.
28 /* Note: these values represent part of the in-game LandscapeType enum */
29 LT_TEMPERATE
= ::LT_TEMPERATE
, ///< Temperate climate.
30 LT_ARCTIC
= ::LT_ARCTIC
, ///< Arctic climate.
31 LT_TROPIC
= ::LT_TROPIC
, ///< Tropic climate.
32 LT_TOYLAND
= ::LT_TOYLAND
, ///< Toyland climate.
37 * @return True if the action succeeded.
43 * @return True if the action succeeded.
45 static bool Unpause();
48 * Check if the game is paused.
49 * @return True if and only if the game is paused (by which-ever means).
50 * @note That a game is paused, doesn't always means you can unpause it. If
51 * the game has been manually paused, or because of the pause_on_join in
52 * Multiplayer for example, you cannot unpause the game.
54 static bool IsPaused();
57 * Get the current landscape.
59 static LandscapeType
GetLandscape();
62 * Is this a multiplayer game?
63 * @return True if this is a server in a multiplayer game.
65 static bool IsMultiplayer();
68 #endif /* SCRIPT_GAME_HPP */