v1.4.0: thrown weps now show their count in orange when about to break
This commit is contained in:
@@ -265,6 +265,11 @@ abstract public class MissileWeapon extends Weapon {
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public String status() {
|
||||
//show quantity even when it is 1
|
||||
return Integer.toString( quantity );
|
||||
}
|
||||
|
||||
@Override
|
||||
public float castDelay(Char user, int dst) {
|
||||
|
||||
@@ -30,6 +30,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.rings.Ring;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MeleeWeapon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.MissileWeapon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||
@@ -227,6 +228,13 @@ public class ItemSlot extends Button {
|
||||
|
||||
status.text( item.status() );
|
||||
|
||||
if (item instanceof MissileWeapon
|
||||
&& ((MissileWeapon) item).durabilityLeft() <= ((MissileWeapon) item).durabilityPerUse()){
|
||||
status.hardlight(WARNING);
|
||||
} else {
|
||||
status.resetColor();
|
||||
}
|
||||
|
||||
if (item.icon != -1 && (item.isIdentified() || (item instanceof Ring && ((Ring) item).isKnown()))){
|
||||
extra.text( null );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user