Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
3 changed files
with
101 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
#include "simulation/Elements.h" | ||
//#TPT-Directive ElementClass Element_CRMC PT_CRMC 179 | ||
Element_CRMC::Element_CRMC() | ||
{ | ||
Identifier = "DEFAULT_PT_CRMC"; | ||
Name = "CRMC"; | ||
Colour = PIXPACK(0xD6D1D4); | ||
MenuVisible = 1; | ||
MenuSection = SC_SOLIDS; | ||
Enabled = 1; | ||
|
||
Advection = 0.0f; | ||
AirDrag = 0.00f * CFDS; | ||
AirLoss = 0.00f; | ||
Loss = 0.00f; | ||
Collision = 0.0f; | ||
Gravity = 0.0f; | ||
Diffusion = 0.00f; | ||
HotAir = 0.000f * CFDS; | ||
Falldown = 0; | ||
|
||
Flammable = 0; | ||
Explosive = 0; | ||
Meltable = 0; | ||
Hardness = 5; | ||
|
||
Weight = 100; | ||
|
||
Temperature = R_TEMP+273.15f; | ||
HeatConduct = 35; | ||
Description = "Ceramic. Gets stronger under pressure."; | ||
|
||
State = ST_SOLID; | ||
Properties = TYPE_SOLID | PROP_NEUTPASS; | ||
|
||
LowPressure = IPL; | ||
LowPressureTransition = NT; | ||
HighPressure = IPH; | ||
HighPressureTransition = NT; | ||
LowTemperature = ITL; | ||
LowTemperatureTransition = NT; | ||
HighTemperature = 2887.15f; | ||
HighTemperatureTransition = ST; | ||
|
||
Update = &Element_CRMC::update; | ||
Graphics = &Element_CRMC::graphics; | ||
} | ||
|
||
//#TPT-Directive ElementHeader Element_CRMC static int update(UPDATE_FUNC_ARGS) | ||
int Element_CRMC::update(UPDATE_FUNC_ARGS) | ||
{ | ||
if (sim->pv[y/CELL][x/CELL] < -30.0f) | ||
sim->create_part(i, x, y, PT_CLST); | ||
return 0; | ||
} | ||
|
||
//#TPT-Directive ElementHeader Element_CRMC static int graphics(GRAPHICS_FUNC_ARGS) | ||
int Element_CRMC::graphics(GRAPHICS_FUNC_ARGS) | ||
{ | ||
int z = cpart->tmp2 - 2; | ||
*colr += z * 8; | ||
*colg += z * 8; | ||
*colb += z * 8; | ||
return 0; | ||
} | ||
|
||
Element_CRMC::~Element_CRMC() {} | ||
|