v0.3.5: adjusted logic for picking up items at full inventory
This commit is contained in:
parent
e883272242
commit
1f40d6289c
|
@ -592,9 +592,10 @@ public class Hero extends Char {
|
|||
|
||||
Heap heap = Dungeon.level.heaps.get( pos );
|
||||
if (heap != null) {
|
||||
Item item = heap.pickUp();
|
||||
Item item = heap.peek();
|
||||
if (item.doPickUp( this )) {
|
||||
|
||||
heap.pickUp();
|
||||
|
||||
if (item instanceof Dewdrop
|
||||
|| item instanceof TimekeepersHourglass.sandBag
|
||||
|| item instanceof DriedRose.Petal) {
|
||||
|
@ -610,13 +611,13 @@ public class Hero extends Char {
|
|||
GLog.i( Messages.get(this, "you_now_have", item.name()) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!heap.isEmpty()) {
|
||||
GLog.i( Messages.get(this, "something_else") );
|
||||
}
|
||||
curAction = null;
|
||||
} else {
|
||||
Dungeon.level.drop( item, pos ).sprite.drop();
|
||||
heap.sprite.drop();
|
||||
ready();
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -21,12 +21,6 @@
|
|||
package com.shatteredpixel.shatteredpixeldungeon.sprites;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
|
||||
import com.watabou.gltextures.TextureCache;
|
||||
import com.watabou.noosa.Game;
|
||||
import com.watabou.noosa.MovieClip;
|
||||
import com.watabou.noosa.TextureFilm;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.DungeonTilemap;
|
||||
|
@ -38,6 +32,11 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.watabou.gltextures.TextureCache;
|
||||
import com.watabou.noosa.Game;
|
||||
import com.watabou.noosa.MovieClip;
|
||||
import com.watabou.noosa.TextureFilm;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
import com.watabou.noosa.particles.Emitter;
|
||||
import com.watabou.utils.PointF;
|
||||
import com.watabou.utils.Random;
|
||||
|
@ -139,6 +138,11 @@ public class ItemSprite extends MovieClip {
|
|||
|
||||
if (heap.isEmpty()) {
|
||||
return;
|
||||
} else if (heap.size() == 1){
|
||||
// normally this would happen for any heap, however this is not applied to heaps greater than 1 in size
|
||||
// in order to preserve an amusing visual bug/feature that used to trigger for heaps with size > 1
|
||||
// where as long as the player continually taps, the heap sails up into the air.
|
||||
place(heap.pos);
|
||||
}
|
||||
|
||||
dropInterval = DROP_INTERVAL;
|
||||
|
|
Loading…
Reference in New Issue
Block a user