Provides a Lua interpreter, to be embedded in WML. More...
#include "scripting/game_lua_kernel.hpp"
#include "actions/attack.hpp"
#include "actions/advancement.hpp"
#include "actions/move.hpp"
#include "actions/vision.hpp"
#include "actions/undo.hpp"
#include "actions/undo_action.hpp"
#include "ai/composite/ai.hpp"
#include "ai/composite/component.hpp"
#include "ai/composite/contexts.hpp"
#include "ai/lua/engine_lua.hpp"
#include "ai/composite/rca.hpp"
#include "ai/composite/stage.hpp"
#include "ai/configuration.hpp"
#include "ai/lua/core.hpp"
#include "ai/manager.hpp"
#include "attack_prediction.hpp"
#include "chat_events.hpp"
#include "config.hpp"
#include "display_chat_manager.hpp"
#include "floating_label.hpp"
#include "formatter.hpp"
#include "game_board.hpp"
#include "game_classification.hpp"
#include "game_config.hpp"
#include "game_config_manager.hpp"
#include "game_data.hpp"
#include "game_display.hpp"
#include "game_errors.hpp"
#include "game_events/conditional_wml.hpp"
#include "game_events/entity_location.hpp"
#include "game_events/handlers.hpp"
#include "game_events/manager_impl.hpp"
#include "game_events/pump.hpp"
#include "preferences/preferences.hpp"
#include "log.hpp"
#include "map/map.hpp"
#include "map/label.hpp"
#include "map/location.hpp"
#include "mouse_events.hpp"
#include "mp_game_settings.hpp"
#include "overlay.hpp"
#include "pathfind/pathfind.hpp"
#include "pathfind/teleport.hpp"
#include "play_controller.hpp"
#include "recall_list_manager.hpp"
#include "replay.hpp"
#include "reports.hpp"
#include "resources.hpp"
#include "scripting/lua_attributes.hpp"
#include "scripting/lua_audio.hpp"
#include "scripting/lua_unit.hpp"
#include "scripting/lua_unit_attacks.hpp"
#include "scripting/lua_common.hpp"
#include "scripting/lua_cpp_function.hpp"
#include "scripting/lua_gui2.hpp"
#include "scripting/lua_pathfind_cost_calculator.hpp"
#include "scripting/lua_race.hpp"
#include "scripting/lua_team.hpp"
#include "scripting/lua_terrainmap.hpp"
#include "scripting/lua_unit_type.hpp"
#include "scripting/push_check.hpp"
#include "synced_commands.hpp"
#include "color.hpp"
#include "side_filter.hpp"
#include "sound.hpp"
#include "synced_context.hpp"
#include "synced_user_choice.hpp"
#include "team.hpp"
#include "terrain/terrain.hpp"
#include "terrain/filter.hpp"
#include "terrain/translation.hpp"
#include "time_of_day.hpp"
#include "tod_manager.hpp"
#include "tstring.hpp"
#include "units/unit.hpp"
#include "units/animation_component.hpp"
#include "units/udisplay.hpp"
#include "units/filter.hpp"
#include "units/map.hpp"
#include "units/ptr.hpp"
#include "units/types.hpp"
#include "utils/scope_exit.hpp"
#include "variable.hpp"
#include "variable_info.hpp"
#include "video.hpp"
#include "whiteboard/manager.hpp"
#include "deprecation.hpp"
#include <functional>
#include <array>
#include <cassert>
#include <cstring>
#include <iterator>
#include <map>
#include <new>
#include <set>
#include <sstream>
#include <thread>
#include <utility>
#include <algorithm>
#include <vector>
Go to the source code of this file.
Classes | |
struct | map_locker |
struct | schedule_tag |
struct | lua_object_traits< schedule_tag > |
struct | game_config_glk_tag |
struct | scenario_tag |
struct | lua_object_traits< scenario_tag > |
struct | current_tag |
struct | lua_object_traits< current_tag > |
struct | lua_event_filter |
struct | callbacks_tag |
struct | lua_object_traits< callbacks_tag > |
Typedefs | |
typedef int(game_lua_kernel::* | member_callback) (lua_State *) |
typedef int(game_lua_kernel::* | member_callback2) (lua_State *, bool) |
using | wml_conditional_handler = bool(*)(const vconfig &) |
Functions | |
template<member_callback method> | |
int | dispatch (lua_State *L) |
template<member_callback2 method, bool b> | |
int | dispatch2 (lua_State *L) |
static int | intf_get_viewing_side (lua_State *L) |
Gets currently viewing side. More... | |
static int | intf_handle_user_interact (lua_State *) |
static int | impl_animator_collect (lua_State *L) |
static int | impl_add_animation (lua_State *L) |
static int | impl_clear_animation (lua_State *L) |
static int | impl_animator_get (lua_State *L) |
static void | luaW_push_tod (lua_State *L, const time_of_day &tod) |
static int | luaW_check_schedule (lua_State *L, int idx) |
static int | intf_get_resource (lua_State *L) |
Gets a table for an resource tag. More... | |
static int | intf_get_era (lua_State *L) |
Gets a table for an era tag. More... | |
luaW_Registry & | gameConfigReg () |
static int | impl_end_level_data_get (lua_State *L) |
static int | impl_end_level_data_collect (lua_State *L) |
static int | impl_mp_settings_get (lua_State *L) |
static int | impl_mp_settings_len (lua_State *L) |
static int | intf_eval_conditional (lua_State *L) |
Evaluates a boolean WML conditional. More... | |
template<typename T > | |
static int | load_fake_units (lua_State *L, int arg, T &fake_units) |
static int * | luaW_check_floating_label (lua_State *L, int idx) |
static int | impl_floating_label_getmethod (lua_State *L) |
static int | intf_create_unit (lua_State *L) |
Creates a unit from its WML description. More... | |
static int | intf_copy_unit (lua_State *L) |
Copies a unit. More... | |
static int | intf_unit_resistance (lua_State *L) |
Returns unit resistance against a given attack type. More... | |
static int | intf_unit_movement_cost (lua_State *L) |
Returns unit movement cost on a given terrain. More... | |
static int | intf_unit_vision_cost (lua_State *L) |
Returns unit vision cost on a given terrain. More... | |
static int | intf_unit_jamming_cost (lua_State *L) |
Returns unit jamming cost on a given terrain. More... | |
static int | intf_unit_defense (lua_State *L) |
Returns unit defense on a given terrain. More... | |
static int | intf_transform_unit (lua_State *L) |
Changes a unit to the given unit type. More... | |
static void | luaW_pushsimdata (lua_State *L, const combatant &cmb) |
Puts a table at the top of the stack with some combat result. More... | |
static void | luaW_pushsimweapon (lua_State *L, const battle_context_unit_stats &bcustats) |
Puts a table at the top of the stack with information about the combatants' weapons. More... | |
static int | intf_synchronize_choice (lua_State *L) |
Ensures a value is synchronized among all the clients. More... | |
static int | intf_synchronize_choices (lua_State *L) |
Ensures a value is synchronized among all the clients. More... | |
static int | intf_do_unsynced (lua_State *L) |
Calls a function in an unsynced context (this specially means that all random calls used by that function will be unsynced). More... | |
static int | intf_modify_ai (lua_State *L, const char *action) |
static int | intf_switch_ai (lua_State *L) |
static int | intf_append_ai (lua_State *L) |
static int | intf_add_modification (lua_State *L) |
Adds a modification to a unit. More... | |
static int | intf_remove_modifications (lua_State *L) |
Removes modifications from a unit. More... | |
static int | intf_advance_unit (lua_State *L) |
Advances a unit if the unit has enough xp. More... | |
static int | intf_add_known_unit (lua_State *L) |
Adds a new known unit type to the help system. More... | |
static std::string | read_event_name (lua_State *L, int idx) |
static int | intf_modify_ai_old (lua_State *L) |
Lua frontend to the modify_ai functionality. More... | |
static int | cfun_exec_candidate_action (lua_State *L) |
static int | cfun_exec_stage (lua_State *L) |
static void | push_component (lua_State *L, ai::component *c, const std::string &ct="") |
static int | intf_debug_ai (lua_State *L) |
Debug access to the ai tables. More... | |
static int | intf_invoke_synced_command (lua_State *L) |
template<typename Ret > | |
static int | impl_null_callback (lua_State *L) |
static int | impl_game_events_dir (lua_State *L) |
static int | impl_game_events_get (lua_State *L) |
template<typename Ret = void> | |
static bool | impl_get_callback (lua_State *L, const std::string &name) |
static bool | is_handled_file_tag (std::string_view s) |
These are the child tags of [scenario] (and the like) that are handled elsewhere (in the C++ code). More... | |
static int | cfun_wml_condition (lua_State *L) |
Executes its upvalue as a wml condition and returns the result. More... | |
static int | intf_run_event_wml (lua_State *L) |
Variables | |
static lg::log_domain | log_scripting_lua ("scripting/lua") |
static lg::log_domain | log_wml ("wml") |
static const char | animatorKey [] = "unit animator" |
luaW_Registry | scheduleReg {"schedule"} |
static auto & | dummy = gameConfigReg() |
luaW_Registry | scenarioReg {"scenario"} |
luaW_Registry | currentReg {"current"} |
const char * | labelKey = "floating label" |
luaW_Registry | callbacksReg {"game_events"} |
Provides a Lua interpreter, to be embedded in WML.
Definition in file game_lua_kernel.cpp.
#define CALLBACK_GETTER | ( | name, | |
type | |||
) | LATTR_GETTER(name, lua_index_raw, callbacks_tag, ) { lua_pushcfunction(L, &impl_null_callback<type>); return lua_index_raw(L); } |
Definition at line 5140 of file game_lua_kernel.cpp.
#define CURRENT_GETTER | ( | name, | |
type | |||
) | LATTR_GETTER(name, type, current_tag, k) |
Definition at line 1848 of file game_lua_kernel.cpp.
#define DBG_LUA LOG_STREAM(debug, log_scripting_lua) |
Definition at line 137 of file game_lua_kernel.cpp.
#define ERR_LUA LOG_STREAM(err, log_scripting_lua) |
Definition at line 140 of file game_lua_kernel.cpp.
#define ERR_WML LOG_STREAM(err, log_wml) |
Definition at line 143 of file game_lua_kernel.cpp.
#define GAME_CONFIG_SIMPLE_SETTER | ( | name | ) |
Definition at line 1356 of file game_lua_kernel.cpp.
#define LOG_LUA LOG_STREAM(info, log_scripting_lua) |
Definition at line 138 of file game_lua_kernel.cpp.
#define READ_ONE_FILTER | ( | key, | |
tag | |||
) |
#define SCENARIO_GETTER | ( | name, | |
type | |||
) | LATTR_GETTER(name, type, scenario_tag, k) |
Definition at line 1605 of file game_lua_kernel.cpp.
#define SCENARIO_SETTER | ( | name, | |
type | |||
) | LATTR_SETTER(name, type, scenario_tag, k) |
Definition at line 1606 of file game_lua_kernel.cpp.
#define SCENARIO_VALID | ( | name | ) | LATTR_VALID(name, scenario_tag, k) |
Definition at line 1607 of file game_lua_kernel.cpp.
#define SCHEDULE_GETTER | ( | name, | |
type | |||
) | LATTR_GETTER(name, type, schedule_tag, sched) |
Definition at line 937 of file game_lua_kernel.cpp.
#define SCHEDULE_SETTER | ( | name, | |
type | |||
) | LATTR_SETTER(name, type, schedule_tag, sched) |
Definition at line 938 of file game_lua_kernel.cpp.
#define SCHEDULE_VALID | ( | name | ) | LATTR_VALID(name, schedule_tag, sched) |
Definition at line 939 of file game_lua_kernel.cpp.
#define WRN_LUA LOG_STREAM(warn, log_scripting_lua) |
Definition at line 139 of file game_lua_kernel.cpp.
typedef int(game_lua_kernel::* member_callback) (lua_State *) |
Definition at line 149 of file game_lua_kernel.cpp.
typedef int(game_lua_kernel::* member_callback2) (lua_State *, bool) |
Definition at line 157 of file game_lua_kernel.cpp.
using wml_conditional_handler = bool(*)(const vconfig&) |
Definition at line 5936 of file game_lua_kernel.cpp.
|
static |
Definition at line 4570 of file game_lua_kernel.cpp.
References ai::candidate_action::evaluate(), ai::candidate_action::execute(), and luaW_toboolean().
Referenced by push_component().
|
static |
Definition at line 4587 of file game_lua_kernel.cpp.
References ai::stage::play_stage().
Referenced by push_component().
|
static |
Executes its upvalue as a wml condition and returns the result.
Definition at line 5941 of file game_lua_kernel.cpp.
References h, and luaW_checkvconfig().
Referenced by game_lua_kernel::set_wml_condition().
int dispatch | ( | lua_State * | L | ) |
Definition at line 152 of file game_lua_kernel.cpp.
int dispatch2 | ( | lua_State * | L | ) |
Definition at line 160 of file game_lua_kernel.cpp.
References b.
luaW_Registry & gameConfigReg | ( | ) |
Definition at line 1276 of file lua_kernel_base.cpp.
References gameConfigReg().
Referenced by gameConfigReg(), lua_kernel_base::impl_game_config_dir(), lua_kernel_base::impl_game_config_get(), and lua_kernel_base::impl_game_config_set().
|
static |
Definition at line 273 of file game_lua_kernel.cpp.
References unit_animator::add_animation(), animatorKey, string_enums::enum_base< Definition >::get_enum(), unit::get_location(), luaW_checkunit_ptr(), luaW_toboolean(), luaW_tolocation(), luaW_totstring(), luaW_toweapon(), luaW_type_error(), and tiles_adjacent().
Referenced by game_lua_kernel::intf_create_animator().
|
static |
Definition at line 267 of file game_lua_kernel.cpp.
References animatorKey.
Referenced by game_lua_kernel::intf_create_animator().
|
static |
Definition at line 396 of file game_lua_kernel.cpp.
References luaW_getmetafield().
Referenced by game_lua_kernel::intf_create_animator().
|
static |
Definition at line 389 of file game_lua_kernel.cpp.
References animatorKey, and unit_animator::clear().
Referenced by game_lua_kernel::intf_create_animator().
|
static |
Definition at line 1461 of file game_lua_kernel.cpp.
References data.
|
static |
Definition at line 1413 of file game_lua_kernel.cpp.
References data, return_bool_attrib, return_cfg_attrib, return_cstring_attrib, and return_string_attrib.
|
static |
Definition at line 2497 of file game_lua_kernel.cpp.
References luaW_check_floating_label(), luaW_getmetafield(), and return_bool_attrib.
Referenced by game_lua_kernel::intf_set_floating_label().
|
static |
Definition at line 5166 of file game_lua_kernel.cpp.
References callbacksReg, and luaW_Registry::dir().
Referenced by game_lua_kernel::game_lua_kernel().
|
static |
Definition at line 5170 of file game_lua_kernel.cpp.
References callbacksReg, and luaW_Registry::get().
Referenced by game_lua_kernel::game_lua_kernel().
|
static |
Definition at line 5175 of file game_lua_kernel.cpp.
References luaW_getglobal().
Referenced by game_lua_kernel::load_game(), game_lua_kernel::mouse_over_hex_callback(), game_lua_kernel::run_event(), and game_lua_kernel::select_hex_callback().
|
static |
Definition at line 1468 of file game_lua_kernel.cpp.
References string_enums::enum_base< Definition >::get_string(), i, INDEFINITE, utils::join(), utils::join_map(), lua_push(), luaW_getglobal(), luaW_pushconfig(), p, return_bool_attrib, return_cfgref_attrib, return_int_attrib, return_string_attrib, and return_string_attrib_deprecated.
|
static |
Definition at line 1588 of file game_lua_kernel.cpp.
References p.
|
static |
Definition at line 5144 of file game_lua_kernel.cpp.
References lua_push().
|
static |
Adds a new known unit type to the help system.
Definition at line 4087 of file game_lua_kernel.cpp.
References prefs::encountered_units(), unit_type_data::find(), prefs::get(), and unit_types.
Referenced by game_lua_kernel::game_lua_kernel().
|
static |
Adds a modification to a unit.
Definition at line 4002 of file game_lua_kernel.cpp.
References unit::add_modification(), deprecated_message(), luaW_checkconfig(), luaW_checkunit(), luaW_toboolean(), and PREEMPTIVE.
Referenced by game_lua_kernel::game_lua_kernel().
|
static |
Advances a unit if the unit has enough xp.
Definition at line 4067 of file game_lua_kernel.cpp.
References advance_unit_at(), advance_unit_params::animate(), advance_unit_params::fire_events(), unit::get_location(), luaW_checkunit(), and luaW_toboolean().
Referenced by game_lua_kernel::game_lua_kernel().
|
static |
Definition at line 3929 of file game_lua_kernel.cpp.
References config::add_child(), ai::manager::append_active_ai_for_side(), ai::configuration::expand_simplified_aspects(), ai::manager::get_singleton(), config::has_child(), luaW_checkconfig(), luaW_toteam(), config::mandatory_child(), config::remove_children(), and t.
Referenced by game_lua_kernel::game_lua_kernel().
|
static |
Copies a unit.
Definition at line 2991 of file game_lua_kernel.cpp.
References unit::clone(), luaW_checkunit(), and luaW_pushunit().
Referenced by game_lua_kernel::game_lua_kernel().
|
static |
Creates a unit from its WML description.
Definition at line 2977 of file game_lua_kernel.cpp.
References unit::create(), luaW_checkconfig(), and luaW_pushunit().
Referenced by game_lua_kernel::game_lua_kernel().
|
static |
Debug access to the ai tables.
Definition at line 4671 of file game_lua_kernel.cpp.
References config::add_child(), ai::component_manager::add_component(), c, game_config::debug, ai::manager::get_active_ai_holder_for_side_dbg(), ai::ai_composite::get_ai_context(), ai::holder::get_component(), ai::configuration::get_default_ai_parameters(), ai::manager::get_singleton(), i, LOG_LUA, luaW_toteam(), ai::engine_lua::push_ai_table(), push_component(), t, and ai::engine_lua::to_config().
Referenced by game_lua_kernel::game_lua_kernel().
|
static |
Calls a function in an unsynced context (this specially means that all random calls used by that function will be unsynced).
This is usually used together with an unsynced if like 'if controller != network'
Definition at line 3762 of file game_lua_kernel.cpp.
References luaW_pcall().
Referenced by game_lua_kernel::game_lua_kernel().
|
static |
Evaluates a boolean WML conditional.
Definition at line 2010 of file game_lua_kernel.cpp.
References b, game_events::conditional_passed(), and luaW_checkvconfig().
Referenced by game_lua_kernel::game_lua_kernel().
|
static |
Gets a table for an era tag.
Definition at line 1333 of file game_lua_kernel.cpp.
References game_config_manager::get(), and luaW_pushconfig().
Referenced by game_lua_kernel::game_lua_kernel().
|
static |
Gets a table for an resource tag.
Definition at line 1315 of file game_lua_kernel.cpp.
References game_config_manager::get(), and luaW_pushconfig().
Referenced by game_lua_kernel::game_lua_kernel().
|
static |
Gets currently viewing side.
Definition at line 247 of file game_lua_kernel.cpp.
References display::get_singleton().
Referenced by game_lua_kernel::game_lua_kernel().
|
static |
Definition at line 259 of file game_lua_kernel.cpp.
References ai::manager::get_singleton(), and ai::manager::raise_user_interact().
Referenced by game_lua_kernel::game_lua_kernel().
|
static |
Definition at line 5110 of file game_lua_kernel.cpp.
References config::add_child(), config::child_or_add(), luaW_checkconfig(), luaW_getglobal(), luaW_pcall(), luaW_pushconfig(), and synced_command::registry().
Referenced by game_lua_kernel::game_lua_kernel().
|
static |
Definition at line 3880 of file game_lua_kernel.cpp.
References config::add_child(), ai::manager::get_singleton(), luaW_checkconfig(), luaW_toteam(), ai::manager::modify_active_ai_for_side(), game_config::path, and t.
Referenced by game_lua_kernel::game_lua_kernel().
|
static |
Lua frontend to the modify_ai functionality.
Definition at line 4561 of file game_lua_kernel.cpp.
References ai::manager::get_singleton(), luaW_toconfig(), and ai::manager::modify_active_ai_for_side().
Referenced by game_lua_kernel::game_lua_kernel().
|
static |
Removes modifications from a unit.
Definition at line 4033 of file game_lua_kernel.cpp.
References config::all_children_count(), config::attribute_count(), config::attribute_range(), config::child_range(), unit::expire_modifications(), unit::get_modifications(), luaW_checkconfig(), luaW_checkunit(), and markup::tag().
Referenced by game_lua_kernel::game_lua_kernel().
|
static |
Definition at line 6021 of file game_lua_kernel.cpp.
References luaW_getglobal().
Referenced by game_lua_kernel::save_wml_event().
|
static |
Definition at line 3908 of file game_lua_kernel.cpp.
References ai::manager::add_ai_for_side_from_config(), lg::err(), ai::manager::get_singleton(), luaW_checkconfig(), luaW_toteam(), and t.
Referenced by game_lua_kernel::game_lua_kernel().
|
static |
Ensures a value is synchronized among all the clients.
Definition at line 3694 of file game_lua_kernel.cpp.
References _(), mp_sync::get_user_choice(), luaW_pushconfig(), and luaW_totstring().
Referenced by game_lua_kernel::game_lua_kernel().
|
static |
Ensures a value is synchronized among all the clients.
Definition at line 3729 of file game_lua_kernel.cpp.
References _(), mp_sync::get_user_choice_multiple_sides(), lua_push(), and luaW_totstring().
Referenced by game_lua_kernel::game_lua_kernel().
|
static |
Changes a unit to the given unit type.
Definition at line 3130 of file game_lua_kernel.cpp.
References unit::advance_to(), unit_type_data::find(), unit_type::get_variation(), unit_type::has_variation(), luaW_checkunit(), and unit_types.
Referenced by game_lua_kernel::game_lua_kernel().
|
static |
Returns unit defense on a given terrain.
Definition at line 3095 of file game_lua_kernel.cpp.
References unit::defense_modifier(), resources::gameboard, loc, luaW_checkunit(), luaW_tolocation(), luaW_type_error(), t_translation::read_terrain_code(), and t.
Referenced by game_lua_kernel::game_lua_kernel().
|
static |
Returns unit jamming cost on a given terrain.
Definition at line 3074 of file game_lua_kernel.cpp.
References resources::gameboard, unit::jamming_cost(), loc, luaW_checkunit(), luaW_tolocation(), luaW_type_error(), t_translation::read_terrain_code(), and t.
Referenced by game_lua_kernel::game_lua_kernel().
|
static |
Returns unit movement cost on a given terrain.
Definition at line 3032 of file game_lua_kernel.cpp.
References resources::gameboard, loc, luaW_checkunit(), luaW_tolocation(), luaW_type_error(), unit::movement_cost(), t_translation::read_terrain_code(), and t.
Referenced by game_lua_kernel::game_lua_kernel().
|
static |
Returns unit resistance against a given attack type.
Definition at line 3006 of file game_lua_kernel.cpp.
References unit::get_location(), loc, luaW_checklocation(), luaW_checkunit(), luaW_toboolean(), and unit::resistance_against().
Referenced by game_lua_kernel::game_lua_kernel().
|
static |
Returns unit vision cost on a given terrain.
Definition at line 3053 of file game_lua_kernel.cpp.
References resources::gameboard, loc, luaW_checkunit(), luaW_tolocation(), luaW_type_error(), t_translation::read_terrain_code(), t, and unit::vision_cost().
Referenced by game_lua_kernel::game_lua_kernel().
|
static |
These are the child tags of [scenario] (and the like) that are handled elsewhere (in the C++ code).
Any child tags not in this list will be passed to Lua's on_load event.
Definition at line 5724 of file game_lua_kernel.cpp.
References s.
Referenced by game_lua_kernel::load_game(), and game_lua_kernel::save_game().
|
static |
Definition at line 2272 of file game_lua_kernel.cpp.
References resources::fake_units, i, luaW_tolocation(), and src.
Referenced by game_lua_kernel::intf_find_cost_map().
|
static |
Definition at line 2492 of file game_lua_kernel.cpp.
References labelKey.
Referenced by impl_floating_label_getmethod(), game_lua_kernel::intf_move_floating_label(), game_lua_kernel::intf_remove_floating_label(), and game_lua_kernel::intf_set_floating_label().
|
static |
Definition at line 921 of file game_lua_kernel.cpp.
References i.
Referenced by lua_object_traits< schedule_tag >::get(), game_lua_kernel::impl_schedule_get(), game_lua_kernel::impl_schedule_len(), game_lua_kernel::impl_schedule_set(), game_lua_kernel::intf_get_time_of_day(), and game_lua_kernel::intf_replace_schedule().
|
static |
Definition at line 875 of file game_lua_kernel.cpp.
References tod_color::b, time_of_day::bonus_modified, time_of_day::color, tod_color::g, time_of_day::id, time_of_day::image, time_of_day::image_mask, time_of_day::lawful_bonus, luaW_pushtstring(), time_of_day::name, tod_color::r, and time_of_day::sounds.
Referenced by game_lua_kernel::impl_schedule_get(), and game_lua_kernel::intf_get_time_of_day().
|
static |
Puts a table at the top of the stack with some combat result.
Definition at line 3149 of file game_lua_kernel.cpp.
References combatant::average_hp(), combatant::hp_dist, i, n, combatant::poisoned, combatant::slowed, and combatant::untouched.
Referenced by game_lua_kernel::intf_simulate_combat().
|
static |
Puts a table at the top of the stack with information about the combatants' weapons.
Definition at line 3172 of file game_lua_kernel.cpp.
References battle_context_unit_stats::attack_num, battle_context_unit_stats::chance_to_hit, battle_context_unit_stats::damage, battle_context_unit_stats::drain_constant, battle_context_unit_stats::drain_percent, battle_context_unit_stats::drains, battle_context_unit_stats::firststrike, luaW_pushweapon(), battle_context_unit_stats::num_blows, battle_context_unit_stats::petrifies, battle_context_unit_stats::plague_type, battle_context_unit_stats::plagues, battle_context_unit_stats::poisons, battle_context_unit_stats::rounds, battle_context_unit_stats::slows, and battle_context_unit_stats::weapon.
Referenced by game_lua_kernel::intf_simulate_combat().
|
static |
Definition at line 4596 of file game_lua_kernel.cpp.
References c, cfun_exec_candidate_action(), cfun_exec_stage(), i, and t.
Referenced by intf_debug_ai().
|
static |
Definition at line 4203 of file game_lua_kernel.cpp.
References utils::join(), and lua_check().
Referenced by game_lua_kernel::intf_add_event(), and game_lua_kernel::intf_add_event_simple().
|
static |
Definition at line 265 of file game_lua_kernel.cpp.
Referenced by impl_add_animation(), impl_animator_collect(), impl_clear_animation(), game_lua_kernel::impl_run_animation(), and game_lua_kernel::intf_create_animator().
luaW_Registry callbacksReg {"game_events"} |
Definition at line 5141 of file game_lua_kernel.cpp.
Referenced by impl_game_events_dir(), and impl_game_events_get().
luaW_Registry currentReg {"current"} |
Definition at line 1849 of file game_lua_kernel.cpp.
Referenced by game_lua_kernel::impl_current_dir(), and game_lua_kernel::impl_current_get().
|
static |
Definition at line 1347 of file game_lua_kernel.cpp.
Referenced by pathfind::full_cost_map::add_unit(), attack_unit(), editor::editor_controller::can_execute_command(), config::child_range(), addons_client::delete_remote_addon(), find_widget_impl(), filesystem::get_binary_paths(), config::get_deprecated_child_range(), config::get_diff(), ai::readonly_context_impl::nearest_keep(), savegame::save_index_class::rebuild(), gui2::addon_list_definition::resolution::resolution(), gui2::drawing_definition::resolution::resolution(), gui2::size_lock_definition::resolution::resolution(), gui2::stacked_widget_definition::resolution::resolution(), game_lua_kernel::run_event(), game_lua_kernel::run_wml_action(), game_lua_kernel::run_wml_event(), translation::strftime(), t_translation::string_to_number_(), replay::undo(), and schema_validation::schema_self_validator::validate().
const char* labelKey = "floating label" |
Definition at line 2490 of file game_lua_kernel.cpp.
Referenced by game_lua_kernel::intf_set_floating_label(), and luaW_check_floating_label().
|
static |
|
static |
luaW_Registry scenarioReg {"scenario"} |
Definition at line 1608 of file game_lua_kernel.cpp.
Referenced by game_lua_kernel::impl_scenario_dir(), game_lua_kernel::impl_scenario_get(), and game_lua_kernel::impl_scenario_set().
luaW_Registry scheduleReg {"schedule"} |
Definition at line 940 of file game_lua_kernel.cpp.
Referenced by game_lua_kernel::impl_schedule_dir(), game_lua_kernel::impl_schedule_get(), and game_lua_kernel::impl_schedule_set().