Limit access to the LatentHeat property to LATENTHEAT builds
This commit is contained in:
parent
78314a8f7d
commit
e64c23d50d
@ -55,46 +55,58 @@ Element::Element():
|
|||||||
|
|
||||||
std::vector<StructProperty> const &Element::GetProperties()
|
std::vector<StructProperty> const &Element::GetProperties()
|
||||||
{
|
{
|
||||||
static std::vector<StructProperty> properties = {
|
struct DoOnce
|
||||||
{ "Name", StructProperty::String, offsetof(Element, Name ) },
|
{
|
||||||
{ "Colour", StructProperty::Colour, offsetof(Element, Colour ) },
|
std::vector<StructProperty> properties;
|
||||||
{ "Color", StructProperty::Colour, offsetof(Element, Colour ) },
|
|
||||||
{ "MenuVisible", StructProperty::Integer, offsetof(Element, MenuVisible ) },
|
DoOnce()
|
||||||
{ "MenuSection", StructProperty::Integer, offsetof(Element, MenuSection ) },
|
{
|
||||||
{ "Enabled", StructProperty::Integer, offsetof(Element, Enabled ) },
|
properties = {
|
||||||
{ "Advection", StructProperty::Float, offsetof(Element, Advection ) },
|
{ "Name", StructProperty::String, offsetof(Element, Name ) },
|
||||||
{ "AirDrag", StructProperty::Float, offsetof(Element, AirDrag ) },
|
{ "Colour", StructProperty::Colour, offsetof(Element, Colour ) },
|
||||||
{ "AirLoss", StructProperty::Float, offsetof(Element, AirLoss ) },
|
{ "Color", StructProperty::Colour, offsetof(Element, Colour ) },
|
||||||
{ "Loss", StructProperty::Float, offsetof(Element, Loss ) },
|
{ "MenuVisible", StructProperty::Integer, offsetof(Element, MenuVisible ) },
|
||||||
{ "Collision", StructProperty::Float, offsetof(Element, Collision ) },
|
{ "MenuSection", StructProperty::Integer, offsetof(Element, MenuSection ) },
|
||||||
{ "Gravity", StructProperty::Float, offsetof(Element, Gravity ) },
|
{ "Enabled", StructProperty::Integer, offsetof(Element, Enabled ) },
|
||||||
{ "NewtonianGravity", StructProperty::Float, offsetof(Element, NewtonianGravity ) },
|
{ "Advection", StructProperty::Float, offsetof(Element, Advection ) },
|
||||||
{ "Diffusion", StructProperty::Float, offsetof(Element, Diffusion ) },
|
{ "AirDrag", StructProperty::Float, offsetof(Element, AirDrag ) },
|
||||||
{ "HotAir", StructProperty::Float, offsetof(Element, HotAir ) },
|
{ "AirLoss", StructProperty::Float, offsetof(Element, AirLoss ) },
|
||||||
{ "Falldown", StructProperty::Integer, offsetof(Element, Falldown ) },
|
{ "Loss", StructProperty::Float, offsetof(Element, Loss ) },
|
||||||
{ "Flammable", StructProperty::Integer, offsetof(Element, Flammable ) },
|
{ "Collision", StructProperty::Float, offsetof(Element, Collision ) },
|
||||||
{ "Explosive", StructProperty::Integer, offsetof(Element, Explosive ) },
|
{ "Gravity", StructProperty::Float, offsetof(Element, Gravity ) },
|
||||||
{ "Meltable", StructProperty::Integer, offsetof(Element, Meltable ) },
|
{ "NewtonianGravity", StructProperty::Float, offsetof(Element, NewtonianGravity ) },
|
||||||
{ "Hardness", StructProperty::Integer, offsetof(Element, Hardness ) },
|
{ "Diffusion", StructProperty::Float, offsetof(Element, Diffusion ) },
|
||||||
{ "PhotonReflectWavelengths", StructProperty::UInteger, offsetof(Element, PhotonReflectWavelengths ) },
|
{ "HotAir", StructProperty::Float, offsetof(Element, HotAir ) },
|
||||||
{ "CarriesTypeIn", StructProperty::UInteger, offsetof(Element, CarriesTypeIn ) },
|
{ "Falldown", StructProperty::Integer, offsetof(Element, Falldown ) },
|
||||||
{ "Weight", StructProperty::Integer, offsetof(Element, Weight ) },
|
{ "Flammable", StructProperty::Integer, offsetof(Element, Flammable ) },
|
||||||
{ "Temperature", StructProperty::Float, offsetof(Element, DefaultProperties.temp ) },
|
{ "Explosive", StructProperty::Integer, offsetof(Element, Explosive ) },
|
||||||
{ "HeatConduct", StructProperty::UChar, offsetof(Element, HeatConduct ) },
|
{ "Meltable", StructProperty::Integer, offsetof(Element, Meltable ) },
|
||||||
{ "LatentHeat", StructProperty::UInteger, offsetof(Element, LatentHeat ) },
|
{ "Hardness", StructProperty::Integer, offsetof(Element, Hardness ) },
|
||||||
{ "Description", StructProperty::String, offsetof(Element, Description ) },
|
{ "PhotonReflectWavelengths", StructProperty::UInteger, offsetof(Element, PhotonReflectWavelengths ) },
|
||||||
{ "State", StructProperty::Removed, 0 },
|
{ "CarriesTypeIn", StructProperty::UInteger, offsetof(Element, CarriesTypeIn ) },
|
||||||
{ "Properties", StructProperty::Integer, offsetof(Element, Properties ) },
|
{ "Weight", StructProperty::Integer, offsetof(Element, Weight ) },
|
||||||
{ "LowPressure", StructProperty::Float, offsetof(Element, LowPressure ) },
|
{ "Temperature", StructProperty::Float, offsetof(Element, DefaultProperties.temp ) },
|
||||||
{ "LowPressureTransition", StructProperty::TransitionType, offsetof(Element, LowPressureTransition ) },
|
{ "HeatConduct", StructProperty::UChar, offsetof(Element, HeatConduct ) },
|
||||||
{ "HighPressure", StructProperty::Float, offsetof(Element, HighPressure ) },
|
{ "Description", StructProperty::String, offsetof(Element, Description ) },
|
||||||
{ "HighPressureTransition", StructProperty::TransitionType, offsetof(Element, HighPressureTransition ) },
|
{ "State", StructProperty::Removed, 0 },
|
||||||
{ "LowTemperature", StructProperty::Float, offsetof(Element, LowTemperature ) },
|
{ "Properties", StructProperty::Integer, offsetof(Element, Properties ) },
|
||||||
{ "LowTemperatureTransition", StructProperty::TransitionType, offsetof(Element, LowTemperatureTransition ) },
|
{ "LowPressure", StructProperty::Float, offsetof(Element, LowPressure ) },
|
||||||
{ "HighTemperature", StructProperty::Float, offsetof(Element, HighTemperature ) },
|
{ "LowPressureTransition", StructProperty::TransitionType, offsetof(Element, LowPressureTransition ) },
|
||||||
{ "HighTemperatureTransition", StructProperty::TransitionType, offsetof(Element, HighTemperatureTransition) }
|
{ "HighPressure", StructProperty::Float, offsetof(Element, HighPressure ) },
|
||||||
|
{ "HighPressureTransition", StructProperty::TransitionType, offsetof(Element, HighPressureTransition ) },
|
||||||
|
{ "LowTemperature", StructProperty::Float, offsetof(Element, LowTemperature ) },
|
||||||
|
{ "LowTemperatureTransition", StructProperty::TransitionType, offsetof(Element, LowTemperatureTransition ) },
|
||||||
|
{ "HighTemperature", StructProperty::Float, offsetof(Element, HighTemperature ) },
|
||||||
|
{ "HighTemperatureTransition", StructProperty::TransitionType, offsetof(Element, HighTemperatureTransition) }
|
||||||
|
};
|
||||||
|
if constexpr (LATENTHEAT)
|
||||||
|
{
|
||||||
|
properties.push_back({ "LatentHeat", StructProperty::UInteger, offsetof(Element, LatentHeat) });
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
return properties;
|
static DoOnce doOnce;
|
||||||
|
return doOnce.properties;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Element::legacyUpdate(UPDATE_FUNC_ARGS) {
|
int Element::legacyUpdate(UPDATE_FUNC_ARGS) {
|
||||||
|
Reference in New Issue
Block a user