Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Another experimental element, floats on water, supports other structures
  • Loading branch information
Simon Robertshaw committed Aug 7, 2016
1 parent 4a3f3e7 commit b8e2113
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/simulation/Simulation.cpp
Expand Up @@ -2044,6 +2044,10 @@ void Simulation::init_can_move()
can_move[movingType][PT_VIBR] = 1;
can_move[movingType][PT_BVBR] = 1;
}

//E181 cannot be displaced by other powders
if (elements[movingType].Properties & TYPE_PART)
can_move[movingType][PT_E181] = 0;
}
//a list of lots of things PHOT can move through
// TODO: replace with property
Expand Down
52 changes: 52 additions & 0 deletions src/simulation/elements/181.cpp
@@ -0,0 +1,52 @@
#include "simulation/Elements.h"
//#TPT-Directive ElementClass Element_E181 PT_E181 181
Element_E181::Element_E181()
{
Identifier = "DEFAULT_PT_E181";
Name = "E181";
Colour = PIXPACK(0xF0F0A0);
MenuVisible = 1;
MenuSection = SC_POWDERS;
#ifdef DEBUG
Enabled = 1;
#else
Enabled = 0;
#endif

Advection = 0.7f;
AirDrag = 0.02f * CFDS;
AirLoss = 0.96f;
Loss = 0.80f;
Collision = 0.0f;
Gravity = 0.1f;
Diffusion = 0.00f;
HotAir = 0.000f * CFDS;
Falldown = 1;

Flammable = 10;
Explosive = 0;
Meltable = 0;
Hardness = 30;

Weight = 18;

Temperature = R_TEMP+0.0f +273.15f;
HeatConduct = 70;
Description = "Experimental element, floats on water";

Properties = TYPE_PART|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC;

LowPressure = IPL;
LowPressureTransition = NT;
HighPressure = IPH;
HighPressureTransition = NT;
LowTemperature = ITL;
LowTemperatureTransition = NT;
HighTemperature = ITH;
HighTemperatureTransition = NT;

Update = NULL;
Graphics = NULL;
}

Element_E181::~Element_E181() {}

0 comments on commit b8e2113

Please sign in to comment.