Fix LITH conducting through INSL

This commit is contained in:
Tamás Bálint Misius 2022-05-27 06:22:22 +02:00
parent fb318c71ec
commit fb7132a923
No known key found for this signature in database
GPG Key ID: 5B472A12F6ECA9F2

View File

@ -134,6 +134,10 @@ static int update(UPDATE_FUNC_ARGS)
break; break;
case PT_SPRK: case PT_SPRK:
if (sim->parts_avg(i, ID(neighborData), PT_INSL) == PT_INSL)
{
break;
}
if (hydrogenationFactor + carbonationFactor >= 5) if (hydrogenationFactor + carbonationFactor >= 5)
{ {
continue; // too impure to do battery things. continue; // too impure to do battery things.
@ -145,6 +149,10 @@ static int update(UPDATE_FUNC_ARGS)
break; break;
case PT_NSCN: case PT_NSCN:
if (sim->parts_avg(i, ID(neighborData), PT_INSL) == PT_INSL)
{
break;
}
if (neighbor.life == 0 && storedEnergy > 0 && !burnTimer) if (neighbor.life == 0 && storedEnergy > 0 && !burnTimer)
{ {
sim->part_change_type(ID(neighborData), x + rx, y + ry, PT_SPRK); sim->part_change_type(ID(neighborData), x + rx, y + ry, PT_SPRK);