Skip to content

Commit

Permalink
when you die now your cell gets reset and it disabled the editor butt…
Browse files Browse the repository at this point in the history
…on (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)
  • Loading branch information
Untrustedlife authored and hhyyrylainen committed Feb 15, 2019
1 parent cded168 commit a64a7a8
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@

"inputs": {
"carbondioxide": 0.09,
"iron": 1.0
"iron": 0.5
},

"outputs": {
Expand Down
12 changes: 12 additions & 0 deletions scripts/gui/microbe_hud.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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();

Expand Down
10 changes: 5 additions & 5 deletions scripts/gui/thrive_gui.html
Original file line number Diff line number Diff line change
Expand Up @@ -508,11 +508,11 @@
<tr>
<td id="addRusticyanin" class="OrganelleListItem">
<span class="tooltiptext">
Rusticyanin <hr><br> Cost: 20 mutation points <hr><br>
Performs Process: Iron Chemolithotrophy<br>(0.09 CO2 + 1 Iron Ion -> 10 ATP)/Second (Depending On Environmental C02)<br>
Storage Space: 5<hr><br>
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 <hr><br> Cost: 20 mutation points <hr><br>
Performs Process: Iron Chemolithotrophy<br>(0.09 CO2 + 0.5 Iron Ion -> 10 ATP)/Second (Depending On Environmental C02)<br>
Storage Space: 5<hr><br>
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.
</span>
<div id="RusticyaninIcon"></div>Rusticyanin<br>20 MP</td>
</tr></table>
Expand Down
5 changes: 5 additions & 0 deletions scripts/microbe_stage/microbe_operations.as
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions scripts/microbe_stage/microbe_stage_hud.as
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down Expand Up @@ -809,6 +817,11 @@ void showReproductionDialog(GameWorld@ world){
showReproductionDialog();
}

void hideReproductionDialog(GameWorld@ world){
cast<MicrobeStageHudSystem@>(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")
Expand Down
2 changes: 1 addition & 1 deletion scripts/microbe_stage/organelle_table.as
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a64a7a8

Please sign in to comment.