Skip to content
Closed
Show file tree
Hide file tree
Changes from 56 commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
6621227
Update OsmoregulationAndHealingSystem.cs
domin2ktr Jun 1, 2025
1feac80
Update OsmoregulationAndHealingSystem.cs
domin2ktr Jun 1, 2025
491d69e
Update ProcessSystem.cs
domin2ktr Jun 1, 2025
29ddb52
Update OsmoregulationAndHealingSystem.cs
domin2ktr Jun 1, 2025
97ed6be
Update ProcessSystem.cs
domin2ktr Jun 1, 2025
4046b10
Update ProcessSystem.cs
domin2ktr Jun 1, 2025
bd31a52
Update ProcessSystem.cs
domin2ktr Jun 1, 2025
c8f1390
Update ProcessSystem.cs
domin2ktr Jun 1, 2025
ef16ec6
Update SimulationCache.cs
domin2ktr Jun 1, 2025
e994c3f
Update OsmoregulationAndHealingSystem.cs
domin2ktr Jun 1, 2025
60676bd
Update ProcessSystem.cs
domin2ktr Jun 1, 2025
7b3199b
Update ProcessSystem.cs
domin2ktr Jun 1, 2025
ebf9b69
Update SimulationCache.cs
domin2ktr Jun 2, 2025
3a483a8
Update SimulationCache.cs
domin2ktr Jun 2, 2025
2fd94d3
Update MicrobeEnvironmentalToleranceCalculations.cs
domin2ktr Jun 2, 2025
7844a7c
Update MicrobeEnvironmentalToleranceCalculations.cs
domin2ktr Jun 2, 2025
d8bf393
Update MicrobeEnvironmentalToleranceCalculations.cs
domin2ktr Jun 2, 2025
6f304c9
Update SimulationCache.cs
domin2ktr Jun 10, 2025
63f623e
Update MicrobeEnvironmentalToleranceCalculations.cs
domin2ktr Jun 10, 2025
6c063fc
Update MicrobeMovementSystem.cs
domin2ktr Jul 24, 2025
949ab3f
Update MicrobeMovementSystem.cs
domin2ktr Jul 25, 2025
c3cb987
Update MicrobeMovementSystem.cs
domin2ktr Jul 25, 2025
b63907f
Update MicrobeMovementSystem.cs
domin2ktr Jul 25, 2025
9356a3b
Update MicrobeEnvironmentalToleranceCalculations.cs
domin2ktr Aug 9, 2025
eb0391b
Update Constants.cs
domin2ktr Aug 9, 2025
eb212df
Update MicrobeMovementSystem.cs
domin2ktr Aug 9, 2025
b5ca5ad
Update ProcessSystem.cs
domin2ktr Aug 9, 2025
54fd9dd
Update ProcessSystem.cs
domin2ktr Aug 9, 2025
2ca2009
Update ProcessSystem.cs
domin2ktr Aug 10, 2025
482c3ed
Update SimulationCache.cs
domin2ktr Aug 10, 2025
0b1c9b4
Update OsmoregulationAndHealingSystem.cs
domin2ktr Aug 10, 2025
7a79d0a
Update OsmoregulationAndHealingSystem.cs
domin2ktr Aug 10, 2025
6935e9a
Update OsmoregulationAndHealingSystem.cs
domin2ktr Aug 10, 2025
2d537b3
Update SimulationCache.cs
domin2ktr Aug 20, 2025
e3a954b
Update ProcessSystem.cs
domin2ktr Aug 30, 2025
a780ea2
Update ProcessSystem.cs
domin2ktr Aug 30, 2025
0cde3d7
Update ProcessSystem.cs
domin2ktr Aug 30, 2025
3a06bf1
Update ProcessSystem.cs
domin2ktr Sep 3, 2025
b99a5d0
Update ProcessSystem.cs
domin2ktr Sep 3, 2025
29bf093
Update ProcessSystem.cs
domin2ktr Sep 3, 2025
2c0b80b
Update ProcessSystem.cs
domin2ktr Sep 3, 2025
44f3057
Update ProcessSystem.cs
domin2ktr Sep 3, 2025
87c86de
Update ProcessSystem.cs
domin2ktr Sep 10, 2025
d28bfc7
Update ProcessSystem.cs
domin2ktr Sep 11, 2025
95d1d77
Update Constants.cs
domin2ktr Sep 11, 2025
550e2a6
Update OsmoregulationAndHealingSystem.cs
domin2ktr Sep 11, 2025
47ddcd5
Update OsmoregulationAndHealingSystem.cs
domin2ktr Sep 11, 2025
13f8e33
Update ProcessSystem.cs
domin2ktr Sep 11, 2025
01c0e96
Merge branch 'master' into master
domin2ktr Sep 25, 2025
6a873f9
Merge branch 'master' into master
domin2ktr Sep 28, 2025
304c932
Update OsmoregulationAndHealingSystem.cs
domin2ktr Sep 28, 2025
8b7f74c
Update Constants.cs
domin2ktr Oct 3, 2025
6bb6a67
Merge branch 'master' into master
domin2ktr Oct 3, 2025
702be3b
Merge branch 'master' into master
domin2ktr Oct 10, 2025
9169f5b
Update en.po
domin2ktr Oct 10, 2025
017221d
Update ru.po
domin2ktr Oct 10, 2025
1dd93a8
Merge branch 'master' into master
domin2ktr Oct 12, 2025
20aa40b
Update en.po
domin2ktr Oct 16, 2025
1b0b86e
Update ru.po
domin2ktr Oct 16, 2025
721c1c2
Update Constants.cs
domin2ktr Dec 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion locale/en.po
Original file line number Diff line number Diff line change
Expand Up @@ -4376,7 +4376,7 @@ msgid "NUCLEUS_DESCRIPTION"
msgstr "The defining feature of eukaryotic cells. The nucleus also includes the endoplasmic reticulum and the Golgi body. It is an evolution of prokaryotic cells to develop a system of internal membranes, done by assimilating another prokaryote inside of themselves. This allows them to compartmentalize, or ward off, the different processes happening inside the cell and prevent them from overlapping. This allows their new membrane-bound organelles to be much more complex, efficient, and specialized than if they were free-floating in the cytoplasm. However, this comes at the cost of making the cell much larger and requiring a lot of the cell's energy to maintain."

msgid "NUCLEUS_SMALL_DESCRIPTION"
msgstr "Allows for the evolution of more complex, membrane-bound organelles and reduces the damage taken by 50%. Costs a lot of ATP to maintain. This is an irreversible evolution."
msgstr "Allows for the evolution of more complex, membrane-bound organelles and reduces the damage taken by 50%. Reduces osmoregulation and basic movement costs by 25%, causing the nucleus to become energy positive when the cell size is greater than 40 hexes. Costs a lot of ATP to maintain. This is an irreversible evolution."

msgid "NUMLOCK"
msgstr "Num Lock"
Expand Down
2 changes: 1 addition & 1 deletion locale/ru.po

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions simulation_parameters/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,10 @@ public static class Constants
/// </remarks>
public const float BASE_MOVEMENT_ATP_COST = 1.0f;

public const float NUCLEUS_MOVEMENT_COST_MODIFIER = 0.75f;

public const float NUCLEUS_OSMOREGULATION_COST_MODIFIER = 0.75f;

public const float BASE_MOVEMENT_FORCE = 900.0f;

public const float MAX_STRAIN_PER_ENTITY = 400.0f;
Expand Down
5 changes: 5 additions & 0 deletions src/microbe_stage/systems/MicrobeMovementSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,11 @@ private Vector3 CalculateMovementForce(in Entity entity, ref MicrobeControl cont
// movement cost
var cost = Constants.BASE_MOVEMENT_ATP_COST * organelles.HexCount * length * delta * strainMultiplier;

if (!cellProperties.IsBacteria)
{
cost *= Constants.NUCLEUS_MOVEMENT_COST_MODIFIER;
}

var got = compounds.TakeCompound(Compound.ATP, cost);

// Halve base movement speed if out of ATP
Expand Down
6 changes: 6 additions & 0 deletions src/microbe_stage/systems/OsmoregulationAndHealingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,12 @@ private void TakeOsmoregulationEnergyCost(in Entity entity, ref CellProperties c
osmoregulationCost *= 20.0f / (20.0f + colonySize);
}

// 30% osmoregulation bonus if have nucleus
if (!cellProperties.IsBacteria)
{
osmoregulationCost *= Constants.NUCLEUS_OSMOREGULATION_COST_MODIFIER;
}

var environmentalMultiplier = environmentalEffects.OsmoregulationMultiplier;

// TODO: remove this safety check once it is no longer possible for this problem to happen
Expand Down
18 changes: 18 additions & 0 deletions src/microbe_stage/systems/ProcessSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ namespace Systems;
[RuntimeCost(26)]
public partial class ProcessSystem : BaseSystem<World, float>
{
public static OrganelleDefinition Nucleus = SimulationParameters.Instance.GetOrganelleType("nucleus");

#if CHECK_USED_STATISTICS
private readonly List<ProcessStatistics> usedStatistics = new();
#endif
Expand Down Expand Up @@ -811,6 +813,8 @@ private static void CalculateSimplePartOfEnergyBalance(IReadOnlyList<OrganelleTe

int hexCount = 0;

bool hasNucleus = false;

int organelleCount = organelles.Count;
for (int i = 0; i < organelleCount; ++i)
{
Expand Down Expand Up @@ -839,9 +843,18 @@ private static void CalculateSimplePartOfEnergyBalance(IReadOnlyList<OrganelleTe

// Store hex count
hexCount += organelle.Definition.HexCount;

if (organelle.Definition == Nucleus)
hasNucleus = true;
}

var baseMovement = Constants.BASE_MOVEMENT_ATP_COST * hexCount;

if (hasNucleus)
{
baseMovement *= Constants.NUCLEUS_MOVEMENT_COST_MODIFIER;
}

result.BaseMovement += baseMovement;

if (includeMovementCost)
Expand All @@ -858,6 +871,11 @@ private static void CalculateSimplePartOfEnergyBalance(IReadOnlyList<OrganelleTe
var osmoregulation = Constants.ATP_COST_FOR_OSMOREGULATION * hexCount *
membrane.OsmoregulationFactor;

if (hasNucleus)
{
osmoregulation *= Constants.NUCLEUS_OSMOREGULATION_COST_MODIFIER;
}

#if DEBUG
if (environmentTolerances.OsmoregulationModifier <= 0)
throw new ArgumentException("Uninitialized environmental tolerances");
Expand Down