Consistent proportions of WATR and SALT in SLTW
1 SALT + 3 WATR = 4 SLTW
This commit is contained in:
parent
85e14302e0
commit
34da698df1
@ -68,8 +68,8 @@ int update_legacy_all(UPDATE_FUNC_ARGS) {
|
|||||||
continue;
|
continue;
|
||||||
if (((r&0xFF)==PT_FIRE || (r&0xFF)==PT_LAVA) && 1>(rand()%10))
|
if (((r&0xFF)==PT_FIRE || (r&0xFF)==PT_LAVA) && 1>(rand()%10))
|
||||||
{
|
{
|
||||||
part_change_type(i,x,y,PT_SALT);
|
if (rand()%4==0) part_change_type(i,x,y,PT_SALT);
|
||||||
part_change_type(r>>8,x+rx,y+ry,PT_WTRV);
|
else part_change_type(i,x,y,PT_WTRV);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ int update_SLTW(UPDATE_FUNC_ARGS) {
|
|||||||
if (!r)
|
if (!r)
|
||||||
continue;
|
continue;
|
||||||
if ((r&0xFF)==PT_SALT && 1>(rand()%10000))
|
if ((r&0xFF)==PT_SALT && 1>(rand()%10000))
|
||||||
kill_part(r>>8);
|
part_change_type(r>>8,x+rx,y+ry,PT_SLTW);
|
||||||
if ((r&0xFF)==PT_PLNT&&5>(rand()%1000))
|
if ((r&0xFF)==PT_PLNT&&5>(rand()%1000))
|
||||||
kill_part(r>>8);
|
kill_part(r>>8);
|
||||||
if (((r&0xFF)==PT_RBDM||(r&0xFF)==PT_LRBD) && !legacy_enable && parts[i].temp>(273.15f+12.0f) && 1>(rand()%500))
|
if (((r&0xFF)==PT_RBDM||(r&0xFF)==PT_LRBD) && !legacy_enable && parts[i].temp>(273.15f+12.0f) && 1>(rand()%500))
|
||||||
|
@ -27,7 +27,9 @@ int update_WATR(UPDATE_FUNC_ARGS) {
|
|||||||
if ((r&0xFF)==PT_SALT && 1>(rand()%250))
|
if ((r&0xFF)==PT_SALT && 1>(rand()%250))
|
||||||
{
|
{
|
||||||
part_change_type(i,x,y,PT_SLTW);
|
part_change_type(i,x,y,PT_SLTW);
|
||||||
part_change_type(r>>8,x+rx,y+ry,PT_SLTW);
|
// on average, convert 3 WATR to SLTW before SALT turns into SLTW
|
||||||
|
if (rand()%3==0)
|
||||||
|
part_change_type(r>>8,x+rx,y+ry,PT_SLTW);
|
||||||
}
|
}
|
||||||
if (((r&0xFF)==PT_RBDM||(r&0xFF)==PT_LRBD) && (legacy_enable||parts[i].temp>(273.15f+12.0f)) && 1>(rand()%500))
|
if (((r&0xFF)==PT_RBDM||(r&0xFF)==PT_LRBD) && (legacy_enable||parts[i].temp>(273.15f+12.0f)) && 1>(rand()%500))
|
||||||
{
|
{
|
||||||
@ -42,6 +44,10 @@ int update_WATR(UPDATE_FUNC_ARGS) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ((r&0xFF)==PT_SLTW && 1>(rand()%10000))
|
||||||
|
{
|
||||||
|
part_change_type(i,x,y,PT_SLTW);
|
||||||
|
}
|
||||||
/*if ((r&0xFF)==PT_CNCT && 1>(rand()%500)) Concrete+Water to paste, not very popular
|
/*if ((r&0xFF)==PT_CNCT && 1>(rand()%500)) Concrete+Water to paste, not very popular
|
||||||
{
|
{
|
||||||
part_change_type(i,x,y,PT_PSTE);
|
part_change_type(i,x,y,PT_PSTE);
|
||||||
|
@ -2197,7 +2197,7 @@ void update_particles_i(pixel *vid, int start, int inc)
|
|||||||
{
|
{
|
||||||
pt = (c_heat - platent[t])/c_Cm;
|
pt = (c_heat - platent[t])/c_Cm;
|
||||||
|
|
||||||
if (1>rand()%6) t = PT_SALT;
|
if (rand()%4==0) t = PT_SALT;
|
||||||
else t = PT_WTRV;
|
else t = PT_WTRV;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -2206,7 +2206,7 @@ void update_particles_i(pixel *vid, int start, int inc)
|
|||||||
s = 0;
|
s = 0;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if (1>rand()%6) t = PT_SALT;
|
if (rand()%4==0) t = PT_SALT;
|
||||||
else t = PT_WTRV;
|
else t = PT_WTRV;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user