summaryrefslogtreecommitdiff
path: root/src/simulation/Simulation.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-08-28 13:17:01 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-08-28 13:17:01 (GMT)
commit4263e3aab77e51de09f4716e5f89371b6aa031cd (patch)
tree812ce60cf5381a37b062714688a46e5d761209de /src/simulation/Simulation.cpp
parent29619e9ebfaa5d0358dd5d817631c7df329ebfda (diff)
downloadpowder-4263e3aab77e51de09f4716e5f89371b6aa031cd.zip
powder-4263e3aab77e51de09f4716e5f89371b6aa031cd.tar.gz
DTEC, generates a spark when something with it's ctype is nearby
Diffstat (limited to 'src/simulation/Simulation.cpp')
-rw-r--r--src/simulation/Simulation.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp
index 505feb0..ea500f5 100644
--- a/src/simulation/Simulation.cpp
+++ b/src/simulation/Simulation.cpp
@@ -2691,6 +2691,12 @@ int Simulation::create_part(int p, int x, int y, int tv)
parts[pmap[y][x]>>8].ctype = t;
if (t==PT_LIFE && v<NGOLALT && (pmap[y][x]&0xFF)!=PT_STOR) parts[pmap[y][x]>>8].tmp = v;
}
+ else if ((pmap[y][x]&0xFF) == PT_DTEC && (pmap[y][x]&0xFF) != t)
+ {
+ parts[pmap[y][x]>>8].ctype = t;
+ if (t==PT_LIFE && v<NGOLALT)
+ parts[pmap[y][x]>>8].tmp = v;
+ }
return -1;
}
if (photons[y][x] && (elements[t].Properties & TYPE_ENERGY))
@@ -2900,6 +2906,9 @@ int Simulation::create_part(int p, int x, int y, int tv)
case PT_BIZR: case PT_BIZRG: case PT_BIZRS:
parts[i].ctype = 0x47FFFF;
break;
+ case PT_DTEC:
+ parts[i].tmp2 = 2;
+ break;
default:
if (t==PT_FIGH)
{