summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon <simon@hardwired.org.uk>2011-01-05 17:42:39 (GMT)
committer Simon <simon@hardwired.org.uk>2011-01-05 17:42:39 (GMT)
commit5d7c0194f18d0fce25b0703b80829b0d0a719a96 (patch)
tree85cb64301a357a576bf90213fdc316beea4f1753
parent0eb4089b086ad4b50f43b8b129bc80d08f258bd0 (diff)
downloadpowder-5d7c0194f18d0fce25b0703b80829b0d0a719a96.zip
powder-5d7c0194f18d0fce25b0703b80829b0d0a719a96.tar.gz
INST enabled. INST modifier for ARAY - makes it not stop
-rw-r--r--includes/powder.h2
-rw-r--r--src/powder.c7
2 files changed, 7 insertions, 2 deletions
diff --git a/includes/powder.h b/includes/powder.h
index 6efee3a..9c7f952 100644
--- a/includes/powder.h
+++ b/includes/powder.h
@@ -391,7 +391,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},
{"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},
- {"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, is now also a battery, 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, 20, 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},
{"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, 40, "Portal IN. Things go in here", TYPE_SOLID, NULL},
diff --git a/src/powder.c b/src/powder.c
index a515177..cbb2ab2 100644
--- a/src/powder.c
+++ b/src/powder.c
@@ -2097,6 +2097,7 @@ void update_particles_i(pixel *vid, int start, int inc)
continue;
if((r&0xFF)==PT_SPRK){
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) {
if(!(x+nxi+nxx<XRES && y+nyi+nyy<YRES && x+nxi+nxx >= 0 && y+nyi+nyy >= 0)){
break;
@@ -2132,7 +2133,11 @@ void update_particles_i(pixel *vid, int start, int inc)
if(nyy!=0 || nxx!=0){
create_part(-1, x+nxi+nxx, y+nyi+nyy, PT_SPRK);
}
- docontinue = 0;
+ if(!(nostop && (ptypes[parts[r>>8].ctype].properties&PROP_CONDUCTS))){
+ docontinue = 0;
+ } else {
+ docontinue = 1;
+ }
}
} else if(destroy) {
if(parts[r>>8].type==PT_BRAY){