TPT: fusion step 2 + modify temp/pressure of step 1 803ded3b33

This commit is contained in:
Simon Robertshaw 2012-04-18 18:40:14 +01:00
parent 4ddf723167
commit bf935ac7d8
4 changed files with 38 additions and 9 deletions

View File

@ -43,23 +43,24 @@ int update_H2(UPDATE_FUNC_ARGS)
if (rand()%5 < 1)
{
int j;
float temp = parts[i].temp;
sim->part_change_type(i,x,y,PT_PLSM);
parts[i].life = rand()%150+50;
sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NEUT);
sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_ELEC);
j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NEUT);
j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_ELEC);
j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_PHOT);
if (j) parts[j].ctype = 0xFFFF00;
if (j != -1) { parts[j].ctype = 0xFFFF00; parts[j].temp = temp; }
j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NBLE);
if (j) parts[j].tmp = 1;
if (j != -1) { parts[j].tmp = 1; parts[j].temp = temp; }
if (rand()%2)
{
j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NBLE);
if (j) parts[j].tmp = 1;
if (j != -1) { parts[j].tmp = 1; parts[j].temp = temp; }
}
if (parts[i].temp < 4273.15)
parts[i].temp = 4273.15;
sim->pv[y/CELL][x/CELL] += 50;
parts[i].temp += 6000;
sim->pv[y/CELL][x/CELL] += 30;
}
}
return 0;

27
src/elements/nble.cpp Normal file
View File

@ -0,0 +1,27 @@
#include "simulation/Element.h"
int update_NBLE(UPDATE_FUNC_ARGS)
{
if (parts[i].temp > 5273.15 && sim->pv[y/CELL][x/CELL] > 50.0f)
{
parts[i].tmp = 1;
if (rand()%5 < 1)
{
int j;
float temp = parts[i].temp;
sim->part_change_type(i,x,y,PT_PLSM);
parts[i].life = rand()%150+50;
sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NEUT);
sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_ELEC);
j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_PHOT);
if (j != -1) { parts[j].ctype = 0xFF0000; parts[j].temp = temp; }
j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_CO2);
if (j != -1) parts[j].temp = temp;
parts[i].temp += 10000;
sim->pv[y/CELL][x/CELL] += 30;
}
}
return 0;
}

View File

@ -107,6 +107,7 @@ int update_IGNT(UPDATE_FUNC_ARGS);
int update_MISC(UPDATE_FUNC_ARGS);
int update_FRAY(UPDATE_FUNC_ARGS);
int update_REPL(UPDATE_FUNC_ARGS);
int update_NBLE(UPDATE_FUNC_ARGS);
int update_legacy_PYRO(UPDATE_FUNC_ARGS);
int update_legacy_all(UPDATE_FUNC_ARGS);
int run_stickman(playerst* playerp, UPDATE_FUNC_ARGS);

View File

@ -237,7 +237,7 @@ part_type * LoadElements(int & elementCount)
{"PLSM", PIXPACK(0xBB99FF), 0.9f, 0.04f * CFDS, 0.97f, 0.20f, 0.0f, -0.1f, 0.30f, 0.001f * CFDS, 0, 0, 0, 0, 0, 1, 1, 1, SC_GAS, 10000.0f +273.15f, 5, "Plasma, extremely hot.", ST_NONE, TYPE_GAS|PROP_LIFE_DEC|PROP_LIFE_KILL, &update_PYRO, &graphics_PLSM},
{"ETRD", PIXPACK(0x404040), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Electrode. Creates a surface that allows Plasma arcs. (Use sparingly)", ST_NONE, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC, NULL, NULL},
{"NICE", PIXPACK(0xC0E0FF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, -0.0005f* CFDS, 0, 0, 0, 0, 20, 1, 1, 100, SC_SOLIDS, 35.0f, 46, "Nitrogen Ice.", ST_SOLID, TYPE_SOLID, NULL, NULL},
{"NBLE", PIXPACK(0xEB4917), 1.0f, 0.01f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 0.75f, 0.001f * CFDS, 0, 0, 0, 0, 1, 1, 1, 1, SC_GAS, R_TEMP+2.0f +273.15f, 106, "Noble Gas. Diffuses. Conductive. Ionizes into plasma when introduced to electricity", ST_GAS, TYPE_GAS|PROP_CONDUCTS|PROP_LIFE_DEC, NULL, NULL},
{"NBLE", PIXPACK(0xEB4917), 1.0f, 0.01f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 0.75f, 0.001f * CFDS, 0, 0, 0, 0, 1, 1, 1, 1, SC_GAS, R_TEMP+2.0f +273.15f, 106, "Noble Gas. Diffuses. Conductive. Ionizes into plasma when introduced to electricity", ST_GAS, TYPE_GAS|PROP_CONDUCTS|PROP_LIFE_DEC, &update_NBLE, NULL},
{"BTRY", PIXPACK(0x858505), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Solid. Generates Electricity.", ST_SOLID, TYPE_SOLID, &update_BTRY, NULL},
{"LCRY", PIXPACK(0x505050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Liquid Crystal. Changes colour when charged. (PSCN Charges, NSCN Discharges)", ST_SOLID, TYPE_SOLID, &update_LCRY, &graphics_LCRY},
{"STKM", PIXPACK(0x000000), 0.5f, 0.00f * CFDS, 0.2f, 1.0f, 0.0f, 0.0f, 0.0f, 0.00f * CFDS, 0, 0, 0, 0, 0, 1, 1, 50, SC_SPECIAL, R_TEMP+14.6f+273.15f, 0, "Stickman. Don't kill him!", ST_NONE, 0, &update_STKM, &graphics_STKM},