v0.2.4d: fixed a bug where losing a bag wouldn't remove items from the quickslot.
This commit is contained in:
parent
d3899871ac
commit
1ee7bbba41
|
@ -21,6 +21,7 @@ import java.util.ArrayList;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||||
|
@ -45,12 +46,6 @@ public class Bag extends Item implements Iterable<Item> {
|
||||||
|
|
||||||
public int size = 1;
|
public int size = 1;
|
||||||
|
|
||||||
@Override
|
|
||||||
public ArrayList<String> actions( Hero hero ) {
|
|
||||||
ArrayList<String> actions = super.actions( hero );
|
|
||||||
return actions;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute( Hero hero, String action ) {
|
public void execute( Hero hero, String action ) {
|
||||||
if (action.equals( AC_OPEN )) {
|
if (action.equals( AC_OPEN )) {
|
||||||
|
@ -85,11 +80,13 @@ public class Bag extends Item implements Iterable<Item> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDetach( ) {
|
public void onDetach( ) {
|
||||||
this.owner = null;
|
this.owner = null;
|
||||||
}
|
for (Item item : items)
|
||||||
|
Dungeon.quickslot.clearItem(item);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isUpgradable() {
|
public boolean isUpgradable() {
|
||||||
return false;
|
return false;
|
||||||
|
@ -111,7 +108,7 @@ public class Bag extends Item implements Iterable<Item> {
|
||||||
super.storeInBundle( bundle );
|
super.storeInBundle( bundle );
|
||||||
bundle.put( ITEMS, items );
|
bundle.put( ITEMS, items );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void restoreFromBundle( Bundle bundle ) {
|
public void restoreFromBundle( Bundle bundle ) {
|
||||||
super.restoreFromBundle( bundle );
|
super.restoreFromBundle( bundle );
|
||||||
|
|
Loading…
Reference in New Issue
Block a user