summaryrefslogtreecommitdiff
path: root/src/simulation/elements
diff options
context:
space:
mode:
authorjacksonmj <mj-pt@jacksonmj.co.uk>2012-12-16 00:16:05 (GMT)
committer jacksonmj <mj-pt@jacksonmj.co.uk>2012-12-16 00:16:05 (GMT)
commite4907d18815b72bb811e4ef981c8cdff4a880a1b (patch)
treec72102dfd88cbeb2a3e72f85eeec3b071a946d17 /src/simulation/elements
parenta623959a314e544f092c85f037d8b564adc2af45 (diff)
downloadpowder-e4907d18815b72bb811e4ef981c8cdff4a880a1b.zip
powder-e4907d18815b72bb811e4ef981c8cdff4a880a1b.tar.gz
Copy dcolour when MERC expands, to let people make coloured mercury thermometers
Diffstat (limited to 'src/simulation/elements')
-rw-r--r--src/simulation/elements/MERC.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/simulation/elements/MERC.cpp b/src/simulation/elements/MERC.cpp
index 1fec32a..655a8b9 100644
--- a/src/simulation/elements/MERC.cpp
+++ b/src/simulation/elements/MERC.cpp
@@ -80,13 +80,14 @@ int Element_MERC::update(UPDATE_FUNC_ARGS)
r = pmap[y+ry][x+rx];
if (parts[i].tmp<=maxtmp)
continue;
- if ((!r)&&parts[i].tmp>=1)//if nothing then create deut
+ if ((!r)&&parts[i].tmp>=1)//if nothing then create MERC
{
np = sim->create_part(-1,x+rx,y+ry,PT_MERC);
if (np<0) continue;
parts[i].tmp--;
parts[np].temp = parts[i].temp;
parts[np].tmp = 0;
+ parts[np].dcolour = parts[i].dcolour;
}
}
for ( trade = 0; trade<4; trade ++)
@@ -118,4 +119,4 @@ int Element_MERC::update(UPDATE_FUNC_ARGS)
}
-Element_MERC::~Element_MERC() {} \ No newline at end of file
+Element_MERC::~Element_MERC() {}