VendorGenerator sets INSTORE flag and item display will show the item's 'cost' in details

This commit is contained in:
Collin Smith 2020-07-13 18:05:21 -07:00
parent b8fa368221
commit 417347e4e9
2 changed files with 5 additions and 0 deletions

View File

@ -967,6 +967,9 @@ public class Item extends Actor implements Disposable {
if (Item.this.type.is(Type.RUNE))
name.setColor(Riiablo.colors.orange);
if ((Item.this.flags & INSTORE) == INSTORE) {
add(new Label(Riiablo.string.lookup("cost") + 0, font, name.getColor())).center().space(SPACING).row();
}
add(name).center().space(SPACING).row();
if (quality.ordinal() > Quality.MAGIC.ordinal() || (flags & RUNEWORD) == RUNEWORD)
add(type).center().space(SPACING).row();

View File

@ -31,6 +31,7 @@ public class VendorGenerator extends PassiveSystem {
int count = base.PermStoreItem ? 1 : MathUtils.random(vendorData[0], vendorData[1]);
for (int i = 0; i < count; i++) {
Item item = generator.generate(base);
item.flags |= Item.INSTORE;
item.load();
items.add(item);
}
@ -39,6 +40,7 @@ public class VendorGenerator extends PassiveSystem {
int count = base.PermStoreItem ? 1 : MathUtils.random(vendorData[2], vendorData[3]);
for (int i = 0; i < count; i++) {
Item item = generator.generate(base);
item.flags |= Item.INSTORE;
item.load();
item.quality = Quality.MAGIC;
items.add(item);