@@ -1144,6 +1144,14 @@ int Simulation::eval_move(int pt, int nx, int ny, unsigned *rr) const
11441144 return 0 ;
11451145 }
11461146 break ;
1147+ case PT_PAPR:
1148+ // BCOL can always pass through PAPR in order to color it
1149+ // Most elements are blocked by marked PAPR, except for certified "weird" elements where it's inverse
1150+ if ((pt == PT_BCOL) || (!parts[ID (r)].life != !(pt != PT_H2 && pt != PT_ANAR && pt != PT_BIZR && pt != PT_BIZRG)))
1151+ result = 2 ;
1152+ else
1153+ result = 0 ;
1154+ break ;
11471155 default :
11481156 // This should never happen
11491157 // If it were to happen, try_move would interpret a 3 as a 1
@@ -1192,8 +1200,8 @@ int Simulation::try_move(int i, int x, int y, int nx, int ny)
11921200 {
11931201 if (rt == PT_COAL || rt == PT_BCOL)
11941202 parts[ID (r)].temp = parts[i].temp ;
1195-
1196- if (rt < PT_NUM && !IsHeatInsulator (parts[ID (r)]) && rt != PT_FILT)
1203+
1204+ if (rt < PT_NUM && !IsHeatInsulator (parts[ID (r)]) && rt != PT_FILT && rt != PT_PAPR )
11971205 parts[i].temp = parts[ID (r)].temp = restrict_flt ((parts[ID (r)].temp +parts[i].temp )/2 , MIN_TEMP, MAX_TEMP);
11981206 }
11991207 else if ((parts[i].type ==PT_NEUT || parts[i].type ==PT_ELEC) && (rt==PT_CLNE || rt==PT_PCLN || rt==PT_BCLN || rt==PT_PBCN))
@@ -2390,7 +2398,8 @@ void Simulation::UpdateParticles(int start, int end)
23902398 || (t == PT_ELEC && rt == PT_DEUT)
23912399 || (t == PT_DEUT && rt == PT_ELEC)
23922400 || (t == PT_HSWC && rt == PT_FILT && parts[i].tmp == 1 )
2393- || (t == PT_FILT && rt == PT_HSWC && parts[ID (r)].tmp == 1 ))
2401+ || (t == PT_FILT && rt == PT_HSWC && parts[ID (r)].tmp == 1 )
2402+ || (t == PT_PHOT && rt == PT_PAPR))
23942403 continue ;
23952404
23962405 surround_hconduct[j] = ID (r);
@@ -3270,9 +3279,9 @@ void Simulation::RecalcFreeParticles(bool do_life_dec)
32703279 photons[y][x] = PMAP (i, t);
32713280 else
32723281 {
3273- // Particles are sometimes allowed to go inside INVS and FILT
3282+ // Particles are sometimes allowed to go inside INVS, FILT, and PAPR
32743283 // To make particles collide correctly when inside these elements, these elements must not overwrite an existing pmap entry from particles inside them
3275- if (!pmap[y][x] || (t!=PT_INVIS && t!= PT_FILT))
3284+ if (!pmap[y][x] || (t!=PT_INVIS && t!= PT_FILT && t != PT_PAPR ))
32763285 pmap[y][x] = PMAP (i, t);
32773286 // (there are a few exceptions, including energy particles - currently no limit on stacking those)
32783287 if (t!=PT_THDR && t!=PT_EMBR && t!=PT_FIGH && t!=PT_PLSM)
0 commit comments