28 namespace ai {
class engine_lua; }
29 namespace ai {
class lua_ai_action_handler; }
30 namespace ai {
class lua_ai_context; }
78 int intf_gamestate_inspector(
lua_State *);
100 int intf_get_max_liminal_bonus(
lua_State *L);
101 int intf_get_village_owner(
lua_State *L);
102 int intf_set_village_owner(
lua_State *L);
104 int intf_get_mouseover_tile(
lua_State *L);
105 int intf_get_selected_tile(
lua_State *L);
106 int impl_game_config_get(
lua_State *L)
override;
107 int impl_game_config_set(
lua_State *L)
override;
129 int intf_set_end_campaign_credits(
lua_State *L);
130 int intf_set_end_campaign_text(
lua_State *L);
134 int intf_set_next_scenario(
lua_State *L);
135 int intf_shroud_op(
lua_State *L,
bool place_shroud);
141 int intf_is_skipping_messages(
lua_State *L);
152 int intf_remove_tile_overlay(
lua_State *L);
168 int intf_fire_event(
lua_State *L,
const bool by_id);
169 int intf_fire_wml_menu_item(
lua_State *L);
171 int intf_remove_sound_source(
lua_State *L);
181 std::string synced_state();
182 void lua_chat(
const std::string& caption,
const std::string&
msg);
183 std::vector<int> get_sides_vector(
const vconfig& cfg);
187 std::vector<team> & teams();
203 virtual std::string
my_name()
override {
return "Game Lua Kernel"; }
205 std::string apply_effect(
const std::string&
name,
unit& u,
const config& cfg,
bool need_apply);
207 void save_game(
config & level);
208 void load_game(
const config& level);
211 void push_builtin_effect();
213 void set_wml_condition(
const std::string&,
bool(*)(
const vconfig&));
214 bool run_wml_action(
const std::string&,
const vconfig&,
216 bool run_filter(
char const *name,
const unit& u);
217 bool run_filter(
char const *name,
const map_location& l);
218 bool run_filter(
char const *name,
const team&
t);
219 bool run_filter(
char const *name,
int nArgs);
220 bool run_wml_conditional(
const std::string&,
const vconfig&);
222 virtual void log_error(
char const*
msg,
char const* context =
"Lua error")
override;
std::stack< game_events::queued_event const *> queued_events_
int map_locked_
A value != 0 means that the shouldn't remove any units from the map, usually because we are currently...
game_display * game_display_
This class represents a single unit of a specific type.
int(* lua_CFunction)(lua_State *L)
void clear(const std::string &key)
virtual std::string my_name() override
User-visible name of the lua kernel that they are talking to.
const std::string & gamedata
Define actions for the game's events mechanism.
static void msg(const char *act, debug_info &i, const char *to="", const char *result="")
void(* handler)(const queued_event &, const vconfig &)
Unit and team statistics.
This class stores all the data for a single 'side' (in game nomenclature).
A small explanation about what's going on here: Each action has access to two game_info objects First...
static int intf_delay(lua_State *L)
Proxy table for the AI context.
Encapsulates the map of the game.
play_controller & play_controller_
Encapsulates the map of the game.
Game configuration data as global variables.
static int intf_set_terrain(lua_State *L)
Sets a terrain code.
Proxy class for calling AI action handlers defined in Lua.
static int intf_find_path(lua_State *L)
Finds a path between two locations.
A variable-expanding proxy for the config class.
static config preload_config
Container associating units to locations.
game_display * get_display() const
A config object defines a single node in a WML file, with access to child nodes.
std::string custom_command()
static int intf_get_terrain(lua_State *L)
Gets a terrain code.
static std::vector< config > preload_scripts
static int intf_log(lua_State *L)
Logs a message Arg 1: (optional) Logger Arg 2: Message.