v0.2.4d: fixed a bug where losing a bag wouldn't remove items from the quickslot.
This commit is contained in:
@@ -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,10 +80,12 @@ 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() {
|
||||||
|
|||||||
Reference in New Issue
Block a user