The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
lua_map_generator.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2014 - 2016 by Chris Beck <[email protected]>
3  Part of the Battle for Wesnoth Project http://www.wesnoth.org/
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY.
11 
12  See the COPYING file for more details.
13 */
14 
15 #ifndef LUA_MAP_GENERATOR_HPP_INCLUDED
16 #define LUA_MAP_GENERATOR_HPP_INCLUDED
17 
18 #include "config.hpp"
19 #include "map_generator.hpp"
20 
22 
23 #include <string>
24 
25 struct lua_State;
26 class CVideo;
27 
28 // TODO: Add support for user configurability (via defining a gui2 dialog in lua)
29 // What's missing is that you need access to the 'wesnoth' object to call show dialog
30 // at the moment.
31 
33 public:
34  lua_map_generator(const config & cfg);
35 
36  bool allow_user_config() const { return false; }
37 
38  std::string name() const { return "lua"; }
39 
40  std::string id() const { return id_; }
41 
42  std::string config_name() const { return config_name_; }
43 
44  virtual void user_config(CVideo & v);
45  virtual std::string create_map(boost::optional<boost::uint32_t> randomseed);
46  virtual config create_scenario(boost::optional<boost::uint32_t> randomseed);
47 
48 private:
50 
54 
56 
58 };
59 
60 #endif
std::string id() const
std::string name() const
Returns a string identifying the generator by name.
Definition: video.hpp:58
virtual std::string create_map(boost::optional< boost::uint32_t > randomseed)
Creates a new map and returns it.
Definitions for the interface to Wesnoth Markup Language (WML).
virtual void user_config(CVideo &v)
Display the interactive screen, which allows the user to modify how the generator behaves...
virtual config create_scenario(boost::optional< boost::uint32_t > randomseed)
const GLdouble * v
Definition: glew.h:1359
bool allow_user_config() const
Returns true if the map generator has an interactive screen, which allows the user to modify how the ...
lua_map_generator(const config &cfg)
std::string config_name() const
Return a friendly name for the generator used to differentiate between different configs of the same ...
std::string create_scenario_
A config object defines a single node in a WML file, with access to child nodes.
Definition: config.hpp:83
GLsizei const GLcharARB ** string
Definition: glew.h:4503
mapgen_lua_kernel lk_