diff --git a/src/microbe_stage/compounds.cpp b/src/microbe_stage/compounds.cpp index dfb3eacbda7..4a8189b0cfc 100644 --- a/src/microbe_stage/compounds.cpp +++ b/src/microbe_stage/compounds.cpp @@ -10,7 +10,7 @@ Compound::Compound(Json::Value value) volume = value["volume"].asDouble(); isCloud = value["isCloud"].asBool(); isUseful = value["isUseful"].asBool(); - + isEnvironmental = value["isEnvironmental"].asBool(); // Setting the cloud colour. float r = value["colour"]["r"].asFloat(); float g = value["colour"]["g"].asFloat(); diff --git a/src/microbe_stage/compounds.h b/src/microbe_stage/compounds.h index 7cd8384b4d6..2e2c83eff4f 100644 --- a/src/microbe_stage/compounds.h +++ b/src/microbe_stage/compounds.h @@ -11,6 +11,7 @@ class Compound : public RegistryType { double volume = 1.0; bool isCloud = false; bool isUseful = false; + bool isEnvironmental = false; Ogre::ColourValue colour; Compound(); diff --git a/src/scripting/script_initializer.cpp b/src/scripting/script_initializer.cpp index 825947beb53..2eec1d0153c 100644 --- a/src/scripting/script_initializer.cpp +++ b/src/scripting/script_initializer.cpp @@ -211,6 +211,11 @@ bool ANGELSCRIPT_REGISTERFAIL; } + if(engine->RegisterObjectProperty( + "Compound", "bool isEnvironmental", asOFFSET(Compound, isEnvironmental)) < 0) { + ANGELSCRIPT_REGISTERFAIL; + } + if(engine->RegisterObjectProperty("Compound", "Ogre::ColourValue colour", asOFFSET(Compound, colour)) < 0) { ANGELSCRIPT_REGISTERFAIL;