98 ship->structurals =
ship->components =
ship->modules = 0;
101 ship->habitation =
ship->life_support =
ship->solar_panels = 0;
103 ship->launch_year = 9999;
106 ship->support_rate =
ship->energy_rate =
107 ship->success_rate =
ship->travel_time = 0.0;
136 if (
ship->modules > (
ship->habitation +
ship->life_support
137 +
ship->solar_panels)) {
145 ((
ship->habitation <
ship->life_support)
146 && (
ship->solar_panels*2 >=
ship->habitation +
ship->life_support + 1))
148 (
ship->solar_panels*2 <
ship->habitation +
ship->life_support)
150 (
ship->life_support <
ship->habitation)
152 ((
ship->life_support <=
ship->habitation)
153 && (
ship->solar_panels * 2 >=
ship->habitation +
ship->life_support + 1))
158 fill->
num =
ship->habitation + 1;
160 fill->
num =
ship->life_support + 1;
162 fill->
num =
ship->solar_panels + 1;
169 if (
ship->fuel <=
ship->propulsion) {
174 fill->
num =
ship->propulsion + 1;
194 if (
ship->habitation >= 1
197 }
else if (
ship->life_support >= 1
200 }
else if (
ship->solar_panels >= 1
205 if ((
i % 2 == 0 &&
ship->fuel > (
i/2))
206 || (
i % 2 == 1 &&
ship->propulsion > (
i/2))) {
216 if ((
i % 3 == 0 &&
ship->habitation > (
i/3))
217 || (
i % 3 == 1 &&
ship->life_support > (
i/3))
218 || (
i % 3 == 2 &&
ship->solar_panels > (
i/3))) {
#define BV_ISSET(bv, bit)
@ SSHIP_PLACE_LIFE_SUPPORT
@ SSHIP_PLACE_SOLAR_PANELS
#define fc_assert(condition)
#define fc_assert_ret_val(condition, val)
int num_spaceship_structurals_placed(const struct player_spaceship *ship)
bool next_spaceship_component(struct player *pplayer, struct player_spaceship *ship, struct spaceship_component *fill)
void spaceship_init(struct player_spaceship *ship)
const struct sship_part_info structurals_info[NUM_SS_STRUCTURALS]
const struct sship_part_info modules_info[NUM_SS_MODULES]
const struct sship_part_info components_info[NUM_SS_COMPONENTS]
#define NUM_SS_COMPONENTS
#define NUM_SS_STRUCTURALS
enum spaceship_place_type type