mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-30 19:29:52 +02:00
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:
@@ -31,7 +31,7 @@ Element_GAS::Element_GAS()
|
|||||||
Description = "Gas. Diffuses. Flammable. Liquefies under pressure.";
|
Description = "Gas. Diffuses. Flammable. Liquefies under pressure.";
|
||||||
|
|
||||||
State = ST_GAS;
|
State = ST_GAS;
|
||||||
Properties = TYPE_GAS;
|
Properties = TYPE_GAS | PROP_NEUTPENETRATE;
|
||||||
|
|
||||||
LowPressure = IPL;
|
LowPressure = IPL;
|
||||||
LowPressureTransition = NT;
|
LowPressureTransition = NT;
|
||||||
|
@@ -31,7 +31,7 @@ Element_ICEI::Element_ICEI()
|
|||||||
Description = "Solid. Freezes water. Crushes under pressure. Cools down air.";
|
Description = "Solid. Freezes water. Crushes under pressure. Cools down air.";
|
||||||
|
|
||||||
State = ST_SOLID;
|
State = ST_SOLID;
|
||||||
Properties = TYPE_SOLID|PROP_LIFE_DEC;
|
Properties = TYPE_SOLID|PROP_LIFE_DEC|PROP_NEUTPENETRATE;
|
||||||
|
|
||||||
LowPressure = IPL;
|
LowPressure = IPL;
|
||||||
LowPressureTransition = NT;
|
LowPressureTransition = NT;
|
||||||
|
@@ -134,6 +134,7 @@ int Element_NEUT::update(UPDATE_FUNC_ARGS)
|
|||||||
sim->create_part(r>>8, x+rx, y+ry, PT_WOOD);
|
sim->create_part(r>>8, x+rx, y+ry, PT_WOOD);
|
||||||
break;
|
break;
|
||||||
case PT_DESL:
|
case PT_DESL:
|
||||||
|
case PT_OIL:
|
||||||
if (3>(rand()%200))
|
if (3>(rand()%200))
|
||||||
sim->part_change_type(r>>8,x+rx,y+ry,PT_GAS);
|
sim->part_change_type(r>>8,x+rx,y+ry,PT_GAS);
|
||||||
break;
|
break;
|
||||||
|
@@ -31,7 +31,7 @@ Element_OIL::Element_OIL()
|
|||||||
Description = "Liquid. Flammable.";
|
Description = "Liquid. Flammable.";
|
||||||
|
|
||||||
State = ST_LIQUID;
|
State = ST_LIQUID;
|
||||||
Properties = TYPE_LIQUID;
|
Properties = TYPE_LIQUID | PROP_NEUTPENETRATE;
|
||||||
|
|
||||||
LowPressure = IPL;
|
LowPressure = IPL;
|
||||||
LowPressureTransition = NT;
|
LowPressureTransition = NT;
|
||||||
|
@@ -31,7 +31,7 @@ Element_SNOW::Element_SNOW()
|
|||||||
Description = "Light particles.";
|
Description = "Light particles.";
|
||||||
|
|
||||||
State = ST_SOLID;
|
State = ST_SOLID;
|
||||||
Properties = TYPE_PART|PROP_LIFE_DEC;
|
Properties = TYPE_PART|PROP_LIFE_DEC|PROP_NEUTPENETRATE;
|
||||||
|
|
||||||
LowPressure = IPL;
|
LowPressure = IPL;
|
||||||
LowPressureTransition = NT;
|
LowPressureTransition = NT;
|
||||||
|
@@ -42,10 +42,17 @@ Element_WOOD::Element_WOOD()
|
|||||||
HighTemperature = 873.0f;
|
HighTemperature = 873.0f;
|
||||||
HighTemperatureTransition = PT_FIRE;
|
HighTemperatureTransition = PT_FIRE;
|
||||||
|
|
||||||
Update = NULL;
|
Update = &Element_WOOD::update;
|
||||||
Graphics = &Element_WOOD::graphics;
|
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)
|
//#TPT-Directive ElementHeader Element_WOOD static int graphics(GRAPHICS_FUNC_ARGS)
|
||||||
int Element_WOOD::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);
|
*colr -= (int)restrict_flt((maxtemp-400)/3,0,172);
|
||||||
*colg -= (int)restrict_flt((maxtemp-400)/4,0,140);
|
*colg -= (int)restrict_flt((maxtemp-400)/4,0,140);
|
||||||
*colb -= (int)restrict_flt((maxtemp-400)/20,0,44);
|
*colb -= (int)restrict_flt((maxtemp-400)/20,0,44);
|
||||||
if (maxtemp > 450)
|
|
||||||
cpart->tmp = (int)maxtemp;
|
|
||||||
}
|
}
|
||||||
if (maxtemp < 273)
|
if (maxtemp < 273)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user