you need to edit elementclasses.h and elementclasses.cpp, in .cpp add 'elements.push_back(Element_DERP());' and in .h after the list with #define: '#define PT_DERP id' and at the bottom before 'std::vector<Element> GetElements();':
class Element_DERP: public Element
{
public:
Element_DERP();
virtual ~Element_DERP();
static int update(UPDATE_FUNC_ARGS);
static int graphics(GRAPHICS_FUNC_ARGS);
};
only update and/or graphics if you use them
what is the code of the element
show code.
#include "simulation/Elements.h"
//#TPT-Directive ElementClass Element_BGLA PT_BGLA 47
Element_DERP::Element_DERP()
{
Identifier = "DEFAULT_PT_DERP";
Name = "DERP";
Colour = PIXPACK(0x424242);
MenuVisible = 1;
MenuSection = SC_POWDERS;
Enabled = 1;
Advection = 0.4f;
AirDrag = 0.04f * CFDS;
AirLoss = 0.94f;
Loss = 0.95f;
Collision = -0.1f;
Gravity = 0.3f;
Diffusion = 0.00f;
HotAir = 0.000f * CFDS;
Falldown = 1;
Flammable = 0;
Explosive = 0;
Meltable = 5;
Hardness = 0;
Weight = 90;
Temperature = R_TEMP+0.0f +273.15f;
HeatConduct = 150;
Description = "Broken Glass, Heavy particles. Meltable. Bagels.";
State = ST_SOLID;
Properties = TYPE_PART;
LowPressure = IPL;
LowPressureTransition = NT;
HighPressure = IPH;
HighPressureTransition = NT;
LowTemperature = ITL;
LowTemperatureTransition = NT;
HighTemperature = 1973.0f;
HighTemperatureTransition = PT_LAVA;
Update = NULL;
}
Element_DERP::~Element_DERP() {}
generator.py only add the files in 'SOURCE_FOLDER\src\simulation\elements' and if you create a file it's almost always created in the 'SOURCE_FOLDER'
also, generator.py only changes in SOURCE_FOLDER\generated
(i think so)