Symphony Of Empires
LuaAPI Namespace Reference

Functions

int register_new_table (lua_State *L, const std::string &name, const std::vector< luaL_Reg > meta, const std::vector< luaL_Reg > methods)
 
int add_terrain_type (lua_State *L)
 
int get_terrain_type (lua_State *L)
 
int get_terrain_type_by_id (lua_State *L)
 
int add_technology (lua_State *L)
 
int get_technology (lua_State *L)
 
int add_req_tech_to_tech (lua_State *L)
 
int add_building_type (lua_State *L)
 
int get_building_type (lua_State *L)
 
int add_good (lua_State *L)
 
int get_good (lua_State *L)
 
int add_input_to_industry_type (lua_State *L)
 
int add_output_to_industry_type (lua_State *L)
 
int add_req_good_to_industry_type (lua_State *L)
 
int add_req_technology_to_industry_type (lua_State *L)
 
int add_nation (lua_State *L)
 
int get_nation (lua_State *L)
 
int get_nation_by_id (lua_State *L)
 
int get_all_nations (lua_State *L)
 
int switch_nation_soul (lua_State *L)
 
int nation_declare_war_no_cb (lua_State *L)
 
int get_provinces_owned_by_nation (lua_State *L)
 
int get_provinces_with_nucleus_by_nation (lua_State *L)
 
int set_nation_primary_language (lua_State *L)
 
int set_nation_capital (lua_State *L)
 
int add_accepted_language (lua_State *L)
 
int add_accepted_religion (lua_State *L)
 
int add_nation_client_hint (lua_State *L)
 
int nation_declare_unjustified_war (lua_State *L)
 
int get_nation_relation (lua_State *L)
 
int set_nation_relation (lua_State *L)
 
int add_province (lua_State *L)
 
int update_province (lua_State *L)
 
int get_province (lua_State *L)
 
int get_province_by_id (lua_State *L)
 
int province_add_unit (lua_State *L)
 
int update_province_building (lua_State *L)
 
int give_province_to (lua_State *L)
 
int give_hard_province_to (lua_State *L)
 
int get_province_owner (lua_State *L)
 
int get_province_controller (lua_State *L)
 
int get_province_neighbours (lua_State *L)
 
int get_province_nuclei (lua_State *L)
 
int add_province_pop (lua_State *L)
 
int set_province_language (lua_State *L)
 
int set_province_religion (lua_State *L)
 
int rename_province (lua_State *L)
 
int add_province_nucleus (lua_State *L)
 
int add_province_owner (lua_State *L)
 
int add_event (lua_State *L)
 
int get_event (lua_State *L)
 
int update_event (lua_State *L)
 
int add_event_receivers (lua_State *L)
 
int add_decision (lua_State *L)
 
int add_pop_type (lua_State *L)
 
int get_pop_type (lua_State *L)
 
int get_pop_type_by_id (lua_State *L)
 
int add_language (lua_State *L)
 
int get_language (lua_State *L)
 
int get_language_by_id (lua_State *L)
 
int add_religion (lua_State *L)
 
int get_religion (lua_State *L)
 
int get_religion_by_id (lua_State *L)
 
int add_unit_type (lua_State *L)
 
int get_unit_type (lua_State *L)
 
int add_req_good_unit_type (lua_State *L)
 
int add_ideology (lua_State *L)
 
int get_ideology (lua_State *L)
 
int get_ideology_by_id (lua_State *L)
 
void fire_event (lua_State *L, Nation &nation, Event &event, bool &is_multi, const std::string_view extra)
 
void check_events (lua_State *L)
 
int ui_call_builtin (lua_State *L)
 

Function Documentation

◆ add_accepted_language()

int LuaAPI::add_accepted_language ( lua_State *  L)

Definition at line 372 of file lua_api.cpp.

Here is the caller graph for this function:

◆ add_accepted_religion()

int LuaAPI::add_accepted_religion ( lua_State *  L)

Definition at line 378 of file lua_api.cpp.

Here is the caller graph for this function:

◆ add_building_type()

int LuaAPI::add_building_type ( lua_State *  L)

Definition at line 182 of file lua_api.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_decision()

int LuaAPI::add_decision ( lua_State *  L)

Definition at line 733 of file lua_api.cpp.

◆ add_event()

int LuaAPI::add_event ( lua_State *  L)

Definition at line 682 of file lua_api.cpp.

Here is the call graph for this function:

◆ add_event_receivers()

int LuaAPI::add_event_receivers ( lua_State *  L)

Definition at line 725 of file lua_api.cpp.

◆ add_good()

int LuaAPI::add_good ( lua_State *  L)

Definition at line 210 of file lua_api.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_ideology()

int LuaAPI::add_ideology ( lua_State *  L)

◆ add_input_to_industry_type()

int LuaAPI::add_input_to_industry_type ( lua_State *  L)

Definition at line 229 of file lua_api.cpp.

Here is the caller graph for this function:

◆ add_language()

int LuaAPI::add_language ( lua_State *  L)

Definition at line 855 of file lua_api.cpp.

Here is the call graph for this function:

◆ add_nation()

int LuaAPI::add_nation ( lua_State *  L)

Definition at line 259 of file lua_api.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_nation_client_hint()

int LuaAPI::add_nation_client_hint ( lua_State *  L)

Definition at line 384 of file lua_api.cpp.

Here is the caller graph for this function:

◆ add_output_to_industry_type()

int LuaAPI::add_output_to_industry_type ( lua_State *  L)

Definition at line 237 of file lua_api.cpp.

Here is the caller graph for this function:

◆ add_pop_type()

int LuaAPI::add_pop_type ( lua_State *  L)

Definition at line 745 of file lua_api.cpp.

◆ add_province()

int LuaAPI::add_province ( lua_State *  L)

Definition at line 423 of file lua_api.cpp.

Here is the call graph for this function:

◆ add_province_nucleus()

int LuaAPI::add_province_nucleus ( lua_State *  L)

Definition at line 654 of file lua_api.cpp.

◆ add_province_owner()

int LuaAPI::add_province_owner ( lua_State *  L)

Definition at line 675 of file lua_api.cpp.

◆ add_province_pop()

int LuaAPI::add_province_pop ( lua_State *  L)

Definition at line 635 of file lua_api.cpp.

◆ add_religion()

int LuaAPI::add_religion ( lua_State *  L)

Definition at line 894 of file lua_api.cpp.

Here is the call graph for this function:

◆ add_req_good_to_industry_type()

int LuaAPI::add_req_good_to_industry_type ( lua_State *  L)

Definition at line 245 of file lua_api.cpp.

Here is the caller graph for this function:

◆ add_req_good_unit_type()

int LuaAPI::add_req_good_unit_type ( lua_State *  L)

Definition at line 955 of file lua_api.cpp.

◆ add_req_tech_to_tech()

int LuaAPI::add_req_tech_to_tech ( lua_State *  L)

Definition at line 176 of file lua_api.cpp.

Here is the caller graph for this function:

◆ add_req_technology_to_industry_type()

int LuaAPI::add_req_technology_to_industry_type ( lua_State *  L)

Definition at line 252 of file lua_api.cpp.

Here is the caller graph for this function:

◆ add_technology()

int LuaAPI::add_technology ( lua_State *  L)

Definition at line 151 of file lua_api.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_terrain_type()

int LuaAPI::add_terrain_type ( lua_State *  L)

Definition at line 114 of file lua_api.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_unit_type()

int LuaAPI::add_unit_type ( lua_State *  L)

Definition at line 923 of file lua_api.cpp.

Here is the call graph for this function:

◆ check_events()

void LuaAPI::check_events ( lua_State *  L)

Definition at line 1021 of file lua_api.cpp.

Here is the call graph for this function:

◆ fire_event()

void LuaAPI::fire_event ( lua_State *  L,
Nation nation,
Event event,
bool &  is_multi,
const std::string_view  extra 
)

Definition at line 972 of file lua_api.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_all_nations()

int LuaAPI::get_all_nations ( lua_State *  L)

Definition at line 297 of file lua_api.cpp.

Here is the caller graph for this function:

◆ get_building_type()

int LuaAPI::get_building_type ( lua_State *  L)

Definition at line 197 of file lua_api.cpp.

Here is the caller graph for this function:

◆ get_event()

int LuaAPI::get_event ( lua_State *  L)
Todo:
A better way to get closures

Definition at line 713 of file lua_api.cpp.

Here is the call graph for this function:

◆ get_good()

int LuaAPI::get_good ( lua_State *  L)

Definition at line 222 of file lua_api.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_ideology()

int LuaAPI::get_ideology ( lua_State *  L)

◆ get_ideology_by_id()

int LuaAPI::get_ideology_by_id ( lua_State *  L)

◆ get_language()

int LuaAPI::get_language ( lua_State *  L)

Definition at line 871 of file lua_api.cpp.

Here is the call graph for this function:

◆ get_language_by_id()

int LuaAPI::get_language_by_id ( lua_State *  L)

Definition at line 883 of file lua_api.cpp.

◆ get_nation()

int LuaAPI::get_nation ( lua_State *  L)

Definition at line 283 of file lua_api.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_nation_by_id()

int LuaAPI::get_nation_by_id ( lua_State *  L)

Definition at line 290 of file lua_api.cpp.

Here is the caller graph for this function:

◆ get_nation_relation()

int LuaAPI::get_nation_relation ( lua_State *  L)

Definition at line 395 of file lua_api.cpp.

Here is the call graph for this function:

◆ get_pop_type()

int LuaAPI::get_pop_type ( lua_State *  L)

Definition at line 793 of file lua_api.cpp.

Here is the call graph for this function:

◆ get_pop_type_by_id()

int LuaAPI::get_pop_type_by_id ( lua_State *  L)

Definition at line 825 of file lua_api.cpp.

Here is the call graph for this function:

◆ get_province()

int LuaAPI::get_province ( lua_State *  L)

Definition at line 504 of file lua_api.cpp.

Here is the call graph for this function:

◆ get_province_by_id()

int LuaAPI::get_province_by_id ( lua_State *  L)

Definition at line 524 of file lua_api.cpp.

Here is the call graph for this function:

◆ get_province_controller()

int LuaAPI::get_province_controller ( lua_State *  L)

Definition at line 604 of file lua_api.cpp.

◆ get_province_neighbours()

int LuaAPI::get_province_neighbours ( lua_State *  L)

Definition at line 611 of file lua_api.cpp.

◆ get_province_nuclei()

int LuaAPI::get_province_nuclei ( lua_State *  L)

Definition at line 623 of file lua_api.cpp.

◆ get_province_owner()

int LuaAPI::get_province_owner ( lua_State *  L)

Definition at line 597 of file lua_api.cpp.

◆ get_provinces_owned_by_nation()

int LuaAPI::get_provinces_owned_by_nation ( lua_State *  L)

Definition at line 327 of file lua_api.cpp.

Here is the caller graph for this function:

◆ get_provinces_with_nucleus_by_nation()

int LuaAPI::get_provinces_with_nucleus_by_nation ( lua_State *  L)

Definition at line 340 of file lua_api.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_religion()

int LuaAPI::get_religion ( lua_State *  L)

Definition at line 907 of file lua_api.cpp.

Here is the call graph for this function:

◆ get_religion_by_id()

int LuaAPI::get_religion_by_id ( lua_State *  L)

Definition at line 915 of file lua_api.cpp.

◆ get_technology()

int LuaAPI::get_technology ( lua_State *  L)

Definition at line 166 of file lua_api.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_terrain_type()

int LuaAPI::get_terrain_type ( lua_State *  L)

Definition at line 141 of file lua_api.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_terrain_type_by_id()

int LuaAPI::get_terrain_type_by_id ( lua_State *  L)

Definition at line 130 of file lua_api.cpp.

Here is the caller graph for this function:

◆ get_unit_type()

int LuaAPI::get_unit_type ( lua_State *  L)

Definition at line 941 of file lua_api.cpp.

Here is the call graph for this function:

◆ give_hard_province_to()

int LuaAPI::give_hard_province_to ( lua_State *  L)

Definition at line 575 of file lua_api.cpp.

Here is the call graph for this function:

◆ give_province_to()

int LuaAPI::give_province_to ( lua_State *  L)

Definition at line 569 of file lua_api.cpp.

◆ nation_declare_unjustified_war()

int LuaAPI::nation_declare_unjustified_war ( lua_State *  L)

Definition at line 415 of file lua_api.cpp.

Here is the call graph for this function:

◆ nation_declare_war_no_cb()

int LuaAPI::nation_declare_war_no_cb ( lua_State *  L)

Definition at line 318 of file lua_api.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ province_add_unit()

int LuaAPI::province_add_unit ( lua_State *  L)

Definition at line 544 of file lua_api.cpp.

Here is the call graph for this function:

◆ register_new_table()

int LuaAPI::register_new_table ( lua_State *  L,
const std::string &  name,
const std::vector< luaL_Reg >  meta,
const std::vector< luaL_Reg >  methods 
)

Definition at line 43 of file lua_api.cpp.

◆ rename_province()

int LuaAPI::rename_province ( lua_State *  L)

Definition at line 648 of file lua_api.cpp.

◆ set_nation_capital()

int LuaAPI::set_nation_capital ( lua_State *  L)

Definition at line 366 of file lua_api.cpp.

Here is the caller graph for this function:

◆ set_nation_primary_language()

int LuaAPI::set_nation_primary_language ( lua_State *  L)

Definition at line 362 of file lua_api.cpp.

Here is the caller graph for this function:

◆ set_nation_relation()

int LuaAPI::set_nation_relation ( lua_State *  L)

Definition at line 405 of file lua_api.cpp.

Here is the call graph for this function:

◆ set_province_language()

int LuaAPI::set_province_language ( lua_State *  L)

Definition at line 663 of file lua_api.cpp.

◆ set_province_religion()

int LuaAPI::set_province_religion ( lua_State *  L)

Definition at line 669 of file lua_api.cpp.

◆ switch_nation_soul()

int LuaAPI::switch_nation_soul ( lua_State *  L)
Todo:
Broadcast this to all clients?

Definition at line 309 of file lua_api.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ui_call_builtin()

int LuaAPI::ui_call_builtin ( lua_State *  L)

Definition at line 1072 of file lua_api.cpp.

Here is the call graph for this function:

◆ update_event()

int LuaAPI::update_event ( lua_State *  L)

Definition at line 700 of file lua_api.cpp.

◆ update_province()

int LuaAPI::update_province ( lua_State *  L)

Definition at line 487 of file lua_api.cpp.

Here is the call graph for this function:

◆ update_province_building()

int LuaAPI::update_province_building ( lua_State *  L)

Definition at line 559 of file lua_api.cpp.