Advertisement
Gustavo6046

TPT element AURL

Feb 13th, 2015
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.43 KB | None | 0 0
  1. #include "simulation/Elements.h"
  2. //#TPT-Directive ElementClass Element_AURL PT_AURL 60461
  3. Element_AURL::Element_AURL()
  4. {
  5.     Identifier = "DEFAULT_PT_AURL";
  6.     Name = "AURL";
  7.     Colour = PIXPACK(0xC9B316);
  8.     MenuVisible = 1;
  9.     MenuSection = SC_NUCLEAR;
  10.     Enabled = 1;
  11.    
  12.     Advection = 0.4f;
  13.     AirDrag = 0.01f * CFDS;
  14.     AirLoss = 0.99f;
  15.     Loss = 0.95f;
  16.     Collision = 0.0f;
  17.     Gravity = 0.4f;
  18.     Diffusion = 0.00f;
  19.     HotAir = 0.000f * CFDS;
  20.     Falldown = 1;
  21.    
  22.     Flammable = 1;
  23.     Explosive = 0;
  24.     Meltable = 0;
  25.     Hardness = 45;
  26.    
  27.     Weight = 65;
  28.    
  29.     Temperature = 330.6;
  30.     HeatConduct = 254;
  31.     Description = "Aurelium. Warm, heavy particles. Generates pressure when heated. Flammable and radioactive. Fissile under pressure like PLUT.";
  32.    
  33.     State = ST_POWDER;
  34.     Properties = TYPE_PART | PROP_RADIOACTIVE;
  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.     Update = &Element_AURL::update;
  46.    
  47. }
  48.  
  49. //#TPT-Directive ElementHeader Element_AURL static int update(UPDATE_FUNC_ARGS)
  50. int Element_AURL::update(UPDATE_FUNC_ARGS)
  51.  {
  52.     if (!sim->legacy_enable && sim->temp[y/CELL][x/CELL]>20C)
  53.     {
  54.         if (parts[i].temp => MIN_TEMP)
  55.         {
  56.             if (parts[i];temp =< MAX_TEMP)
  57.             {
  58.                 parts[i].pv += .01f;
  59.             {
  60.         }
  61.         else
  62.         {
  63.             return 0;
  64.         }
  65.     }
  66.     return 0;
  67. }
  68.  
  69.  
  70. Element_AURL::~Element_AURL() {}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement