v0.3.5: big consistency pass on how items handle execution

This commit is contained in:
Evan Debenham
2016-04-19 19:34:08 -04:00
parent a571dc7f02
commit e715e147ff
36 changed files with 163 additions and 151 deletions
@@ -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 );
}
}