diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2011-09-08 10:54:50 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2011-09-08 10:54:50 (GMT) |
| commit | 63dd1cfd4b6c2f784e86f9dc330ba3d9274d43d6 (patch) | |
| tree | 76aea0b8ecf27f7ad1e20c0171942d7d29e92e0b /src | |
| parent | 69a5bc5440a885d26f51704ac8ab79f15bed9d0e (diff) | |
| download | powder-63dd1cfd4b6c2f784e86f9dc330ba3d9274d43d6.zip powder-63dd1cfd4b6c2f784e86f9dc330ba3d9274d43d6.tar.gz | |
Add energy-only wall and make STOR show when it's holding a particle
Diffstat (limited to 'src')
| -rw-r--r-- | src/graphics.c | 8 | ||||
| -rw-r--r-- | src/powder.c | 7 |
2 files changed, 13 insertions, 2 deletions
diff --git a/src/graphics.c b/src/graphics.c index 3056742..6f46c57 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -3083,6 +3083,14 @@ void draw_parts(pixel *vid) blendpixel(vid, nx-1, ny+1, GR, 30, 30, 112); } } + else if (t==PT_STOR) + { + if(parts[i].tmp){ + vid[ny*(XRES+BARSIZE)+nx] = PIXPACK(0x50DFDF); + } else { + vid[ny*(XRES+BARSIZE)+nx] = PIXPACK(0x20AFAF); + } + } else if (t==PT_PUMP) { uint8 GR = 0x3B+((parts[i].life>10?10:parts[i].life)*19); diff --git a/src/powder.c b/src/powder.c index 65bca43..4902b75 100644 --- a/src/powder.c +++ b/src/powder.c @@ -173,6 +173,8 @@ int eval_move(int pt, int nx, int ny, unsigned *rr) { if (bmap[ny/CELL][nx/CELL]==WL_ALLOWGAS && !(ptypes[pt].properties&TYPE_GAS))// && ptypes[pt].falldown!=0 && pt!=PT_FIRE && pt!=PT_SMKE) return 0; + if (bmap[ny/CELL][nx/CELL]==WL_ALLOWENERGY && !(ptypes[pt].properties&TYPE_ENERGY))// && ptypes[pt].falldown!=0 && pt!=PT_FIRE && pt!=PT_SMKE) + return 0; if (bmap[ny/CELL][nx/CELL]==WL_ALLOWLIQUID && ptypes[pt].falldown!=2) return 0; if (bmap[ny/CELL][nx/CELL]==WL_ALLOWSOLID && ptypes[pt].falldown!=1) @@ -1603,7 +1605,8 @@ void update_particles_i(pixel *vid, int start, int inc) (bmap[y/CELL][x/CELL]==WL_ALLOWLIQUID && ptypes[t].falldown!=2) || (bmap[y/CELL][x/CELL]==WL_ALLOWSOLID && ptypes[t].falldown!=1) || (bmap[y/CELL][x/CELL]==WL_ALLOWGAS && !(ptypes[t].properties&TYPE_GAS)) || //&& ptypes[t].falldown!=0 && parts[i].type!=PT_FIRE && parts[i].type!=PT_SMKE && parts[i].type!=PT_HFLM) || - (bmap[y/CELL][x/CELL]==WL_DETECT && (t==PT_METL || t==PT_SPRK)) || + (bmap[y/CELL][x/CELL]==WL_ALLOWENERGY && !(ptypes[t].properties&TYPE_ENERGY)) || + (bmap[y/CELL][x/CELL]==WL_DETECT && (t==PT_METL || t==PT_SPRK)) || (bmap[y/CELL][x/CELL]==WL_EWALL && !emap[y/CELL][x/CELL])) && (t!=PT_STKM) && (t!=PT_STKM2))) { kill_part(i); @@ -2880,7 +2883,7 @@ void create_line(int x1, int y1, int x2, int y2, int rx, int ry, int c, int flag if (e >= 0.5f) { y += sy; - if (c==WL_EHOLE+100 || c==WL_ALLOWGAS+100 || c==WL_ALLOWALLELEC+100 || c==WL_ALLOWSOLID+100 || c==WL_ALLOWAIR+100 || c==WL_WALL+100 || c==WL_DESTROYALL+100 || c==WL_ALLOWLIQUID+100 || c==WL_FAN+100 || c==WL_STREAM+100 || c==WL_DETECT+100 || c==WL_EWALL+100 || c==WL_WALLELEC+100 || !(rx+ry)) + if (c==WL_EHOLE+100 || c==WL_ALLOWGAS+100 || c==WL_ALLOWENERGY+100 || c==WL_ALLOWALLELEC+100 || c==WL_ALLOWSOLID+100 || c==WL_ALLOWAIR+100 || c==WL_WALL+100 || c==WL_DESTROYALL+100 || c==WL_ALLOWLIQUID+100 || c==WL_FAN+100 || c==WL_STREAM+100 || c==WL_DETECT+100 || c==WL_EWALL+100 || c==WL_WALLELEC+100 || !(rx+ry)) { if (cp) create_parts(y, x, rx, ry, c, flags); |
