Skip to content

Commit

Permalink
Clear endosymbiosis when entering multicellular (#5864)
Browse files Browse the repository at this point in the history
* Clear endosymbiosis when entering multicellular

* Make new method for clearing all endosymbiosis targets
  • Loading branch information
CI09 authored Feb 11, 2025
1 parent 5e1fe5c commit 1edc671
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/general/EndosymbiosisData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,15 @@ public bool CancelEndosymbiosisTarget(int targetSpeciesId)
return true;
}

public bool CancelAllEndosymbiosisTargets()
{
if (StartedEndosymbiosis == null)
return false;

StartedEndosymbiosis = null;
return true;
}

public InProgressEndosymbiosis MarkEndosymbiosisDone(InProgressEndosymbiosis endosymbiosisToComplete)
{
if (StartedEndosymbiosis == null)
Expand Down
2 changes: 2 additions & 0 deletions src/microbe_stage/MicrobeStage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,8 @@ public void MoveToMulticellular()
throw new Exception("failed to keep the current scene root");
}

GameWorld.PlayerSpecies.Endosymbiosis.CancelAllEndosymbiosisTargets();

// TODO: The multicellular stage needs to be able to track statistics and not break organelle unlocks
GameWorld.UnlockProgress.UnlockAll = true;

Expand Down

0 comments on commit 1edc671

Please sign in to comment.