Freeciv-3.2
|
#include "luascript_types.h"
Go to the source code of this file.
Enumerations | |
enum | climate_change_type { CLIMATE_CHANGE_GLOBAL_WARMING , CLIMATE_CHANGE_NUCLEAR_WINTER } |
Enumerator | |
---|---|
CLIMATE_CHANGE_GLOBAL_WARMING | |
CLIMATE_CHANGE_NUCLEAR_WINTER |
Definition at line 23 of file api_server_edit.h.
Change pplayer's gold by amount.
Definition at line 815 of file api_server_edit.c.
Referenced by tolua_server_edit_change_gold00().
Change pplayer's infrapoints by amount.
Definition at line 828 of file api_server_edit.c.
Referenced by tolua_server_edit_change_infrapoints00().
Change terrain on tile
Definition at line 637 of file api_server_edit.c.
Referenced by tolua_server_edit_change_terrain00().
Add history to a city
Definition at line 1185 of file api_server_edit.c.
Referenced by tolua_server_edit_add_city_history00().
Provoke a civil war.
Definition at line 1083 of file api_server_edit.c.
Referenced by tolua_server_edit_civil_war00().
void api_edit_climate_change | ( | lua_State * | L, |
enum climate_change_type | type, | ||
int | effect | ||
) |
Global climate change.
Definition at line 1068 of file api_server_edit.c.
Referenced by tolua_server_edit_climate_change00().
Create a new base.
Definition at line 967 of file api_server_edit.c.
Referenced by tolua_server_edit_create_base00().
void api_edit_create_building | ( | lua_State * | L, |
City * | pcity, | ||
Building_Type * | impr | ||
) |
Create a building to a city
Definition at line 710 of file api_server_edit.c.
Referenced by tolua_server_edit_create_building00().
Create a new city.
Definition at line 673 of file api_server_edit.c.
Referenced by tolua_server_edit_create_city00().
Create a new extra.
Definition at line 959 of file api_server_edit.c.
Referenced by tolua_server_edit_create_extra00().
void api_edit_create_owned_extra | ( | lua_State * | L, |
Tile * | ptile, | ||
const char * | name, | ||
Player * | pplayer | ||
) |
Create a new owned extra.
Definition at line 935 of file api_server_edit.c.
Referenced by api_edit_create_base(), api_edit_create_extra(), api_edit_create_road(), and tolua_server_edit_create_owned_extra00().
Player * api_edit_create_player | ( | lua_State * | L, |
const char * | username, | ||
Nation_Type * | pnation, | ||
const char * | ai | ||
) |
Create a new player.
Definition at line 780 of file api_server_edit.c.
Referenced by tolua_server_edit_create_player00().
Add a new road.
Definition at line 976 of file api_server_edit.c.
Referenced by tolua_server_edit_create_road00().
Unit * api_edit_create_unit | ( | lua_State * | L, |
Player * | pplayer, | ||
Tile * | ptile, | ||
Unit_Type * | ptype, | ||
int | veteran_level, | ||
City * | homecity, | ||
int | moves_left | ||
) |
Create a new unit.
Definition at line 113 of file api_server_edit.c.
Referenced by tolua_server_edit_create_unit00().
Unit * api_edit_create_unit_full | ( | lua_State * | L, |
Player * | pplayer, | ||
Tile * | ptile, | ||
Unit_Type * | ptype, | ||
int | veteran_level, | ||
City * | homecity, | ||
int | moves_left, | ||
int | hp_left, | ||
Unit * | ptransport | ||
) |
Create a new unit.
Definition at line 124 of file api_server_edit.c.
Referenced by api_edit_create_unit(), and tolua_server_edit_create_unit_full00().
Tech_Type * api_edit_give_technology | ( | lua_State * | L, |
Player * | pplayer, | ||
Tech_Type * | ptech, | ||
int | cost, | ||
bool | notify, | ||
const char * | reason | ||
) |
Give pplayer technology ptech. Quietly returns NULL if player already has this tech; otherwise returns the tech granted. Use NULL for ptech to grant a random tech. sends script signal "tech_researched" with the given reason
Definition at line 845 of file api_server_edit.c.
Referenced by tolua_server_edit_give_tech00().
bool api_edit_perform_action_unit_vs_city | ( | lua_State * | L, |
Unit * | punit, | ||
Action * | paction, | ||
City * | tgt | ||
) |
Force a unit to perform an action against a city.
Definition at line 260 of file api_server_edit.c.
Referenced by tolua_server_edit_perform_action00().
bool api_edit_perform_action_unit_vs_city_impr | ( | lua_State * | L, |
Unit * | punit, | ||
Action * | paction, | ||
City * | tgt, | ||
Building_Type * | sub_tgt | ||
) |
Force a unit to perform an action against a city and a building.
Definition at line 284 of file api_server_edit.c.
Referenced by tolua_server_edit_perform_action01().
bool api_edit_perform_action_unit_vs_city_tech | ( | lua_State * | L, |
Unit * | punit, | ||
Action * | paction, | ||
City * | tgt, | ||
Tech_Type * | sub_tgt | ||
) |
Force a unit to perform an action against a city and a tech.
Definition at line 310 of file api_server_edit.c.
Referenced by tolua_server_edit_perform_action02().
Force a unit to perform an action against it self.
Definition at line 480 of file api_server_edit.c.
Referenced by tolua_server_edit_perform_action06().
bool api_edit_perform_action_unit_vs_tile | ( | lua_State * | L, |
Unit * | punit, | ||
Action * | paction, | ||
Tile * | tgt | ||
) |
Force a unit to perform an action against a tile.
Definition at line 362 of file api_server_edit.c.
Referenced by tolua_server_edit_perform_action04().
bool api_edit_perform_action_unit_vs_tile_extra | ( | lua_State * | L, |
Unit * | punit, | ||
Action * | paction, | ||
Tile * | tgt, | ||
const char * | sub_tgt | ||
) |
Force a unit to perform an action against a tile and an extra.
Definition at line 418 of file api_server_edit.c.
Referenced by tolua_server_edit_perform_action05().
bool api_edit_perform_action_unit_vs_unit | ( | lua_State * | L, |
Unit * | punit, | ||
Action * | paction, | ||
Unit * | tgt | ||
) |
Force a unit to perform an action against a unit.
Definition at line 336 of file api_server_edit.c.
Referenced by tolua_server_edit_perform_action03().
void api_edit_place_partisans | ( | lua_State * | L, |
Tile * | ptile, | ||
Player * | pplayer, | ||
int | count, | ||
int | sq_radius | ||
) |
Place partisans for a player around a tile (normally around a city).
Definition at line 97 of file api_server_edit.c.
Referenced by tolua_server_edit_place_partisans00().
Add history to a player
Definition at line 1196 of file api_server_edit.c.
Referenced by tolua_server_edit_add_player_history00().
Give bulbs to a player, optionally towards a specific tech. If a tech that is not currently in research is specified, tech known state will not immediately change. Out of multiresearch mode, when tech is not NULL, this function sets the "previous" tech (or clears it if the current one is specified); in the case if a new "previous" tech is set, all non-free bulbs of the old "previous" tech are cleared, and if necessary the bulbs on stock are adjusted (for clear switching) as like amount was the previously researched value.
Definition at line 1215 of file api_server_edit.c.
Referenced by tolua_server_edit_give_bulbs00().
Make player winner of the scenario
Definition at line 1112 of file api_server_edit.c.
Referenced by tolua_server_edit_player_victory00().
void api_edit_remove_building | ( | lua_State * | L, |
City * | pcity, | ||
Building_Type * | impr | ||
) |
Remove a building from a city
Definition at line 758 of file api_server_edit.c.
Referenced by tolua_server_edit_remove_building00().
Destroy a city
Definition at line 687 of file api_server_edit.c.
Referenced by tolua_server_edit_remove_city00().
Remove extra from tile, if present
Definition at line 984 of file api_server_edit.c.
Referenced by tolua_server_edit_remove_extra00().
Try to hide tile from player.
Definition at line 1034 of file api_server_edit.c.
Referenced by tolua_server_edit_tile_hide00().
Set tile label text.
Definition at line 1007 of file api_server_edit.c.
Referenced by tolua_server_edit_tile_set_label00().
Reveal tile as it is currently to the player.
Definition at line 1022 of file api_server_edit.c.
Referenced by tolua_server_edit_tile_show00().
Modify player's trait value.
Definition at line 914 of file api_server_edit.c.
Referenced by tolua_server_edit_trait_mod00().
Transfer city from player to another.
Definition at line 698 of file api_server_edit.c.
Referenced by tolua_server_edit_transfer_city00().
bool api_edit_unit_hitpoints | ( | lua_State * | L, |
Unit * | self, | ||
int | change, | ||
const char * | reason, | ||
Player * | killer | ||
) |
Change unit hitpoints. Reason and killer are used if unit dies.
Definition at line 575 of file api_server_edit.c.
Referenced by tolua_server_edit_unit_add_hitpoints00().
Kill the unit.
Definition at line 555 of file api_server_edit.c.
Referenced by tolua_server_edit_unit_kill00().
bool api_edit_unit_move | ( | lua_State * | L, |
Unit * | punit, | ||
Tile * | ptile, | ||
int | movecost, | ||
Unit * | embark_to, | ||
bool | disembark, | ||
bool | conquer_city, | ||
bool | conquer_extra, | ||
bool | enter_hut, | ||
bool | frighten_hut | ||
) |
Move a unit.
Definition at line 1123 of file api_server_edit.c.
Referenced by tolua_server_edit_unit_move00().
Change unit move points.
Definition at line 611 of file api_server_edit.c.
Referenced by tolua_server_edit_unit_add_movepoints00().
Allow unit to move
Definition at line 1172 of file api_server_edit.c.
Referenced by tolua_server_edit_movement_allow00().
Prohibit unit from moving
Definition at line 1159 of file api_server_edit.c.
Referenced by tolua_server_edit_movement_disallow00().
bool api_edit_unit_teleport | ( | lua_State * | L, |
Unit * | punit, | ||
Tile * | dest, | ||
Unit * | embark_to, | ||
bool | allow_disembark, | ||
bool | conquer_city, | ||
bool | conquer_extra, | ||
bool | enter_hut, | ||
bool | frighten_hut | ||
) |
Teleport unit to destination tile
Definition at line 206 of file api_server_edit.c.
Referenced by tolua_server_edit_unit_teleport00().
Transform punit to ptype, decreasing vet_loss veteranship levels. Returns if the transformation was possible.
Definition at line 542 of file api_server_edit.c.
Referenced by tolua_server_Unit_transform00().
Change unit orientation
Definition at line 506 of file api_server_edit.c.
Referenced by tolua_server_edit_unit_turn00().
Upgrade punit for free in the default manner, lose vet_loss vet levels. Returns if the upgrade was possible.
Definition at line 524 of file api_server_edit.c.
Referenced by tolua_server_Unit_upgrade00().
Unleash barbarians on a tile, for example from a hut
Definition at line 59 of file api_server_edit.c.
Referenced by tolua_server_edit_unleash_barbarians00().