Skip to content

Commit

Permalink
species with rusticyanin now start with some iron (not the player spe…
Browse files Browse the repository at this point in the history
…cies though)(still need to figure out how to make that work)

fixed typo
  • Loading branch information
Untrustedlife authored and hhyyrylainen committed Feb 15, 2019
1 parent 0e3758a commit 529c665
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
3 changes: 2 additions & 1 deletion scripts/microbe_stage/configs.as
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,8 @@ const dictionary STARTER_MICROBES = {
{"ammonia", InitialCompound(0)},
{"phosphates", InitialCompound(0)},
{"hydrogensulfide", InitialCompound(0)},
{"oxytoxy", InitialCompound(0)}
{"oxytoxy", InitialCompound(0)},
{"iron", InitialCompound(0)}
},
{
OrganelleTemplatePlaced("cytoplasm", 0, 0, 0)
Expand Down
27 changes: 25 additions & 2 deletions scripts/microbe_stage/species_system.as
Original file line number Diff line number Diff line change
Expand Up @@ -247,14 +247,28 @@ string generateNameSection()
return newName;
}

// For normal microbes
const dictionary DEFAULT_INITIAL_COMPOUNDS =
{
{"atp", InitialCompound(30,300)},
{"glucose", InitialCompound(30,300)},
{"ammonia", InitialCompound(30,100)},
{"phosphates", InitialCompound(0)},
{"hydrogensulfide", InitialCompound(0)},
{"oxytoxy", InitialCompound(0)}
{"oxytoxy", InitialCompound(0)},
{"iron", InitialCompound(0)}
};

// For iron phillic microbes
const dictionary DEFAULT_INITIAL_COMPOUNDS_IRON =
{
{"atp", InitialCompound(30,300)},
{"glucose", InitialCompound(10,30)},
{"ammonia", InitialCompound(30,100)},
{"phosphates", InitialCompound(0)},
{"hydrogensulfide", InitialCompound(0)},
{"oxytoxy", InitialCompound(0)},
{"iron", InitialCompound(30,300)}
};

string randomSpeciesName()
Expand Down Expand Up @@ -477,10 +491,19 @@ class Species{
@forWorld = world;

auto organelles = positionOrganelles(stringCode);

// If you have iron (f is the symbol for rusticyanin)
if (stringCode.findFirst('f') >= 0)
{
templateEntity = Species::createSpecies(forWorld, this.name, this.genus, this.epithet,
organelles, this.colour, this.isBacteria, this.speciesMembraneType,
DEFAULT_INITIAL_COMPOUNDS_IRON, this.aggression, this.fear, this.activity, this.focus);
}
else {
templateEntity = Species::createSpecies(forWorld, this.name, this.genus, this.epithet,
organelles, this.colour, this.isBacteria, this.speciesMembraneType,
DEFAULT_INITIAL_COMPOUNDS, this.aggression, this.fear, this.activity, this.focus);
}

}

// Delete a species
Expand Down

0 comments on commit 529c665

Please sign in to comment.