From a64a7a8614c6c43f2c33a52aa7378c1b0979d49b Mon Sep 17 00:00:00 2001 From: Untrustedlife Date: Mon, 28 Jan 2019 12:59:16 -0600 Subject: [PATCH] when you die now your cell gets reset and it disabled the editor button (so that you cant be cheesy and get to the editor, then die, then enter the editor after you respawn) buffed iron respiration Cytoplasm is now the same mass as a nucleus. (so that the cytoplasm you start with acts like a nucleus) --- .../MicrobeStage/BioProcesses.json | 2 +- scripts/gui/microbe_hud.mjs | 12 ++++++++++++ scripts/gui/thrive_gui.html | 10 +++++----- scripts/microbe_stage/microbe_operations.as | 5 +++++ scripts/microbe_stage/microbe_stage_hud.as | 13 +++++++++++++ scripts/microbe_stage/organelle_table.as | 2 +- 6 files changed, 37 insertions(+), 7 deletions(-) diff --git a/scripts/SimulationParameters/MicrobeStage/BioProcesses.json b/scripts/SimulationParameters/MicrobeStage/BioProcesses.json index ba5b36f3690..f212037ccde 100644 --- a/scripts/SimulationParameters/MicrobeStage/BioProcesses.json +++ b/scripts/SimulationParameters/MicrobeStage/BioProcesses.json @@ -117,7 +117,7 @@ "inputs": { "carbondioxide": 0.09, - "iron": 1.0 + "iron": 0.5 }, "outputs": { diff --git a/scripts/gui/microbe_hud.mjs b/scripts/gui/microbe_hud.mjs index 9893c011d82..9845d866587 100644 --- a/scripts/gui/microbe_hud.mjs +++ b/scripts/gui/microbe_hud.mjs @@ -91,6 +91,9 @@ export function runMicrobeHUDSetup(){ // Event that enables the editor button Leviathan.OnGeneric("PlayerReadyToEnterEditor", onReadyToEnterEditor); + // Event that disabled the editor button + Leviathan.OnGeneric("PlayerDiedBeforeEnter", onResetEditor); + // Add listner for sucide button document.getElementById("suicideButton").addEventListener("click", killPlayerCell, true); @@ -152,6 +155,15 @@ export function onReadyToEnterEditor(){ } +//! Disabled the editor button +export function onResetEditor(){ + + // Disable + document.getElementById("microbeToEditorButton").classList.add("DisabledButton"); + readyToEdit = false; +} + + function onCompoundPanelClicked() { common.playButtonPressSound(); diff --git a/scripts/gui/thrive_gui.html b/scripts/gui/thrive_gui.html index 7907a69d24b..72bbfc201db 100644 --- a/scripts/gui/thrive_gui.html +++ b/scripts/gui/thrive_gui.html @@ -508,11 +508,11 @@ - Rusticyanin

Cost: 20 mutation points

- Performs Process: Iron Chemolithotrophy
(0.09 CO2 + 1 Iron Ion -> 10 ATP)/Second (Depending On Environmental C02)
- Storage Space: 5

- Siderophores and Rusticyanin for storing and using iron ions and carbon from atmospheric carbon dioxide to produce ATP. - Iron Chemolithotrophy is a process by which organisms obtain their energy from the oxidation of reduced inorganic ions. + Rusticyanin

Cost: 20 mutation points

+ Performs Process: Iron Chemolithotrophy
(0.09 CO2 + 0.5 Iron Ion -> 10 ATP)/Second (Depending On Environmental C02)
+ Storage Space: 5

+ Siderophores and Rusticyanin for storing and using iron ions and carbon from atmospheric carbon dioxide to produce ATP. + Iron Chemolithotrophy is a process by which organisms obtain their energy from the oxidation of reduced inorganic ions.
Rusticyanin
20 MP diff --git a/scripts/microbe_stage/microbe_operations.as b/scripts/microbe_stage/microbe_operations.as index 9e0fbfa6a55..805d48507fc 100644 --- a/scripts/microbe_stage/microbe_operations.as +++ b/scripts/microbe_stage/microbe_operations.as @@ -295,6 +295,11 @@ void respawnPlayer(CellStageWorld@ world) // Reset membrane color to fix the bug that made membranes sometimes red after you respawn. MicrobeOperations::applyMembraneColour(world, playerEntity); + //If you died before entering the editor disable that + microbeComponent.reproductionStage = 0; + hideReproductionDialog(world); + // Reset the player cell to be the same as the species template + Species::restoreOrganelleLayout(world, playerEntity, microbeComponent, playerSpecies); } // Decrease the population by 20 diff --git a/scripts/microbe_stage/microbe_stage_hud.as b/scripts/microbe_stage/microbe_stage_hud.as index 552f88b3d82..20a429504e7 100644 --- a/scripts/microbe_stage/microbe_stage_hud.as +++ b/scripts/microbe_stage/microbe_stage_hud.as @@ -286,6 +286,14 @@ class MicrobeStageHudSystem : ScriptSystem{ } } + void hideReproductionDialog(){ + reproductionDialogOpened = false; + GenericEvent@ event = GenericEvent("PlayerDiedBeforeEnter"); + GetEngine().GetEventHandler().CallEvent(event); + } + + + void suicideButtonClicked(){ // getComponent("gui_sounds", this.gameState, SoundSourceComponent).playSound("button-hover-click"); if(boolean2 == false){ @@ -809,6 +817,11 @@ void showReproductionDialog(GameWorld@ world){ showReproductionDialog(); } +void hideReproductionDialog(GameWorld@ world){ + cast(world.GetScriptSystem("MicrobeStageHudSystem")). + hideReproductionDialog(); +} + void showMessage(const string &in msg){ LOG_INFO(msg + " (note, in-game messages currently disabled)"); //auto messagePanel = Engine.currentGameState().rootGUIWindow().getChild("MessagePanel") diff --git a/scripts/microbe_stage/organelle_table.as b/scripts/microbe_stage/organelle_table.as index ce6f7476133..735f37ae4de 100644 --- a/scripts/microbe_stage/organelle_table.as +++ b/scripts/microbe_stage/organelle_table.as @@ -288,7 +288,7 @@ void setupOrganelles(){ // Cytoplasm auto cytoplasmParameters = OrganelleParameters("cytoplasm"); - cytoplasmParameters.mass = 0.1; + cytoplasmParameters.mass = 0.7; cytoplasmParameters.gene = "Y"; cytoplasmParameters.mesh = ""; //it's an empty hex cytoplasmParameters.chanceToCreate = 1;