v0.3.0: improved interactions between plants and fire
This commit is contained in:
parent
5c4dc05477
commit
3ae6f88914
|
@ -27,6 +27,7 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.particles.FlameParticle;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.plants.Plant;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
|
||||
public class Fire extends Blob {
|
||||
|
@ -92,6 +93,11 @@ public class Fire extends Blob {
|
|||
if (heap != null) {
|
||||
heap.burn();
|
||||
}
|
||||
|
||||
Plant plant = Dungeon.level.plants.get( pos );
|
||||
if (plant != null){
|
||||
plant.wither();
|
||||
}
|
||||
}
|
||||
|
||||
public void seed( int cell, int amount ) {
|
||||
|
|
|
@ -680,6 +680,7 @@ public abstract class Level implements Bundlable {
|
|||
map[pos] == Terrain.EMBERS ||
|
||||
map[pos] == Terrain.EMPTY_DECO) {
|
||||
map[pos] = Terrain.GRASS;
|
||||
flamable[pos] = true;
|
||||
GameScene.updateMap( pos );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user