Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Revolutionary-Games/Thrive into S…
Browse files Browse the repository at this point in the history
…ulfurChunks
  • Loading branch information
HexapodPhilosopher committed Dec 13, 2024
2 parents 39184ec + 07610e7 commit de8a4be
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/microbe_stage/ProcessList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ public IEnumerable<IProcessDisplayInfo>? ProcessesToShow
/// </summary>
public bool MarkRedOnLimitingCompounds { get; set; }

/// <summary>
/// If true the created process objects have <see cref="ChemicalEquation.AutoRefreshProcess"/> set to true
/// </summary>
public bool UpdateEquationAutomatically { get; set; } = true;

public override void _Ready()
{
chemicalEquationScene = GD.Load<PackedScene>("res://src/gui_common/ChemicalEquation.tscn");
Expand Down Expand Up @@ -85,6 +90,7 @@ private ChemicalEquation CreateEquation(StrictProcessDisplayInfoEquality process
equation.ShowSpinner = ShowSpinners;
equation.ShowToggle = ShowToggles;
equation.MarkRedOnLimitingCompounds = MarkRedOnLimitingCompounds;
equation.AutoRefreshProcess = UpdateEquationAutomatically;

equation.Connect(SignalName.ToggleProcessPressed, new Callable(this, nameof(HandleToggleProcess)));

Expand Down
4 changes: 3 additions & 1 deletion src/microbe_stage/editor/tooltips/SelectionMenuToolTip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -260,11 +260,13 @@ public void AddModifierInfo(string name, string value, float valueForColourApply
}

/// <summary>
/// Creates UI elements for the processes info in a specific patch
/// Creates UI elements for the processes info in a specific patch. Note that this doesn't refresh so this must
/// be always called again when the process speed information has changed.
/// </summary>
public void WriteOrganelleProcessList(List<ProcessSpeedInformation>? processes)
{
processList.ProcessesTitleColour = processTitleFont;
processList.UpdateEquationAutomatically = false;

if (processes == null || processes.Count <= 0)
{
Expand Down

0 comments on commit de8a4be

Please sign in to comment.