Skip to content

Commit

Permalink
started working on my issues
Browse files Browse the repository at this point in the history
game currently cannot run

got rid of proc gen species completely

species can now mutate new membranes

added population to c++ side species, fixed epithet

game now runs again, it crashes when you ente rthe editor though because your species lacks a stringcode
  • Loading branch information
Untrustedlife authored and hhyyrylainen committed May 9, 2019
1 parent f65c3d6 commit c0a2c44
Show file tree
Hide file tree
Showing 10 changed files with 109 additions and 369 deletions.
5 changes: 4 additions & 1 deletion scripts/SimulationParameters/MicrobeStage/Species.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
"organelles": {
},
"membranetype": 0,
"isBacteria": false
"isBacteria": false,
"genus": "Primum",
"epithet":"Thrivium",
"population": 30
}
}
12 changes: 10 additions & 2 deletions scripts/microbe_stage/configs.as
Original file line number Diff line number Diff line change
Expand Up @@ -312,16 +312,22 @@ class MicrobeTemplate{
array<OrganelleTemplatePlaced@> organelles,
Float4 colour,
bool isBacteria,
MEMBRANE_TYPE speciesMembraneType
MEMBRANE_TYPE speciesMembraneType,
string genus,
string epithet
) {
this.spawnDensity = spawnDensity;
this.compounds = compounds;
this.organelles = organelles;
this.colour = colour;
this.isBacteria = isBacteria;
this.speciesMembraneType = speciesMembraneType;
this.genus = genus;
this.epithet = epithet;
}

string genus;
string epithet;
float spawnDensity;
dictionary compounds;
array<OrganelleTemplatePlaced@> organelles;
Expand Down Expand Up @@ -368,7 +374,9 @@ const dictionary STARTER_MICROBES = {
Float4(1, 1, 1, 1),
// Player starts as bacteria
true,
MEMBRANE_TYPE::WALL)
MEMBRANE_TYPE::WALL,
"Primum",
"Thrivium")
}
};

Expand Down
4 changes: 4 additions & 0 deletions scripts/microbe_stage/microbe_editor/microbe_editor.as
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ class MicrobeEditor{

// Update GUI buttons now that we have correct organelles
updateGuiButtonStatus(checkIsNucleusPresent());

//force add your species
cast<SpeciesSystem>(GetThriveGame().getCellStage().GetScriptSystem("SpeciesSystem")).splitSpecies(playerSpecies);

//force an auto-evo step
cast<SpeciesSystem>(GetThriveGame().getCellStage().GetScriptSystem("SpeciesSystem")).doAutoEvoStep();
// Reset to cytoplasm if nothing is selected
Expand Down
24 changes: 0 additions & 24 deletions scripts/microbe_stage/microbe_operations.as
Original file line number Diff line number Diff line change
Expand Up @@ -1047,30 +1047,6 @@ ObjectID _createMicrobeEntity(CellStageWorld@ world, bool aiControlled,
ObjectID entity = world.CreateEntity();

// TODO: movement sound for microbes
// auto soundComponent = SoundSourceComponent();
// auto s1 = null;
// soundComponent.addSound("microbe-release-toxin",
// "soundeffects/microbe-release-toxin.ogg");
// soundComponent.addSound("microbe-toxin-damage",
// "soundeffects/microbe-toxin-damage.ogg");
// soundComponent.addSound("microbe-death", "soundeffects/microbe-death.ogg");
// soundComponent.addSound("microbe-pickup-organelle",
// "soundeffects/microbe-pickup-organelle.ogg");
// soundComponent.addSound("microbe-engulfment", "soundeffects/engulfment.ogg");
// soundComponent.addSound("microbe-reproduction", "soundeffects/reproduction.ogg");

// s1 = soundComponent.addSound("microbe-movement-1",
// "soundeffects/microbe-movement-1.ogg");
// s1.properties.volume = 0.4;
// s1.properties.touch();
// s1 = soundComponent.addSound("microbe-movement-turn",
// "soundeffects/microbe-movement-2.ogg");
// s1.properties.volume = 0.1;
// s1.properties.touch();
// s1 = soundComponent.addSound("microbe-movement-2",
// "soundeffects/microbe-movement-3.ogg");
// s1.properties.volume = 0.4;
// s1.properties.touch();

auto position = world.Create_Position(entity, Float3(0, 0, 0), Float4::IdentityQuaternion);

Expand Down
1 change: 0 additions & 1 deletion scripts/microbe_stage/setup.as
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,6 @@ void resetWorld(CellStageWorld@ world)
// but eh. We can call it all in this method.

cast<SpeciesSystem>(world.GetScriptSystem("SpeciesSystem")).resetAutoEvo();
cast<SpeciesSystem>(world.GetScriptSystem("SpeciesSystem")).createNewEcoSystem();
}

//! AI species are spawned by Species in species_system
Expand Down
Loading

0 comments on commit c0a2c44

Please sign in to comment.