Freeciv-3.1
Loading...
Searching...
No Matches
api_server_edit.h
Go to the documentation of this file.
1/*****************************************************************************
2 Freeciv - Copyright (C) 2005 - The Freeciv Project
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12*****************************************************************************/
13
14#ifndef FC__API_SERVER_EDIT_H
15#define FC__API_SERVER_EDIT_H
16
17/* common/scriptcore */
18#include "luascript_types.h"
19
20struct lua_State;
21
22/* type of climate change */
27
28bool api_edit_unleash_barbarians(lua_State *L, Tile *ptile);
29void api_edit_place_partisans(lua_State *L, Tile *ptile, Player *pplayer,
30 int count, int sq_radius);
31Unit *api_edit_create_unit(lua_State *L, Player *pplayer, Tile *ptile,
32 Unit_Type *ptype, int veteran_level,
33 City *homecity, int moves_left);
34Unit *api_edit_create_unit_full(lua_State *L, Player *pplayer, Tile *ptile,
35 Unit_Type *ptype, int veteran_level,
36 City *homecity, int moves_left, int hp_left,
37 Unit *ptransport);
38bool api_edit_unit_teleport(lua_State *L, Unit *punit, Tile *dest,
39 Unit *embark_to, bool allow_disembark,
40 bool conquer_city, bool conquer_extra,
41 bool enter_hut, bool frighten_hut);
42bool api_edit_unit_teleport_old(lua_State *L, Unit *punit, Tile *dest);
43
45 Action *paction, City *tgt);
47 Action *paction, City *tgt,
48 Building_Type *sub_tgt);
50 Action *paction, City *tgt,
51 Tech_Type *sub_tgt);
53 Action *paction, Unit *tgt);
55 Action *paction, Tile *tgt);
57 Action *paction, Tile *tgt,
58 const char *sub_tgt);
60 Action *paction);
61
62void api_edit_unit_turn(lua_State *L, Unit *punit, Direction dir);
63
64bool api_edit_unit_upgrade(lua_State *L, Unit *punit, int vet_loss);
65bool api_edit_unit_transform(lua_State *L, Unit *punit, Unit_Type *ptype,
66 int vet_loss);
67
68void api_edit_unit_kill(lua_State *L, Unit *punit, const char *reason,
69 Player *killer);
70
71bool api_edit_change_terrain(lua_State *L, Tile *ptile, Terrain *pterr);
72
73bool api_edit_create_city(lua_State *L, Player *pplayer, Tile *ptile,
74 const char *name);
75void api_edit_remove_city(lua_State *L, City *pcity);
76void api_edit_create_building(lua_State *L, City *pcity, Building_Type *impr);
77void api_edit_remove_building(lua_State *L, City *pcity, Building_Type *impr);
78Player *api_edit_create_player(lua_State *L, const char *username,
79 Nation_Type *pnation, const char *ai);
80void api_edit_change_gold(lua_State *L, Player *pplayer, int amount);
81Tech_Type *api_edit_give_technology(lua_State *L, Player *pplayer,
82 Tech_Type *ptech, int cost, bool notify,
83 const char *reason);
84bool api_edit_trait_mod_set(lua_State *L, Player *pplayer,
85 const char *tname, const int mod);
86
87void api_edit_create_owned_extra(lua_State *L, Tile *ptile, const char *name,
88 struct player *pplayer);
89void api_edit_create_extra(lua_State *L, Tile *ptile, const char *name);
90void api_edit_create_base(lua_State *L, Tile *ptile, const char *name,
91 struct player *pplayer);
92void api_edit_create_road(lua_State *L, Tile *ptile, const char *name);
93void api_edit_remove_extra(lua_State *L, Tile *ptile, const char *name);
94
95void api_edit_tile_set_label(lua_State *L, Tile *ptile, const char *label);
96void api_edit_tile_show(lua_State *L, Tile *ptile, Player *pplayer);
97bool api_edit_tile_hide(lua_State *L, Tile *ptile, Player *pplayer);
98
100 int effect);
101Player *api_edit_civil_war(lua_State *L, Player *pplayer, int probability);
102
103
104void api_edit_player_victory(lua_State *L, Player *pplayer);
105bool api_edit_unit_move(lua_State *L, Unit *punit, Tile *ptile,
106 int movecost,
107 Unit *embark_to, bool allow_disembark,
108 bool conquer_city, bool conquer_extra,
109 bool enter_hut, bool frighten_hut);
110bool api_edit_unit_move_old(lua_State *L, Unit *punit, Tile *ptile,
111 int movecost);
112void api_edit_unit_moving_disallow(lua_State *L, Unit *punit);
113void api_edit_unit_moving_allow(lua_State *L, Unit *punit);
114
115void api_edit_city_add_history(lua_State *L, City *pcity, int amount);
116void api_edit_player_add_history(lua_State *L, Player *pplayer, int amount);
117
118void api_edit_player_give_bulbs(lua_State *L, Player *pplayer, int amount);
119
120#endif /* API_SERVER_EDIT_H */
bool api_edit_perform_action_unit_vs_tile_extra(lua_State *L, Unit *punit, Action *paction, Tile *tgt, const char *sub_tgt)
bool api_edit_perform_action_unit_vs_tile(lua_State *L, Unit *punit, Action *paction, Tile *tgt)
void api_edit_climate_change(lua_State *L, enum climate_change_type type, int effect)
void api_edit_unit_moving_allow(lua_State *L, Unit *punit)
void api_edit_remove_city(lua_State *L, City *pcity)
bool api_edit_trait_mod_set(lua_State *L, Player *pplayer, const char *tname, const int mod)
bool api_edit_unleash_barbarians(lua_State *L, Tile *ptile)
void api_edit_remove_building(lua_State *L, City *pcity, Building_Type *impr)
void api_edit_player_victory(lua_State *L, Player *pplayer)
void api_edit_create_extra(lua_State *L, Tile *ptile, const char *name)
Unit * api_edit_create_unit(lua_State *L, Player *pplayer, Tile *ptile, Unit_Type *ptype, int veteran_level, City *homecity, int moves_left)
climate_change_type
@ CLIMATE_CHANGE_GLOBAL_WARMING
@ CLIMATE_CHANGE_NUCLEAR_WINTER
bool api_edit_perform_action_unit_vs_unit(lua_State *L, Unit *punit, Action *paction, Unit *tgt)
void api_edit_player_add_history(lua_State *L, Player *pplayer, int amount)
Tech_Type * api_edit_give_technology(lua_State *L, Player *pplayer, Tech_Type *ptech, int cost, bool notify, const char *reason)
bool api_edit_perform_action_unit_vs_city_impr(lua_State *L, Unit *punit, Action *paction, City *tgt, Building_Type *sub_tgt)
void api_edit_create_building(lua_State *L, City *pcity, Building_Type *impr)
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)
void api_edit_player_give_bulbs(lua_State *L, Player *pplayer, int amount)
bool api_edit_change_terrain(lua_State *L, Tile *ptile, Terrain *pterr)
bool api_edit_unit_move(lua_State *L, Unit *punit, Tile *ptile, int movecost, Unit *embark_to, bool allow_disembark, bool conquer_city, bool conquer_extra, bool enter_hut, bool frighten_hut)
void api_edit_tile_show(lua_State *L, Tile *ptile, Player *pplayer)
void api_edit_unit_kill(lua_State *L, Unit *punit, const char *reason, Player *killer)
bool api_edit_tile_hide(lua_State *L, Tile *ptile, Player *pplayer)
void api_edit_unit_turn(lua_State *L, Unit *punit, Direction dir)
void api_edit_place_partisans(lua_State *L, Tile *ptile, Player *pplayer, int count, int sq_radius)
void api_edit_remove_extra(lua_State *L, Tile *ptile, const char *name)
void api_edit_create_base(lua_State *L, Tile *ptile, const char *name, struct player *pplayer)
void api_edit_tile_set_label(lua_State *L, Tile *ptile, const char *label)
void api_edit_create_road(lua_State *L, Tile *ptile, const char *name)
bool api_edit_unit_move_old(lua_State *L, Unit *punit, Tile *ptile, int movecost)
bool api_edit_perform_action_unit_vs_city(lua_State *L, Unit *punit, Action *paction, City *tgt)
void api_edit_city_add_history(lua_State *L, City *pcity, int amount)
bool api_edit_create_city(lua_State *L, Player *pplayer, Tile *ptile, const char *name)
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)
void api_edit_unit_moving_disallow(lua_State *L, Unit *punit)
bool api_edit_unit_teleport_old(lua_State *L, Unit *punit, Tile *dest)
bool api_edit_unit_upgrade(lua_State *L, Unit *punit, int vet_loss)
void api_edit_create_owned_extra(lua_State *L, Tile *ptile, const char *name, struct player *pplayer)
bool api_edit_perform_action_unit_vs_self(lua_State *L, Unit *punit, Action *paction)
Player * api_edit_create_player(lua_State *L, const char *username, Nation_Type *pnation, const char *ai)
bool api_edit_unit_transform(lua_State *L, Unit *punit, Unit_Type *ptype, int vet_loss)
void api_edit_change_gold(lua_State *L, Player *pplayer, int amount)
Player * api_edit_civil_war(lua_State *L, Player *pplayer, int probability)
bool api_edit_perform_action_unit_vs_city_tech(lua_State *L, Unit *punit, Action *paction, City *tgt, Tech_Type *sub_tgt)
static void conquer_city(QVariant data1, QVariant data2)
Definition dialogs.cpp:1832
static void enter_hut(QVariant data1, QVariant data2)
Definition dialogs.cpp:2571
static void frighten_hut(QVariant data1, QVariant data2)
Definition dialogs.cpp:2601
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit * punit
Definition dialogs_g.h:73
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit int cost
Definition dialogs_g.h:73
GType type
Definition repodlgs.c:1312
const char * name
Definition inputfile.c:127
enum direction8 Direction
Definition city.h:309
Definition tile.h:49
Definition unit.h:138