1 #include "simulation/ElementCommon.h" 2 3 static void create(ELEMENT_CREATE_FUNC_ARGS); 4 Element_TESC()5void Element::Element_TESC() 6 { 7 Identifier = "DEFAULT_PT_TESC"; 8 Name = "TESC"; 9 Colour = PIXPACK(0x707040); 10 MenuVisible = 1; 11 MenuSection = SC_ELEC; 12 Enabled = 1; 13 14 Advection = 0.0f; 15 AirDrag = 0.00f * CFDS; 16 AirLoss = 0.90f; 17 Loss = 0.00f; 18 Collision = 0.0f; 19 Gravity = 0.0f; 20 Diffusion = 0.00f; 21 HotAir = 0.000f * CFDS; 22 Falldown = 0; 23 24 Flammable = 0; 25 Explosive = 0; 26 Meltable = 0; 27 Hardness = 1; 28 29 Weight = 100; 30 31 HeatConduct = 251; 32 Description = "Tesla coil! Creates lightning when sparked."; 33 34 Properties = TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_HOT_GLOW; 35 36 LowPressure = IPL; 37 LowPressureTransition = NT; 38 HighPressure = IPH; 39 HighPressureTransition = NT; 40 LowTemperature = ITL; 41 LowTemperatureTransition = NT; 42 HighTemperature = ITH; 43 HighTemperatureTransition = NT; 44 45 Create = &create; 46 } 47 create(ELEMENT_CREATE_FUNC_ARGS)48static void create(ELEMENT_CREATE_FUNC_ARGS) 49 { 50 if (v >= 0) 51 { 52 sim->parts[i].tmp = v; 53 if (sim->parts[i].tmp > 300) 54 sim->parts[i].tmp = 300; 55 } 56 } 57