Freeciv-3.3: /fast/freeciv/nightly/main/server/unithand.h Source File

Freeciv-3.3

Loading...
Searching...
No Matches
unithand.h
Go to the documentation of this file.
1/***********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
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#ifndef FC__UNITHAND_H
14#define FC__UNITHAND_H
15
16/* common */
17#include "explanation.h"
18#include "unit.h"
19
20/* server */
21#include <hand_gen.h> /* <> so looked from the build directory first. */
22
23bool unit_activity_handling(struct unit *punit,
24 enum unit_activity new_activity,
25 enum gen_action trigger_action);
26bool unit_activity_handling_targeted(struct unit *punit,
27 enum unit_activity new_activity,
28 struct extra_type **new_target,
29 enum gen_action trigger_action);
30void unit_change_homecity_handling(struct unit *punit, struct city *new_pcity,
31 bool rehome);
32
33bool unit_move_handling(struct unit *punit, struct tile *pdesttile,
34 bool move_diplomat_city);
35
36void unit_do_action(struct player *pplayer,
37 const int actor_id,
38 const int target_id,
39 const int sub_tgt_id,
40 const char *name,
41 const action_id action_type);
42
43bool unit_perform_action(struct player *pplayer,
44 const int actor_id,
45 const int target_id,
46 const int sub_tgt_id,
47 const char *name,
48 const action_id action_type,
49 const enum action_requester requester);
50
51void illegal_action_msg(struct player *pplayer,
52 const enum event_type event,
53 struct unit *actor,
54 const action_id stopped_action,
55 const struct tile *target_tile,
56 const struct city *target_city,
57 const struct unit *target_unit);
58
59enum ane_kind action_not_enabled_reason(struct unit *punit,
60 action_id act_id,
61 const struct tile *target_tile,
62 const struct city *target_city,
63 const struct unit *target_unit);
64
65bool unit_server_side_agent_set(struct player *pplayer,
66 struct unit *punit,
67 enum server_side_agent agent);
68
69#endif /* FC__UNITHAND_H */
incite_cost
char * incite_cost
Definition comments.c:74
target_unit
struct unit struct city struct unit * target_unit
Definition dialogs_g.h:56
actor
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit * actor
Definition dialogs_g.h:73
target_tile
struct unit struct city struct unit struct tile * target_tile
Definition dialogs_g.h:57
punit
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
target_city
struct unit struct city * target_city
Definition dialogs_g.h:56
event
enum event_type event
Definition events.c:81
explanation.h
ane_kind
ane_kind
Definition explanation.h:22
action_id
int action_id
Definition fc_types.h:393
hand_gen.h
name
const char * name
Definition inputfile.c:127
agent
Definition agents.h:40
city
Definition city.h:320
extra_type
Definition extras.h:88
player
Definition player.h:249
tile
Definition tile.h:50
unit
Definition unit.h:140
unit.h
unit_activity_handling_targeted
bool unit_activity_handling_targeted(struct unit *punit, enum unit_activity new_activity, struct extra_type **new_target, enum gen_action trigger_action)
Definition unithand.c:6685
illegal_action_msg
void illegal_action_msg(struct player *pplayer, const enum event_type event, struct unit *actor, const action_id stopped_action, const struct tile *target_tile, const struct city *target_city, const struct unit *target_unit)
Definition unithand.c:2514
unit_move_handling
bool unit_move_handling(struct unit *punit, struct tile *pdesttile, bool move_diplomat_city)
Definition unithand.c:5679
unit_activity_handling
bool unit_activity_handling(struct unit *punit, enum unit_activity new_activity, enum gen_action trigger_action)
Definition unithand.c:6613
unit_do_action
void unit_do_action(struct player *pplayer, const int actor_id, const int target_id, const int sub_tgt_id, const char *name, const action_id action_type)
Definition unithand.c:3317
unit_change_homecity_handling
void unit_change_homecity_handling(struct unit *punit, struct city *new_pcity, bool rehome)
Definition unithand.c:4040
unit_server_side_agent_set
bool unit_server_side_agent_set(struct player *pplayer, struct unit *punit, enum server_side_agent agent)
Definition unithand.c:6513
action_not_enabled_reason
enum ane_kind action_not_enabled_reason(struct unit *punit, action_id act_id, const struct tile *target_tile, const struct city *target_city, const struct unit *target_unit)
Definition unithand.c:1935
unit_perform_action
bool unit_perform_action(struct player *pplayer, const int actor_id, const int target_id, const int sub_tgt_id, const char *name, const action_id action_type, const enum action_requester requester)
Definition unithand.c:3337