mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-12 03:14:04 +02:00
TPT: fusion changes
This commit is contained in:
@@ -127,7 +127,7 @@ int Element_ELEC::update(UPDATE_FUNC_ARGS)
|
|||||||
sim->kill_part(i);
|
sim->kill_part(i);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if ((sim->elements[r&0xFF].Properties & PROP_CONDUCTS) && ((r&0xFF)!=PT_H2||parts[i].tmp!=1))
|
if ((sim->elements[r&0xFF].Properties & PROP_CONDUCTS) && ((r&0xFF)!=PT_H2||parts[i].temp<2273.15))
|
||||||
{
|
{
|
||||||
sim->create_part(-1, x+rx, y+ry, PT_SPRK);
|
sim->create_part(-1, x+rx, y+ry, PT_SPRK);
|
||||||
sim->kill_part(i);
|
sim->kill_part(i);
|
||||||
@@ -153,4 +153,4 @@ int Element_ELEC::graphics(GRAPHICS_FUNC_ARGS)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Element_ELEC::~Element_ELEC() {}
|
Element_ELEC::~Element_ELEC() {}
|
||||||
|
@@ -68,7 +68,7 @@ int Element_H2::update(UPDATE_FUNC_ARGS)
|
|||||||
}
|
}
|
||||||
if (parts[r>>8].temp > 2273.15)// && pv[y/CELL][x/CELL] > 50.0f)
|
if (parts[r>>8].temp > 2273.15)// && pv[y/CELL][x/CELL] > 50.0f)
|
||||||
continue;
|
continue;
|
||||||
if (parts[i].tmp != 1)
|
if (parts[i].temp < 2273.15)
|
||||||
{
|
{
|
||||||
if (rt==PT_FIRE)
|
if (rt==PT_FIRE)
|
||||||
{
|
{
|
||||||
@@ -87,27 +87,25 @@ int Element_H2::update(UPDATE_FUNC_ARGS)
|
|||||||
}
|
}
|
||||||
if (parts[i].temp > 2273.15 && sim->pv[y/CELL][x/CELL] > 50.0f)
|
if (parts[i].temp > 2273.15 && sim->pv[y/CELL][x/CELL] > 50.0f)
|
||||||
{
|
{
|
||||||
parts[i].tmp = 1;
|
|
||||||
if (rand()%5 < 1)
|
if (rand()%5 < 1)
|
||||||
{
|
{
|
||||||
int j;
|
int j;
|
||||||
float temp = parts[i].temp;
|
float temp = parts[i].temp;
|
||||||
sim->part_change_type(i,x,y,PT_PLSM);
|
sim->part_change_type(i,x,y,PT_PLSM);
|
||||||
parts[i].life = rand()%150+50;
|
parts[i].life = rand()%150+50;
|
||||||
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_NEUT); if (j != -1) parts[j].temp = temp;
|
||||||
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_ELEC); if (j != -1) parts[j].temp = temp;
|
||||||
j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_PHOT);
|
j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_PHOT);
|
||||||
if (j != -1) { parts[j].ctype = 0xFFFF00; parts[j].temp = temp; }
|
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);
|
j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NBLE); if (j != -1) parts[j].temp = temp;
|
||||||
if (j != -1) { parts[j].tmp = 1; parts[j].temp = temp; }
|
|
||||||
|
|
||||||
if (rand()%2)
|
if (rand()%2)
|
||||||
{
|
{
|
||||||
j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NBLE);
|
j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NBLE);
|
||||||
if (j != -1) { parts[j].tmp = 1; parts[j].temp = temp; }
|
if (j != -1) { parts[j].tmp = 1; parts[j].temp = temp; }
|
||||||
}
|
}
|
||||||
parts[i].temp += 6000;
|
parts[i].temp += 750+rand()%500;
|
||||||
sim->pv[y/CELL][x/CELL] += 30;
|
sim->pv[y/CELL][x/CELL] += 30;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -115,4 +113,4 @@ int Element_H2::update(UPDATE_FUNC_ARGS)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Element_H2::~Element_H2() {}
|
Element_H2::~Element_H2() {}
|
||||||
|
Reference in New Issue
Block a user