diff options
| author | jacksonmj <mj-pt@jacksonmj.co.uk> | 2012-10-26 23:51:01 (GMT) |
|---|---|---|
| committer | jacksonmj <mj-pt@jacksonmj.co.uk> | 2012-10-26 23:56:02 (GMT) |
| commit | 9a0ca32372f4386c5929dde2ff824c28d8e71d1c (patch) | |
| tree | d3351d3efc332e2f1107882a81c15cedf78012fb /src/simulation/Simulation.cpp | |
| parent | 9b4f710e28bd7d14bec0ce67d19d75cb6a67c5a6 (diff) | |
| download | powder-9a0ca32372f4386c5929dde2ff824c28d8e71d1c.zip powder-9a0ca32372f4386c5929dde2ff824c28d8e71d1c.tar.gz | |
Make conversion of PHOT to ELEC using BIZR, and enrichment of DEUT with ELEC, work better
Diffstat (limited to 'src/simulation/Simulation.cpp')
| -rw-r--r-- | src/simulation/Simulation.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 09b0da9..488c7fb 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -2017,6 +2017,7 @@ void Simulation::init_can_move() //whol eats anar can_move[PT_ANAR][PT_WHOL] = 1; can_move[PT_ANAR][PT_NWHL] = 1; + can_move[PT_ELEC][PT_DEUT] = 1; can_move[PT_THDR][PT_THDR] = 2; can_move[PT_EMBR][PT_EMBR] = 2; } @@ -2185,6 +2186,11 @@ int Simulation::try_move(int i, int x, int y, int nx, int ny) if (temp_bin > 25) temp_bin = 25; parts[i].ctype = 0x1F << temp_bin; } + if (((r&0xFF)==PT_BIZR || (r&0xFF)==PT_BIZRG || (r&0xFF)==PT_BIZRS) && parts[i].type==PT_PHOT) + { + part_change_type(i, x, y, PT_ELEC); + parts[i].ctype = 0; + } return 1; } //else e=1 , we are trying to swap the particles, return 0 no swap/move, 1 is still overlap/move, because the swap takes place later @@ -2218,6 +2224,14 @@ int Simulation::try_move(int i, int x, int y, int nx, int ny) kill_part(i); return 0; } + if ((r&0xFF)==PT_DEUT && parts[i].type==PT_ELEC) + { + if(parts[r>>8].life < 6000) + parts[r>>8].life += 1; + parts[r>>8].temp = 0; + kill_part(i); + return 0; + } if (parts[i].type==PT_CNCT && y<ny && (pmap[y+1][x]&0xFF)==PT_CNCT)//check below CNCT for another CNCT return 0; @@ -3687,7 +3701,9 @@ void Simulation::update_particles_i(int start, int inc) rt = r&0xFF; if (rt&&elements[rt].HeatConduct&&(rt!=PT_HSWC||parts[r>>8].life==10) &&(t!=PT_FILT||(rt!=PT_BRAY&&rt!=PT_BIZR&&rt!=PT_BIZRG)) - &&(rt!=PT_FILT||(t!=PT_BRAY&&t!=PT_PHOT&&t!=PT_BIZR&&t!=PT_BIZRG))) + &&(rt!=PT_FILT||(t!=PT_BRAY&&t!=PT_PHOT&&t!=PT_BIZR&&t!=PT_BIZRG)) + &&(t!=PT_ELEC||rt!=PT_DEUT) + &&(t!=PT_DEUT||rt!=PT_ELEC)) { surround_hconduct[j] = r>>8; #ifdef REALISTIC |
