diff options
Diffstat (limited to 'src/simulation/elements/VIRS.cpp')
| -rw-r--r-- | src/simulation/elements/VIRS.cpp | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/simulation/elements/VIRS.cpp b/src/simulation/elements/VIRS.cpp index 7880a92..b30eecf 100644 --- a/src/simulation/elements/VIRS.cpp +++ b/src/simulation/elements/VIRS.cpp @@ -19,7 +19,7 @@ Element_VIRS::Element_VIRS() HotAir = 0.000f * CFDS; Falldown = 2; - Flammable = 100; + Flammable = 0; Explosive = 0; Meltable = 0; Hardness = 20; @@ -43,7 +43,7 @@ Element_VIRS::Element_VIRS() HighTemperatureTransition = PT_VRSG; Update = &Element_VIRS::update; - + Graphics = &Element_VIRS::graphics; } //#TPT-Directive ElementHeader Element_VIRS static int update(UPDATE_FUNC_ARGS) @@ -104,13 +104,21 @@ int Element_VIRS::update(UPDATE_FUNC_ARGS) return 0; } //soap cures virus - else if ((r&0xFF) == PT_SOAP || (r&0xFF) == PT_FIRE) + else if ((r&0xFF) == PT_SOAP) { parts[i].pavg[0] += 10; if (!((rndstore&0x7)>>1)) sim->kill_part(r>>8); return 0; } + else if ((r&0xFF) == PT_PLSM) + { + if (surround_space && 10 + (int)(sim->pv[(y+ry)/CELL][(x+rx)/CELL]) > (rand()%100)) + { + sim->create_part(i, x, y, PT_PLSM); + return 1; + } + } //transforms things into virus here else if ((r&0xFF) != PT_VIRS && (r&0xFF) != PT_VRSS && (r&0xFF) != PT_VRSG && (r&0xFF) != PT_DMND) { @@ -142,4 +150,11 @@ int Element_VIRS::update(UPDATE_FUNC_ARGS) return 0; } +//#TPT-Directive ElementHeader Element_VIRS static int graphics(GRAPHICS_FUNC_ARGS) +int Element_VIRS::graphics(GRAPHICS_FUNC_ARGS) +{ + *pixel_mode |= NO_DECO; + return 1; +} + Element_VIRS::~Element_VIRS() {} |
