v0.6.1: adjusted wndbag and increased inventory space to 20 from 19

This commit is contained in:
Evan Debenham 2017-06-17 21:37:09 -04:00
parent 69981aab33
commit 95dd291bfe
8 changed files with 45 additions and 29 deletions

View File

@ -39,7 +39,7 @@ import java.util.Iterator;
public class Belongings implements Iterable<Item> { public class Belongings implements Iterable<Item> {
public static final int BACKPACK_SIZE = 19; public static final int BACKPACK_SIZE = 20;
private Hero owner; private Hero owner;

View File

@ -157,7 +157,7 @@ public class Messages {
private static final HashSet<String> noCaps = new HashSet<>( private static final HashSet<String> noCaps = new HashSet<>(
Arrays.asList(new String[]{ Arrays.asList(new String[]{
//English //English
"a", "of", "by", "to", "the", "x" "a", "an", "and", "of", "by", "to", "the", "x"
}) })
); );

View File

@ -48,11 +48,13 @@ import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.plants.Plant.Seed; import com.shatteredpixel.shatteredpixeldungeon.plants.Plant.Seed;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene; import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
import com.shatteredpixel.shatteredpixeldungeon.ui.Icons; import com.shatteredpixel.shatteredpixeldungeon.ui.Icons;
import com.shatteredpixel.shatteredpixeldungeon.ui.ItemSlot; import com.shatteredpixel.shatteredpixeldungeon.ui.ItemSlot;
import com.shatteredpixel.shatteredpixeldungeon.ui.QuickSlotButton; import com.shatteredpixel.shatteredpixeldungeon.ui.QuickSlotButton;
import com.watabou.gltextures.TextureCache; import com.watabou.gltextures.TextureCache;
import com.watabou.noosa.BitmapText;
import com.watabou.noosa.ColorBlock; import com.watabou.noosa.ColorBlock;
import com.watabou.noosa.Image; import com.watabou.noosa.Image;
import com.watabou.noosa.RenderedText; import com.watabou.noosa.RenderedText;
@ -85,7 +87,7 @@ public class WndBag extends WndTabbed {
protected static final int SLOT_HEIGHT = 28; protected static final int SLOT_HEIGHT = 28;
protected static final int SLOT_MARGIN = 1; protected static final int SLOT_MARGIN = 1;
protected static final int TITLE_HEIGHT = 12; protected static final int TITLE_HEIGHT = 14;
private Listener listener; private Listener listener;
private WndBag.Mode mode; private WndBag.Mode mode;
@ -113,16 +115,12 @@ public class WndBag extends WndTabbed {
lastBag = bag; lastBag = bag;
nCols = ShatteredPixelDungeon.landscape() ? COLS_L : COLS_P; nCols = ShatteredPixelDungeon.landscape() ? COLS_L : COLS_P;
nRows = (int)Math.ceil((Belongings.BACKPACK_SIZE + 4 + 1) / (float)nCols); nRows = (int)Math.ceil((Belongings.BACKPACK_SIZE + 4) / (float)nCols);
int slotsWidth = SLOT_WIDTH * nCols + SLOT_MARGIN * (nCols - 1); int slotsWidth = SLOT_WIDTH * nCols + SLOT_MARGIN * (nCols - 1);
int slotsHeight = SLOT_HEIGHT * nRows + SLOT_MARGIN * (nRows - 1); int slotsHeight = SLOT_HEIGHT * nRows + SLOT_MARGIN * (nRows - 1);
RenderedText txtTitle = PixelScene.renderText( title != null ? title : Messages.titleCase( bag.name() ), 9 ); placeTitle( bag, slotsWidth );
txtTitle.hardlight( TITLE_COLOR );
txtTitle.x = (int)(slotsWidth - txtTitle.width()) / 2;
txtTitle.y = (int)(TITLE_HEIGHT - txtTitle.height()) / 2;
add( txtTitle );
placeItems( bag ); placeItems( bag );
@ -168,6 +166,31 @@ public class WndBag extends WndTabbed {
lastBag( listener, mode, title ); lastBag( listener, mode, title );
} }
protected void placeTitle( Bag bag, int width ){
RenderedText txtTitle = PixelScene.renderText(
title != null ? Messages.titleCase(title) : Messages.titleCase( bag.name() ), 9 );
txtTitle.hardlight( TITLE_COLOR );
txtTitle.x = 1;
txtTitle.y = (int)(TITLE_HEIGHT - txtTitle.baseLine()) / 2f - 1;
PixelScene.align(txtTitle);
add( txtTitle );
ItemSprite gold = new ItemSprite(ItemSpriteSheet.GOLD, null);
gold.x = width - gold.width() - 1;
gold.y = (TITLE_HEIGHT - gold.height())/2f - 1;
PixelScene.align(gold);
add(gold);
BitmapText amt = new BitmapText( Integer.toString(Dungeon.gold), PixelScene.pixelFont );
amt.hardlight(TITLE_COLOR);
amt.measure();
amt.x = width - gold.width() - amt.width() - 2;
amt.y = (TITLE_HEIGHT - amt.baseLine())/2f - 1;
PixelScene.align(amt);
add(amt);
}
protected void placeItems( Bag container ) { protected void placeItems( Bag container ) {
// Equipped items // Equipped items
@ -193,13 +216,6 @@ public class WndBag extends WndTabbed {
while (count-(backpack ? 4 : nCols) < container.size) { while (count-(backpack ? 4 : nCols) < container.size) {
placeItem( null ); placeItem( null );
} }
// Gold
if (container == Dungeon.hero.belongings.backpack) {
row = nRows - 1;
col = nCols - 1;
placeItem( new Gold( Dungeon.gold ) );
}
} }
protected void placeItem( final Item item ) { protected void placeItem( final Item item ) {

View File

@ -327,7 +327,7 @@ actors.mobs.npcs.sheep.desc=This is a magic sheep. What's so magical about it? Y
actors.mobs.npcs.shopkeeper.name=shopkeeper actors.mobs.npcs.shopkeeper.name=shopkeeper
actors.mobs.npcs.shopkeeper.thief=Thief, Thief! actors.mobs.npcs.shopkeeper.thief=Thief, Thief!
actors.mobs.npcs.shopkeeper.sell=Select an item to sell actors.mobs.npcs.shopkeeper.sell=Sell an item
actors.mobs.npcs.shopkeeper.desc=This stout guy looks more appropriate for a trade district in some large city than for a dungeon. His prices explain why he prefers to do business here. actors.mobs.npcs.shopkeeper.desc=This stout guy looks more appropriate for a trade district in some large city than for a dungeon. His prices explain why he prefers to do business here.
actors.mobs.npcs.wandmaker.name=old wandmaker actors.mobs.npcs.wandmaker.name=old wandmaker

View File

@ -206,7 +206,7 @@ items.artifacts.hornofplenty.name=horn of plenty
items.artifacts.hornofplenty.ac_eat=EAT items.artifacts.hornofplenty.ac_eat=EAT
items.artifacts.hornofplenty.ac_store=STORE items.artifacts.hornofplenty.ac_store=STORE
items.artifacts.hornofplenty.eat=You eat from the horn. items.artifacts.hornofplenty.eat=You eat from the horn.
items.artifacts.hornofplenty.prompt=Select a piece of food items.artifacts.hornofplenty.prompt=Select some food
items.artifacts.hornofplenty.no_food=Your horn has no food in it to eat! items.artifacts.hornofplenty.no_food=Your horn has no food in it to eat!
items.artifacts.hornofplenty.full=Your horn is full of food! items.artifacts.hornofplenty.full=Your horn is full of food!
items.artifacts.hornofplenty.reject=Your horn rejects the uncooked blandfruit. items.artifacts.hornofplenty.reject=Your horn rejects the uncooked blandfruit.
@ -568,7 +568,7 @@ items.scrolls.inventoryscroll.yes=Yes, I'm positive
items.scrolls.inventoryscroll.no=No, I changed my mind items.scrolls.inventoryscroll.no=No, I changed my mind
items.scrolls.scrollofidentify.name=scroll of identify items.scrolls.scrollofidentify.name=scroll of identify
items.scrolls.scrollofidentify.inv_title=Select an item to identify items.scrolls.scrollofidentify.inv_title=Identify an item
items.scrolls.scrollofidentify.it_is=Your scroll identifies the %s. items.scrolls.scrollofidentify.it_is=Your scroll identifies the %s.
items.scrolls.scrollofidentify.desc=This scroll permanently reveals all of the secrets of a single item. items.scrolls.scrollofidentify.desc=This scroll permanently reveals all of the secrets of a single item.
@ -577,7 +577,7 @@ items.scrolls.scrolloflullaby.sooth=The scroll utters a soothing melody. You fee
items.scrolls.scrolloflullaby.desc=Reading this scroll emits a soothing melody will lull all who hear it into a deep magical sleep. items.scrolls.scrolloflullaby.desc=Reading this scroll emits a soothing melody will lull all who hear it into a deep magical sleep.
items.scrolls.scrollofmagicalinfusion.name=scroll of magical infusion items.scrolls.scrollofmagicalinfusion.name=scroll of magical infusion
items.scrolls.scrollofmagicalinfusion.inv_title=Select an item to infuse items.scrolls.scrollofmagicalinfusion.inv_title=Infuse an item
items.scrolls.scrollofmagicalinfusion.infuse=Your %s is infused with arcane energy! items.scrolls.scrollofmagicalinfusion.infuse=Your %s is infused with arcane energy!
items.scrolls.scrollofmagicalinfusion.desc=This scroll will infuse a weapon or armor with powerful magical energy.\n\nIn addition to being upgraded, A weapon will gain a magical enchantment, or armor will be imbued with a magical glyph.\n\nIf the item already has an enchantment or glyph, it will never be erased by this scroll. items.scrolls.scrollofmagicalinfusion.desc=This scroll will infuse a weapon or armor with powerful magical energy.\n\nIn addition to being upgraded, A weapon will gain a magical enchantment, or armor will be imbued with a magical glyph.\n\nIf the item already has an enchantment or glyph, it will never be erased by this scroll.
@ -601,7 +601,7 @@ items.scrolls.scrollofrecharging.surge=A surge of energy courses through your bo
items.scrolls.scrollofrecharging.desc=The raw magical power bound up in this parchment will, when released, charge up all the users wands over time. items.scrolls.scrollofrecharging.desc=The raw magical power bound up in this parchment will, when released, charge up all the users wands over time.
items.scrolls.scrollofremovecurse.name=scroll of remove curse items.scrolls.scrollofremovecurse.name=scroll of remove curse
items.scrolls.scrollofremovecurse.inv_title=Select an item to cleanse items.scrolls.scrollofremovecurse.inv_title=Cleanse an item
items.scrolls.scrollofremovecurse.cleansed=Your item glows with a cleansing light, and a malevolent energy disperses! items.scrolls.scrollofremovecurse.cleansed=Your item glows with a cleansing light, and a malevolent energy disperses!
items.scrolls.scrollofremovecurse.not_cleansed=Your item glows with a cleansing light, but nothing happens. items.scrolls.scrollofremovecurse.not_cleansed=Your item glows with a cleansing light, but nothing happens.
items.scrolls.scrollofremovecurse.desc=The incantation on this scroll will instantly strip any curses from a single weapon, ring, wand, armor, or artifact. items.scrolls.scrollofremovecurse.desc=The incantation on this scroll will instantly strip any curses from a single weapon, ring, wand, armor, or artifact.
@ -618,7 +618,7 @@ items.scrolls.scrollofterror.many=The scroll emits a brilliant flash of red ligh
items.scrolls.scrollofterror.desc=A flash of red light will overwhelm all creatures in your field of view with terror, and they will turn and flee. Attacking a fleeing enemy will dispel the effect. items.scrolls.scrollofterror.desc=A flash of red light will overwhelm all creatures in your field of view with terror, and they will turn and flee. Attacking a fleeing enemy will dispel the effect.
items.scrolls.scrollofupgrade.name=scroll of upgrade items.scrolls.scrollofupgrade.name=scroll of upgrade
items.scrolls.scrollofupgrade.inv_title=Select an item to upgrade items.scrolls.scrollofupgrade.inv_title=Upgrade an item
items.scrolls.scrollofupgrade.weaken_curse=The scroll of upgrade weakens the curse on your item. items.scrolls.scrollofupgrade.weaken_curse=The scroll of upgrade weakens the curse on your item.
items.scrolls.scrollofupgrade.remove_curse=The scroll of upgrade cleanses the curse on your item! items.scrolls.scrollofupgrade.remove_curse=The scroll of upgrade cleanses the curse on your item!
items.scrolls.scrollofupgrade.desc=This scroll will upgrade a single item, improving its quality. A wand will increase in power and number of charges, weapons and armor will deal and block more damage, and the effects of rings will intensify. This scroll is even able to mitigate or sometimes totally dispel curse effects, though it is not as potent as a scroll of remove curse. items.scrolls.scrollofupgrade.desc=This scroll will upgrade a single item, improving its quality. A wand will increase in power and number of charges, weapons and armor will deal and block more damage, and the effects of rings will intensify. This scroll is even able to mitigate or sometimes totally dispel curse effects, though it is not as potent as a scroll of remove curse.
@ -828,7 +828,7 @@ items.weapon.melee.mace.desc=The large iron head of this weapon inflicts substan
items.weapon.melee.magesstaff.name=mage's staff items.weapon.melee.magesstaff.name=mage's staff
items.weapon.melee.magesstaff.ac_imbue=IMBUE items.weapon.melee.magesstaff.ac_imbue=IMBUE
items.weapon.melee.magesstaff.ac_zap=ZAP items.weapon.melee.magesstaff.ac_zap=ZAP
items.weapon.melee.magesstaff.prompt=Select a wand to consume items.weapon.melee.magesstaff.prompt=Select a wand
items.weapon.melee.magesstaff.imbue=You imbue your staff with the %s. items.weapon.melee.magesstaff.imbue=You imbue your staff with the %s.
items.weapon.melee.magesstaff.conflict=The conflicting magics erase the enchantment on your staff. items.weapon.melee.magesstaff.conflict=The conflicting magics erase the enchantment on your staff.
items.weapon.melee.magesstaff.id_first=You'll need to identify this wand first. items.weapon.melee.magesstaff.id_first=You'll need to identify this wand first.
@ -939,7 +939,7 @@ items.ankh.desc_blessed=This ancient symbol of immortality grants the ability to
items.armorkit.name=armor kit items.armorkit.name=armor kit
items.armorkit.ac_apply=APPLY items.armorkit.ac_apply=APPLY
items.armorkit.prompt=Select an armor to upgrade items.armorkit.prompt=Select an armor
items.armorkit.upgraded=You applied the armor kit to upgrade your %s items.armorkit.upgraded=You applied the armor kit to upgrade your %s
items.armorkit.desc=Using this kit of small tools and materials anybody can transform any armor into an "epic armor", which will keep all properties of the original armor, but will also provide its wearer a special ability depending on his class. No skills in tailoring, leatherworking or blacksmithing are required. items.armorkit.desc=Using this kit of small tools and materials anybody can transform any armor into an "epic armor", which will keep all properties of the original armor, but will also provide its wearer a special ability depending on his class. No skills in tailoring, leatherworking or blacksmithing are required.
@ -1021,7 +1021,7 @@ items.merchantsbeacon.desc=This odd piece of dwarven technology allows you to co
items.stylus.name=arcane stylus items.stylus.name=arcane stylus
items.stylus.ac_inscribe=INSCRIBE items.stylus.ac_inscribe=INSCRIBE
items.stylus.prompt=Select an armor to inscribe items.stylus.prompt=Select an armor
items.stylus.identify=You must identify that armor first. items.stylus.identify=You must identify that armor first.
items.stylus.cursed=The stylus's magic will not work on cursed armor. items.stylus.cursed=The stylus's magic will not work on cursed armor.
items.stylus.inscribed=You inscribed your armor with the stylus items.stylus.inscribed=You inscribed your armor with the stylus
@ -1038,7 +1038,7 @@ items.torch.desc=An adventuring staple, when a dungeon goes dark, a torch can he
items.weightstone.name=weightstone items.weightstone.name=weightstone
items.weightstone.ac_apply=APPLY items.weightstone.ac_apply=APPLY
items.weightstone.select=Select a weapon to balance items.weightstone.select=Select a weapon
items.weightstone.light=you balanced your weapon to make it lighter items.weightstone.light=you balanced your weapon to make it lighter
items.weightstone.heavy=you balanced your weapon to make it heavier items.weightstone.heavy=you balanced your weapon to make it heavier
items.weightstone.desc=Using a weightstone, you can balance your melee weapon to make it lighter or heavier, increasing either speed or damage at the expense of the other. items.weightstone.desc=Using a weightstone, you can balance your melee weapon to make it lighter or heavier, increasing either speed or damage at the expense of the other.

View File

@ -1,5 +1,5 @@
###features ###features
levels.features.alchemypot.select_seed=Select a seed to throw levels.features.alchemypot.select_seed=Select a seed
levels.features.alchemypot.pot=Alchemy Pot levels.features.alchemypot.pot=Alchemy Pot
levels.features.alchemypot.fruit=Cook a Blandfruit levels.features.alchemypot.fruit=Cook a Blandfruit
levels.features.alchemypot.potion=Brew a Potion levels.features.alchemypot.potion=Brew a Potion

View File

@ -1,3 +1,3 @@
ui.quickslotbutton.select_item=Select an item to quickslot ui.quickslotbutton.select_item=Quickslot an item
ui.toolbar.examine_prompt=Press again to search\nPress a tile for info ui.toolbar.examine_prompt=Press again to search\nPress a tile for info

View File

@ -1,5 +1,5 @@
windows.wndblacksmith.prompt=Ok, a deal is a deal, here's what I can do for you: I can reforge 2 items and turn them into one of a better quality. windows.wndblacksmith.prompt=Ok, a deal is a deal, here's what I can do for you: I can reforge 2 items and turn them into one of a better quality.
windows.wndblacksmith.select=Select an item to reforge windows.wndblacksmith.select=Reforge an item
windows.wndblacksmith.reforge=Reforge them windows.wndblacksmith.reforge=Reforge them
windows.wndcatalogs.potions=Potions windows.wndcatalogs.potions=Potions