CAUS.cpp - return 1 when type changes to RFRG

CAUS will convert multiple nearby GAS to RFRG when this reaction triggers. Perhaps it should have been a 1:1 conversion, but it's been like this from the start and nerfing the conversion rate could break reactors that don't input enough CAUS
This commit is contained in:
jacob1 2025-02-05 23:46:02 -05:00
parent 8926e48103
commit 8a9713cd83
No known key found for this signature in database
GPG Key ID: 4E58A32D510E1995

View File

@ -51,6 +51,7 @@ static int update(UPDATE_FUNC_ARGS)
{
auto &sd = SimulationData::CRef();
auto &elements = sd.elements;
bool converted = false;
for (int rx = -2; rx <= 2; rx++)
{
for (int ry = -2; ry <= 2; ry++)
@ -66,6 +67,7 @@ static int update(UPDATE_FUNC_ARGS)
{
sim->part_change_type(ID(r), x+rx, y+ry, PT_RFRG);
sim->part_change_type(i, x, y, PT_RFRG);
converted = true;
}
}
else if (TYP(r) != PT_ACID && TYP(r) != PT_CAUS && TYP(r) != PT_RFRG && TYP(r) != PT_RFGL)
@ -92,5 +94,5 @@ static int update(UPDATE_FUNC_ARGS)
}
}
}
return 0;
return converted;
}