diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index b1040f7d9..537d6fd4b 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -1094,6 +1094,10 @@ int Simulation::eval_move(int pt, int nx, int ny, unsigned *rr) const return 0; } break; + case PT_PAPR: + // May allow PAPR to block particles when marked? Or would that be too contrived? + result = 2; + break; default: // This should never happen // If it were to happen, try_move would interpret a 3 as a 1 diff --git a/src/simulation/SimulationData.cpp b/src/simulation/SimulationData.cpp index 1e101a851..d1a886164 100644 --- a/src/simulation/SimulationData.cpp +++ b/src/simulation/SimulationData.cpp @@ -185,6 +185,10 @@ void SimulationData::init_can_move() //SAWD cannot be displaced by other powders if (elements[movingType].Properties & TYPE_PART) can_move[movingType][PT_SAWD] = 0; + + // Let most non-solids pass through PAPR + if (elements[movingType].Properties & (TYPE_GAS | TYPE_PART | TYPE_LIQUID)) + can_move[movingType][PT_PAPR] = 2; } //a list of lots of things PHOT can move through // TODO: replace with property diff --git a/src/simulation/elements/PAPR.cpp b/src/simulation/elements/PAPR.cpp index 4a9892f5d..1083418ee 100644 --- a/src/simulation/elements/PAPR.cpp +++ b/src/simulation/elements/PAPR.cpp @@ -8,8 +8,8 @@ static int graphics(GRAPHICS_FUNC_ARGS); // Additionally, it can be read and written to by ARAY. // Property usage: -// life: Temporary read/write state for ARAY interaction -// tmp: Written color value. If dcolour is not black, it gets copied here. 1 bit alpha +// life: Written color value. If dcolour is not black, it gets copied here. 1 bit alpha +// tmp: Temporary read/write state for ARAY interaction // tmp2: Singe level void Element::Element_PAPR() @@ -58,6 +58,7 @@ void Element::Element_PAPR() static int update(UPDATE_FUNC_ARGS) { + // Char when above burning temperature if (parts[i].temp > 450 && parts[i].temp >= parts[i].tmp2) { parts[i].tmp2 = (int)parts[i].temp; @@ -73,7 +74,6 @@ static int update(UPDATE_FUNC_ARGS) if (np >= 0) { parts[np].life = 70; - // parts[np].temp = parts[i].temp; } } } @@ -82,6 +82,7 @@ static int update(UPDATE_FUNC_ARGS) static int graphics(GRAPHICS_FUNC_ARGS) { + // Darken when burnt float maxtemp = std::max((float)cpart->tmp2, cpart->temp); if (maxtemp > 450) {