update, and another small ARAY feature, goes through SWCH.
This commit is contained in:
parent
cf2489916c
commit
45078b5933
@ -390,7 +390,7 @@ static const part_type ptypes[PT_NUM] =
|
|||||||
{"BIZR", PIXPACK(0x00FF77), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 30, SC_LIQUID, R_TEMP+0.0f +273.15f, 29, "Bizarre... contradicts the normal state changes.", TYPE_LIQUID, NULL},
|
{"BIZR", PIXPACK(0x00FF77), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 30, SC_LIQUID, R_TEMP+0.0f +273.15f, 29, "Bizarre... contradicts the normal state changes.", TYPE_LIQUID, NULL},
|
||||||
{"BIZG", PIXPACK(0x00FFBB), 1.0f, 0.01f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 2.75f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, SC_CRACKER2, R_TEMP-200.0f+273.15f, 42, "Bizarre gas", TYPE_GAS, NULL},
|
{"BIZG", PIXPACK(0x00FFBB), 1.0f, 0.01f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 2.75f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, SC_CRACKER2, R_TEMP-200.0f+273.15f, 42, "Bizarre gas", TYPE_GAS, NULL},
|
||||||
{"BIZS", PIXPACK(0x00E455), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 100, SC_CRACKER2, R_TEMP+300.0f+273.15f, 251, "Bizarre solid", TYPE_SOLID, NULL},
|
{"BIZS", PIXPACK(0x00E455), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 100, SC_CRACKER2, R_TEMP+300.0f+273.15f, 251, "Bizarre solid", TYPE_SOLID, NULL},
|
||||||
{"INST", PIXPACK(0x404039), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 100, SC_CRACKER2, R_TEMP+0.0f +273.15f, 251, "Instantly conducts, like walls, PSCN to charge, NSCN to take.", TYPE_SOLID|PROP_CONDUCTS, NULL},
|
{"INST", PIXPACK(0x404039), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Instantly conducts, PSCN to charge, NSCN to take.", TYPE_SOLID|PROP_CONDUCTS, NULL},
|
||||||
{"ISOZ", PIXPACK(0xAA30D0), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 0, 1, 24, SC_NUCLEAR, R_TEMP-2.0f +273.15f, 29, "Radioactive liquid", TYPE_LIQUID|PROP_NEUTPENETRATE, NULL},
|
{"ISOZ", PIXPACK(0xAA30D0), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 0, 1, 24, SC_NUCLEAR, R_TEMP-2.0f +273.15f, 29, "Radioactive liquid", TYPE_LIQUID|PROP_NEUTPENETRATE, NULL},
|
||||||
{"ISZS", PIXPACK(0x662089), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, -0.0007f* CFDS, 0, 0, 0, 1, 1, 1, 100, SC_NUCLEAR, 140.00f, 251, "Solid form of ISOZ, slowly decays.", TYPE_SOLID, NULL},
|
{"ISZS", PIXPACK(0x662089), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, -0.0007f* CFDS, 0, 0, 0, 1, 1, 1, 100, SC_NUCLEAR, 140.00f, 251, "Solid form of ISOZ, slowly decays.", TYPE_SOLID, NULL},
|
||||||
{"PRTI", PIXPACK(0xEB5917), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, -0.005f * CFDS, 0, 0, 0, 0, 0, 1, 100, SC_NUCLEAR, R_TEMP+0.0f +273.15f, 0, "Portal IN. Things go in here, now with channels (same as WIFI)", TYPE_SOLID, NULL},
|
{"PRTI", PIXPACK(0xEB5917), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, -0.005f * CFDS, 0, 0, 0, 0, 0, 1, 100, SC_NUCLEAR, R_TEMP+0.0f +273.15f, 0, "Portal IN. Things go in here, now with channels (same as WIFI)", TYPE_SOLID, NULL},
|
||||||
|
17
src/powder.c
17
src/powder.c
@ -565,9 +565,15 @@ inline int create_part(int p, int x, int y, int t)
|
|||||||
if(p==-1)//creating from anything but brush
|
if(p==-1)//creating from anything but brush
|
||||||
{
|
{
|
||||||
if(pmap[y][x])
|
if(pmap[y][x])
|
||||||
|
{
|
||||||
if((pmap[y][x]&0xFF)!=PT_SPAWN&&(pmap[y][x]&0xFF)!=PT_SPAWN2)
|
if((pmap[y][x]&0xFF)!=PT_SPAWN&&(pmap[y][x]&0xFF)!=PT_SPAWN2)
|
||||||
|
{
|
||||||
if(t!=PT_STKM&&t!=PT_STKM2)
|
if(t!=PT_STKM&&t!=PT_STKM2)
|
||||||
|
{
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if(pfree == -1)
|
if(pfree == -1)
|
||||||
return -1;
|
return -1;
|
||||||
i = pfree;
|
i = pfree;
|
||||||
@ -685,7 +691,7 @@ inline int create_part(int p, int x, int y, int t)
|
|||||||
}
|
}
|
||||||
if(t==PT_BIZR||t==PT_BIZRG)
|
if(t==PT_BIZR||t==PT_BIZRG)
|
||||||
parts[i].ctype = 0x47FFFF;
|
parts[i].ctype = 0x47FFFF;
|
||||||
if(t!=PT_STKM&&t!=PT_STKM2)// && t!=PT_PHOT && t!=PT_NEUT) is this needed? it breaks floodfill
|
if(t!=PT_STKM&&t!=PT_STKM2 && t!=PT_PHOT)// && t!=PT_NEUT) is this needed? it breaks floodfill, Yes photons should not be placed in the PMAP
|
||||||
pmap[y][x] = t|(i<<8);
|
pmap[y][x] = t|(i<<8);
|
||||||
else if(t==PT_STKM)
|
else if(t==PT_STKM)
|
||||||
{
|
{
|
||||||
@ -2097,6 +2103,7 @@ void update_particles_i(pixel *vid, int start, int inc)
|
|||||||
continue;
|
continue;
|
||||||
if((r&0xFF)==PT_SPRK){
|
if((r&0xFF)==PT_SPRK){
|
||||||
int destroy = (parts[r>>8].ctype==PT_PSCN)?1:0;
|
int destroy = (parts[r>>8].ctype==PT_PSCN)?1:0;
|
||||||
|
int nostop = (parts[r>>8].ctype==PT_INST)?1:0;
|
||||||
for (docontinue = 1, nxx = 0, nyy = 0, nxi = nx*-1, nyi = ny*-1; docontinue; nyy+=nyi, nxx+=nxi) {
|
for (docontinue = 1, nxx = 0, nyy = 0, nxi = nx*-1, nyi = ny*-1; docontinue; nyy+=nyi, nxx+=nxi) {
|
||||||
if(!(x+nxi+nxx<XRES && y+nyi+nyy<YRES && x+nxi+nxx >= 0 && y+nyi+nyy >= 0)){
|
if(!(x+nxi+nxx<XRES && y+nyi+nyy<YRES && x+nxi+nxx >= 0 && y+nyi+nyy >= 0)){
|
||||||
break;
|
break;
|
||||||
@ -2128,17 +2135,21 @@ void update_particles_i(pixel *vid, int start, int inc)
|
|||||||
}
|
}
|
||||||
else if(parts[r>>8].type==PT_FILT){
|
else if(parts[r>>8].type==PT_FILT){
|
||||||
colored = parts[r>>8].ctype;
|
colored = parts[r>>8].ctype;
|
||||||
}else if(parts[r>>8].type!=PT_INWR && parts[r>>8].type!=PT_ARAY && parts[r>>8].type!=PT_WIFI) {
|
}else if(parts[r>>8].type!=PT_INWR && parts[r>>8].type!=PT_ARAY && parts[r>>8].type!=PT_WIFI && !(parts[r>>8].type==PT_SWCH && parts[r>>8].life>=10)) {
|
||||||
if(nyy!=0 || nxx!=0){
|
if(nyy!=0 || nxx!=0){
|
||||||
create_part(-1, x+nxi+nxx, y+nyi+nyy, PT_SPRK);
|
create_part(-1, x+nxi+nxx, y+nyi+nyy, PT_SPRK);
|
||||||
}
|
}
|
||||||
|
if(!(nostop && (ptypes[parts[r>>8].ctype].properties&PROP_CONDUCTS))){
|
||||||
docontinue = 0;
|
docontinue = 0;
|
||||||
|
} else {
|
||||||
|
docontinue = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if(destroy) {
|
} else if(destroy) {
|
||||||
if(parts[r>>8].type==PT_BRAY){
|
if(parts[r>>8].type==PT_BRAY){
|
||||||
parts[r>>8].life = 1;
|
parts[r>>8].life = 1;
|
||||||
docontinue = 1;
|
docontinue = 1;
|
||||||
} else if(parts[r>>8].type==PT_INWR || parts[r>>8].type==PT_ARAY || parts[r>>8].type==PT_WIFI) {
|
} else if(parts[r>>8].type==PT_INWR || parts[r>>8].type==PT_ARAY || parts[r>>8].type==PT_WIFI || parts[r>>8].type==PT_FILT || (parts[r>>8].type==PT_SWCH && parts[r>>8].life>=10)) {
|
||||||
docontinue = 1;
|
docontinue = 1;
|
||||||
} else {
|
} else {
|
||||||
docontinue = 0;
|
docontinue = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user