// 30% of solids stays in body
AddMass(res, amount * 0.3 * composition.Compatibility(res));
} else {
- // 5% of fluids stays in body
- AddMass(res, amount * 0.05 * composition.Compatibility(res));
+ // 10% of fluids stays in body
+ AddMass(res, amount * 0.1 * composition.Compatibility(res));
}
math::GaloisLFSR &random = sim.Assets().random;
if (random.UNorm() < AdaptChance()) {
double color_divisor = 0.0;
if (p.HasAtmosphere()) {
- c.AddMass(p.Atmosphere(), 0.01);
+ c.AddMass(p.Atmosphere(), 0.005);
color_avg += c.GetSimulation().Resources()[p.Atmosphere()].base_color * 0.1;
color_divisor += 0.1;
}
a->Name(c.GetSimulation().Assets().name.Sequential());
c.GetGenome().Configure(*a);
for (const auto &cmp : c.GetComposition()) {
- a->AddMass(cmp.resource, cmp.value * 0.5);
+ // require at least 0.1%
+ if (cmp.value > 0.002) {
+ a->AddMass(cmp.resource, cmp.value * 0.5);
+ }
}
s.GetPlanet().AddCreature(a);
// TODO: duplicate situation somehow
b->Name(c.GetSimulation().Assets().name.Sequential());
c.GetGenome().Configure(*b);
for (const auto &cmp : c.GetComposition()) {
- b->AddMass(cmp.resource, cmp.value * 0.5);
+ // require at least 0.1%
+ if (cmp.value > 0.002) {
+ b->AddMass(cmp.resource, cmp.value * 0.5);
+ }
}
s.GetPlanet().AddCreature(b);
b->GetSituation().SetPlanetSurface(
GetSteering().ResumeSeparate();
}
- // use boredom as chance per minute
- if (Random().UNorm() < GetStats().Boredom().value * (1.0 / 3600.0)) {
+ // use boredom as chance per 30s
+ if (Random().UNorm() < GetStats().Boredom().value * (1.0 / 1800.0)) {
PickActivity();
}
}
}
if (ingesting) {
if (OnSuitableTile() && !GetSituation().Moving()) {
- GetCreature().Ingest(resource, yield * GetCreature().GetComposition().Compatibility(resource) * dt);
- stat.Add(-1.0 * yield * dt);
+ GetCreature().Ingest(resource, yield * dt);
+ stat.Add(-1.0 * yield * GetCreature().GetComposition().Compatibility(resource) * dt);
if (stat.Empty()) {
SetComplete();
}
void CreaturePanel::Draw(graphics::Viewport &viewport) noexcept {
if (!c) return;
- name->Text(c->Name());
+ std::string name_str(c->Name());
+ if (c->Dead()) {
+ name_str += " (deceased)";
+ }
+ name->Text(name_str);
age->Text(TimeString(c->Age()));
mass->Text(MassString(c->Mass()));
size->Text(LengthString(c->Size()));