From 1e2dc678f376d156ca12eefceb407c383cf4aa67 Mon Sep 17 00:00:00 2001 From: Untrustedlife Date: Sat, 2 Feb 2019 16:42:01 -0600 Subject: [PATCH] You can no longer delete your last organelle in the editor (to stop people from deleting their entire cell when they dont have a nucleus) --- scripts/microbe_stage/microbe_editor/microbe_editor.as | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/microbe_stage/microbe_editor/microbe_editor.as b/scripts/microbe_stage/microbe_editor/microbe_editor.as index db08a0eae85..2ae12085306 100644 --- a/scripts/microbe_stage/microbe_editor/microbe_editor.as +++ b/scripts/microbe_stage/microbe_editor/microbe_editor.as @@ -744,7 +744,8 @@ class MicrobeEditor{ PlacedOrganelle@ organelle = cast(organelleHere); if(organelleHere !is null){ - if(!(organelleHere.organelle.name == "nucleus")) { + // DOnt allow deletion of nucleus or the last organelle + if(!(organelleHere.organelle.name == "nucleus") && getMicrobeSize() > 1) { EditorAction@ action = EditorAction(ORGANELLE_REMOVE_COST, // redo We need data about the organelle we removed, and the location so we can "redo" it function(EditorAction@ action, MicrobeEditor@ editor){