Freeciv-3.2
Loading...
Searching...
No Matches
advspace.c
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
14#ifdef HAVE_CONFIG_H
15#include <fc_config.h>
16#endif
17
18/* common */
19#include "government.h"
20#include "packets.h"
21#include "spaceship.h"
22
23/* server */
24#include "spacerace.h"
25
26#include "advspace.h"
27
28/************************************************************************/
33bool adv_spaceship_autoplace(struct player *pplayer,
34 struct player_spaceship *ship)
35{
37 bool retval = FALSE;
38 bool placed;
39
40 do {
42
43 if (placed) {
45 place.type, place.num)) {
46 /* A part was placed. It was placed even if the placement of future
47 * parts will fail. */
48 retval = TRUE;
49 } else {
50 /* Unable to place this part. Don't try to place it again. */
51 break;
52 }
53 }
54 } while (placed);
55
56 return retval;
57}
bool adv_spaceship_autoplace(struct player *pplayer, struct player_spaceship *ship)
Definition advspace.c:33
char * incite_cost
Definition comments.c:75
bool do_spaceship_place(struct player *pplayer, enum action_requester from, enum spaceship_place_type type, int num)
Definition spacerace.c:215
bool next_spaceship_component(struct player *pplayer, struct player_spaceship *ship, struct spaceship_component *fill)
Definition spaceship.c:130
#define TRUE
Definition support.h:46
#define FALSE
Definition support.h:47