v0.3.5: big consistency pass on how items handle execution
This commit is contained in:
@@ -20,9 +20,6 @@
|
||||
*/
|
||||
package com.shatteredpixel.shatteredpixeldungeon.items.bags;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
@@ -33,6 +30,9 @@ import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag;
|
||||
import com.watabou.utils.Bundlable;
|
||||
import com.watabou.utils.Bundle;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
|
||||
public class Bag extends Item implements Iterable<Item> {
|
||||
|
||||
public static final String AC_OPEN = "OPEN";
|
||||
@@ -53,14 +53,13 @@ public class Bag extends Item implements Iterable<Item> {
|
||||
|
||||
@Override
|
||||
public void execute( Hero hero, String action ) {
|
||||
|
||||
super.execute( hero, action );
|
||||
|
||||
if (action.equals( AC_OPEN )) {
|
||||
|
||||
GameScene.show( new WndBag( this, null, WndBag.Mode.ALL, null ) );
|
||||
|
||||
} else {
|
||||
|
||||
super.execute( hero, action );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user