v0.6.2: fixed bugs with plant logic caused by recent code changes
This commit is contained in:
@@ -722,7 +722,7 @@ public abstract class Level implements Bundlable {
|
||||
flamable[pos] = true;
|
||||
}
|
||||
|
||||
plant = seed.couch( pos );
|
||||
plant = seed.couch( pos, this );
|
||||
plants.put( pos, plant );
|
||||
|
||||
GameScene.plantSeed( pos );
|
||||
|
||||
@@ -36,6 +36,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Dewdrop;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.SandalsOfNature;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
@@ -166,9 +167,9 @@ public abstract class Plant implements Bundlable {
|
||||
}
|
||||
}
|
||||
|
||||
public Plant couch( int pos ) {
|
||||
public Plant couch( int pos, Level level ) {
|
||||
try {
|
||||
if (Dungeon.level.heroFOV != null && Dungeon.level.heroFOV[pos]) {
|
||||
if (level.heroFOV != null && level.heroFOV[pos]) {
|
||||
Sample.INSTANCE.play(Assets.SND_PLANT);
|
||||
}
|
||||
Plant plant = plantClass.newInstance();
|
||||
|
||||
Reference in New Issue
Block a user