From 0078fb4c6fc5b9e04ff5d9b1802c44d576163cb9 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Mon, 25 Nov 2019 22:08:18 -0500 Subject: [PATCH] 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 --- src/client/GameSave.cpp | 2 +- src/lua/LuaScriptInterface.cpp | 2 +- src/lua/TPTScriptInterface.cpp | 2 +- src/simulation/Simulation.cpp | 94 +---------------------------- src/simulation/elements/116.cpp | 1 - src/simulation/elements/146.cpp | 2 +- src/simulation/elements/ACEL.cpp | 1 - src/simulation/elements/ACID.cpp | 3 +- src/simulation/elements/AMTR.cpp | 1 - src/simulation/elements/ANAR.cpp | 1 - src/simulation/elements/ARAY.cpp | 1 - src/simulation/elements/BANG.cpp | 1 - src/simulation/elements/BCLN.cpp | 1 - src/simulation/elements/BCOL.cpp | 3 +- src/simulation/elements/BGLA.cpp | 1 - src/simulation/elements/BHOL.cpp | 2 +- src/simulation/elements/BIZR.cpp | 3 +- src/simulation/elements/BIZRG.cpp | 4 +- src/simulation/elements/BIZRS.cpp | 4 +- src/simulation/elements/BMTL.cpp | 1 - src/simulation/elements/BOMB.cpp | 2 +- src/simulation/elements/BOYL.cpp | 2 +- src/simulation/elements/BRAY.cpp | 3 +- src/simulation/elements/BRCK.cpp | 1 - src/simulation/elements/BREC.cpp | 1 - src/simulation/elements/BRMT.cpp | 1 - src/simulation/elements/BTRY.cpp | 1 - src/simulation/elements/BVBR.cpp | 2 +- src/simulation/elements/C5.cpp | 1 - src/simulation/elements/CAUS.cpp | 3 +- src/simulation/elements/CBNW.cpp | 2 +- src/simulation/elements/CFLM.cpp | 2 +- src/simulation/elements/CLNE.cpp | 1 - src/simulation/elements/CLST.cpp | 1 - src/simulation/elements/CNCT.cpp | 1 - src/simulation/elements/CO2.cpp | 1 - src/simulation/elements/COAL.cpp | 4 +- src/simulation/elements/CONV.cpp | 1 - src/simulation/elements/CRAY.cpp | 3 +- src/simulation/elements/CRMC.cpp | 1 - src/simulation/elements/DCEL.cpp | 1 - src/simulation/elements/DESL.cpp | 1 - src/simulation/elements/DEST.cpp | 1 - src/simulation/elements/DEUT.cpp | 4 +- src/simulation/elements/DLAY.cpp | 2 +- src/simulation/elements/DMG.cpp | 2 +- src/simulation/elements/DMND.cpp | 1 - src/simulation/elements/DRAY.cpp | 1 - src/simulation/elements/DRIC.cpp | 2 +- src/simulation/elements/DSTW.cpp | 2 +- src/simulation/elements/DTEC.cpp | 3 +- src/simulation/elements/DUST.cpp | 1 - src/simulation/elements/DYST.cpp | 1 - src/simulation/elements/ELEC.cpp | 2 +- src/simulation/elements/EMBR.cpp | 4 +- src/simulation/elements/EMP.cpp | 1 - src/simulation/elements/ETRD.cpp | 1 - src/simulation/elements/EXOT.cpp | 5 +- src/simulation/elements/Element.cpp | 5 +- src/simulation/elements/Element.h | 6 +- src/simulation/elements/FIGH.cpp | 8 ++- src/simulation/elements/FILT.cpp | 1 - src/simulation/elements/FIRE.cpp | 4 +- src/simulation/elements/FIRW.cpp | 1 - src/simulation/elements/FOG.cpp | 2 +- src/simulation/elements/FRAY.cpp | 2 +- src/simulation/elements/FRME.cpp | 1 - src/simulation/elements/FRZW.cpp | 4 +- src/simulation/elements/FRZZ.cpp | 2 +- src/simulation/elements/FSEP.cpp | 3 +- src/simulation/elements/FUSE.cpp | 4 +- src/simulation/elements/FWRK.cpp | 1 - src/simulation/elements/GAS.cpp | 2 +- src/simulation/elements/GBMB.cpp | 2 +- src/simulation/elements/GEL.cpp | 2 +- src/simulation/elements/GLAS.cpp | 1 - src/simulation/elements/GLOW.cpp | 2 +- src/simulation/elements/GOLD.cpp | 1 - src/simulation/elements/GOO.cpp | 1 - src/simulation/elements/GPMP.cpp | 3 +- src/simulation/elements/GRAV.cpp | 1 - src/simulation/elements/GRVT.cpp | 3 +- src/simulation/elements/GUNP.cpp | 1 - src/simulation/elements/H2.cpp | 1 - src/simulation/elements/HEAC.cpp | 1 - src/simulation/elements/HSWC.cpp | 1 - src/simulation/elements/ICEI.cpp | 4 +- src/simulation/elements/IGNT.cpp | 3 +- src/simulation/elements/INSL.cpp | 1 - src/simulation/elements/INST.cpp | 1 - src/simulation/elements/INVIS.cpp | 1 - src/simulation/elements/INWR.cpp | 1 - src/simulation/elements/IRON.cpp | 1 - src/simulation/elements/ISOZ.cpp | 2 +- src/simulation/elements/ISZS.cpp | 2 +- src/simulation/elements/LAVA.cpp | 2 +- src/simulation/elements/LCRY.cpp | 1 - src/simulation/elements/LDTC.cpp | 1 - src/simulation/elements/LIFE.cpp | 2 +- src/simulation/elements/LIGH.cpp | 3 +- src/simulation/elements/LNTG.cpp | 2 +- src/simulation/elements/LO2.cpp | 2 +- src/simulation/elements/LOLZ.cpp | 2 +- src/simulation/elements/LOVE.cpp | 2 +- src/simulation/elements/LRBD.cpp | 2 +- src/simulation/elements/LSNS.cpp | 4 +- src/simulation/elements/MERC.cpp | 3 +- src/simulation/elements/METL.cpp | 1 - src/simulation/elements/MORT.cpp | 5 +- src/simulation/elements/MWAX.cpp | 2 +- src/simulation/elements/NBHL.cpp | 1 - src/simulation/elements/NBLE.cpp | 2 +- src/simulation/elements/NEUT.cpp | 2 +- src/simulation/elements/NICE.cpp | 2 +- src/simulation/elements/NITR.cpp | 1 - src/simulation/elements/NONE.cpp | 1 - src/simulation/elements/NSCN.cpp | 1 - src/simulation/elements/NTCT.cpp | 1 - src/simulation/elements/NWHL.cpp | 1 - src/simulation/elements/O2.cpp | 1 - src/simulation/elements/OIL.cpp | 1 - src/simulation/elements/PBCN.cpp | 1 - src/simulation/elements/PCLN.cpp | 1 - src/simulation/elements/PHOT.cpp | 5 +- src/simulation/elements/PIPE.cpp | 4 +- src/simulation/elements/PLEX.cpp | 1 - src/simulation/elements/PLNT.cpp | 1 - src/simulation/elements/PLSM.cpp | 2 +- src/simulation/elements/PLUT.cpp | 2 +- src/simulation/elements/POLO.cpp | 2 +- src/simulation/elements/PPIP.cpp | 4 +- src/simulation/elements/PQRT.cpp | 1 - src/simulation/elements/PROT.cpp | 3 +- src/simulation/elements/PRTI.cpp | 1 - src/simulation/elements/PRTO.cpp | 1 - src/simulation/elements/PSCN.cpp | 1 - src/simulation/elements/PSNS.cpp | 2 +- src/simulation/elements/PSTE.cpp | 2 +- src/simulation/elements/PSTN.cpp | 2 +- src/simulation/elements/PSTS.cpp | 2 +- src/simulation/elements/PTCT.cpp | 1 - src/simulation/elements/PUMP.cpp | 4 +- src/simulation/elements/PVOD.cpp | 1 - src/simulation/elements/QRTZ.cpp | 1 - src/simulation/elements/RBDM.cpp | 1 - src/simulation/elements/RFGL.cpp | 1 - src/simulation/elements/RFRG.cpp | 1 - src/simulation/elements/RIME.cpp | 2 +- src/simulation/elements/RPEL.cpp | 2 +- src/simulation/elements/SALT.cpp | 1 - src/simulation/elements/SAND.cpp | 1 - src/simulation/elements/SAWD.cpp | 1 - src/simulation/elements/SHLD1.cpp | 1 - src/simulation/elements/SHLD2.cpp | 1 - src/simulation/elements/SHLD3.cpp | 1 - src/simulation/elements/SHLD4.cpp | 1 - src/simulation/elements/SING.cpp | 1 - src/simulation/elements/SLTW.cpp | 1 - src/simulation/elements/SMKE.cpp | 2 +- src/simulation/elements/SNOW.cpp | 2 +- src/simulation/elements/SOAP.cpp | 5 +- src/simulation/elements/SPAWN.cpp | 1 - src/simulation/elements/SPAWN2.cpp | 1 - src/simulation/elements/SPNG.cpp | 1 - src/simulation/elements/SPRK.cpp | 1 - src/simulation/elements/STKM.cpp | 4 +- src/simulation/elements/STKM2.cpp | 4 +- src/simulation/elements/STNE.cpp | 1 - src/simulation/elements/STOR.cpp | 1 - src/simulation/elements/SWCH.cpp | 1 - src/simulation/elements/TESC.cpp | 1 - src/simulation/elements/THDR.cpp | 2 +- src/simulation/elements/THRM.cpp | 1 - src/simulation/elements/TRON.cpp | 2 +- src/simulation/elements/TSNS.cpp | 3 +- src/simulation/elements/TTAN.cpp | 1 - src/simulation/elements/TUNG.cpp | 1 - src/simulation/elements/URAN.cpp | 2 +- src/simulation/elements/VIBR.cpp | 2 +- src/simulation/elements/VINE.cpp | 3 +- src/simulation/elements/VIRS.cpp | 4 +- src/simulation/elements/VOID.cpp | 1 - src/simulation/elements/VRSG.cpp | 4 +- src/simulation/elements/VRSS.cpp | 4 +- src/simulation/elements/WARP.cpp | 1 - src/simulation/elements/WATR.cpp | 2 +- src/simulation/elements/WAX.cpp | 1 - src/simulation/elements/WHOL.cpp | 2 +- src/simulation/elements/WIFI.cpp | 1 - src/simulation/elements/WIRE.cpp | 1 - src/simulation/elements/WOOD.cpp | 1 - src/simulation/elements/WTRV.cpp | 2 +- src/simulation/elements/YEST.cpp | 1 - 193 files changed, 167 insertions(+), 290 deletions(-) diff --git a/src/client/GameSave.cpp b/src/client/GameSave.cpp index 43131e890..c7a4e94ad 100644 --- a/src/client/GameSave.cpp +++ b/src/client/GameSave.cpp @@ -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; } } } diff --git a/src/lua/LuaScriptInterface.cpp b/src/lua/LuaScriptInterface.cpp index 244f55662..6c8eec1a0 100644 --- a/src/lua/LuaScriptInterface.cpp +++ b/src/lua/LuaScriptInterface.cpp @@ -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; diff --git a/src/lua/TPTScriptInterface.cpp b/src/lua/TPTScriptInterface.cpp index fd2d754b3..4ed537f01 100644 --- a/src/lua/TPTScriptInterface.cpp +++ b/src/lua/TPTScriptInterface.cpp @@ -575,7 +575,7 @@ AnyType TPTScriptInterface::tptS_reset(std::deque * 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; } } } diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 5061fe1f7..5841a8c43 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -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; diff --git a/src/simulation/elements/116.cpp b/src/simulation/elements/116.cpp index c8ecf4c00..d199c1d25 100644 --- a/src/simulation/elements/116.cpp +++ b/src/simulation/elements/116.cpp @@ -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."; diff --git a/src/simulation/elements/146.cpp b/src/simulation/elements/146.cpp index 929e8ecc0..b9108d4ec 100644 --- a/src/simulation/elements/146.cpp +++ b/src/simulation/elements/146.cpp @@ -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"; diff --git a/src/simulation/elements/ACEL.cpp b/src/simulation/elements/ACEL.cpp index bbae0a1e8..329a29f9f 100644 --- a/src/simulation/elements/ACEL.cpp +++ b/src/simulation/elements/ACEL.cpp @@ -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."; diff --git a/src/simulation/elements/ACID.cpp b/src/simulation/elements/ACID.cpp index deb57954f..0c2b23959 100644 --- a/src/simulation/elements/ACID.cpp +++ b/src/simulation/elements/ACID.cpp @@ -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; } diff --git a/src/simulation/elements/AMTR.cpp b/src/simulation/elements/AMTR.cpp index 3139ab351..c02f47637 100644 --- a/src/simulation/elements/AMTR.cpp +++ b/src/simulation/elements/AMTR.cpp @@ -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."; diff --git a/src/simulation/elements/ANAR.cpp b/src/simulation/elements/ANAR.cpp index 9959533d3..2a1fd9a20 100644 --- a/src/simulation/elements/ANAR.cpp +++ b/src/simulation/elements/ANAR.cpp @@ -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."; diff --git a/src/simulation/elements/ARAY.cpp b/src/simulation/elements/ARAY.cpp index f8ce046c2..5388d2a16 100644 --- a/src/simulation/elements/ARAY.cpp +++ b/src/simulation/elements/ARAY.cpp @@ -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."; diff --git a/src/simulation/elements/BANG.cpp b/src/simulation/elements/BANG.cpp index a1b09f4a4..9b091bad0 100644 --- a/src/simulation/elements/BANG.cpp +++ b/src/simulation/elements/BANG.cpp @@ -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."; diff --git a/src/simulation/elements/BCLN.cpp b/src/simulation/elements/BCLN.cpp index e9bb145c8..46a83db42 100644 --- a/src/simulation/elements/BCLN.cpp +++ b/src/simulation/elements/BCLN.cpp @@ -26,7 +26,6 @@ Element_BCLN::Element_BCLN() Weight = 100; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 251; Description = "Breakable Clone."; diff --git a/src/simulation/elements/BCOL.cpp b/src/simulation/elements/BCOL.cpp index e741a23a1..3d0f84a28 100644 --- a/src/simulation/elements/BCOL.cpp +++ b/src/simulation/elements/BCOL.cpp @@ -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; } diff --git a/src/simulation/elements/BGLA.cpp b/src/simulation/elements/BGLA.cpp index 3fb7d4637..99082c9ca 100644 --- a/src/simulation/elements/BGLA.cpp +++ b/src/simulation/elements/BGLA.cpp @@ -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."; diff --git a/src/simulation/elements/BHOL.cpp b/src/simulation/elements/BHOL.cpp index 11fdd0ba2..7b2ae7a53 100644 --- a/src/simulation/elements/BHOL.cpp +++ b/src/simulation/elements/BHOL.cpp @@ -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."; diff --git a/src/simulation/elements/BIZR.cpp b/src/simulation/elements/BIZR.cpp index 0cc323721..334641968 100644 --- a/src/simulation/elements/BIZR.cpp +++ b/src/simulation/elements/BIZR.cpp @@ -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; } diff --git a/src/simulation/elements/BIZRG.cpp b/src/simulation/elements/BIZRG.cpp index 471027899..b8c5c717a 100644 --- a/src/simulation/elements/BIZRG.cpp +++ b/src/simulation/elements/BIZRG.cpp @@ -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; } diff --git a/src/simulation/elements/BIZRS.cpp b/src/simulation/elements/BIZRS.cpp index a6f73869b..659ad4c27 100644 --- a/src/simulation/elements/BIZRS.cpp +++ b/src/simulation/elements/BIZRS.cpp @@ -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; } diff --git a/src/simulation/elements/BMTL.cpp b/src/simulation/elements/BMTL.cpp index 190cf5a18..f4157b858 100644 --- a/src/simulation/elements/BMTL.cpp +++ b/src/simulation/elements/BMTL.cpp @@ -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."; diff --git a/src/simulation/elements/BOMB.cpp b/src/simulation/elements/BOMB.cpp index a86f7f62d..b748c130f 100644 --- a/src/simulation/elements/BOMB.cpp +++ b/src/simulation/elements/BOMB.cpp @@ -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."; diff --git a/src/simulation/elements/BOYL.cpp b/src/simulation/elements/BOYL.cpp index e60879bb3..3ca6b50a3 100644 --- a/src/simulation/elements/BOYL.cpp +++ b/src/simulation/elements/BOYL.cpp @@ -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."; diff --git a/src/simulation/elements/BRAY.cpp b/src/simulation/elements/BRAY.cpp index 026e2e443..ba540cb42 100644 --- a/src/simulation/elements/BRAY.cpp +++ b/src/simulation/elements/BRAY.cpp @@ -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; } diff --git a/src/simulation/elements/BRCK.cpp b/src/simulation/elements/BRCK.cpp index 4557c7812..474e64ed8 100644 --- a/src/simulation/elements/BRCK.cpp +++ b/src/simulation/elements/BRCK.cpp @@ -26,7 +26,6 @@ Element_BRCK::Element_BRCK() Weight = 100; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 251; Description = "Brick, breakable building material."; diff --git a/src/simulation/elements/BREC.cpp b/src/simulation/elements/BREC.cpp index 94dce3c00..528122b9a 100644 --- a/src/simulation/elements/BREC.cpp +++ b/src/simulation/elements/BREC.cpp @@ -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."; diff --git a/src/simulation/elements/BRMT.cpp b/src/simulation/elements/BRMT.cpp index 8f1632b29..b593b098d 100644 --- a/src/simulation/elements/BRMT.cpp +++ b/src/simulation/elements/BRMT.cpp @@ -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."; diff --git a/src/simulation/elements/BTRY.cpp b/src/simulation/elements/BTRY.cpp index c9d634125..2232574b6 100644 --- a/src/simulation/elements/BTRY.cpp +++ b/src/simulation/elements/BTRY.cpp @@ -26,7 +26,6 @@ Element_BTRY::Element_BTRY() Weight = 100; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 251; Description = "Battery. Generates infinite electricity."; diff --git a/src/simulation/elements/BVBR.cpp b/src/simulation/elements/BVBR.cpp index c64bfc559..a7fbea4ce 100644 --- a/src/simulation/elements/BVBR.cpp +++ b/src/simulation/elements/BVBR.cpp @@ -26,7 +26,7 @@ Element_BVBR::Element_BVBR() Weight = 67; - Temperature = 273.15f; + DefaultProperties.temp = 273.15f; HeatConduct = 164; Description = "Broken vibranium."; diff --git a/src/simulation/elements/C5.cpp b/src/simulation/elements/C5.cpp index 566ca57eb..5358c8c8d 100644 --- a/src/simulation/elements/C5.cpp +++ b/src/simulation/elements/C5.cpp @@ -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."; diff --git a/src/simulation/elements/CAUS.cpp b/src/simulation/elements/CAUS.cpp index 272f78caf..e026635ea 100644 --- a/src/simulation/elements/CAUS.cpp +++ b/src/simulation/elements/CAUS.cpp @@ -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; } diff --git a/src/simulation/elements/CBNW.cpp b/src/simulation/elements/CBNW.cpp index 8348881f4..a6a66d288 100644 --- a/src/simulation/elements/CBNW.cpp +++ b/src/simulation/elements/CBNW.cpp @@ -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."; diff --git a/src/simulation/elements/CFLM.cpp b/src/simulation/elements/CFLM.cpp index fbda76e00..f56f76c4f 100644 --- a/src/simulation/elements/CFLM.cpp +++ b/src/simulation/elements/CFLM.cpp @@ -28,7 +28,7 @@ Element_CFLM::Element_CFLM() Weight = 2; - Temperature = 0.0f; + DefaultProperties.temp = 0.0f; HeatConduct = 88; Description = "Sub-zero flame."; diff --git a/src/simulation/elements/CLNE.cpp b/src/simulation/elements/CLNE.cpp index 0aa333d4c..098199fe6 100644 --- a/src/simulation/elements/CLNE.cpp +++ b/src/simulation/elements/CLNE.cpp @@ -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."; diff --git a/src/simulation/elements/CLST.cpp b/src/simulation/elements/CLST.cpp index 16546ff80..e86148501 100644 --- a/src/simulation/elements/CLST.cpp +++ b/src/simulation/elements/CLST.cpp @@ -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."; diff --git a/src/simulation/elements/CNCT.cpp b/src/simulation/elements/CNCT.cpp index a63e7a1e9..8e2544aa4 100644 --- a/src/simulation/elements/CNCT.cpp +++ b/src/simulation/elements/CNCT.cpp @@ -26,7 +26,6 @@ Element_CNCT::Element_CNCT() Weight = 55; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 100; Description = "Concrete, stronger than stone."; diff --git a/src/simulation/elements/CO2.cpp b/src/simulation/elements/CO2.cpp index 080f07dac..478f24121 100644 --- a/src/simulation/elements/CO2.cpp +++ b/src/simulation/elements/CO2.cpp @@ -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."; diff --git a/src/simulation/elements/COAL.cpp b/src/simulation/elements/COAL.cpp index 0a2d66cf9..d72d6e9e5 100644 --- a/src/simulation/elements/COAL.cpp +++ b/src/simulation/elements/COAL.cpp @@ -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; } diff --git a/src/simulation/elements/CONV.cpp b/src/simulation/elements/CONV.cpp index 5a8a8df85..0724a51ca 100644 --- a/src/simulation/elements/CONV.cpp +++ b/src/simulation/elements/CONV.cpp @@ -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."; diff --git a/src/simulation/elements/CRAY.cpp b/src/simulation/elements/CRAY.cpp index ba1e1455e..838a78122 100644 --- a/src/simulation/elements/CRAY.cpp +++ b/src/simulation/elements/CRAY.cpp @@ -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; } diff --git a/src/simulation/elements/CRMC.cpp b/src/simulation/elements/CRMC.cpp index 72bac82f0..4a0ac3558 100644 --- a/src/simulation/elements/CRMC.cpp +++ b/src/simulation/elements/CRMC.cpp @@ -26,7 +26,6 @@ Element_CRMC::Element_CRMC() Weight = 100; - Temperature = R_TEMP+273.15f; HeatConduct = 35; Description = "Ceramic. Gets stronger under pressure."; diff --git a/src/simulation/elements/DCEL.cpp b/src/simulation/elements/DCEL.cpp index ebd5ea293..0dbea2db5 100644 --- a/src/simulation/elements/DCEL.cpp +++ b/src/simulation/elements/DCEL.cpp @@ -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."; diff --git a/src/simulation/elements/DESL.cpp b/src/simulation/elements/DESL.cpp index c3208d1b4..6422dc598 100644 --- a/src/simulation/elements/DESL.cpp +++ b/src/simulation/elements/DESL.cpp @@ -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."; diff --git a/src/simulation/elements/DEST.cpp b/src/simulation/elements/DEST.cpp index 3ea67d3ce..d772c6a0c 100644 --- a/src/simulation/elements/DEST.cpp +++ b/src/simulation/elements/DEST.cpp @@ -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."; diff --git a/src/simulation/elements/DEUT.cpp b/src/simulation/elements/DEUT.cpp index 62c2b0e01..ff613cd02 100644 --- a/src/simulation/elements/DEUT.cpp +++ b/src/simulation/elements/DEUT.cpp @@ -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; } diff --git a/src/simulation/elements/DLAY.cpp b/src/simulation/elements/DLAY.cpp index 6c53f096c..346549e37 100644 --- a/src/simulation/elements/DLAY.cpp +++ b/src/simulation/elements/DLAY.cpp @@ -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)."; diff --git a/src/simulation/elements/DMG.cpp b/src/simulation/elements/DMG.cpp index 96942004f..ba9aa1c91 100644 --- a/src/simulation/elements/DMG.cpp +++ b/src/simulation/elements/DMG.cpp @@ -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."; diff --git a/src/simulation/elements/DMND.cpp b/src/simulation/elements/DMND.cpp index eb5859dff..08713fd12 100644 --- a/src/simulation/elements/DMND.cpp +++ b/src/simulation/elements/DMND.cpp @@ -26,7 +26,6 @@ Element_DMND::Element_DMND() Weight = 100; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 186; Description = "Diamond. Indestructible."; diff --git a/src/simulation/elements/DRAY.cpp b/src/simulation/elements/DRAY.cpp index 52b2a0979..2987cc6a4 100644 --- a/src/simulation/elements/DRAY.cpp +++ b/src/simulation/elements/DRAY.cpp @@ -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."; diff --git a/src/simulation/elements/DRIC.cpp b/src/simulation/elements/DRIC.cpp index c32ada7a9..5ee6dc6af 100644 --- a/src/simulation/elements/DRIC.cpp +++ b/src/simulation/elements/DRIC.cpp @@ -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."; diff --git a/src/simulation/elements/DSTW.cpp b/src/simulation/elements/DSTW.cpp index 72ce2f1de..55cc2b0f6 100644 --- a/src/simulation/elements/DSTW.cpp +++ b/src/simulation/elements/DSTW.cpp @@ -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."; diff --git a/src/simulation/elements/DTEC.cpp b/src/simulation/elements/DTEC.cpp index 93a20c002..06dd9cf46 100644 --- a/src/simulation/elements/DTEC.cpp +++ b/src/simulation/elements/DTEC.cpp @@ -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; } diff --git a/src/simulation/elements/DUST.cpp b/src/simulation/elements/DUST.cpp index 8e2ff8dbe..6f917c7fa 100644 --- a/src/simulation/elements/DUST.cpp +++ b/src/simulation/elements/DUST.cpp @@ -27,7 +27,6 @@ Element_DUST::Element_DUST() Weight = 85; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 70; Description = "Very light dust. Flammable."; diff --git a/src/simulation/elements/DYST.cpp b/src/simulation/elements/DYST.cpp index d087897da..9bd70d8d8 100644 --- a/src/simulation/elements/DYST.cpp +++ b/src/simulation/elements/DYST.cpp @@ -26,7 +26,6 @@ Element_DYST::Element_DYST() Weight = 80; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 70; Description = "Dead Yeast."; diff --git a/src/simulation/elements/ELEC.cpp b/src/simulation/elements/ELEC.cpp index 0cf72d72e..ec50cf8fb 100644 --- a/src/simulation/elements/ELEC.cpp +++ b/src/simulation/elements/ELEC.cpp @@ -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."; diff --git a/src/simulation/elements/EMBR.cpp b/src/simulation/elements/EMBR.cpp index a5b1a8d5c..22cbba78c 100644 --- a/src/simulation/elements/EMBR.cpp +++ b/src/simulation/elements/EMBR.cpp @@ -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; } diff --git a/src/simulation/elements/EMP.cpp b/src/simulation/elements/EMP.cpp index 4971c1941..ba1aa2416 100644 --- a/src/simulation/elements/EMP.cpp +++ b/src/simulation/elements/EMP.cpp @@ -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."; diff --git a/src/simulation/elements/ETRD.cpp b/src/simulation/elements/ETRD.cpp index 0d2b62a9e..f3c042f24 100644 --- a/src/simulation/elements/ETRD.cpp +++ b/src/simulation/elements/ETRD.cpp @@ -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)"; diff --git a/src/simulation/elements/EXOT.cpp b/src/simulation/elements/EXOT.cpp index c6c24213c..4a4dd6c47 100644 --- a/src/simulation/elements/EXOT.cpp +++ b/src/simulation/elements/EXOT.cpp @@ -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; } diff --git a/src/simulation/elements/Element.cpp b/src/simulation/elements/Element.cpp index 8145e3574..831fe87d1 100644 --- a/src/simulation/elements/Element.cpp +++ b/src/simulation/elements/Element.cpp @@ -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 const &Element::GetProperties() @@ -75,7 +76,7 @@ std::vector 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 }, diff --git a/src/simulation/elements/Element.h b/src/simulation/elements/Element.h index 7d5cf42fd..09be83bbe 100644 --- a/src/simulation/elements/Element.h +++ b/src/simulation/elements/Element.h @@ -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); diff --git a/src/simulation/elements/FIGH.cpp b/src/simulation/elements/FIGH.cpp index 93cdefe5d..cedd2b8b2 100644 --- a/src/simulation/elements/FIGH.cpp +++ b/src/simulation/elements/FIGH.cpp @@ -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 (tarxpart_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) diff --git a/src/simulation/elements/FIRW.cpp b/src/simulation/elements/FIRW.cpp index e38b4da24..0e3cbed5b 100644 --- a/src/simulation/elements/FIRW.cpp +++ b/src/simulation/elements/FIRW.cpp @@ -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."; diff --git a/src/simulation/elements/FOG.cpp b/src/simulation/elements/FOG.cpp index 843da60a5..8a84aa688 100644 --- a/src/simulation/elements/FOG.cpp +++ b/src/simulation/elements/FOG.cpp @@ -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."; diff --git a/src/simulation/elements/FRAY.cpp b/src/simulation/elements/FRAY.cpp index ddc1d6217..9d979f138 100644 --- a/src/simulation/elements/FRAY.cpp +++ b/src/simulation/elements/FRAY.cpp @@ -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."; diff --git a/src/simulation/elements/FRME.cpp b/src/simulation/elements/FRME.cpp index 667f39443..ccdeee5bf 100644 --- a/src/simulation/elements/FRME.cpp +++ b/src/simulation/elements/FRME.cpp @@ -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."; diff --git a/src/simulation/elements/FRZW.cpp b/src/simulation/elements/FRZW.cpp index cba9fc3d8..4fdb21dd9 100644 --- a/src/simulation/elements/FRZW.cpp +++ b/src/simulation/elements/FRZW.cpp @@ -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; } diff --git a/src/simulation/elements/FRZZ.cpp b/src/simulation/elements/FRZZ.cpp index 487e4822c..484b254b1 100644 --- a/src/simulation/elements/FRZZ.cpp +++ b/src/simulation/elements/FRZZ.cpp @@ -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."; diff --git a/src/simulation/elements/FSEP.cpp b/src/simulation/elements/FSEP.cpp index ffb25a358..2c288d61e 100644 --- a/src/simulation/elements/FSEP.cpp +++ b/src/simulation/elements/FSEP.cpp @@ -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; } diff --git a/src/simulation/elements/FUSE.cpp b/src/simulation/elements/FUSE.cpp index 48a203cf5..27278d656 100644 --- a/src/simulation/elements/FUSE.cpp +++ b/src/simulation/elements/FUSE.cpp @@ -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; } diff --git a/src/simulation/elements/FWRK.cpp b/src/simulation/elements/FWRK.cpp index 52bfe0915..cb6f73320 100644 --- a/src/simulation/elements/FWRK.cpp +++ b/src/simulation/elements/FWRK.cpp @@ -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."; diff --git a/src/simulation/elements/GAS.cpp b/src/simulation/elements/GAS.cpp index f24e9d810..1a5e33bfd 100644 --- a/src/simulation/elements/GAS.cpp +++ b/src/simulation/elements/GAS.cpp @@ -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."; diff --git a/src/simulation/elements/GBMB.cpp b/src/simulation/elements/GBMB.cpp index a0a7c298b..50e3324df 100644 --- a/src/simulation/elements/GBMB.cpp +++ b/src/simulation/elements/GBMB.cpp @@ -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."; diff --git a/src/simulation/elements/GEL.cpp b/src/simulation/elements/GEL.cpp index 04452278f..ac72a1f8e 100644 --- a/src/simulation/elements/GEL.cpp +++ b/src/simulation/elements/GEL.cpp @@ -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."; diff --git a/src/simulation/elements/GLAS.cpp b/src/simulation/elements/GLAS.cpp index b3249b340..3466e0d1f 100644 --- a/src/simulation/elements/GLAS.cpp +++ b/src/simulation/elements/GLAS.cpp @@ -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."; diff --git a/src/simulation/elements/GLOW.cpp b/src/simulation/elements/GLOW.cpp index b40df3e3c..da22a7907 100644 --- a/src/simulation/elements/GLOW.cpp +++ b/src/simulation/elements/GLOW.cpp @@ -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."; diff --git a/src/simulation/elements/GOLD.cpp b/src/simulation/elements/GOLD.cpp index 1b07df05b..4ad1af7ef 100644 --- a/src/simulation/elements/GOLD.cpp +++ b/src/simulation/elements/GOLD.cpp @@ -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."; diff --git a/src/simulation/elements/GOO.cpp b/src/simulation/elements/GOO.cpp index c3600276b..17f956f7b 100644 --- a/src/simulation/elements/GOO.cpp +++ b/src/simulation/elements/GOO.cpp @@ -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."; diff --git a/src/simulation/elements/GPMP.cpp b/src/simulation/elements/GPMP.cpp index bbb2a5cf6..5c28cf12d 100644 --- a/src/simulation/elements/GPMP.cpp +++ b/src/simulation/elements/GPMP.cpp @@ -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; } diff --git a/src/simulation/elements/GRAV.cpp b/src/simulation/elements/GRAV.cpp index b55ef8d57..c854a8be3 100644 --- a/src/simulation/elements/GRAV.cpp +++ b/src/simulation/elements/GRAV.cpp @@ -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."; diff --git a/src/simulation/elements/GRVT.cpp b/src/simulation/elements/GRVT.cpp index 2fe50f5b1..8e4e5dc83 100644 --- a/src/simulation/elements/GRVT.cpp +++ b/src/simulation/elements/GRVT.cpp @@ -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; } diff --git a/src/simulation/elements/GUNP.cpp b/src/simulation/elements/GUNP.cpp index 3c78e1b70..9379237cb 100644 --- a/src/simulation/elements/GUNP.cpp +++ b/src/simulation/elements/GUNP.cpp @@ -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."; diff --git a/src/simulation/elements/H2.cpp b/src/simulation/elements/H2.cpp index 58fadb9f7..c8038008d 100644 --- a/src/simulation/elements/H2.cpp +++ b/src/simulation/elements/H2.cpp @@ -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."; diff --git a/src/simulation/elements/HEAC.cpp b/src/simulation/elements/HEAC.cpp index 5d704b56c..f2508314a 100644 --- a/src/simulation/elements/HEAC.cpp +++ b/src/simulation/elements/HEAC.cpp @@ -29,7 +29,6 @@ Element_HEAC::Element_HEAC() Weight = 100; - Temperature = R_TEMP+273.15f; HeatConduct = 251; Description = "Rapid heat conductor."; diff --git a/src/simulation/elements/HSWC.cpp b/src/simulation/elements/HSWC.cpp index a6a62f029..a0648d4a5 100644 --- a/src/simulation/elements/HSWC.cpp +++ b/src/simulation/elements/HSWC.cpp @@ -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."; diff --git a/src/simulation/elements/ICEI.cpp b/src/simulation/elements/ICEI.cpp index 78a8218ca..1b54129da 100644 --- a/src/simulation/elements/ICEI.cpp +++ b/src/simulation/elements/ICEI.cpp @@ -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; } diff --git a/src/simulation/elements/IGNT.cpp b/src/simulation/elements/IGNT.cpp index 125180579..e522c9ff8 100644 --- a/src/simulation/elements/IGNT.cpp +++ b/src/simulation/elements/IGNT.cpp @@ -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; } diff --git a/src/simulation/elements/INSL.cpp b/src/simulation/elements/INSL.cpp index 883335f6d..cfeb9ab5c 100644 --- a/src/simulation/elements/INSL.cpp +++ b/src/simulation/elements/INSL.cpp @@ -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."; diff --git a/src/simulation/elements/INST.cpp b/src/simulation/elements/INST.cpp index d6767d553..5febdc986 100644 --- a/src/simulation/elements/INST.cpp +++ b/src/simulation/elements/INST.cpp @@ -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."; diff --git a/src/simulation/elements/INVIS.cpp b/src/simulation/elements/INVIS.cpp index fcc669cc4..defc5bda2 100644 --- a/src/simulation/elements/INVIS.cpp +++ b/src/simulation/elements/INVIS.cpp @@ -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."; diff --git a/src/simulation/elements/INWR.cpp b/src/simulation/elements/INWR.cpp index 59d826f17..75ed3d77d 100644 --- a/src/simulation/elements/INWR.cpp +++ b/src/simulation/elements/INWR.cpp @@ -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."; diff --git a/src/simulation/elements/IRON.cpp b/src/simulation/elements/IRON.cpp index 5e6ebcd6c..e480db0c9 100644 --- a/src/simulation/elements/IRON.cpp +++ b/src/simulation/elements/IRON.cpp @@ -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."; diff --git a/src/simulation/elements/ISOZ.cpp b/src/simulation/elements/ISOZ.cpp index 489b1bd20..3fbfdeed7 100644 --- a/src/simulation/elements/ISOZ.cpp +++ b/src/simulation/elements/ISOZ.cpp @@ -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."; diff --git a/src/simulation/elements/ISZS.cpp b/src/simulation/elements/ISZS.cpp index d1e5fd2d6..db3dbb6f5 100644 --- a/src/simulation/elements/ISZS.cpp +++ b/src/simulation/elements/ISZS.cpp @@ -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."; diff --git a/src/simulation/elements/LAVA.cpp b/src/simulation/elements/LAVA.cpp index cb9d526b3..c9d92ab7d 100644 --- a/src/simulation/elements/LAVA.cpp +++ b/src/simulation/elements/LAVA.cpp @@ -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."; diff --git a/src/simulation/elements/LCRY.cpp b/src/simulation/elements/LCRY.cpp index 9eb10e5e8..aabb32310 100644 --- a/src/simulation/elements/LCRY.cpp +++ b/src/simulation/elements/LCRY.cpp @@ -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)"; diff --git a/src/simulation/elements/LDTC.cpp b/src/simulation/elements/LDTC.cpp index 5ea3fabee..66e186fc9 100644 --- a/src/simulation/elements/LDTC.cpp +++ b/src/simulation/elements/LDTC.cpp @@ -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."; diff --git a/src/simulation/elements/LIFE.cpp b/src/simulation/elements/LIFE.cpp index 1c409b10f..dd404c92f 100644 --- a/src/simulation/elements/LIFE.cpp +++ b/src/simulation/elements/LIFE.cpp @@ -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"; diff --git a/src/simulation/elements/LIGH.cpp b/src/simulation/elements/LIGH.cpp index 9dcf5dfb3..287ee3e77 100644 --- a/src/simulation/elements/LIGH.cpp +++ b/src/simulation/elements/LIGH.cpp @@ -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) diff --git a/src/simulation/elements/LNTG.cpp b/src/simulation/elements/LNTG.cpp index 0dcfd5a1d..e9b6ce73a 100644 --- a/src/simulation/elements/LNTG.cpp +++ b/src/simulation/elements/LNTG.cpp @@ -26,7 +26,7 @@ Element_LNTG::Element_LNTG() Weight = 30; - Temperature = 70.15f; + DefaultProperties.temp = 70.15f; HeatConduct = 70; Description = "Liquid Nitrogen. Very cold, disappears whenever it touches anything warmer."; diff --git a/src/simulation/elements/LO2.cpp b/src/simulation/elements/LO2.cpp index 8a5c10c48..22f79ba1f 100644 --- a/src/simulation/elements/LO2.cpp +++ b/src/simulation/elements/LO2.cpp @@ -26,7 +26,7 @@ Element_LO2::Element_LO2() Weight = 30; - Temperature = 80.0f; + DefaultProperties.temp = 80.0f; HeatConduct = 70; Description = "Liquid Oxygen. Very cold. Reacts with fire."; diff --git a/src/simulation/elements/LOLZ.cpp b/src/simulation/elements/LOLZ.cpp index ef0b14636..959d74cff 100644 --- a/src/simulation/elements/LOLZ.cpp +++ b/src/simulation/elements/LOLZ.cpp @@ -26,7 +26,7 @@ Element_LOLZ::Element_LOLZ() Weight = 100; - Temperature = 373.0f; + DefaultProperties.temp = 373.0f; HeatConduct = 40; Description = "Lolz"; diff --git a/src/simulation/elements/LOVE.cpp b/src/simulation/elements/LOVE.cpp index 3e2d4606f..710cc762f 100644 --- a/src/simulation/elements/LOVE.cpp +++ b/src/simulation/elements/LOVE.cpp @@ -26,7 +26,7 @@ Element_LOVE::Element_LOVE() Weight = 100; - Temperature = 373.0f; + DefaultProperties.temp = 373.0f; HeatConduct = 40; Description = "Love..."; diff --git a/src/simulation/elements/LRBD.cpp b/src/simulation/elements/LRBD.cpp index 578d14326..639c93ca5 100644 --- a/src/simulation/elements/LRBD.cpp +++ b/src/simulation/elements/LRBD.cpp @@ -26,7 +26,7 @@ Element_LRBD::Element_LRBD() Weight = 45; - Temperature = R_TEMP+45.0f+273.15f; + DefaultProperties.temp = R_TEMP + 45.0f + 273.15f; HeatConduct = 170; Description = "Liquid Rubidium."; diff --git a/src/simulation/elements/LSNS.cpp b/src/simulation/elements/LSNS.cpp index 3946eb0bd..7530f4ec6 100644 --- a/src/simulation/elements/LSNS.cpp +++ b/src/simulation/elements/LSNS.cpp @@ -26,7 +26,7 @@ Element_LSNS::Element_LSNS() Weight = 100; - Temperature = 4.0f + 273.15f; + DefaultProperties.temp = 4.0f + 273.15f; HeatConduct = 0; Description = "Life sensor, creates a spark when there's a nearby particle with a life higher than its temperature."; @@ -41,6 +41,8 @@ Element_LSNS::Element_LSNS() HighTemperature = ITH; HighTemperatureTransition = NT; + DefaultProperties.tmp2 = 2; + Update = &Element_LSNS::update; } diff --git a/src/simulation/elements/MERC.cpp b/src/simulation/elements/MERC.cpp index 92ec7293b..607efdc61 100644 --- a/src/simulation/elements/MERC.cpp +++ b/src/simulation/elements/MERC.cpp @@ -26,7 +26,6 @@ Element_MERC::Element_MERC() Weight = 91; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 251; Description = "Mercury. Volume changes with temperature, Conductive."; @@ -41,6 +40,8 @@ Element_MERC::Element_MERC() HighTemperature = ITH; HighTemperatureTransition = NT; + DefaultProperties.tmp = 10; + Update = &Element_MERC::update; } diff --git a/src/simulation/elements/METL.cpp b/src/simulation/elements/METL.cpp index e7565643b..82b5ccfb6 100644 --- a/src/simulation/elements/METL.cpp +++ b/src/simulation/elements/METL.cpp @@ -26,7 +26,6 @@ Element_METL::Element_METL() Weight = 100; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 251; Description = "The basic conductor. Meltable."; diff --git a/src/simulation/elements/MORT.cpp b/src/simulation/elements/MORT.cpp index fb4bd900d..6052b0f4e 100644 --- a/src/simulation/elements/MORT.cpp +++ b/src/simulation/elements/MORT.cpp @@ -26,7 +26,7 @@ Element_MORT::Element_MORT() Weight = -1; - Temperature = R_TEMP+4.0f +273.15f; + DefaultProperties.temp = R_TEMP + 4.0f + 273.15f; HeatConduct = 60; Description = "Steam Train."; @@ -41,6 +41,9 @@ Element_MORT::Element_MORT() HighTemperature = ITH; HighTemperatureTransition = NT; + // CHOO CHOO + DefaultProperties.vx = 2.0f; + Update = &Element_MORT::update; } diff --git a/src/simulation/elements/MWAX.cpp b/src/simulation/elements/MWAX.cpp index 097b3f8f2..3ac4eb431 100644 --- a/src/simulation/elements/MWAX.cpp +++ b/src/simulation/elements/MWAX.cpp @@ -26,7 +26,7 @@ Element_MWAX::Element_MWAX() Weight = 25; - Temperature = R_TEMP+28.0f+273.15f; + DefaultProperties.temp = R_TEMP + 28.0f + 273.15f; HeatConduct = 44; Description = "Liquid Wax. Hardens into WAX at 45 degrees."; diff --git a/src/simulation/elements/NBHL.cpp b/src/simulation/elements/NBHL.cpp index 5fcc0708f..17d5bf873 100644 --- a/src/simulation/elements/NBHL.cpp +++ b/src/simulation/elements/NBHL.cpp @@ -26,7 +26,6 @@ Element_NBHL::Element_NBHL() Weight = 100; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 186; Description = "Black hole, sucks in particles using gravity. (Requires Newtonian gravity)"; diff --git a/src/simulation/elements/NBLE.cpp b/src/simulation/elements/NBLE.cpp index 8e155b5c1..8130675ec 100644 --- a/src/simulation/elements/NBLE.cpp +++ b/src/simulation/elements/NBLE.cpp @@ -27,7 +27,7 @@ Element_NBLE::Element_NBLE() Weight = 1; - Temperature = R_TEMP+2.0f +273.15f; + DefaultProperties.temp = R_TEMP + 2.0f + 273.15f; HeatConduct = 106; Description = "Noble Gas. Diffuses and conductive. Ionizes into plasma when introduced to electricity."; diff --git a/src/simulation/elements/NEUT.cpp b/src/simulation/elements/NEUT.cpp index 5aa259526..1e43a6706 100644 --- a/src/simulation/elements/NEUT.cpp +++ b/src/simulation/elements/NEUT.cpp @@ -26,7 +26,7 @@ Element_NEUT::Element_NEUT() Weight = -1; - Temperature = R_TEMP+4.0f +273.15f; + DefaultProperties.temp = R_TEMP + 4.0f + 273.15f; HeatConduct = 60; Description = "Neutrons. Interact with matter in odd ways."; diff --git a/src/simulation/elements/NICE.cpp b/src/simulation/elements/NICE.cpp index 19a58a39c..0a2901268 100644 --- a/src/simulation/elements/NICE.cpp +++ b/src/simulation/elements/NICE.cpp @@ -26,7 +26,7 @@ Element_NICE::Element_NICE() Weight = 100; - Temperature = 35.0f; + DefaultProperties.temp = 35.0f; HeatConduct = 46; Description = "Nitrogen Ice. Very cold, will melt into LN2 when heated only slightly."; diff --git a/src/simulation/elements/NITR.cpp b/src/simulation/elements/NITR.cpp index 0b087db44..4362066fc 100644 --- a/src/simulation/elements/NITR.cpp +++ b/src/simulation/elements/NITR.cpp @@ -27,7 +27,6 @@ Element_NITR::Element_NITR() Weight = 23; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 50; Description = "Nitroglycerin. Pressure sensitive explosive. Mix with CLST to make TNT."; diff --git a/src/simulation/elements/NONE.cpp b/src/simulation/elements/NONE.cpp index b3f7632ae..497a2abb4 100644 --- a/src/simulation/elements/NONE.cpp +++ b/src/simulation/elements/NONE.cpp @@ -26,7 +26,6 @@ Element_NONE::Element_NONE() Weight = 100; - Temperature = R_TEMP+273.15f; HeatConduct = 0; Description = "Erases particles."; diff --git a/src/simulation/elements/NSCN.cpp b/src/simulation/elements/NSCN.cpp index 665152114..0b2d65444 100644 --- a/src/simulation/elements/NSCN.cpp +++ b/src/simulation/elements/NSCN.cpp @@ -27,7 +27,6 @@ Element_NSCN::Element_NSCN() Weight = 100; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 251; Description = "N-Type Silicon, Will not transfer current to P-Type Silicon."; diff --git a/src/simulation/elements/NTCT.cpp b/src/simulation/elements/NTCT.cpp index 14c6f4ed4..aeb3d9a35 100644 --- a/src/simulation/elements/NTCT.cpp +++ b/src/simulation/elements/NTCT.cpp @@ -26,7 +26,6 @@ Element_NTCT::Element_NTCT() Weight = 100; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 251; Description = "Semi-conductor. Only conducts electricity when hot. (More than 100C)"; diff --git a/src/simulation/elements/NWHL.cpp b/src/simulation/elements/NWHL.cpp index 23cfd5825..b6f024c46 100644 --- a/src/simulation/elements/NWHL.cpp +++ b/src/simulation/elements/NWHL.cpp @@ -26,7 +26,6 @@ Element_NWHL::Element_NWHL() Weight = 100; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 186; Description = "White hole, pushes away other particles with gravity. (Requires Newtonian gravity)"; diff --git a/src/simulation/elements/O2.cpp b/src/simulation/elements/O2.cpp index aaf8a7a1a..ef8469b84 100644 --- a/src/simulation/elements/O2.cpp +++ b/src/simulation/elements/O2.cpp @@ -26,7 +26,6 @@ Element_O2::Element_O2() Weight = 1; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 70; Description = "Oxygen gas. Ignites easily."; diff --git a/src/simulation/elements/OIL.cpp b/src/simulation/elements/OIL.cpp index b5c7d7904..9a66e0cfc 100644 --- a/src/simulation/elements/OIL.cpp +++ b/src/simulation/elements/OIL.cpp @@ -26,7 +26,6 @@ Element_OIL::Element_OIL() Weight = 20; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 42; Description = "Flammable, turns into GAS at low pressure or high temperature. Can be formed with NEUT and NITR."; diff --git a/src/simulation/elements/PBCN.cpp b/src/simulation/elements/PBCN.cpp index 4a3564d5f..0af1698ef 100644 --- a/src/simulation/elements/PBCN.cpp +++ b/src/simulation/elements/PBCN.cpp @@ -26,7 +26,6 @@ Element_PBCN::Element_PBCN() Weight = 100; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 251; Description = "Powered breakable clone."; diff --git a/src/simulation/elements/PCLN.cpp b/src/simulation/elements/PCLN.cpp index 5bf5e0a0a..154f0a0c8 100644 --- a/src/simulation/elements/PCLN.cpp +++ b/src/simulation/elements/PCLN.cpp @@ -26,7 +26,6 @@ Element_PCLN::Element_PCLN() Weight = 100; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 251; Description = "Powered clone. When activated, duplicates any particles it touches."; diff --git a/src/simulation/elements/PHOT.cpp b/src/simulation/elements/PHOT.cpp index 215fb5f1d..5d0b44706 100644 --- a/src/simulation/elements/PHOT.cpp +++ b/src/simulation/elements/PHOT.cpp @@ -26,7 +26,7 @@ Element_PHOT::Element_PHOT() Weight = -1; - Temperature = R_TEMP+900.0f+273.15f; + DefaultProperties.temp = R_TEMP + 900.0f + 273.15f; HeatConduct = 251; Description = "Photons. Refracts through glass, scattered by quartz, and color-changed by different elements. Ignites flammable materials."; @@ -41,6 +41,9 @@ Element_PHOT::Element_PHOT() HighTemperature = ITH; HighTemperatureTransition = NT; + DefaultProperties.life = 680; + DefaultProperties.ctype = 0x3FFFFFFF; + Update = &Element_PHOT::update; Graphics = &Element_PHOT::graphics; } diff --git a/src/simulation/elements/PIPE.cpp b/src/simulation/elements/PIPE.cpp index 9b83275aa..610377231 100644 --- a/src/simulation/elements/PIPE.cpp +++ b/src/simulation/elements/PIPE.cpp @@ -29,7 +29,7 @@ Element_PIPE::Element_PIPE() Weight = 100; - Temperature = 273.15f; + DefaultProperties.temp = 273.15f; HeatConduct = 0; Description = "PIPE, moves particles around. Once the BRCK generates, erase some for the exit. Then the PIPE generates and is usable."; @@ -44,6 +44,8 @@ Element_PIPE::Element_PIPE() HighTemperature = ITH; HighTemperatureTransition = NT; + DefaultProperties.life = 60; + Update = &Element_PIPE::update; Graphics = &Element_PIPE::graphics; diff --git a/src/simulation/elements/PLEX.cpp b/src/simulation/elements/PLEX.cpp index 51a6f5b58..5a33530c6 100644 --- a/src/simulation/elements/PLEX.cpp +++ b/src/simulation/elements/PLEX.cpp @@ -27,7 +27,6 @@ Element_PLEX::Element_PLEX() Weight = 100; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 88; Description = "Solid pressure sensitive explosive."; diff --git a/src/simulation/elements/PLNT.cpp b/src/simulation/elements/PLNT.cpp index 6eaa2f573..df6f40506 100644 --- a/src/simulation/elements/PLNT.cpp +++ b/src/simulation/elements/PLNT.cpp @@ -29,7 +29,6 @@ Element_PLNT::Element_PLNT() Weight = 100; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 65; Description = "Plant, drinks water and grows."; diff --git a/src/simulation/elements/PLSM.cpp b/src/simulation/elements/PLSM.cpp index e1d2c0162..af81b5d74 100644 --- a/src/simulation/elements/PLSM.cpp +++ b/src/simulation/elements/PLSM.cpp @@ -26,7 +26,7 @@ Element_PLSM::Element_PLSM() Weight = 1; - Temperature = 10000.0f +273.15f; + DefaultProperties.temp = MAX_TEMP; HeatConduct = 5; Description = "Plasma, extremely hot."; diff --git a/src/simulation/elements/PLUT.cpp b/src/simulation/elements/PLUT.cpp index 121abacec..545732e65 100644 --- a/src/simulation/elements/PLUT.cpp +++ b/src/simulation/elements/PLUT.cpp @@ -27,7 +27,7 @@ Element_PLUT::Element_PLUT() Weight = 90; - Temperature = R_TEMP+4.0f +273.15f; + DefaultProperties.temp = R_TEMP + 4.0f + 273.15f; HeatConduct = 251; Description = "Plutonium. Heavy, fissile particles. Generates neutrons under pressure."; diff --git a/src/simulation/elements/POLO.cpp b/src/simulation/elements/POLO.cpp index 70340ed02..4875193c9 100644 --- a/src/simulation/elements/POLO.cpp +++ b/src/simulation/elements/POLO.cpp @@ -27,7 +27,7 @@ Element_POLO::Element_POLO() Weight = 90; - Temperature = 388.15f; + DefaultProperties.temp = 388.15f; HeatConduct = 251; Description = "Polonium, highly radioactive. Decays into NEUT and heats up."; diff --git a/src/simulation/elements/PPIP.cpp b/src/simulation/elements/PPIP.cpp index 78f9feea0..938060d6a 100644 --- a/src/simulation/elements/PPIP.cpp +++ b/src/simulation/elements/PPIP.cpp @@ -26,7 +26,7 @@ Element_PPIP::Element_PPIP() Weight = 100; - Temperature = 273.15f; + DefaultProperties.temp = 273.15f; HeatConduct = 0; Description = "Powered version of PIPE, use PSCN/NSCN to Activate/Deactivate."; @@ -41,6 +41,8 @@ Element_PPIP::Element_PPIP() HighTemperature = ITH; HighTemperatureTransition = NT; + DefaultProperties.life = 60; + Update = &Element_PIPE::update; Graphics = &Element_PIPE::graphics; } diff --git a/src/simulation/elements/PQRT.cpp b/src/simulation/elements/PQRT.cpp index 9d0b65cf1..8f29bf200 100644 --- a/src/simulation/elements/PQRT.cpp +++ b/src/simulation/elements/PQRT.cpp @@ -26,7 +26,6 @@ Element_PQRT::Element_PQRT() Weight = 90; - Temperature = R_TEMP+273.15f; HeatConduct = 3; Description = "Powdered quartz, broken form of QRTZ."; diff --git a/src/simulation/elements/PROT.cpp b/src/simulation/elements/PROT.cpp index e7203dbc7..78074d862 100644 --- a/src/simulation/elements/PROT.cpp +++ b/src/simulation/elements/PROT.cpp @@ -26,7 +26,6 @@ Element_PROT::Element_PROT() Weight = -1; - Temperature = R_TEMP+273.15f; HeatConduct = 61; Description = "Protons. Transfer heat to materials, and removes sparks."; @@ -41,6 +40,8 @@ Element_PROT::Element_PROT() HighTemperature = ITH; HighTemperatureTransition = NT; + DefaultProperties.life = 75; + Update = &Element_PROT::update; Graphics = &Element_PROT::graphics; } diff --git a/src/simulation/elements/PRTI.cpp b/src/simulation/elements/PRTI.cpp index 310ce3481..56a853bb1 100644 --- a/src/simulation/elements/PRTI.cpp +++ b/src/simulation/elements/PRTI.cpp @@ -26,7 +26,6 @@ Element_PRTI::Element_PRTI() Weight = 100; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 0; Description = "Portal IN. Particles go in here. Also has temperature dependent channels. (same as WIFI)"; diff --git a/src/simulation/elements/PRTO.cpp b/src/simulation/elements/PRTO.cpp index 8445f6d87..2d6a99ad8 100644 --- a/src/simulation/elements/PRTO.cpp +++ b/src/simulation/elements/PRTO.cpp @@ -26,7 +26,6 @@ Element_PRTO::Element_PRTO() Weight = 100; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 0; Description = "Portal OUT. Particles come out here. Also has temperature dependent channels. (same as WIFI)"; diff --git a/src/simulation/elements/PSCN.cpp b/src/simulation/elements/PSCN.cpp index 21fc18500..cb2adc59e 100644 --- a/src/simulation/elements/PSCN.cpp +++ b/src/simulation/elements/PSCN.cpp @@ -27,7 +27,6 @@ Element_PSCN::Element_PSCN() Weight = 100; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 251; Description = "P-Type Silicon, Will transfer current to any conductor."; diff --git a/src/simulation/elements/PSNS.cpp b/src/simulation/elements/PSNS.cpp index 47d498369..e1b57b0f3 100644 --- a/src/simulation/elements/PSNS.cpp +++ b/src/simulation/elements/PSNS.cpp @@ -26,7 +26,7 @@ Element_PSNS::Element_PSNS() Weight = 100; - Temperature = 277.15f; + DefaultProperties.temp = 4.0f + 273.15f; HeatConduct = 0; Description = "Pressure sensor, creates a spark when the pressure is greater than its temperature."; diff --git a/src/simulation/elements/PSTE.cpp b/src/simulation/elements/PSTE.cpp index 116efb1c7..2af802704 100644 --- a/src/simulation/elements/PSTE.cpp +++ b/src/simulation/elements/PSTE.cpp @@ -26,7 +26,7 @@ Element_PSTE::Element_PSTE() Weight = 31; - Temperature = R_TEMP-2.0f +273.15f; + DefaultProperties.temp = R_TEMP - 2.0f + 273.15f; HeatConduct = 29; Description = "Colloid, Hardens under pressure."; diff --git a/src/simulation/elements/PSTN.cpp b/src/simulation/elements/PSTN.cpp index c23995579..199110242 100644 --- a/src/simulation/elements/PSTN.cpp +++ b/src/simulation/elements/PSTN.cpp @@ -28,7 +28,7 @@ Element_PSTN::Element_PSTN() Weight = 100; - Temperature = 283.15f; + DefaultProperties.temp = 10.0f + 273.15f; HeatConduct = 0; Description = "Piston, extends and pushes particles."; diff --git a/src/simulation/elements/PSTS.cpp b/src/simulation/elements/PSTS.cpp index 7d81f342a..00a1c9162 100644 --- a/src/simulation/elements/PSTS.cpp +++ b/src/simulation/elements/PSTS.cpp @@ -26,7 +26,7 @@ Element_PSTS::Element_PSTS() Weight = 100; - Temperature = R_TEMP-2.0f +273.15f; + DefaultProperties.temp = R_TEMP - 2.0f + 273.15f; HeatConduct = 29; Description = "Solid form of PSTE."; diff --git a/src/simulation/elements/PTCT.cpp b/src/simulation/elements/PTCT.cpp index 02773ca90..012b953e9 100644 --- a/src/simulation/elements/PTCT.cpp +++ b/src/simulation/elements/PTCT.cpp @@ -26,7 +26,6 @@ Element_PTCT::Element_PTCT() Weight = 100; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 251; Description = "Semi-conductor. Only conducts electricity when cold. (Less than 100C)"; diff --git a/src/simulation/elements/PUMP.cpp b/src/simulation/elements/PUMP.cpp index 7c54bb251..1af14c3d0 100644 --- a/src/simulation/elements/PUMP.cpp +++ b/src/simulation/elements/PUMP.cpp @@ -26,7 +26,7 @@ Element_PUMP::Element_PUMP() Weight = 100; - Temperature = 273.15f; + DefaultProperties.temp = 273.15f; HeatConduct = 0; Description = "Pressure pump. Changes pressure to its temp when activated. (use HEAT/COOL)."; @@ -41,6 +41,8 @@ Element_PUMP::Element_PUMP() HighTemperature = ITH; HighTemperatureTransition = NT; + DefaultProperties.life = 10; + Update = &Element_PUMP::update; Graphics = &Element_PUMP::graphics; } diff --git a/src/simulation/elements/PVOD.cpp b/src/simulation/elements/PVOD.cpp index 2b2efee01..28f4411fe 100644 --- a/src/simulation/elements/PVOD.cpp +++ b/src/simulation/elements/PVOD.cpp @@ -26,7 +26,6 @@ Element_PVOD::Element_PVOD() Weight = 100; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 251; Description = "Powered VOID. When activated, destroys entering particles."; diff --git a/src/simulation/elements/QRTZ.cpp b/src/simulation/elements/QRTZ.cpp index fac6c96fe..55c312e92 100644 --- a/src/simulation/elements/QRTZ.cpp +++ b/src/simulation/elements/QRTZ.cpp @@ -26,7 +26,6 @@ Element_QRTZ::Element_QRTZ() Weight = 100; - Temperature = R_TEMP+273.15f; HeatConduct = 3; Description = "Quartz, breakable mineral. Conducts but becomes brittle at lower temperatures."; diff --git a/src/simulation/elements/RBDM.cpp b/src/simulation/elements/RBDM.cpp index 8658d4e92..c3e3b2cf1 100644 --- a/src/simulation/elements/RBDM.cpp +++ b/src/simulation/elements/RBDM.cpp @@ -26,7 +26,6 @@ Element_RBDM::Element_RBDM() Weight = 100; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 240; Description = "Rubidium. Explosive, especially on contact with water. Low melting point."; diff --git a/src/simulation/elements/RFGL.cpp b/src/simulation/elements/RFGL.cpp index b9936e3f9..196ec45a0 100644 --- a/src/simulation/elements/RFGL.cpp +++ b/src/simulation/elements/RFGL.cpp @@ -26,7 +26,6 @@ Element_RFGL::Element_RFGL() Weight = 10; - Temperature = R_TEMP + 273.15f; HeatConduct = 3; Description = "Liquid refrigerant."; diff --git a/src/simulation/elements/RFRG.cpp b/src/simulation/elements/RFRG.cpp index 0e20f4046..d5865fde2 100644 --- a/src/simulation/elements/RFRG.cpp +++ b/src/simulation/elements/RFRG.cpp @@ -26,7 +26,6 @@ Element_RFRG::Element_RFRG() Weight = 1; - Temperature = R_TEMP + 273.15f; HeatConduct = 3; Description = "Refrigerant. Heats up and liquefies under pressure."; diff --git a/src/simulation/elements/RIME.cpp b/src/simulation/elements/RIME.cpp index 00c0ff420..8300be81c 100644 --- a/src/simulation/elements/RIME.cpp +++ b/src/simulation/elements/RIME.cpp @@ -26,7 +26,7 @@ Element_RIME::Element_RIME() Weight = 100; - Temperature = 243.15f; + DefaultProperties.temp = -30.0f + 273.15f; HeatConduct = 100; Description = "Solid, created when steam cools rapidly and goes through sublimation."; diff --git a/src/simulation/elements/RPEL.cpp b/src/simulation/elements/RPEL.cpp index 6ed0eaa1c..42e1343e6 100644 --- a/src/simulation/elements/RPEL.cpp +++ b/src/simulation/elements/RPEL.cpp @@ -26,7 +26,7 @@ Element_RPEL::Element_RPEL() Weight = 100; - Temperature = 20.0f+0.0f +273.15f; + DefaultProperties.temp = 20.0f + 273.15f; HeatConduct = 0; Description = "Repels or attracts particles based on its temperature."; diff --git a/src/simulation/elements/SALT.cpp b/src/simulation/elements/SALT.cpp index 9bba25020..45d0c2417 100644 --- a/src/simulation/elements/SALT.cpp +++ b/src/simulation/elements/SALT.cpp @@ -26,7 +26,6 @@ Element_SALT::Element_SALT() Weight = 75; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 110; Description = "Salt, dissolves in water."; diff --git a/src/simulation/elements/SAND.cpp b/src/simulation/elements/SAND.cpp index 405c71bdc..db3e5cd33 100644 --- a/src/simulation/elements/SAND.cpp +++ b/src/simulation/elements/SAND.cpp @@ -26,7 +26,6 @@ Element_SAND::Element_SAND() Weight = 90; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 150; Description = "Sand, Heavy particles. Melts into glass."; diff --git a/src/simulation/elements/SAWD.cpp b/src/simulation/elements/SAWD.cpp index dc2345e58..fb50a168e 100644 --- a/src/simulation/elements/SAWD.cpp +++ b/src/simulation/elements/SAWD.cpp @@ -26,7 +26,6 @@ Element_SAWD::Element_SAWD() Weight = 18; - Temperature = R_TEMP+273.15f; HeatConduct = 70; Description = "Sawdust. Floats on water."; diff --git a/src/simulation/elements/SHLD1.cpp b/src/simulation/elements/SHLD1.cpp index 20a0c7a8f..d0a232b4e 100644 --- a/src/simulation/elements/SHLD1.cpp +++ b/src/simulation/elements/SHLD1.cpp @@ -26,7 +26,6 @@ Element_SHLD1::Element_SHLD1() Weight = 100; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 0; Description = "Shield, spark it to grow."; diff --git a/src/simulation/elements/SHLD2.cpp b/src/simulation/elements/SHLD2.cpp index b83208690..86128ddd2 100644 --- a/src/simulation/elements/SHLD2.cpp +++ b/src/simulation/elements/SHLD2.cpp @@ -26,7 +26,6 @@ Element_SHLD2::Element_SHLD2() Weight = 100; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 0; Description = "Shield lvl 2."; diff --git a/src/simulation/elements/SHLD3.cpp b/src/simulation/elements/SHLD3.cpp index db6f821ef..69bc916e8 100644 --- a/src/simulation/elements/SHLD3.cpp +++ b/src/simulation/elements/SHLD3.cpp @@ -26,7 +26,6 @@ Element_SHLD3::Element_SHLD3() Weight = 100; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 0; Description = "Shield lvl 3."; diff --git a/src/simulation/elements/SHLD4.cpp b/src/simulation/elements/SHLD4.cpp index ad82882c4..70b7288c6 100644 --- a/src/simulation/elements/SHLD4.cpp +++ b/src/simulation/elements/SHLD4.cpp @@ -26,7 +26,6 @@ Element_SHLD4::Element_SHLD4() Weight = 100; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 0; Description = "Shield lvl 4."; diff --git a/src/simulation/elements/SING.cpp b/src/simulation/elements/SING.cpp index bb39fbc20..532d40347 100644 --- a/src/simulation/elements/SING.cpp +++ b/src/simulation/elements/SING.cpp @@ -26,7 +26,6 @@ Element_SING::Element_SING() Weight = 86; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 70; Description = "Singularity. Creates huge amounts of negative pressure and destroys everything."; diff --git a/src/simulation/elements/SLTW.cpp b/src/simulation/elements/SLTW.cpp index 2be31fd50..134aa41be 100644 --- a/src/simulation/elements/SLTW.cpp +++ b/src/simulation/elements/SLTW.cpp @@ -26,7 +26,6 @@ Element_SLTW::Element_SLTW() Weight = 35; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 75; Description = "Saltwater, conducts electricity, difficult to freeze."; diff --git a/src/simulation/elements/SMKE.cpp b/src/simulation/elements/SMKE.cpp index 0671befce..e7a744668 100644 --- a/src/simulation/elements/SMKE.cpp +++ b/src/simulation/elements/SMKE.cpp @@ -26,7 +26,7 @@ Element_SMKE::Element_SMKE() Weight = 1; - Temperature = R_TEMP+320.0f+273.15f; + DefaultProperties.temp = R_TEMP + 320.0f + 273.15f; HeatConduct = 88; Description = "Smoke, created by fire."; diff --git a/src/simulation/elements/SNOW.cpp b/src/simulation/elements/SNOW.cpp index 8ecc8584f..eaa9140db 100644 --- a/src/simulation/elements/SNOW.cpp +++ b/src/simulation/elements/SNOW.cpp @@ -27,7 +27,7 @@ Element_SNOW::Element_SNOW() Weight = 50; - Temperature = R_TEMP-30.0f+273.15f; + DefaultProperties.temp = R_TEMP - 30.0f + 273.15f; HeatConduct = 46; Description = "Light particles. Created when ICE breaks under pressure."; diff --git a/src/simulation/elements/SOAP.cpp b/src/simulation/elements/SOAP.cpp index 54697ead0..5c15d01fc 100644 --- a/src/simulation/elements/SOAP.cpp +++ b/src/simulation/elements/SOAP.cpp @@ -26,7 +26,7 @@ Element_SOAP::Element_SOAP() Weight = 35; - Temperature = R_TEMP-2.0f +273.15f; + DefaultProperties.temp = R_TEMP - 2.0f + 273.15f; HeatConduct = 29; Description = "Soap. Creates bubbles, washes off deco color, and cures virus."; @@ -41,6 +41,9 @@ Element_SOAP::Element_SOAP() HighTemperature = ITH; HighTemperatureTransition = NT; + DefaultProperties.tmp = -1; + DefaultProperties.tmp2 = -1; + Update = &Element_SOAP::update; Graphics = &Element_SOAP::graphics; } diff --git a/src/simulation/elements/SPAWN.cpp b/src/simulation/elements/SPAWN.cpp index 44eabba0c..8a91a9406 100644 --- a/src/simulation/elements/SPAWN.cpp +++ b/src/simulation/elements/SPAWN.cpp @@ -26,7 +26,6 @@ Element_SPAWN::Element_SPAWN() Weight = 100; - Temperature = R_TEMP+273.15f; HeatConduct = 0; Description = "STKM spawn point."; diff --git a/src/simulation/elements/SPAWN2.cpp b/src/simulation/elements/SPAWN2.cpp index 71a6792fd..118f7c582 100644 --- a/src/simulation/elements/SPAWN2.cpp +++ b/src/simulation/elements/SPAWN2.cpp @@ -26,7 +26,6 @@ Element_SPAWN2::Element_SPAWN2() Weight = 100; - Temperature = R_TEMP+273.15f; HeatConduct = 0; Description = "STK2 spawn point."; diff --git a/src/simulation/elements/SPNG.cpp b/src/simulation/elements/SPNG.cpp index 9dadc4dfd..800d22528 100644 --- a/src/simulation/elements/SPNG.cpp +++ b/src/simulation/elements/SPNG.cpp @@ -26,7 +26,6 @@ Element_SPNG::Element_SPNG() Weight = 100; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 251; Description = "Sponge, absorbs water. Is not a moving solid."; diff --git a/src/simulation/elements/SPRK.cpp b/src/simulation/elements/SPRK.cpp index 6a582eba8..b1c39f127 100644 --- a/src/simulation/elements/SPRK.cpp +++ b/src/simulation/elements/SPRK.cpp @@ -27,7 +27,6 @@ Element_SPRK::Element_SPRK() Weight = 100; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 251; Description = "Electricity. The basis of all electronics in TPT, travels along wires and other conductive elements."; diff --git a/src/simulation/elements/STKM.cpp b/src/simulation/elements/STKM.cpp index c411d4a01..080a3734b 100644 --- a/src/simulation/elements/STKM.cpp +++ b/src/simulation/elements/STKM.cpp @@ -27,7 +27,7 @@ Element_STKM::Element_STKM() Weight = 50; - Temperature = R_TEMP+14.6f+273.15f; + DefaultProperties.temp = R_TEMP + 14.6f + 273.15f; HeatConduct = 0; Description = "Stickman. Don't kill him! Control with the arrow keys."; @@ -42,6 +42,8 @@ Element_STKM::Element_STKM() HighTemperature = 620.0f; HighTemperatureTransition = PT_FIRE; + DefaultProperties.life = 100; + Update = &Element_STKM::update; Graphics = &Element_STKM::graphics; } diff --git a/src/simulation/elements/STKM2.cpp b/src/simulation/elements/STKM2.cpp index f921bfb4d..d0e7e07c3 100644 --- a/src/simulation/elements/STKM2.cpp +++ b/src/simulation/elements/STKM2.cpp @@ -27,7 +27,7 @@ Element_STKM2::Element_STKM2() Weight = 50; - Temperature = R_TEMP+14.6f+273.15f; + DefaultProperties.temp = R_TEMP + 14.6f + 273.15f; HeatConduct = 0; Description = "Second stickman. Don't kill him! Control with wasd."; @@ -42,6 +42,8 @@ Element_STKM2::Element_STKM2() HighTemperature = 620.0f; HighTemperatureTransition = PT_FIRE; + DefaultProperties.life = 100; + Update = &Element_STKM2::update; Graphics = &Element_STKM::graphics; } diff --git a/src/simulation/elements/STNE.cpp b/src/simulation/elements/STNE.cpp index 7a17258e5..8d265a759 100644 --- a/src/simulation/elements/STNE.cpp +++ b/src/simulation/elements/STNE.cpp @@ -26,7 +26,6 @@ Element_STNE::Element_STNE() Weight = 90; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 150; Description = "Heavy particles. Meltable."; diff --git a/src/simulation/elements/STOR.cpp b/src/simulation/elements/STOR.cpp index f8d7be4d4..2318ae54e 100644 --- a/src/simulation/elements/STOR.cpp +++ b/src/simulation/elements/STOR.cpp @@ -26,7 +26,6 @@ Element_STOR::Element_STOR() Weight = 100; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 0; Description = "Storage. Captures and stores a single particle. Releases when charged with PSCN, also passes to PIPE."; diff --git a/src/simulation/elements/SWCH.cpp b/src/simulation/elements/SWCH.cpp index 85659d567..a6cdfe5c3 100644 --- a/src/simulation/elements/SWCH.cpp +++ b/src/simulation/elements/SWCH.cpp @@ -26,7 +26,6 @@ Element_SWCH::Element_SWCH() Weight = 100; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 251; Description = "Only conducts when switched on. (PSCN switches on, NSCN switches off)"; diff --git a/src/simulation/elements/TESC.cpp b/src/simulation/elements/TESC.cpp index 7a19de692..d6aeaafbd 100644 --- a/src/simulation/elements/TESC.cpp +++ b/src/simulation/elements/TESC.cpp @@ -26,7 +26,6 @@ Element_TESC::Element_TESC() Weight = 100; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 251; Description = "Tesla coil! Creates lightning when sparked."; diff --git a/src/simulation/elements/THDR.cpp b/src/simulation/elements/THDR.cpp index 7bda360cc..00060f97d 100644 --- a/src/simulation/elements/THDR.cpp +++ b/src/simulation/elements/THDR.cpp @@ -26,7 +26,7 @@ Element_THDR::Element_THDR() Weight = 1; - Temperature = 9000.0f +273.15f; + DefaultProperties.temp = 9000.0f + 273.15f; HeatConduct = 1; Description = "Lightning! Very hot, inflicts damage upon most materials, and transfers current to metals."; diff --git a/src/simulation/elements/THRM.cpp b/src/simulation/elements/THRM.cpp index eb52bb7d8..8f56d7b9c 100644 --- a/src/simulation/elements/THRM.cpp +++ b/src/simulation/elements/THRM.cpp @@ -26,7 +26,6 @@ Element_THRM::Element_THRM() Weight = 90; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 211; Description = "Thermite. Burns at extremely high temperature."; diff --git a/src/simulation/elements/TRON.cpp b/src/simulation/elements/TRON.cpp index 6cd6e922f..286997e5f 100644 --- a/src/simulation/elements/TRON.cpp +++ b/src/simulation/elements/TRON.cpp @@ -26,7 +26,7 @@ Element_TRON::Element_TRON() Weight = 100; - Temperature = 0.0f; + DefaultProperties.temp = 0.0f; HeatConduct = 40; Description = "Smart particles, Travels in straight lines and avoids obstacles. Grows with time."; diff --git a/src/simulation/elements/TSNS.cpp b/src/simulation/elements/TSNS.cpp index 1c8ec1bc6..ef262d48e 100644 --- a/src/simulation/elements/TSNS.cpp +++ b/src/simulation/elements/TSNS.cpp @@ -26,7 +26,6 @@ Element_TSNS::Element_TSNS() Weight = 100; - Temperature = R_TEMP + 273.15f; HeatConduct = 0; Description = "Temperature sensor, creates a spark when there's a nearby particle with a greater temperature."; @@ -41,6 +40,8 @@ Element_TSNS::Element_TSNS() HighTemperature = ITH; HighTemperatureTransition = NT; + DefaultProperties.tmp2 = 2; + Update = &Element_TSNS::update; } diff --git a/src/simulation/elements/TTAN.cpp b/src/simulation/elements/TTAN.cpp index eb6bcecf3..24a499a9d 100644 --- a/src/simulation/elements/TTAN.cpp +++ b/src/simulation/elements/TTAN.cpp @@ -27,7 +27,6 @@ Element_TTAN::Element_TTAN() Weight = 100; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 251; Description = "Titanium. Higher melting temperature than most other metals, blocks all air pressure."; diff --git a/src/simulation/elements/TUNG.cpp b/src/simulation/elements/TUNG.cpp index 2bd27db04..7e90cd689 100644 --- a/src/simulation/elements/TUNG.cpp +++ b/src/simulation/elements/TUNG.cpp @@ -27,7 +27,6 @@ Element_TUNG::Element_TUNG() Weight = 100; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 251; Description = "Tungsten. Brittle metal with a very high melting point."; diff --git a/src/simulation/elements/URAN.cpp b/src/simulation/elements/URAN.cpp index 61ba2f8ba..80fdd3eba 100644 --- a/src/simulation/elements/URAN.cpp +++ b/src/simulation/elements/URAN.cpp @@ -27,7 +27,7 @@ Element_URAN::Element_URAN() Weight = 90; - Temperature = R_TEMP+30.0f+273.15f; + DefaultProperties.temp = R_TEMP + 30.0f + 273.15f; HeatConduct = 251; Description = "Uranium. Heavy particles. Generates heat under pressure."; diff --git a/src/simulation/elements/VIBR.cpp b/src/simulation/elements/VIBR.cpp index 4a47b1cfd..a4fb6864e 100644 --- a/src/simulation/elements/VIBR.cpp +++ b/src/simulation/elements/VIBR.cpp @@ -26,7 +26,7 @@ Element_VIBR::Element_VIBR() Weight = 100; - Temperature = 273.15f; + DefaultProperties.temp = 273.15f; HeatConduct = 251; Description = "Vibranium. Stores energy and releases it in violent explosions."; diff --git a/src/simulation/elements/VINE.cpp b/src/simulation/elements/VINE.cpp index 9092111d2..16b4ccbe4 100644 --- a/src/simulation/elements/VINE.cpp +++ b/src/simulation/elements/VINE.cpp @@ -28,7 +28,6 @@ Element_VINE::Element_VINE() Weight = 100; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 65; Description = "Vine, can grow along WOOD."; @@ -43,6 +42,8 @@ Element_VINE::Element_VINE() HighTemperature = 573.0f; HighTemperatureTransition = PT_FIRE; + DefaultProperties.tmp = 1; + Update = &Element_VINE::update; } diff --git a/src/simulation/elements/VIRS.cpp b/src/simulation/elements/VIRS.cpp index e6eeee7de..f13c9d20b 100644 --- a/src/simulation/elements/VIRS.cpp +++ b/src/simulation/elements/VIRS.cpp @@ -26,7 +26,7 @@ Element_VIRS::Element_VIRS() Weight = 31; - Temperature = 72.0f + 273.15f; + DefaultProperties.temp = 72.0f + 273.15f; HeatConduct = 251; Description = "Virus. Turns everything it touches into virus."; @@ -41,6 +41,8 @@ Element_VIRS::Element_VIRS() HighTemperature = 673.0f; HighTemperatureTransition = PT_VRSG; + DefaultProperties.pavg[1] = 250; + Update = &Element_VIRS::update; Graphics = &Element_VIRS::graphics; } diff --git a/src/simulation/elements/VOID.cpp b/src/simulation/elements/VOID.cpp index 2fb5cace0..7d86d6ad8 100644 --- a/src/simulation/elements/VOID.cpp +++ b/src/simulation/elements/VOID.cpp @@ -26,7 +26,6 @@ Element_VOID::Element_VOID() Weight = 100; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 251; Description = "Hole, will drain away any particles."; diff --git a/src/simulation/elements/VRSG.cpp b/src/simulation/elements/VRSG.cpp index 9d238903f..6dec94b4a 100644 --- a/src/simulation/elements/VRSG.cpp +++ b/src/simulation/elements/VRSG.cpp @@ -26,7 +26,7 @@ Element_VRSG::Element_VRSG() Weight = 1; - Temperature = 522.0f + 273.15f; + DefaultProperties.temp = 522.0f + 273.15f; HeatConduct = 251; Description = "Gas Virus. Turns everything it touches into virus."; @@ -41,6 +41,8 @@ Element_VRSG::Element_VRSG() HighTemperature = ITH; HighTemperatureTransition = NT; + DefaultProperties.pavg[1] = 250; + Update = &Element_VIRS::update; Graphics = &Element_VRSG::graphics; } diff --git a/src/simulation/elements/VRSS.cpp b/src/simulation/elements/VRSS.cpp index 30714b900..ac5d1d7d0 100644 --- a/src/simulation/elements/VRSS.cpp +++ b/src/simulation/elements/VRSS.cpp @@ -26,7 +26,7 @@ Element_VRSS::Element_VRSS() Weight = 100; - Temperature = R_TEMP+ 273.15f; + DefaultProperties.temp = R_TEMP + 273.15f; HeatConduct = 251; Description = "Solid Virus. Turns everything it touches into virus."; @@ -41,6 +41,8 @@ Element_VRSS::Element_VRSS() HighTemperature = 305.0f; HighTemperatureTransition = PT_VIRS; + DefaultProperties.pavg[1] = 250; + Update = &Element_VIRS::update; Graphics = &Element_VRSS::graphics; } diff --git a/src/simulation/elements/WARP.cpp b/src/simulation/elements/WARP.cpp index b9a1e2ae2..6d88eafa6 100644 --- a/src/simulation/elements/WARP.cpp +++ b/src/simulation/elements/WARP.cpp @@ -26,7 +26,6 @@ Element_WARP::Element_WARP() Weight = 1; - Temperature = R_TEMP +273.15f; HeatConduct = 100; Description = "Displaces other elements."; diff --git a/src/simulation/elements/WATR.cpp b/src/simulation/elements/WATR.cpp index 8c1d1466c..34ac26f3f 100644 --- a/src/simulation/elements/WATR.cpp +++ b/src/simulation/elements/WATR.cpp @@ -26,7 +26,7 @@ Element_WATR::Element_WATR() Weight = 30; - Temperature = R_TEMP-2.0f +273.15f; + DefaultProperties.temp = R_TEMP - 2.0f + 273.15f; HeatConduct = 29; Description = "Water. Conducts electricity, freezes, and extinguishes fires."; diff --git a/src/simulation/elements/WAX.cpp b/src/simulation/elements/WAX.cpp index 279afbe45..4c9880346 100644 --- a/src/simulation/elements/WAX.cpp +++ b/src/simulation/elements/WAX.cpp @@ -26,7 +26,6 @@ Element_WAX::Element_WAX() Weight = 100; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 44; Description = "Wax. Melts at moderately high temperatures."; diff --git a/src/simulation/elements/WHOL.cpp b/src/simulation/elements/WHOL.cpp index 8bdf8c7bd..9c7af4747 100644 --- a/src/simulation/elements/WHOL.cpp +++ b/src/simulation/elements/WHOL.cpp @@ -26,7 +26,7 @@ Element_WHOL::Element_WHOL() Weight = 100; - Temperature = R_TEMP-16.0f+273.15f; + DefaultProperties.temp = R_TEMP - 16.0f + 273.15f; HeatConduct = 255; Description = "Air vent, creates pressure and pushes other particles away."; diff --git a/src/simulation/elements/WIFI.cpp b/src/simulation/elements/WIFI.cpp index 3b022caec..022996d08 100644 --- a/src/simulation/elements/WIFI.cpp +++ b/src/simulation/elements/WIFI.cpp @@ -26,7 +26,6 @@ Element_WIFI::Element_WIFI() Weight = 100; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 0; Description = "Wireless transmitter, transfers spark to any other wifi on the same temperature channel."; diff --git a/src/simulation/elements/WIRE.cpp b/src/simulation/elements/WIRE.cpp index b985d66ab..d1ad9c82d 100644 --- a/src/simulation/elements/WIRE.cpp +++ b/src/simulation/elements/WIRE.cpp @@ -26,7 +26,6 @@ Element_WIRE::Element_WIRE() Weight = 100; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 250; Description = "WireWorld wires, conducts based on a set of GOL-like rules."; diff --git a/src/simulation/elements/WOOD.cpp b/src/simulation/elements/WOOD.cpp index 9c56da033..c46e82f06 100644 --- a/src/simulation/elements/WOOD.cpp +++ b/src/simulation/elements/WOOD.cpp @@ -28,7 +28,6 @@ Element_WOOD::Element_WOOD() Weight = 100; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 164; Description = "Wood, flammable."; diff --git a/src/simulation/elements/WTRV.cpp b/src/simulation/elements/WTRV.cpp index 41b0c2ab8..a8767eb0a 100644 --- a/src/simulation/elements/WTRV.cpp +++ b/src/simulation/elements/WTRV.cpp @@ -26,7 +26,7 @@ Element_WTRV::Element_WTRV() Weight = 1; - Temperature = R_TEMP+100.0f+273.15f; + DefaultProperties.temp = R_TEMP + 100.0f + 273.15f; HeatConduct = 48; Description = "Steam. Produced from hot water."; diff --git a/src/simulation/elements/YEST.cpp b/src/simulation/elements/YEST.cpp index ed8b0564e..3038f1ee6 100644 --- a/src/simulation/elements/YEST.cpp +++ b/src/simulation/elements/YEST.cpp @@ -26,7 +26,6 @@ Element_YEST::Element_YEST() Weight = 80; - Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 70; Description = "Yeast, grows when warm (~37C).";