The Battle for Wesnoth  1.13.10+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 - 2017 by Chris Beck <render787@gmail.com>
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 #pragma once
16 
17 #include "config.hpp"
18 #include "map_generator.hpp"
19 
21 
22 #include <string>
23 
25 public:
26  lua_map_generator(const config & cfg);
27 
28  bool allow_user_config() const override { return !user_config_.empty(); }
29 
30  std::string name() const override { return "lua"; }
31 
32  std::string id() const { return id_; }
33 
34  std::string config_name() const override { return config_name_; }
35 
36  virtual void user_config() override;
37  virtual std::string create_map(boost::optional<uint32_t> randomseed) override;
38  virtual config create_scenario(boost::optional<uint32_t> randomseed) override;
39 
40 private:
42 
46 
48 
50 };
std::string id() const
std::vector< char_t > string
std::string config_name() const override
Return a friendly name for the generator used to differentiate between different configs of the same ...
Definitions for the interface to Wesnoth Markup Language (WML).
std::string name() const override
Returns a string identifying the generator by name.
bool allow_user_config() const override
Returns true if the map generator has an interactive screen, which allows the user to modify how the ...
virtual void user_config() override
Display the interactive screen, which allows the user to modify how the generator behaves...
virtual std::string create_map(boost::optional< uint32_t > randomseed) override
Creates a new map and returns it.
virtual config create_scenario(boost::optional< uint32_t > randomseed) override
lua_map_generator(const config &cfg)
std::string create_scenario_
A config object defines a single node in a WML file, with access to child nodes.
Definition: config.hpp:93
mapgen_lua_kernel lk_