Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
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
3 changes: 2 additions & 1 deletion src/microbe_stage/editor/MicrobeEditor.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,11 @@ offset_top = -54.0
offset_right = 154.0
grow_vertical = 0

[node name="MicrobeEditorCheatMenu" parent="MicrobeEditorGUI" unique_id=1037789443 instance=ExtResource("39")]
[node name="MicrobeEditorCheatMenu" parent="MicrobeEditorGUI" unique_id=1037789443 node_paths=PackedStringArray("editor") instance=ExtResource("39")]
layout_mode = 0
offset_left = 10.0
offset_top = 30.0
editor = NodePath("../..")

[node name="TutorialGUI" parent="." unique_id=1480772500 instance=ExtResource("85")]
visible = false
Expand Down
10 changes: 10 additions & 0 deletions src/microbe_stage/editor/MicrobeEditorCheatMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ public partial class MicrobeEditorCheatMenu : CheatMenu
#pragma warning disable CA2213
[Export]
private CheckBox infiniteMp = null!;

[Export]
private MicrobeEditor editor = null!;
#pragma warning restore CA2213

public override void ReloadGUI()
Expand All @@ -24,4 +27,11 @@ private void OnUnlockAllOrganellesPressed()
{
CheatManager.UnlockAllOrganelles();
}

private void InfiniteMPToggled(bool value)
{
SetInfiniteMP(value);

editor.DirtyMutationPointsCache();
}
}
2 changes: 1 addition & 1 deletion src/microbe_stage/editor/MicrobeEditorCheatMenu.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ layout_mode = 2
theme_override_font_sizes/font_size = 14
text = "UNLOCK_ALL_ORGANELLES"

[connection signal="toggled" from="VBoxContainer/InfiniteMP" to="." method="SetInfiniteMP"]
[connection signal="toggled" from="VBoxContainer/InfiniteMP" to="." method="InfiniteMPToggled"]
[connection signal="toggled" from="VBoxContainer/MoveToAnyPatch" to="." method="SetMoveToAnyPatch"]
[connection signal="pressed" from="VBoxContainer/RevealAllPatches" to="." method="OnRevealAllPatchesPressed"]
[connection signal="pressed" from="VBoxContainer/UnlockAllOrganelles" to="." method="OnUnlockAllOrganellesPressed"]