Add DefaultProperties, replaces some of the case statements in create_part
The rest will will in a commit soon that adds the Create event and some other stuff Lua events will come after that PLSM default temp lowered to MAX_TEMP
This commit is contained in:
parent
459790ffe0
commit
0078fb4c6f
@ -1803,7 +1803,7 @@ void GameSave::readPSv(char * saveDataChar, int dataLength)
|
||||
}
|
||||
else
|
||||
{
|
||||
particles[i-1].temp = elements[particles[i-1].type].Temperature;
|
||||
particles[i-1].temp = elements[particles[i-1].type].DefaultProperties.temp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1614,7 +1614,7 @@ int LuaScriptInterface::simulation_resetTemp(lua_State * l)
|
||||
{
|
||||
if (luacon_sim->parts[i].type && (luacon_sim->elements[luacon_sim->parts[i].type].HeatConduct || !onlyConductors))
|
||||
{
|
||||
luacon_sim->parts[i].temp = luacon_sim->elements[luacon_sim->parts[i].type].Temperature;
|
||||
luacon_sim->parts[i].temp = luacon_sim->elements[luacon_sim->parts[i].type].DefaultProperties.temp;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
@ -575,7 +575,7 @@ AnyType TPTScriptInterface::tptS_reset(std::deque<String> * words)
|
||||
{
|
||||
if (sim->parts[i].type)
|
||||
{
|
||||
sim->parts[i].temp = sim->elements[sim->parts[i].type].Temperature;
|
||||
sim->parts[i].temp = sim->elements[sim->parts[i].type].DefaultProperties.temp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3281,45 +3281,21 @@ int Simulation::create_part(int p, int x, int y, int t, int v)
|
||||
|
||||
if (i>parts_lastActiveIndex) parts_lastActiveIndex = i;
|
||||
|
||||
parts[i] = elements[t].DefaultProperties;
|
||||
parts[i].type = t;
|
||||
parts[i].x = (float)x;
|
||||
parts[i].y = (float)y;
|
||||
parts[i].type = t;
|
||||
parts[i].vx = 0;
|
||||
parts[i].vy = 0;
|
||||
parts[i].life = 0;
|
||||
parts[i].ctype = 0;
|
||||
parts[i].temp = elements[t].Temperature;
|
||||
parts[i].tmp = 0;
|
||||
parts[i].tmp2 = 0;
|
||||
parts[i].dcolour = 0;
|
||||
parts[i].flags = 0;
|
||||
if (t == PT_GLAS || t == PT_QRTZ || t == PT_TUNG)
|
||||
{
|
||||
parts[i].pavg[0] = 0.0f;
|
||||
parts[i].pavg[1] = pv[y/CELL][x/CELL];
|
||||
}
|
||||
else
|
||||
{
|
||||
parts[i].pavg[0] = 0.0f;
|
||||
parts[i].pavg[1] = 0.0f;
|
||||
}
|
||||
|
||||
switch (t)
|
||||
{
|
||||
case PT_SOAP:
|
||||
parts[i].tmp = -1;
|
||||
parts[i].tmp2 = -1;
|
||||
break;
|
||||
case PT_ACID: case PT_CAUS:
|
||||
parts[i].life = 75;
|
||||
break;
|
||||
case PT_WARP:
|
||||
parts[i].life = RNG::Ref().between(70, 164);
|
||||
break;
|
||||
case PT_FUSE:
|
||||
parts[i].life = 50;
|
||||
parts[i].tmp = 50;
|
||||
break;
|
||||
case PT_LIFE:
|
||||
if (v < NGOL)
|
||||
{
|
||||
@ -3327,18 +3303,6 @@ int Simulation::create_part(int p, int x, int y, int t, int v)
|
||||
parts[i].ctype = v;
|
||||
}
|
||||
break;
|
||||
case PT_DEUT:
|
||||
parts[i].life = 10;
|
||||
break;
|
||||
case PT_MERC:
|
||||
parts[i].tmp = 10;
|
||||
break;
|
||||
case PT_BRAY:
|
||||
parts[i].life = 30;
|
||||
break;
|
||||
case PT_GPMP: case PT_PUMP:
|
||||
parts[i].life = 10;
|
||||
break;
|
||||
case PT_SING:
|
||||
parts[i].life = RNG::Ref().between(60, 109);
|
||||
break;
|
||||
@ -3349,26 +3313,6 @@ int Simulation::create_part(int p, int x, int y, int t, int v)
|
||||
case PT_CLST:
|
||||
parts[i].tmp = RNG::Ref().between(0, 6);
|
||||
break;
|
||||
case PT_FSEP:
|
||||
parts[i].life = 50;
|
||||
break;
|
||||
case PT_COAL:
|
||||
parts[i].life = 110;
|
||||
parts[i].tmp = 50;
|
||||
break;
|
||||
case PT_IGNT:
|
||||
parts[i].life = 3;
|
||||
break;
|
||||
case PT_FRZW:
|
||||
parts[i].life = 100;
|
||||
break;
|
||||
case PT_PPIP:
|
||||
case PT_PIPE:
|
||||
parts[i].life = 60;
|
||||
break;
|
||||
case PT_BCOL:
|
||||
parts[i].life = 110;
|
||||
break;
|
||||
case PT_FIRE:
|
||||
parts[i].life = RNG::Ref().between(120, 169);
|
||||
break;
|
||||
@ -3381,43 +3325,11 @@ int Simulation::create_part(int p, int x, int y, int t, int v)
|
||||
case PT_LAVA:
|
||||
parts[i].life = RNG::Ref().between(240, 359);
|
||||
break;
|
||||
case PT_NBLE:
|
||||
parts[i].life = 0;
|
||||
break;
|
||||
case PT_ICEI:
|
||||
parts[i].ctype = PT_WATR;
|
||||
break;
|
||||
case PT_MORT:
|
||||
parts[i].vx = 2;
|
||||
break;
|
||||
case PT_EXOT:
|
||||
parts[i].life = 1000;
|
||||
parts[i].tmp = 244;
|
||||
break;
|
||||
case PT_EMBR:
|
||||
parts[i].life = 50;
|
||||
break;
|
||||
case PT_TESC:
|
||||
parts[i].tmp = v;
|
||||
if (parts[i].tmp > 300)
|
||||
parts[i].tmp=300;
|
||||
break;
|
||||
case PT_BIZR: case PT_BIZRG: case PT_BIZRS:
|
||||
parts[i].ctype = 0x47FFFF;
|
||||
break;
|
||||
case PT_DTEC:
|
||||
case PT_TSNS:
|
||||
case PT_LSNS:
|
||||
parts[i].tmp2 = 2;
|
||||
break;
|
||||
case PT_VINE:
|
||||
parts[i].tmp = 1;
|
||||
break;
|
||||
case PT_VIRS:
|
||||
case PT_VRSS:
|
||||
case PT_VRSG:
|
||||
parts[i].pavg[1] = 250;
|
||||
break;
|
||||
case PT_CRMC:
|
||||
parts[i].tmp2 = RNG::Ref().between(0, 4);
|
||||
break;
|
||||
@ -4299,7 +4211,7 @@ void Simulation::UpdateParticles(int start, int end)
|
||||
if ((elements[t].Explosive&2) && pv[y/CELL][x/CELL]>2.5f)
|
||||
{
|
||||
parts[i].life = RNG::Ref().between(180, 259);
|
||||
parts[i].temp = restrict_flt(elements[PT_FIRE].Temperature + (elements[t].Flammable/2), MIN_TEMP, MAX_TEMP);
|
||||
parts[i].temp = restrict_flt(elements[PT_FIRE].DefaultProperties.temp + (elements[t].Flammable/2), MIN_TEMP, MAX_TEMP);
|
||||
t = PT_FIRE;
|
||||
part_change_type(i,x,y,t);
|
||||
pv[y/CELL][x/CELL] += 0.25f * CFDS;
|
||||
|
@ -26,7 +26,6 @@ Element_116::Element_116()
|
||||
|
||||
Weight = 85;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 70;
|
||||
Description = "A failed shared velocity test.";
|
||||
|
||||
|
@ -26,7 +26,7 @@ Element_146::Element_146()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = 9000.0f;
|
||||
DefaultProperties.temp = 9000.0f;
|
||||
HeatConduct = 40;
|
||||
Description = "Brian 6 S6/B246/3";
|
||||
|
||||
|
@ -26,7 +26,6 @@ Element_ACEL::Element_ACEL()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 251;
|
||||
Description = "Accelerator, speeds up nearby elements.";
|
||||
|
||||
|
@ -27,7 +27,6 @@ Element_ACID::Element_ACID()
|
||||
|
||||
Weight = 10;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 34;
|
||||
Description = "Dissolves almost everything.";
|
||||
|
||||
@ -42,6 +41,8 @@ Element_ACID::Element_ACID()
|
||||
HighTemperature = ITH;
|
||||
HighTemperatureTransition = NT;
|
||||
|
||||
DefaultProperties.life = 75;
|
||||
|
||||
Update = &Element_ACID::update;
|
||||
Graphics = &Element_ACID::graphics;
|
||||
}
|
||||
|
@ -26,7 +26,6 @@ Element_AMTR::Element_AMTR()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 70;
|
||||
Description = "Anti-Matter, destroys a majority of particles.";
|
||||
|
||||
|
@ -27,7 +27,6 @@ Element_ANAR::Element_ANAR()
|
||||
|
||||
Weight = 85;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 70;
|
||||
Description = "Anti-air. Very light dust, which behaves opposite gravity.";
|
||||
|
||||
|
@ -26,7 +26,6 @@ Element_ARAY::Element_ARAY()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 0;
|
||||
Description = "Ray Emitter. Rays create points when they collide.";
|
||||
|
||||
|
@ -26,7 +26,6 @@ Element_BANG::Element_BANG()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 88;
|
||||
Description = "TNT, explodes all at once.";
|
||||
|
||||
|
@ -26,7 +26,6 @@ Element_BCLN::Element_BCLN()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 251;
|
||||
Description = "Breakable Clone.";
|
||||
|
||||
|
@ -27,7 +27,6 @@ Element_BCOL::Element_BCOL()
|
||||
|
||||
Weight = 90;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 150;
|
||||
Description = "Broken Coal. Heavy particles, burns slowly.";
|
||||
|
||||
@ -42,6 +41,8 @@ Element_BCOL::Element_BCOL()
|
||||
HighTemperature = ITH;
|
||||
HighTemperatureTransition = NT;
|
||||
|
||||
DefaultProperties.life = 110;
|
||||
|
||||
Update = &Element_COAL::update;
|
||||
Graphics = &Element_COAL::graphics;
|
||||
}
|
||||
|
@ -26,7 +26,6 @@ Element_BGLA::Element_BGLA()
|
||||
|
||||
Weight = 90;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 150;
|
||||
Description = "Broken Glass, heavy particles formed when glass breaks under pressure. Meltable. Bagels.";
|
||||
|
||||
|
@ -26,7 +26,7 @@ Element_BHOL::Element_BHOL()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = R_TEMP+70.0f+273.15f;
|
||||
DefaultProperties.temp = R_TEMP + 70.0f + 273.15f;
|
||||
HeatConduct = 255;
|
||||
Description = "Vacuum, sucks in other particles and heats up.";
|
||||
|
||||
|
@ -26,7 +26,6 @@ Element_BIZR::Element_BIZR()
|
||||
|
||||
Weight = 30;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 29;
|
||||
Description = "Bizarre... contradicts the normal state changes. Paints other elements with its deco color.";
|
||||
|
||||
@ -41,6 +40,8 @@ Element_BIZR::Element_BIZR()
|
||||
HighTemperature = 400.0f;
|
||||
HighTemperatureTransition = PT_BIZRS;
|
||||
|
||||
DefaultProperties.ctype = 0x47FFFF;
|
||||
|
||||
Update = &Element_BIZR::update;
|
||||
Graphics = &Element_BIZR::graphics;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ Element_BIZRG::Element_BIZRG()
|
||||
|
||||
Weight = 1;
|
||||
|
||||
Temperature = R_TEMP-200.0f+273.15f;
|
||||
DefaultProperties.temp = R_TEMP - 200.0f + 273.15f;
|
||||
HeatConduct = 42;
|
||||
Description = "Bizarre gas.";
|
||||
|
||||
@ -41,6 +41,8 @@ Element_BIZRG::Element_BIZRG()
|
||||
HighTemperature = 100.0f;
|
||||
HighTemperatureTransition = PT_BIZR;
|
||||
|
||||
DefaultProperties.ctype = 0x47FFFF;
|
||||
|
||||
Update = &Element_BIZR::update;
|
||||
Graphics = &Element_BIZR::graphics;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ Element_BIZRS::Element_BIZRS()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = R_TEMP+300.0f+273.15f;
|
||||
DefaultProperties.temp = R_TEMP + 300.0f + 273.15f;
|
||||
HeatConduct = 251;
|
||||
Description = "Bizarre solid.";
|
||||
|
||||
@ -41,6 +41,8 @@ Element_BIZRS::Element_BIZRS()
|
||||
HighTemperature = ITH;
|
||||
HighTemperatureTransition = NT;
|
||||
|
||||
DefaultProperties.ctype = 0x47FFFF;
|
||||
|
||||
Update = &Element_BIZR::update;
|
||||
Graphics = &Element_BIZR::graphics;
|
||||
}
|
||||
|
@ -26,7 +26,6 @@ Element_BMTL::Element_BMTL()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 251;
|
||||
Description = "Breakable metal. Common conductive building material, can melt and break under pressure.";
|
||||
|
||||
|
@ -26,7 +26,7 @@ Element_BOMB::Element_BOMB()
|
||||
|
||||
Weight = 30;
|
||||
|
||||
Temperature = R_TEMP-2.0f +273.15f;
|
||||
DefaultProperties.temp = R_TEMP - 2.0f + 273.15f;
|
||||
HeatConduct = 29;
|
||||
Description = "Bomb. Explodes and destroys all surrounding particles when it touches something.";
|
||||
|
||||
|
@ -26,7 +26,7 @@ Element_BOYL::Element_BOYL()
|
||||
|
||||
Weight = 1;
|
||||
|
||||
Temperature = R_TEMP+2.0f +273.15f;
|
||||
DefaultProperties.temp = R_TEMP + 2.0f + 273.15f;
|
||||
HeatConduct = 42;
|
||||
Description = "Boyle, variable pressure gas. Expands when heated.";
|
||||
|
||||
|
@ -26,7 +26,6 @@ Element_BRAY::Element_BRAY()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 251;
|
||||
Description = "Ray Point. Rays create points when they collide.";
|
||||
|
||||
@ -41,6 +40,8 @@ Element_BRAY::Element_BRAY()
|
||||
HighTemperature = ITH;
|
||||
HighTemperatureTransition = NT;
|
||||
|
||||
DefaultProperties.life = 30;
|
||||
|
||||
Update = NULL;
|
||||
Graphics = &Element_BRAY::graphics;
|
||||
}
|
||||
|
@ -26,7 +26,6 @@ Element_BRCK::Element_BRCK()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 251;
|
||||
Description = "Brick, breakable building material.";
|
||||
|
||||
|
@ -26,7 +26,6 @@ Element_BREC::Element_BREC()
|
||||
|
||||
Weight = 90;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 211;
|
||||
Description = "Broken electronics. Formed from EMP blasts, and when constantly sparked while under pressure, turns to EXOT.";
|
||||
|
||||
|
@ -26,7 +26,6 @@ Element_BRMT::Element_BRMT()
|
||||
|
||||
Weight = 90;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 211;
|
||||
Description = "Broken metal. Created when iron rusts or when metals break from pressure.";
|
||||
|
||||
|
@ -26,7 +26,6 @@ Element_BTRY::Element_BTRY()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 251;
|
||||
Description = "Battery. Generates infinite electricity.";
|
||||
|
||||
|
@ -26,7 +26,7 @@ Element_BVBR::Element_BVBR()
|
||||
|
||||
Weight = 67;
|
||||
|
||||
Temperature = 273.15f;
|
||||
DefaultProperties.temp = 273.15f;
|
||||
HeatConduct = 164;
|
||||
Description = "Broken vibranium.";
|
||||
|
||||
|
@ -26,7 +26,6 @@ Element_C5::Element_C5()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 88;
|
||||
Description = "Cold explosive, set off by anything cold.";
|
||||
|
||||
|
@ -26,7 +26,6 @@ Element_CAUS::Element_CAUS()
|
||||
|
||||
Weight = 1;
|
||||
|
||||
Temperature = R_TEMP+273.15f;
|
||||
HeatConduct = 70;
|
||||
Description = "Caustic Gas, acts like ACID.";
|
||||
|
||||
@ -41,6 +40,8 @@ Element_CAUS::Element_CAUS()
|
||||
HighTemperature = ITH;
|
||||
HighTemperatureTransition = NT;
|
||||
|
||||
DefaultProperties.life = 75;
|
||||
|
||||
Update = &Element_CAUS::update;
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@ Element_CBNW::Element_CBNW()
|
||||
|
||||
Weight = 30;
|
||||
|
||||
Temperature = R_TEMP-2.0f +273.15f;
|
||||
DefaultProperties.temp = R_TEMP - 2.0f + 273.15f;
|
||||
HeatConduct = 29;
|
||||
Description = "Carbonated water. Slowly releases CO2.";
|
||||
|
||||
|
@ -28,7 +28,7 @@ Element_CFLM::Element_CFLM()
|
||||
|
||||
Weight = 2;
|
||||
|
||||
Temperature = 0.0f;
|
||||
DefaultProperties.temp = 0.0f;
|
||||
HeatConduct = 88;
|
||||
Description = "Sub-zero flame.";
|
||||
|
||||
|
@ -26,7 +26,6 @@ Element_CLNE::Element_CLNE()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 251;
|
||||
Description = "Clone. Duplicates any particles it touches.";
|
||||
|
||||
|
@ -26,7 +26,6 @@ Element_CLST::Element_CLST()
|
||||
|
||||
Weight = 55;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 70;
|
||||
Description = "Clay dust. Produces paste when mixed with water.";
|
||||
|
||||
|
@ -26,7 +26,6 @@ Element_CNCT::Element_CNCT()
|
||||
|
||||
Weight = 55;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 100;
|
||||
Description = "Concrete, stronger than stone.";
|
||||
|
||||
|
@ -26,7 +26,6 @@ Element_CO2::Element_CO2()
|
||||
|
||||
Weight = 1;
|
||||
|
||||
Temperature = R_TEMP+273.15f;
|
||||
HeatConduct = 88;
|
||||
Description = "Carbon Dioxide. Heavy gas, drifts downwards. Carbonates water and turns to dry ice when cold.";
|
||||
|
||||
|
@ -27,7 +27,6 @@ Element_COAL::Element_COAL()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 200;
|
||||
Description = "Coal, Burns very slowly. Gets red when hot.";
|
||||
|
||||
@ -42,6 +41,9 @@ Element_COAL::Element_COAL()
|
||||
HighTemperature = ITH;
|
||||
HighTemperatureTransition = NT;
|
||||
|
||||
DefaultProperties.life = 110;
|
||||
DefaultProperties.tmp = 50;
|
||||
|
||||
Update = &Element_COAL::update;
|
||||
Graphics = &Element_COAL::graphics;
|
||||
}
|
||||
|
@ -26,7 +26,6 @@ Element_CONV::Element_CONV()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 251;
|
||||
Description = "Converter. Converts everything into whatever it first touches.";
|
||||
|
||||
|
@ -26,7 +26,6 @@ Element_CRAY::Element_CRAY()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 0;
|
||||
Description = "Particle Ray Emitter. Creates a beam of particles set by its ctype, with a range set by tmp.";
|
||||
|
||||
@ -166,7 +165,7 @@ bool Element_CRAY::ctypeDraw(CTYPEDRAW_FUNC_ARGS)
|
||||
{
|
||||
sim->parts[i].ctype |= PMAPID(30);
|
||||
}
|
||||
sim->parts[i].temp = sim->elements[t].Temperature;
|
||||
sim->parts[i].temp = sim->elements[t].DefaultProperties.temp;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,6 @@ Element_CRMC::Element_CRMC()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = R_TEMP+273.15f;
|
||||
HeatConduct = 35;
|
||||
Description = "Ceramic. Gets stronger under pressure.";
|
||||
|
||||
|
@ -26,7 +26,6 @@ Element_DCEL::Element_DCEL()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 251;
|
||||
Description = "Decelerator, slows down nearby elements.";
|
||||
|
||||
|
@ -26,7 +26,6 @@ Element_DESL::Element_DESL()
|
||||
|
||||
Weight = 15;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 42;
|
||||
Description = "Liquid diesel. Explodes under high pressure and temperatures.";
|
||||
|
||||
|
@ -26,7 +26,6 @@ Element_DEST::Element_DEST()
|
||||
|
||||
Weight = 101;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 150;
|
||||
Description = "More destructive Bomb, can break through virtually anything.";
|
||||
|
||||
|
@ -26,7 +26,7 @@ Element_DEUT::Element_DEUT()
|
||||
|
||||
Weight = 31;
|
||||
|
||||
Temperature = R_TEMP-2.0f +273.15f;
|
||||
DefaultProperties.temp = R_TEMP - 2.0f + 273.15f;
|
||||
HeatConduct = 251;
|
||||
Description = "Deuterium oxide. Volume changes with temp, radioactive with neutrons.";
|
||||
|
||||
@ -41,6 +41,8 @@ Element_DEUT::Element_DEUT()
|
||||
HighTemperature = ITH;
|
||||
HighTemperatureTransition = NT;
|
||||
|
||||
DefaultProperties.life = 10;
|
||||
|
||||
Update = &Element_DEUT::update;
|
||||
Graphics = &Element_DEUT::graphics;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ Element_DLAY::Element_DLAY()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = 4.0f+273.15f;
|
||||
DefaultProperties.temp = 4.0f + 273.15f;
|
||||
HeatConduct = 0;
|
||||
Description = "Conducts with temperature-dependent delay. (use HEAT/COOL).";
|
||||
|
||||
|
@ -26,7 +26,7 @@ Element_DMG::Element_DMG()
|
||||
|
||||
Weight = 30;
|
||||
|
||||
Temperature = R_TEMP-2.0f +273.15f;
|
||||
DefaultProperties.temp = R_TEMP - 2.0f + 273.15f;
|
||||
HeatConduct = 29;
|
||||
Description = "Generates damaging pressure and breaks any elements it hits.";
|
||||
|
||||
|
@ -26,7 +26,6 @@ Element_DMND::Element_DMND()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 186;
|
||||
Description = "Diamond. Indestructible.";
|
||||
|
||||
|
@ -26,7 +26,6 @@ Element_DRAY::Element_DRAY()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = R_TEMP + 273.15f;
|
||||
HeatConduct = 0;
|
||||
Description = "Duplicator ray. Replicates a line of particles in front of it.";
|
||||
|
||||
|
@ -26,7 +26,7 @@ Element_DRIC::Element_DRIC()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = 172.65f;
|
||||
DefaultProperties.temp = 172.65f;
|
||||
HeatConduct = 2;
|
||||
Description = "Dry Ice, formed when CO2 is cooled.";
|
||||
|
||||
|
@ -26,7 +26,7 @@ Element_DSTW::Element_DSTW()
|
||||
|
||||
Weight = 30;
|
||||
|
||||
Temperature = R_TEMP-2.0f +273.15f;
|
||||
DefaultProperties.temp = R_TEMP - 2.0f + 273.15f;
|
||||
HeatConduct = 23;
|
||||
Description = "Distilled water, does not conduct electricity.";
|
||||
|
||||
|
@ -26,7 +26,6 @@ Element_DTEC::Element_DTEC()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 0;
|
||||
Description = "Detector, creates a spark when something with its ctype is nearby.";
|
||||
|
||||
@ -41,6 +40,8 @@ Element_DTEC::Element_DTEC()
|
||||
HighTemperature = ITH;
|
||||
HighTemperatureTransition = NT;
|
||||
|
||||
DefaultProperties.tmp2 = 2;
|
||||
|
||||
Update = &Element_DTEC::update;
|
||||
CtypeDraw = &Element::ctypeDrawVInTmp;
|
||||
}
|
||||
|
@ -27,7 +27,6 @@ Element_DUST::Element_DUST()
|
||||
|
||||
Weight = 85;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 70;
|
||||
Description = "Very light dust. Flammable.";
|
||||
|
||||
|
@ -26,7 +26,6 @@ Element_DYST::Element_DYST()
|
||||
|
||||
Weight = 80;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 70;
|
||||
Description = "Dead Yeast.";
|
||||
|
||||
|
@ -26,7 +26,7 @@ Element_ELEC::Element_ELEC()
|
||||
|
||||
Weight = -1;
|
||||
|
||||
Temperature = R_TEMP+200.0f+273.15f;
|
||||
DefaultProperties.temp = R_TEMP + 200.0f + 273.15f;
|
||||
HeatConduct = 251;
|
||||
Description = "Electrons. Sparks electronics, reacts with NEUT and WATR.";
|
||||
|
||||
|
@ -26,7 +26,7 @@ Element_EMBR::Element_EMBR()
|
||||
|
||||
Weight = 30;
|
||||
|
||||
Temperature = 500.0f +273.15f;
|
||||
DefaultProperties.temp = 500.0f + 273.15f;
|
||||
HeatConduct = 29;
|
||||
Description = "Sparks. Formed by explosions.";
|
||||
|
||||
@ -41,6 +41,8 @@ Element_EMBR::Element_EMBR()
|
||||
HighTemperature = ITH;
|
||||
HighTemperatureTransition = NT;
|
||||
|
||||
DefaultProperties.life = 50;
|
||||
|
||||
Update = &Element_EMBR::update;
|
||||
Graphics = &Element_EMBR::graphics;
|
||||
}
|
||||
|
@ -28,7 +28,6 @@ Element_EMP::Element_EMP()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 121;
|
||||
Description = "Electromagnetic pulse. Breaks activated electronics.";
|
||||
|
||||
|
@ -28,7 +28,6 @@ Element_ETRD::Element_ETRD()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 251;
|
||||
Description = "Electrode. Creates a surface that allows Plasma arcs. (Use sparingly)";
|
||||
|
||||
|
@ -26,7 +26,7 @@ Element_EXOT::Element_EXOT()
|
||||
|
||||
Weight = 46;
|
||||
|
||||
Temperature = R_TEMP-2.0f +273.15f;
|
||||
DefaultProperties.temp = R_TEMP - 2.0f + 273.15f;
|
||||
HeatConduct = 250;
|
||||
Description = "Exotic matter. Explodes with excess exposure to electrons. Has many other odd reactions.";
|
||||
|
||||
@ -41,6 +41,9 @@ Element_EXOT::Element_EXOT()
|
||||
HighTemperature = ITH;
|
||||
HighTemperatureTransition = NT;
|
||||
|
||||
DefaultProperties.life = 1000;
|
||||
DefaultProperties.tmp = 244;
|
||||
|
||||
Update = &Element_EXOT::update;
|
||||
Graphics = &Element_EXOT::graphics;
|
||||
}
|
||||
|
@ -28,7 +28,6 @@ Element::Element():
|
||||
|
||||
Weight(50),
|
||||
|
||||
Temperature(273.15f),
|
||||
HeatConduct(128),
|
||||
Description("No description"),
|
||||
|
||||
@ -48,6 +47,8 @@ Element::Element():
|
||||
CtypeDraw(nullptr),
|
||||
IconGenerator(nullptr)
|
||||
{
|
||||
memset(&DefaultProperties, 0, sizeof(Particle));
|
||||
DefaultProperties.temp = R_TEMP + 273.15f;
|
||||
}
|
||||
|
||||
std::vector<StructProperty> const &Element::GetProperties()
|
||||
@ -75,7 +76,7 @@ std::vector<StructProperty> const &Element::GetProperties()
|
||||
{ "Hardness", StructProperty::Integer, offsetof(Element, Hardness ) },
|
||||
{ "PhotonReflectWavelengths", StructProperty::UInteger, offsetof(Element, PhotonReflectWavelengths ) },
|
||||
{ "Weight", StructProperty::Integer, offsetof(Element, Weight ) },
|
||||
{ "Temperature", StructProperty::Float, offsetof(Element, Temperature ) },
|
||||
{ "Temperature", StructProperty::Float, offsetof(Element, DefaultProperties.temp ) },
|
||||
{ "HeatConduct", StructProperty::UChar, offsetof(Element, HeatConduct ) },
|
||||
{ "Description", StructProperty::String, offsetof(Element, Description ) },
|
||||
{ "State", StructProperty::Removed, 0 },
|
||||
|
@ -2,8 +2,9 @@
|
||||
#define ELEMENTCLASS_H
|
||||
|
||||
#include "graphics/Pixel.h"
|
||||
#include "simulation/StructProperty.h"
|
||||
#include "simulation/ElementDefs.h"
|
||||
#include "simulation/Particle.h"
|
||||
#include "simulation/StructProperty.h"
|
||||
|
||||
class Simulation;
|
||||
class Renderer;
|
||||
@ -36,7 +37,6 @@ public:
|
||||
// Photon wavelengths are ANDed with this value when a photon hits an element, meaning that only wavelengths present in both this value and the original photon will remain in the reflected photon
|
||||
unsigned int PhotonReflectWavelengths;
|
||||
int Weight;
|
||||
float Temperature;
|
||||
unsigned char HeatConduct;
|
||||
String Description;
|
||||
unsigned int Properties;
|
||||
@ -56,6 +56,8 @@ public:
|
||||
|
||||
VideoBuffer * (*IconGenerator)(int, int, int);
|
||||
|
||||
Particle DefaultProperties;
|
||||
|
||||
Element();
|
||||
virtual ~Element() {}
|
||||
static int defaultGraphics(GRAPHICS_FUNC_ARGS);
|
||||
|
@ -27,7 +27,7 @@ Element_FIGH::Element_FIGH()
|
||||
|
||||
Weight = 50;
|
||||
|
||||
Temperature = R_TEMP+14.6f+273.15f;
|
||||
DefaultProperties.temp = R_TEMP + 14.6f + 273.15f;
|
||||
HeatConduct = 0;
|
||||
Description = "Fighter. Tries to kill stickmen. You must first give it an element to kill him with.";
|
||||
|
||||
@ -42,6 +42,8 @@ Element_FIGH::Element_FIGH()
|
||||
HighTemperature = 620.0f;
|
||||
HighTemperatureTransition = PT_FIRE;
|
||||
|
||||
DefaultProperties.life = 100;
|
||||
|
||||
Update = &Element_FIGH::update;
|
||||
Graphics = &Element_STKM::graphics;
|
||||
}
|
||||
@ -89,8 +91,8 @@ int Element_FIGH::update(UPDATE_FUNC_ARGS)
|
||||
if ((pow(float(tarx-x), 2) + pow(float(tary-y), 2))<600)
|
||||
{
|
||||
if (figh->elem == PT_LIGH || figh->elem == PT_NEUT
|
||||
|| sim->elements[figh->elem].Properties&(PROP_DEADLY|PROP_RADIOACTIVE)
|
||||
|| sim->elements[figh->elem].Temperature>=323 || sim->elements[figh->elem].Temperature<=243)
|
||||
|| sim->elements[figh->elem].Properties & (PROP_DEADLY | PROP_RADIOACTIVE)
|
||||
|| sim->elements[figh->elem].DefaultProperties.temp >= 323 || sim->elements[figh->elem].DefaultProperties.temp <= 243)
|
||||
figh->comm = (int)figh->comm | 0x08;
|
||||
}
|
||||
else if (tarx<x)
|
||||
|
@ -26,7 +26,6 @@ Element_FILT::Element_FILT()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 251;
|
||||
Description = "Filter for photons, changes the color.";
|
||||
|
||||
|
@ -28,7 +28,7 @@ Element_FIRE::Element_FIRE()
|
||||
|
||||
Weight = 2;
|
||||
|
||||
Temperature = R_TEMP+400.0f+273.15f;
|
||||
DefaultProperties.temp = R_TEMP + 400.0f + 273.15f;
|
||||
HeatConduct = 88;
|
||||
Description = "Ignites flammable materials. Heats air.";
|
||||
|
||||
@ -160,7 +160,7 @@ int Element_FIRE::update(UPDATE_FUNC_ARGS)
|
||||
(rt != PT_SPNG || parts[ID(r)].life == 0))
|
||||
{
|
||||
sim->part_change_type(ID(r), x+rx, y+ry, PT_FIRE);
|
||||
parts[ID(r)].temp = restrict_flt(sim->elements[PT_FIRE].Temperature + (sim->elements[rt].Flammable/2), MIN_TEMP, MAX_TEMP);
|
||||
parts[ID(r)].temp = restrict_flt(sim->elements[PT_FIRE].DefaultProperties.temp + (sim->elements[rt].Flammable/2), MIN_TEMP, MAX_TEMP);
|
||||
parts[ID(r)].life = RNG::Ref().between(180, 259);
|
||||
parts[ID(r)].tmp = parts[ID(r)].ctype = 0;
|
||||
if (sim->elements[rt].Explosive)
|
||||
|
@ -27,7 +27,6 @@ Element_FIRW::Element_FIRW()
|
||||
|
||||
Weight = 55;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 70;
|
||||
Description = "Fireworks! Colorful, set off by fire.";
|
||||
|
||||
|
@ -26,7 +26,7 @@ Element_FOG::Element_FOG()
|
||||
|
||||
Weight = 1;
|
||||
|
||||
Temperature = 243.15f;
|
||||
DefaultProperties.temp = 243.15f;
|
||||
HeatConduct = 100;
|
||||
Description = "Fog, created when an electric current is passed through RIME.";
|
||||
|
||||
|
@ -26,7 +26,7 @@ Element_FRAY::Element_FRAY()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = 20.0f+0.0f +273.15f;
|
||||
DefaultProperties.temp = 20.0f + 273.15f;
|
||||
HeatConduct = 0;
|
||||
Description = "Force Emitter. Pushes or pulls objects based on its temperature. Use like ARAY.";
|
||||
|
||||
|
@ -26,7 +26,6 @@ Element_FRME::Element_FRME()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 0;
|
||||
Description = "Frame, can be used with pistons to push many particles.";
|
||||
|
||||
|
@ -26,7 +26,7 @@ Element_FRZW::Element_FRZW()
|
||||
|
||||
Weight = 30;
|
||||
|
||||
Temperature = 120.0f;
|
||||
DefaultProperties.temp = 120.0f;
|
||||
HeatConduct = 29;
|
||||
Description = "Freeze water. Hybrid liquid formed when Freeze powder melts.";
|
||||
|
||||
@ -41,6 +41,8 @@ Element_FRZW::Element_FRZW()
|
||||
HighTemperature = ITH;
|
||||
HighTemperatureTransition = NT;
|
||||
|
||||
DefaultProperties.life = 100;
|
||||
|
||||
Update = &Element_FRZW::update;
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@ Element_FRZZ::Element_FRZZ()
|
||||
|
||||
Weight = 50;
|
||||
|
||||
Temperature = 253.15f;
|
||||
DefaultProperties.temp = 253.15f;
|
||||
HeatConduct = 46;
|
||||
Description = "Freeze powder. When melted, forms ice that always cools. Spreads with regular water.";
|
||||
|
||||
|
@ -26,7 +26,6 @@ Element_FSEP::Element_FSEP()
|
||||
|
||||
Weight = 70;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 70;
|
||||
Description = "Fuse Powder. Burns slowly like FUSE.";
|
||||
|
||||
@ -41,6 +40,8 @@ Element_FSEP::Element_FSEP()
|
||||
HighTemperature = ITH;
|
||||
HighTemperatureTransition = NT;
|
||||
|
||||
DefaultProperties.life = 50;
|
||||
|
||||
Update = &Element_FSEP::update;
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,6 @@ Element_FUSE::Element_FUSE()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 200;
|
||||
Description = "Burns slowly. Ignites at somewhat high temperatures or with electricity.";
|
||||
|
||||
@ -41,6 +40,9 @@ Element_FUSE::Element_FUSE()
|
||||
HighTemperature = ITH;
|
||||
HighTemperatureTransition = NT;
|
||||
|
||||
DefaultProperties.life = 50;
|
||||
DefaultProperties.tmp = 50;
|
||||
|
||||
Update = &Element_FUSE::update;
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,6 @@ Element_FWRK::Element_FWRK()
|
||||
|
||||
Weight = 97;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 100;
|
||||
Description = "Original version of fireworks, activated by heat/neutrons.";
|
||||
|
||||
|
@ -26,7 +26,7 @@ Element_GAS::Element_GAS()
|
||||
|
||||
Weight = 1;
|
||||
|
||||
Temperature = R_TEMP+2.0f +273.15f;
|
||||
DefaultProperties.temp = R_TEMP + 2.0f + 273.15f;
|
||||
HeatConduct = 42;
|
||||
Description = "Diffuses quickly and is flammable. Liquefies into OIL under pressure.";
|
||||
|
||||
|
@ -26,7 +26,7 @@ Element_GBMB::Element_GBMB()
|
||||
|
||||
Weight = 30;
|
||||
|
||||
Temperature = R_TEMP-2.0f +273.15f;
|
||||
DefaultProperties.temp = R_TEMP - 2.0f + 273.15f;
|
||||
HeatConduct = 29;
|
||||
Description = "Gravity bomb. Sticks to the first object it touches then produces a strong gravity push.";
|
||||
|
||||
|
@ -26,7 +26,7 @@ Element_GEL::Element_GEL()
|
||||
|
||||
Weight = 35;
|
||||
|
||||
Temperature = R_TEMP-2.0f +273.15f;
|
||||
DefaultProperties.temp = R_TEMP - 2.0f + 273.15f;
|
||||
HeatConduct = 29;
|
||||
Description = "Gel. A liquid with variable viscosity and heat conductivity.";
|
||||
|
||||
|
@ -26,7 +26,6 @@ Element_GLAS::Element_GLAS()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 150;
|
||||
Description = "Glass. Meltable. Shatters under pressure, and refracts photons.";
|
||||
|
||||
|
@ -26,7 +26,7 @@ Element_GLOW::Element_GLOW()
|
||||
|
||||
Weight = 40;
|
||||
|
||||
Temperature = R_TEMP+20.0f+273.15f;
|
||||
DefaultProperties.temp = R_TEMP + 20.0f + 273.15f;
|
||||
HeatConduct = 44;
|
||||
Description = "Glow, Glows under pressure.";
|
||||
|
||||
|
@ -28,7 +28,6 @@ Element_GOLD::Element_GOLD()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 251;
|
||||
Description = "Corrosion resistant metal, will reverse corrosion of iron.";
|
||||
|
||||
|
@ -27,7 +27,6 @@ Element_GOO::Element_GOO()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 75;
|
||||
Description = "Deforms and disappears under pressure.";
|
||||
|
||||
|
@ -26,7 +26,6 @@ Element_GPMP::Element_GPMP()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = 0.0f +273.15f;
|
||||
HeatConduct = 0;
|
||||
Description = "Gravity pump. Changes gravity to its temp when activated. (use HEAT/COOL)";
|
||||
|
||||
@ -41,6 +40,8 @@ Element_GPMP::Element_GPMP()
|
||||
HighTemperature = ITH;
|
||||
HighTemperatureTransition = NT;
|
||||
|
||||
DefaultProperties.life = 10;
|
||||
|
||||
Update = &Element_GPMP::update;
|
||||
Graphics = &Element_GPMP::graphics;
|
||||
}
|
||||
|
@ -28,7 +28,6 @@ Element_GRAV::Element_GRAV()
|
||||
|
||||
Weight = 85;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 70;
|
||||
Description = "Very light dust. Changes colour based on velocity.";
|
||||
|
||||
|
@ -26,7 +26,6 @@ Element_GRVT::Element_GRVT()
|
||||
|
||||
Weight = -1;
|
||||
|
||||
Temperature = R_TEMP+273.15f;
|
||||
HeatConduct = 61;
|
||||
Description = "Gravitons. Create Newtonian Gravity.";
|
||||
|
||||
@ -41,6 +40,8 @@ Element_GRVT::Element_GRVT()
|
||||
HighTemperature = ITH;
|
||||
HighTemperatureTransition = NT;
|
||||
|
||||
DefaultProperties.tmp = 7;
|
||||
|
||||
Update = &Element_GRVT::update;
|
||||
Graphics = &Element_GRVT::graphics;
|
||||
}
|
||||
|
@ -26,7 +26,6 @@ Element_GUNP::Element_GUNP()
|
||||
|
||||
Weight = 85;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 97;
|
||||
Description = "Gunpowder. Light dust, explodes on contact with fire or spark.";
|
||||
|
||||
|
@ -26,7 +26,6 @@ Element_H2::Element_H2()
|
||||
|
||||
Weight = 1;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 251;
|
||||
Description = "Hydrogen. Combusts with OXYG to make WATR. Undergoes fusion at high temperature and pressure.";
|
||||
|
||||
|
@ -29,7 +29,6 @@ Element_HEAC::Element_HEAC()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = R_TEMP+273.15f;
|
||||
HeatConduct = 251;
|
||||
Description = "Rapid heat conductor.";
|
||||
|
||||
|
@ -26,7 +26,6 @@ Element_HSWC::Element_HSWC()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 251;
|
||||
Description = "Heat switch. Conducts heat only when activated.";
|
||||
|
||||
|
@ -26,7 +26,7 @@ Element_ICEI::Element_ICEI()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = R_TEMP-50.0f+273.15f;
|
||||
DefaultProperties.temp = R_TEMP - 50.0f + 273.15f;
|
||||
HeatConduct = 46;
|
||||
Description = "Crushes under pressure. Cools down air.";
|
||||
|
||||
@ -41,6 +41,8 @@ Element_ICEI::Element_ICEI()
|
||||
HighTemperature = 252.05f;
|
||||
HighTemperatureTransition = ST;
|
||||
|
||||
DefaultProperties.ctype = PT_WATR;
|
||||
|
||||
Update = &Element_ICEI::update;
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,6 @@ Element_IGNT::Element_IGNT()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 88;
|
||||
Description = "Ignition cord. Burns slowly with fire and sparks.";
|
||||
|
||||
@ -41,6 +40,8 @@ Element_IGNT::Element_IGNT()
|
||||
HighTemperature = 673.0f;
|
||||
HighTemperatureTransition = PT_FIRE;
|
||||
|
||||
DefaultProperties.life = 3;
|
||||
|
||||
Update = &Element_IGNT::update;
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,6 @@ Element_INSL::Element_INSL()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 0;
|
||||
Description = "Insulator, does not conduct heat and blocks electricity.";
|
||||
|
||||
|
@ -26,7 +26,6 @@ Element_INST::Element_INST()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 251;
|
||||
Description = "Instantly conducts, PSCN to charge, NSCN to take.";
|
||||
|
||||
|
@ -26,7 +26,6 @@ Element_INVIS::Element_INVIS()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 164;
|
||||
Description = "Invisible to particles while under pressure.";
|
||||
|
||||
|
@ -26,7 +26,6 @@ Element_INWR::Element_INWR()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 251;
|
||||
Description = "Insulated Wire. Doesn't conduct to metal or semiconductors.";
|
||||
|
||||
|
@ -26,7 +26,6 @@ Element_IRON::Element_IRON()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 251;
|
||||
Description = "Rusts with salt, can be used for electrolysis of WATR.";
|
||||
|
||||
|
@ -26,7 +26,7 @@ Element_ISOZ::Element_ISOZ()
|
||||
|
||||
Weight = 24;
|
||||
|
||||
Temperature = R_TEMP-2.0f +273.15f;
|
||||
DefaultProperties.temp = R_TEMP - 2.0f + 273.15f;
|
||||
HeatConduct = 29;
|
||||
Description = "Isotope-Z. Radioactive liquid, decays into photons when touching PHOT or under negative pressure.";
|
||||
|
||||
|
@ -26,7 +26,7 @@ Element_ISZS::Element_ISZS()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = 140.00f;
|
||||
DefaultProperties.temp = 140.00f;
|
||||
HeatConduct = 251;
|
||||
Description = "Solid form of ISOZ, slowly decays into PHOT.";
|
||||
|
||||
|
@ -27,7 +27,7 @@ Element_LAVA::Element_LAVA()
|
||||
|
||||
Weight = 45;
|
||||
|
||||
Temperature = R_TEMP+1500.0f+273.15f;
|
||||
DefaultProperties.temp = R_TEMP + 1500.0f + 273.15f;
|
||||
HeatConduct = 60;
|
||||
Description = "Molten lava. Ignites flammable materials. Generated when metals and other materials melt, solidifies when cold.";
|
||||
|
||||
|
@ -26,7 +26,6 @@ Element_LCRY::Element_LCRY()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 251;
|
||||
Description = "Liquid Crystal. Changes colour when charged. (PSCN Charges, NSCN Discharges)";
|
||||
|
||||
|
@ -28,7 +28,6 @@ Element_LDTC::Element_LDTC()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = R_TEMP + 273.15f;
|
||||
HeatConduct = 0;
|
||||
Description = "Linear detector. Scans in 8 directions for particles with its ctype and creates a spark on the opposite side.";
|
||||
|
||||
|
@ -30,7 +30,7 @@ Element_LIFE::Element_LIFE()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = 9000.0f;
|
||||
DefaultProperties.temp = 9000.0f;
|
||||
HeatConduct = 40;
|
||||
Description = "Game Of Life! B3/S23";
|
||||
|
||||
|
@ -27,7 +27,6 @@ Element_LIGH::Element_LIGH()
|
||||
|
||||
Weight = 100;
|
||||
|
||||
Temperature = R_TEMP+0.0f +273.15f;
|
||||
HeatConduct = 0;
|
||||
Description = "Lightning. Change the brush size to set the size of the lightning.";
|
||||
|
||||
@ -94,7 +93,7 @@ int Element_LIGH::update(UPDATE_FUNC_ARGS)
|
||||
sim->elements[rt].Flammable && RNG::Ref().chance(sim->elements[rt].Flammable + sim->pv[(y+ry)/CELL][(x+rx)/CELL] * 10.0f, 1000))
|
||||
{
|
||||
sim->part_change_type(ID(r),x+rx,y+ry,PT_FIRE);
|
||||
parts[ID(r)].temp = restrict_flt(sim->elements[PT_FIRE].Temperature + (sim->elements[rt].Flammable/2), MIN_TEMP, MAX_TEMP);
|
||||
parts[ID(r)].temp = restrict_flt(sim->elements[PT_FIRE].DefaultProperties.temp + (sim->elements[rt].Flammable/2), MIN_TEMP, MAX_TEMP);
|
||||
parts[ID(r)].life = RNG::Ref().between(180, 259);
|
||||
parts[ID(r)].tmp = parts[ID(r)].ctype = 0;
|
||||
if (sim->elements[rt].Explosive)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user