allow NEUT to travel through ICE and SNOW, and for it to turn OIL to GAS (both like inextremely old versions)

This commit is contained in:
jacob1 2013-03-02 19:07:00 -05:00
parent 85cb4b37c9
commit 846d7d8064
6 changed files with 13 additions and 7 deletions

View File

@ -31,7 +31,7 @@ Element_GAS::Element_GAS()
Description = "Gas. Diffuses. Flammable. Liquefies under pressure.";
State = ST_GAS;
Properties = TYPE_GAS;
Properties = TYPE_GAS | PROP_NEUTPENETRATE;
LowPressure = IPL;
LowPressureTransition = NT;

View File

@ -31,7 +31,7 @@ Element_ICEI::Element_ICEI()
Description = "Solid. Freezes water. Crushes under pressure. Cools down air.";
State = ST_SOLID;
Properties = TYPE_SOLID|PROP_LIFE_DEC;
Properties = TYPE_SOLID|PROP_LIFE_DEC|PROP_NEUTPENETRATE;
LowPressure = IPL;
LowPressureTransition = NT;

View File

@ -134,6 +134,7 @@ int Element_NEUT::update(UPDATE_FUNC_ARGS)
sim->create_part(r>>8, x+rx, y+ry, PT_WOOD);
break;
case PT_DESL:
case PT_OIL:
if (3>(rand()%200))
sim->part_change_type(r>>8,x+rx,y+ry,PT_GAS);
break;

View File

@ -31,7 +31,7 @@ Element_OIL::Element_OIL()
Description = "Liquid. Flammable.";
State = ST_LIQUID;
Properties = TYPE_LIQUID;
Properties = TYPE_LIQUID | PROP_NEUTPENETRATE;
LowPressure = IPL;
LowPressureTransition = NT;

View File

@ -31,7 +31,7 @@ Element_SNOW::Element_SNOW()
Description = "Light particles.";
State = ST_SOLID;
Properties = TYPE_PART|PROP_LIFE_DEC;
Properties = TYPE_PART|PROP_LIFE_DEC|PROP_NEUTPENETRATE;
LowPressure = IPL;
LowPressureTransition = NT;

View File

@ -42,10 +42,17 @@ Element_WOOD::Element_WOOD()
HighTemperature = 873.0f;
HighTemperatureTransition = PT_FIRE;
Update = NULL;
Update = &Element_WOOD::update;
Graphics = &Element_WOOD::graphics;
}
//#TPT-Directive ElementHeader Element_WOOD static int update(UPDATE_FUNC_ARGS)
int Element_WOOD::update(UPDATE_FUNC_ARGS)
{
if (parts[i].temp > 450 && parts[i].temp > parts[i].tmp)
parts[i].tmp = (int)parts[i].temp;
return 0;
}
//#TPT-Directive ElementHeader Element_WOOD static int graphics(GRAPHICS_FUNC_ARGS)
int Element_WOOD::graphics(GRAPHICS_FUNC_ARGS)
{
@ -55,8 +62,6 @@ int Element_WOOD::graphics(GRAPHICS_FUNC_ARGS)
*colr -= (int)restrict_flt((maxtemp-400)/3,0,172);
*colg -= (int)restrict_flt((maxtemp-400)/4,0,140);
*colb -= (int)restrict_flt((maxtemp-400)/20,0,44);
if (maxtemp > 450)
cpart->tmp = (int)maxtemp;
}
if (maxtemp < 273)
{