18 #include "gb/files_shl.h" 21 #include "gb/tweakables.h" 26 int maxsupport(
const Race *r,
const Sector &s,
const double c,
28 if (!r->likes[s.condition])
return 0.0;
29 double a = ((
double)s.eff + 1.0) * (
double)s.fert;
32 int val = (
int)(a * b * .01 * (100.0 - (
double)toxic));
41 double atmosphere = 1.0;
44 add = 0.1 * ((
double)planet.conditions[
TEMP] - race->conditions[
TEMP]);
45 sum = 1.0 - (
double)abs(add) / 100.0;
49 add = (
double)planet.conditions[i] - race->conditions[i];
50 atmosphere *= 1.0 - (
double)abs(add) / 100.0;
53 sum *= 100.0 - planet.conditions[
TOXIC];
55 if (sum < 0.0)
return 0.0;
60 return (
double)(p.Maxx) * (
double)(p.Maxy) *
GRAV_FACTOR;
66 switch (s->whatorbits) {
67 case ScopeLevel::LEVEL_UNIV:
70 case ScopeLevel::LEVEL_STAR:
73 case ScopeLevel::LEVEL_PLAN:
75 Stars[s->storbits]->pnames[s->pnumorbits]);
77 case ScopeLevel::LEVEL_SHIP:
78 if (
auto mothership = getship(s->destshipno); mothership) {
79 motherorbits = prin_ship_orbits(&*mothership);
static char Dispshiporbits_buf[PLACENAMESIZE+13]
char * prin_ship_orbits(Ship *s)
double compatibility(const Planet &planet, const Race *race)
double gravity(const Planet &p)
int maxsupport(const Race *r, const Sector &s, const double c, const int toxic)