Skip to content

Commit

Permalink
Use create_part in resist reactions, and set CarriesCtypeIn for RSSS.
Browse files Browse the repository at this point in the history
  • Loading branch information
savask committed Apr 4, 2024
1 parent f8873de commit 1a0eb73
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/simulation/elements/PTNM.cpp
Expand Up @@ -238,7 +238,7 @@ static int update(UPDATE_FUNC_ARGS)
break;

case PT_RSST: // RSST -> BIZR
sim->part_change_type(ID(r), x + rx, y + ry, PT_BIZR);
sim->create_part(ID(r), x + rx, y + ry, PT_BIZR);
break;
}
}
Expand Down
1 change: 1 addition & 0 deletions src/simulation/elements/RSSS.cpp
Expand Up @@ -33,6 +33,7 @@ void Element::Element_RSSS()
Description = "Solidified resist. Blocks pressure and insulates electricity. Liquefies on contact with neutrons.";

Properties = TYPE_SOLID|PROP_NEUTPASS;
CarriesTypeIn = (1U << FIELD_CTYPE) | (1U << FIELD_TMP);

LowPressure = IPL;
LowPressureTransition = NT;
Expand Down
4 changes: 2 additions & 2 deletions src/simulation/elements/RSST.cpp
Expand Up @@ -61,15 +61,15 @@ int update(UPDATE_FUNC_ARGS)
// RSST + GUNP = FIRW
if(TYP(r) == PT_GUNP)
{
sim->part_change_type(i, x, y, PT_FIRW);
sim->create_part(i, x, y, PT_FIRW);
sim->kill_part(ID(r));
return 1;
}

// RSST + BCOL = FSEP
if(TYP(r) == PT_BCOL)
{
sim->part_change_type(i, x, y, PT_FSEP);
sim->create_part(i, x, y, PT_FSEP);
parts[i].life = 50;
sim->kill_part(ID(r));
return 1;
Expand Down

0 comments on commit 1a0eb73

Please sign in to comment.