#include "conq.h"#include "kernel.h"Include dependency graph for economy.c:

Classes | |
| struct | a_materialhandler |
Defines | |
| #define | CHECK_MAXGAP |
Typedefs | |
| typedef a_materialhandler | MaterialHandler |
Enumerations | |
| enum | MaterialHandlerType { mh_unit, mh_treasury, mh_cell } |
Functions | |
| void | run_economy (void) |
| void | try_sharing (Unit *from, Unit *to, int m) |
| void | run_all_consumption (void) |
| void | maybe_starve (Unit *unit, int partial) |
Variables | |
| short | any_unit_production = -1 |
| short | any_terrain_production = -1 |
| short | any_people_production = -1 |
| short | any_people_consumption = -1 |
| short | any_cell_consumption = -1 |
| short | any_unit_base_consumption = -1 |
| short | any_unit_starvation = -1 |
| short | max_terrain_to_terrain_length = -1 |
| int | tmpexcess |
| int | tmpneed |
|
|
Value: if (can_transfer_material(m, mh_from+from_ptr, &mh_tmp)) { \ gap = material_gap(mh_from+from_ptr, &mh_tmp); \ if (gap > maxgap) tiesize = 0; \ if ((gap >= maxgap) && (xrandom(++tiesize) == 0)) { \ maxgap = gap; \ mh_to = mh_tmp; \ } \ } |
|
|
|
|
|
|
|
||||||||||||
|
|
|
|
|
|
|
|
|
||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.3.6