Skip to content

Commit

Permalink
You can no longer delete your last organelle in the editor (to stop p…
Browse files Browse the repository at this point in the history
…eople from deleting their entire cell when they dont have a nucleus)
  • Loading branch information
Untrustedlife authored and hhyyrylainen committed Feb 15, 2019
1 parent 2c56cf3 commit 1e2dc67
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/microbe_stage/microbe_editor/microbe_editor.as
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,8 @@ class MicrobeEditor{
PlacedOrganelle@ organelle = cast<PlacedOrganelle>(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){
Expand Down

0 comments on commit 1e2dc67

Please sign in to comment.