diff --git a/scripts/microbe_stage/configs.as b/scripts/microbe_stage/configs.as index c5ff979c366..458c621c836 100644 --- a/scripts/microbe_stage/configs.as +++ b/scripts/microbe_stage/configs.as @@ -10,7 +10,7 @@ const auto STARTING_SPAWN_DENSITY = 45000.0f; const auto MAX_SPAWN_DENSITY = 20000.0f; //Corpse info const auto CORPSE_COMPOUND_COMPENSATION = 2.0f; -const auto CORPSE_CHUNK_DIVISER = 5.0f; +const auto CORPSE_CHUNK_DIVISER = 8.0f; const auto CHUNK_ENGULF_COMPOUND_DIVISOR = 6.0f; // Cell Spawn Variation diff --git a/scripts/microbe_stage/microbe_operations.as b/scripts/microbe_stage/microbe_operations.as index e4b96f6967c..18f873bb39c 100644 --- a/scripts/microbe_stage/microbe_operations.as +++ b/scripts/microbe_stage/microbe_operations.as @@ -1119,7 +1119,8 @@ void kill(CellStageWorld@ world, ObjectID microbeEntity) LOG_ERROR("Trying to kill a dead microbe"); return; } - + //diable engulf mode when a cell dies + microbeComponent.engulfMode = false; // Releasing all the agents. // To not completely deadlock in this there is a maximum of 5 of these created const int maxAgentsToShoot = 5; diff --git a/scripts/microbe_stage/species_system.as b/scripts/microbe_stage/species_system.as index 8017d134d92..b2a088af025 100644 --- a/scripts/microbe_stage/species_system.as +++ b/scripts/microbe_stage/species_system.as @@ -324,11 +324,42 @@ class Species{ } const auto cytoplasmGene = getOrganelleDefinition("cytoplasm").gene; + string energyGene = cytoplasmGene; + const auto bonusPadding = GetEngine().GetRandom().GetNumber(1, 5); // it should always have a nucleus and a cytoplasm. stringCode = getOrganelleDefinition("nucleus").gene + cytoplasmGene; + // generated cells need to be viable for now + switch (GetEngine().GetRandom().GetNumber(0, 3)) + { + case 0: + energyGene = getOrganelleDefinition("cytoplasm").gene; + //if cytoplasm you need a few more of them + for(int i = 0; i < bonusPadding; i++){ + this.stringCode.insert(GetEngine().GetRandom().GetNumber(2, + stringCode.length()), energyGene); + } + break; + case 1: + energyGene = getOrganelleDefinition("metabolosome").gene; + break; + case 2: + energyGene = getOrganelleDefinition("rusticyanin").gene; + energyGene += getOrganelleDefinition("cytoplasm").gene; + break; + case 3: + energyGene = getOrganelleDefinition("mitochondrion").gene; + break; + } + + const auto energyPadding = GetEngine().GetRandom().GetNumber(1, 5); + for(int i = 0; i < energyPadding; i++){ + this.stringCode.insert(GetEngine().GetRandom().GetNumber(2, + stringCode.length()), energyGene); + } + for(int i = 0; i < stringSize; i++){ this.stringCode += getRandomLetter(false); } @@ -338,8 +369,15 @@ class Species{ if (GetEngine().GetRandom().GetNumber(0, 100) <= 25) { for(int i = 0; i < cytoplasmPadding; i++){ - this.stringCode.insert(GetEngine().GetRandom().GetNumber(2, + if (GetEngine().GetRandom().GetNumber(0, 20)<= 10) + { + this.stringCode.insert(GetEngine().GetRandom().GetNumber(2, + stringCode.length()), energyGene); + } + else { + this.stringCode.insert(GetEngine().GetRandom().GetNumber(2, stringCode.length()), cytoplasmGene); + } } }