mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
Fix issue where quest icons wouldn't appear
This commit is contained in:
@@ -121,6 +121,12 @@ public class GuiDesktop implements IGuiBase {
|
|||||||
return Singletons.getControl().mayShowCard(card);
|
return Singletons.getControl().mayShowCard(card);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ISkinImage getSkinIcon(FSkinProp skinProp) {
|
||||||
|
if (skinProp == null) { return null; }
|
||||||
|
return FSkin.getIcon(skinProp);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ISkinImage getUnskinnedIcon(String path) {
|
public ISkinImage getUnskinnedIcon(String path) {
|
||||||
return new FSkin.UnskinnedIcon(path);
|
return new FSkin.UnskinnedIcon(path);
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ import forge.util.WaitRunnable;
|
|||||||
import forge.util.gui.SGuiChoose;
|
import forge.util.gui.SGuiChoose;
|
||||||
|
|
||||||
public class GuiMobile implements IGuiBase {
|
public class GuiMobile implements IGuiBase {
|
||||||
|
|
||||||
private final String assetsDir;
|
private final String assetsDir;
|
||||||
|
|
||||||
public GuiMobile(String assetsDir0) {
|
public GuiMobile(String assetsDir0) {
|
||||||
@@ -99,6 +99,12 @@ public class GuiMobile implements IGuiBase {
|
|||||||
return FControl.mayShowCard(card);
|
return FControl.mayShowCard(card);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ISkinImage getSkinIcon(FSkinProp skinProp) {
|
||||||
|
if (skinProp == null) { return null; }
|
||||||
|
return FSkin.getImages().get(skinProp);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ISkinImage getUnskinnedIcon(String path) {
|
public ISkinImage getUnskinnedIcon(String path) {
|
||||||
return new FTextureImage(new Texture(path));
|
return new FTextureImage(new Texture(path));
|
||||||
|
|||||||
@@ -4,14 +4,14 @@
|
|||||||
<iconSize>80</iconSize>
|
<iconSize>80</iconSize>
|
||||||
</options>
|
</options>
|
||||||
<stalls>
|
<stalls>
|
||||||
<stall name="Alchemist" displayName="Orim, Samite Healer" icon="ICO_BOTTLES">
|
<stall name="Alchemist" displayName="Orim, Samite Healer" icon="ICO_QUEST_BOTTLES">
|
||||||
<description>The walls of this alchemist's stall are covered with shelves with potions, oils, powders, poultices and elixirs, each meticulously labeled.</description>
|
<description>The walls of this alchemist's stall are covered with shelves with potions, oils, powders, poultices and elixirs, each meticulously labeled.</description>
|
||||||
<items>
|
<items>
|
||||||
<string>Elixir of Life</string>
|
<string>Elixir of Life</string>
|
||||||
<string>Pound of Flesh</string>
|
<string>Pound of Flesh</string>
|
||||||
</items>
|
</items>
|
||||||
</stall>
|
</stall>
|
||||||
<stall name="Banker" displayName="Bank of Sarpadia" icon="ICO_COIN">
|
<stall name="Banker" displayName="Bank of Sarpadia" icon="ICO_QUEST_COIN">
|
||||||
<description>A large book large enough to be seen from the outside rests on the Banker's desk.</description>
|
<description>A large book large enough to be seen from the outside rests on the Banker's desk.</description>
|
||||||
<items>
|
<items>
|
||||||
<string>Bank Membership</string>
|
<string>Bank Membership</string>
|
||||||
@@ -20,13 +20,13 @@
|
|||||||
<string>Cash Stakes</string>
|
<string>Cash Stakes</string>
|
||||||
</items>
|
</items>
|
||||||
</stall>
|
</stall>
|
||||||
<stall name="Bookstore" displayName="Beleren's Books" icon="ICO_BOOK">
|
<stall name="Bookstore" displayName="Beleren's Books" icon="ICO_QUEST_BOOK">
|
||||||
<description>Tomes of different sizes are stacked in man-high towers.</description>
|
<description>Tomes of different sizes are stacked in man-high towers.</description>
|
||||||
<items>
|
<items>
|
||||||
<string>Sleight</string>
|
<string>Sleight</string>
|
||||||
</items>
|
</items>
|
||||||
</stall>
|
</stall>
|
||||||
<stall name="Gear" displayName="The Rope and Axe" icon="ICO_GEAR">
|
<stall name="Gear" displayName="The Rope and Axe" icon="ICO_QUEST_GEAR">
|
||||||
<description>This adventurer's market has a tool for every need ... or so the plaque on the wall claims.</description>
|
<description>This adventurer's market has a tool for every need ... or so the plaque on the wall claims.</description>
|
||||||
<items>
|
<items>
|
||||||
<string>Map</string>
|
<string>Map</string>
|
||||||
@@ -34,13 +34,13 @@
|
|||||||
<string>Charm of Vigor</string>
|
<string>Charm of Vigor</string>
|
||||||
</items>
|
</items>
|
||||||
</stall>
|
</stall>
|
||||||
<stall name="Nursery" displayName="Force of Nature Nursery" icon="ICO_LEAF">
|
<stall name="Nursery" displayName="Force of Nature Nursery" icon="ICO_QUEST_LEAF">
|
||||||
<description>The smells of the one hundred and one different plants forms a unique fragrance.</description>
|
<description>The smells of the one hundred and one different plants forms a unique fragrance.</description>
|
||||||
<items>
|
<items>
|
||||||
<string>Plant</string>
|
<string>Plant</string>
|
||||||
</items>
|
</items>
|
||||||
</stall>
|
</stall>
|
||||||
<stall name="Pet Shop" displayName="The Hive" icon="ICO_FOX">
|
<stall name="Pet Shop" displayName="The Hive" icon="ICO_QUEST_FOX">
|
||||||
<description>This large menagerie echoes with a multitude of animal noises.</description>
|
<description>This large menagerie echoes with a multitude of animal noises.</description>
|
||||||
<items>
|
<items>
|
||||||
<string>Ape</string>
|
<string>Ape</string>
|
||||||
@@ -52,28 +52,28 @@
|
|||||||
</stall>
|
</stall>
|
||||||
</stalls>
|
</stalls>
|
||||||
<questItems>
|
<questItems>
|
||||||
<item name="Sleight" purchaseName="Sleight of Hand Vol. I" maxLevel="1" basePrice="2000" itemType="SLEIGHT" icon="ICO_BOOK">
|
<item name="Sleight" purchaseName="Sleight of Hand Vol. I" maxLevel="1" basePrice="2000" itemType="SLEIGHT" icon="ICO_QUEST_BOOK">
|
||||||
<description>These volumes explain how to perform the most difficult of sleights.
|
<description>These volumes explain how to perform the most difficult of sleights.
|
||||||
|
|
||||||
Effect: Your first mulligan is free.</description>
|
Effect: Your first mulligan is free.</description>
|
||||||
</item>
|
</item>
|
||||||
<item name="Map" purchaseName="Adventurer's Map" maxLevel="1" basePrice="2000" itemType="MAP" icon="ICO_MAP">
|
<item name="Map" purchaseName="Adventurer's Map" maxLevel="1" basePrice="2000" itemType="MAP" icon="ICO_QUEST_MAP">
|
||||||
<description>These ancient charts should facilitate navigation during your travels significantly.
|
<description>These ancient charts should facilitate navigation during your travels significantly.
|
||||||
|
|
||||||
Effect: Quest challenges become available more frequently</description>
|
Effect: Quest challenges become available more frequently</description>
|
||||||
</item>
|
</item>
|
||||||
<item name="Lucky Coin" maxLevel="1" basePrice="2000" itemType="LUCKY_COIN" icon="ICO_COIN">
|
<item name="Lucky Coin" maxLevel="1" basePrice="2000" itemType="LUCKY_COIN" icon="ICO_QUEST_COIN">
|
||||||
<description>This coin is believed to give good luck to its owner.
|
<description>This coin is believed to give good luck to its owner.
|
||||||
|
|
||||||
Effect: Improves the chance of getting a random rare after each match by 15%.</description>
|
Effect: Improves the chance of getting a random rare after each match by 15%.</description>
|
||||||
</item>
|
</item>
|
||||||
<item name="Estates" maxLevel="3" basePrice="250" itemType="ESTATES" icon="ICO_GOLD">
|
<item name="Estates" maxLevel="3" basePrice="250" itemType="ESTATES" icon="ICO_QUEST_GOLD">
|
||||||
<description>Land owners have a strong voice in community matters.
|
<description>Land owners have a strong voice in community matters.
|
||||||
|
|
||||||
Effect: Gives a bonus of %d%% to match winnings.
|
Effect: Gives a bonus of %d%% to match winnings.
|
||||||
Effect: Improves sell percentage by %.2f%%.</description>
|
Effect: Improves sell percentage by %.2f%%.</description>
|
||||||
</item>
|
</item>
|
||||||
<item name="Zeppelin" maxLevel="1" basePrice="5000" itemType="ZEPPELIN" icon="ICO_ZEP">
|
<item name="Zeppelin" maxLevel="1" basePrice="5000" itemType="ZEPPELIN" icon="ICO_QUEST_ZEP">
|
||||||
<description>This extremely comfortable airship allows for more efficient and safe travel to faraway destinations.
|
<description>This extremely comfortable airship allows for more efficient and safe travel to faraway destinations.
|
||||||
|
|
||||||
|
|
||||||
@@ -81,32 +81,32 @@ Effect: Quest challenges become available more frequently.
|
|||||||
Effect: +3 life
|
Effect: +3 life
|
||||||
Effect: Activate once for a new set of challenges (re-fuels after a challenge is attempted).</description>
|
Effect: Activate once for a new set of challenges (re-fuels after a challenge is attempted).</description>
|
||||||
</item>
|
</item>
|
||||||
<item name="Pound of Flesh" maxLevel="29" basePrice="250" itemType="POUND_FLESH" icon="ICO_BREW">
|
<item name="Pound of Flesh" maxLevel="29" basePrice="250" itemType="POUND_FLESH" icon="ICO_QUEST_BREW">
|
||||||
<description>The Alchemist welcomes contributions to his famous Elixir.
|
<description>The Alchemist welcomes contributions to his famous Elixir.
|
||||||
But beware, you may build an immunity to its effects...
|
But beware, you may build an immunity to its effects...
|
||||||
|
|
||||||
Effect: Alchemist gives you %d credits.
|
Effect: Alchemist gives you %d credits.
|
||||||
Effect: Reduces maximum life by 1."</description>
|
Effect: Reduces maximum life by 1."</description>
|
||||||
</item>
|
</item>
|
||||||
<item name="Elixir of Life" maxLevel="15" basePrice="250" itemType="ELIXIR_OF_LIFE" icon="ICO_ELIXIR">
|
<item name="Elixir of Life" maxLevel="15" basePrice="250" itemType="ELIXIR_OF_LIFE" icon="ICO_QUEST_ELIXIR">
|
||||||
<description>A salty sweet smell rises from the vials bubbling behind the counter.
|
<description>A salty sweet smell rises from the vials bubbling behind the counter.
|
||||||
|
|
||||||
Effect: Gives +1 to maximum life.
|
Effect: Gives +1 to maximum life.
|
||||||
Fine Print: Loses effectiveness after 15 uses.</description>
|
Fine Print: Loses effectiveness after 15 uses.</description>
|
||||||
</item>
|
</item>
|
||||||
<item name="Charm of Vigor" maxLevel="1" basePrice="1000"
|
<item name="Charm of Vigor" maxLevel="1" basePrice="1000"
|
||||||
itemType="CHARM" icon="ICO_CHARM">
|
itemType="CHARM" icon="ICO_QUEST_CHARM">
|
||||||
<description>A charm to ward off the fatigue of battle.
|
<description>A charm to ward off the fatigue of battle.
|
||||||
|
|
||||||
Effect: You may have each match be best of 5 instead of 3.</description>
|
Effect: You may have each match be best of 5 instead of 3.</description>
|
||||||
</item>
|
</item>
|
||||||
<item name="Cash Stakes" maxLevel="1" basePrice="1500" itemType="CASH_STAKES" icon="ICO_STAKES">
|
<item name="Cash Stakes" maxLevel="1" basePrice="1500" itemType="CASH_STAKES" icon="ICO_QUEST_STAKES">
|
||||||
<description>A written agreement with the Spell Shop to acquire cards you lose in an ante match from quest opponents.
|
<description>A written agreement with the Spell Shop to acquire cards you lose in an ante match from quest opponents.
|
||||||
|
|
||||||
|
|
||||||
Effect: Cards lost in an ante match will be available immediately following the match in the Card Shop.</description>
|
Effect: Cards lost in an ante match will be available immediately following the match in the Card Shop.</description>
|
||||||
</item>
|
</item>
|
||||||
<item name="Bank Membership" maxLevel="3" basePrice="2500" itemType="MEMBERSHIP_TOKEN" icon="ICO_MEMBERSHIP">
|
<item name="Bank Membership" maxLevel="3" basePrice="2500" itemType="MEMBERSHIP_TOKEN" icon="ICO_QUEST_GOLD">
|
||||||
<description>A token certifying you as a member of the bank, giving you a greater selection of booster packs when you win.
|
<description>A token certifying you as a member of the bank, giving you a greater selection of booster packs when you win.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ public interface IGuiBase {
|
|||||||
boolean isGuiThread();
|
boolean isGuiThread();
|
||||||
String getAssetsDir();
|
String getAssetsDir();
|
||||||
boolean mayShowCard(Card card);
|
boolean mayShowCard(Card card);
|
||||||
|
ISkinImage getSkinIcon(FSkinProp skinProp);
|
||||||
ISkinImage getUnskinnedIcon(String path);
|
ISkinImage getUnskinnedIcon(String path);
|
||||||
void showBugReportDialog(String title, String text, boolean showExitAppBtn);
|
void showBugReportDialog(String title, String text, boolean showExitAppBtn);
|
||||||
int showOptionDialog(String message, String title, FSkinProp icon, String[] options, int defaultOption);
|
int showOptionDialog(String message, String title, FSkinProp icon, String[] options, int defaultOption);
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ package forge.quest.bazaar;
|
|||||||
|
|
||||||
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
|
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
|
||||||
|
|
||||||
|
import forge.GuiBase;
|
||||||
|
import forge.assets.FSkinProp;
|
||||||
import forge.assets.ISkinImage;
|
import forge.assets.ISkinImage;
|
||||||
import forge.quest.data.QuestAssets;
|
import forge.quest.data.QuestAssets;
|
||||||
|
|
||||||
@@ -66,6 +68,9 @@ public class QuestItemBasic implements IQuestBazaarItem {
|
|||||||
return this.basePrice;
|
return this.basePrice;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@XStreamAsAttribute
|
||||||
|
private final FSkinProp icon = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* Constructor for QuestItemAbstract.
|
* Constructor for QuestItemAbstract.
|
||||||
@@ -163,7 +168,7 @@ public class QuestItemBasic implements IQuestBazaarItem {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public ISkinImage getIcon(QuestAssets qA) {
|
public ISkinImage getIcon(QuestAssets qA) {
|
||||||
return null;
|
return GuiBase.getInterface().getSkinIcon(icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ package forge.quest.bazaar;
|
|||||||
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
||||||
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
|
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
|
||||||
|
|
||||||
|
import forge.GuiBase;
|
||||||
|
import forge.assets.FSkinProp;
|
||||||
import forge.assets.ISkinImage;
|
import forge.assets.ISkinImage;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -45,7 +47,7 @@ public class QuestStallDefinition {
|
|||||||
private final String displayName;
|
private final String displayName;
|
||||||
|
|
||||||
@XStreamAsAttribute
|
@XStreamAsAttribute
|
||||||
private final ISkinImage icon;
|
private final FSkinProp icon;
|
||||||
|
|
||||||
private final String description;
|
private final String description;
|
||||||
|
|
||||||
@@ -88,7 +90,7 @@ public class QuestStallDefinition {
|
|||||||
* @return the icon
|
* @return the icon
|
||||||
*/
|
*/
|
||||||
public ISkinImage getIcon() {
|
public ISkinImage getIcon() {
|
||||||
return icon;
|
return GuiBase.getInterface().getSkinIcon(icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user