mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-07-31 05:30:23 +02:00
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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user