1 #include "simulation/ElementCommon.h" 2 3 static int update(UPDATE_FUNC_ARGS); 4 Element_PLUT()5void Element::Element_PLUT() 6 { 7 Identifier = "DEFAULT_PT_PLUT"; 8 Name = "PLUT"; 9 Colour = PIXPACK(0x407020); 10 MenuVisible = 1; 11 MenuSection = SC_NUCLEAR; 12 Enabled = 1; 13 14 Advection = 0.4f; 15 AirDrag = 0.01f * CFDS; 16 AirLoss = 0.99f; 17 Loss = 0.95f; 18 Collision = 0.0f; 19 Gravity = 0.4f; 20 Diffusion = 0.00f; 21 HotAir = 0.000f * CFDS; 22 Falldown = 1; 23 24 Flammable = 0; 25 Explosive = 0; 26 Meltable = 0; 27 Hardness = 0; 28 PhotonReflectWavelengths = 0x001FCE00; 29 30 Weight = 90; 31 32 DefaultProperties.temp = R_TEMP + 4.0f + 273.15f; 33 HeatConduct = 251; 34 Description = "Plutonium. Heavy, fissile particles. Generates neutrons under pressure."; 35 36 Properties = TYPE_PART|PROP_NEUTPASS|PROP_RADIOACTIVE; 37 38 LowPressure = IPL; 39 LowPressureTransition = NT; 40 HighPressure = IPH; 41 HighPressureTransition = NT; 42 LowTemperature = ITL; 43 LowTemperatureTransition = NT; 44 HighTemperature = ITH; 45 HighTemperatureTransition = NT; 46 47 Update = &update; 48 } 49 update(UPDATE_FUNC_ARGS)50static int update(UPDATE_FUNC_ARGS) 51 { 52 if (RNG::Ref().chance(1, 100) && RNG::Ref().chance(5.0f*sim->pv[y/CELL][x/CELL], 1000)) 53 { 54 sim->create_part(i, x, y, PT_NEUT); 55 } 56 return 0; 57 } 58