1 #include "simulation/ElementCommon.h" 2 3 static int update(UPDATE_FUNC_ARGS); 4 Element_PTCT()5void Element::Element_PTCT() 6 { 7 Identifier = "DEFAULT_PT_PTCT"; 8 Name = "PTCT"; 9 Colour = PIXPACK(0x405050); 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 = 1; 27 Hardness = 1; 28 29 Weight = 100; 30 31 HeatConduct = 251; 32 Description = "Semi-conductor. Only conducts electricity when cold. (Less than 100C)"; 33 34 Properties = TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC; 35 36 LowPressure = IPL; 37 LowPressureTransition = NT; 38 HighPressure = IPH; 39 HighPressureTransition = NT; 40 LowTemperature = ITL; 41 LowTemperatureTransition = NT; 42 HighTemperature = 1687.0f; 43 HighTemperatureTransition = PT_LAVA; 44 45 Update = &update; 46 } 47 update(UPDATE_FUNC_ARGS)48static int update(UPDATE_FUNC_ARGS) 49 { 50 if (parts[i].temp>295.0f) 51 parts[i].temp -= 2.5f; 52 return 0; 53 } 54