Copy dcolour when MERC expands, to let people make coloured mercury thermometers

This commit is contained in:
jacksonmj 2012-12-16 00:16:05 +00:00
parent a623959a31
commit e4907d1881

View File

@ -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() {}
Element_MERC::~Element_MERC() {}