Merging Source v1.7.2: item changes
This commit is contained in:
@@ -27,7 +27,7 @@ public class IronKey extends Key {
|
||||
|
||||
private static final String TXT_FROM_DEPTH = "iron key from depth %d";
|
||||
|
||||
public static int curDepthQunatity = 0;
|
||||
public static int curDepthQuantity = 0;
|
||||
|
||||
{
|
||||
name = "iron key";
|
||||
@@ -51,15 +51,13 @@ public class IronKey extends Key {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item detach( Bag bag ) {
|
||||
Item result = super.detach( bag );
|
||||
if (result != null && depth == Dungeon.depth) {
|
||||
Dungeon.hero.belongings.countIronKeys();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDetach( ) {
|
||||
if (depth == Dungeon.depth) {
|
||||
Dungeon.hero.belongings.countIronKeys();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
|
||||
@@ -36,13 +36,6 @@ public class Key extends Item {
|
||||
return item.getClass() == getClass() && ((Key)item).depth == depth;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item detach( Bag container ) {
|
||||
Key key = (Key)super.detach( container );
|
||||
key.depth = depth;
|
||||
return key;
|
||||
}
|
||||
|
||||
private static final String DEPTH = "depth";
|
||||
|
||||
@Override
|
||||
@@ -66,4 +59,10 @@ public class Key extends Item {
|
||||
public boolean isIdentified() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String status() {
|
||||
return depth + "*";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user