mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-04-23 08:14:51 +02:00
Fog/Rime can absorb gas to become acidic, condense to acid (#999)
This commit is contained in:
parent
917b299ecd
commit
56ede6caad
@ -2493,6 +2493,19 @@ void Simulation::UpdateParticles(int start, int end)
|
||||
else
|
||||
t = PT_LAVA;
|
||||
}
|
||||
else if (t == PT_RIME)
|
||||
{
|
||||
if (parts[i].tmp > 5)
|
||||
{
|
||||
t = PT_ACID;
|
||||
parts[i].life = 25 + 5 * parts[i].tmp;
|
||||
parts[i].tmp = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
t = PT_WATR;
|
||||
}
|
||||
}
|
||||
else
|
||||
s = 0;
|
||||
}
|
||||
@ -2566,7 +2579,7 @@ void Simulation::UpdateParticles(int start, int end)
|
||||
{
|
||||
if (t==PT_ICEI || t==PT_LAVA || t==PT_SNOW)
|
||||
parts[i].ctype = parts[i].type;
|
||||
if (!(t==PT_ICEI && parts[i].ctype==PT_FRZW))
|
||||
if (!(t==PT_ICEI && parts[i].ctype==PT_FRZW) && t!=PT_ACID)
|
||||
parts[i].life = 0;
|
||||
if (t == PT_FIRE)
|
||||
{
|
||||
|
@ -82,7 +82,7 @@ static int update(UPDATE_FUNC_ARGS)
|
||||
sim->kill_part(ID(r));
|
||||
}
|
||||
}
|
||||
else if (rt != PT_CLNE && rt != PT_PCLN && parts[i].life > 50 && sim->rng.chance(elements[rt].Hardness, 1000))
|
||||
else if (rt != PT_CLNE && rt != PT_PCLN && ((rt != PT_FOG && rt != PT_RIME) || parts[ID(r)].tmp <= 5) && parts[i].life > 50 && sim->rng.chance(elements[rt].Hardness, 1000))
|
||||
{
|
||||
if (sim->parts_avg(i, ID(r),PT_GLAS)!= PT_GLAS)//GLAS protects stuff from acid
|
||||
{
|
||||
|
@ -72,7 +72,7 @@ static int update(UPDATE_FUNC_ARGS)
|
||||
}
|
||||
else if (TYP(r) != PT_ACID && TYP(r) != PT_CAUS && TYP(r) != PT_RFRG && TYP(r) != PT_RFGL)
|
||||
{
|
||||
if ((TYP(r) != PT_CLNE && TYP(r) != PT_PCLN && sim->rng.chance(elements[TYP(r)].Hardness, 1000)) && parts[i].life >= 50)
|
||||
if ((TYP(r) != PT_CLNE && TYP(r) != PT_PCLN && ((TYP(r) != PT_FOG && TYP(r) != PT_RIME) || parts[ID(r)].tmp <= 5) && sim->rng.chance(elements[TYP(r)].Hardness, 1000)) && parts[i].life > 50)
|
||||
{
|
||||
// GLAS protects stuff from acid
|
||||
if (sim->parts_avg(i, ID(r),PT_GLAS) != PT_GLAS)
|
||||
|
@ -67,6 +67,11 @@ static int update(UPDATE_FUNC_ARGS)
|
||||
{
|
||||
parts[i].life += sim->rng.between(0, 19);
|
||||
}
|
||||
if (TYP(r) == PT_GAS && parts[i].tmp < 10)
|
||||
{
|
||||
sim->kill_part(ID(r));
|
||||
parts[i].tmp++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ void Element::Element_RIME()
|
||||
LowTemperature = ITL;
|
||||
LowTemperatureTransition = NT;
|
||||
HighTemperature = 273.15f;
|
||||
HighTemperatureTransition = PT_WATR;
|
||||
HighTemperatureTransition = ST;
|
||||
|
||||
Update = &update;
|
||||
}
|
||||
@ -62,6 +62,11 @@ static int update(UPDATE_FUNC_ARGS)
|
||||
sim->part_change_type(i,x,y,PT_FOG);
|
||||
parts[i].life = sim->rng.between(60, 119);
|
||||
}
|
||||
else if (TYP(r) == PT_GAS && parts[i].tmp < 10)
|
||||
{
|
||||
sim->kill_part(ID(r));
|
||||
parts[i].tmp++;
|
||||
}
|
||||
else if (TYP(r)==PT_FOG&&parts[ID(r)].life>0)
|
||||
{
|
||||
sim->part_change_type(i,x,y,PT_FOG);
|
||||
|
Loading…
x
Reference in New Issue
Block a user