Freeciv-3.2
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
29void api_edit_place_partisans(lua_State *L, Tile *ptile, Player *pplayer,
30 int count, int sq_radius);
33 City *homecity, int moves_left);
36 City *homecity, int moves_left, int hp_left,
40 bool conquer_city, bool conquer_extra,
41 bool enter_hut, bool frighten_hut);
42
44 Action *paction, City *tgt);
46 Action *paction, City *tgt,
49 Action *paction, City *tgt,
52 Action *paction, Unit *tgt);
54 Action *paction, Tile *tgt);
56 Action *paction, Tile *tgt,
57 const char *sub_tgt);
60
62
65 int vet_loss);
66
67void api_edit_unit_kill(lua_State *L, Unit *punit, const char *reason,
68 Player *killer);
69bool api_edit_unit_hitpoints(lua_State *L, Unit *self, int change,
70 const char *reason, Player *killer);
71void api_edit_unit_movepoints(lua_State *L, Unit *self, int change);
72
74
75bool api_edit_create_city(lua_State *L, Player *pplayer, Tile *ptile,
76 const char *name);
81Player *api_edit_create_player(lua_State *L, const char *username,
82 Nation_Type *pnation, const char *ai);
83void api_edit_change_gold(lua_State *L, Player *pplayer, int amount);
86 Tech_Type *ptech, int cost, bool notify,
87 const char *reason);
89 const char *tname, const int mod);
90
91void api_edit_create_owned_extra(lua_State *L, Tile *ptile, const char *name,
92 struct player *pplayer);
93void api_edit_create_extra(lua_State *L, Tile *ptile, const char *name);
94void api_edit_create_base(lua_State *L, Tile *ptile, const char *name,
95 struct player *pplayer);
96void api_edit_create_road(lua_State *L, Tile *ptile, const char *name);
97void api_edit_remove_extra(lua_State *L, Tile *ptile, const char *name);
98
99void api_edit_tile_set_label(lua_State *L, Tile *ptile, const char *label);
100void api_edit_tile_show(lua_State *L, Tile *ptile, Player *pplayer);
101bool api_edit_tile_hide(lua_State *L, Tile *ptile, Player *pplayer);
102
104 int effect);
106
107
110 int movecost,
112 bool conquer_city, bool conquer_extra,
113 bool enter_hut, bool frighten_hut);
116
119
121 Tech_Type *tech);
122
123#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_player_give_bulbs(lua_State *L, Player *pplayer, int amount, Tech_Type *tech)
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)
void api_edit_unit_movepoints(lua_State *L, Unit *self, int change)
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)
bool api_edit_transfer_city(lua_State *L, City *pcity, Player *new_owner)
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)
bool api_edit_unit_hitpoints(lua_State *L, Unit *self, int change, const char *reason, Player *killer)
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_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_upgrade(lua_State *L, Unit *punit, int vet_loss)
void api_edit_change_infrapoints(lua_State *L, Player *pplayer, int amount)
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 struct ai_type * self
Definition classicai.c:45
char * incite_cost
Definition comments.c:75
static void conquer_city(QVariant data1, QVariant data2)
Definition dialogs.cpp:1853
static void enter_hut(QVariant data1, QVariant data2)
Definition dialogs.cpp:2658
static void frighten_hut(QVariant data1, QVariant data2)
Definition dialogs.cpp:2688
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:74
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:74
GType type
Definition repodlgs.c:1313
const char * name
Definition inputfile.c:127
enum direction8 Direction
Definition city.h:320
Definition tile.h:50
Definition unit.h:138