diff --git a/pom.xml b/pom.xml
index a6c6044..16cee0f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
StSExporter
StSExporter
- 0.2.0
+ 0.2.1
Exporter
A simple mod for Slay the Spire that can export card images and other data.
diff --git a/src/main/java/sts_exporter/CardExportData.java b/src/main/java/sts_exporter/CardExportData.java
index 0de74a8..bc5d6d1 100644
--- a/src/main/java/sts_exporter/CardExportData.java
+++ b/src/main/java/sts_exporter/CardExportData.java
@@ -37,17 +37,21 @@ public class CardExportData {
public int block, damage, magicNumber;
public CardExportData(AbstractCard card, String imageDir) {
+ this(card, imageDir, true);
+ }
+
+ public CardExportData(AbstractCard card, String imageDir, boolean exportUpgrade) {
card.initializeDescription();
this.card = card;
this.name = card.name;
this.rarity = Exporter.rarityName(card.rarity);
this.color = Exporter.colorName(card.color);
this.type = Exporter.typeString(card.type);
- if (!card.upgraded && card.canUpgrade()) {
+ if (exportUpgrade && !card.upgraded && card.canUpgrade()) {
AbstractCard copy = card.makeCopy();
copy.upgrade();
copy.displayUpgrades();
- this.upgrade = new CardExportData(copy, imageDir);
+ this.upgrade = new CardExportData(copy, imageDir, false);
}
// cost
if (card.cost == -1) {
diff --git a/src/main/java/sts_exporter/CreatureExportData.java b/src/main/java/sts_exporter/CreatureExportData.java
index 7e16c53..ed7c140 100644
--- a/src/main/java/sts_exporter/CreatureExportData.java
+++ b/src/main/java/sts_exporter/CreatureExportData.java
@@ -105,11 +105,7 @@ public static ArrayList getAllCreatures() {
}
// Now get all monsters
- // There is unfortunately no list of all monsters in the game. The best we can do use use MonsterHelper.getMonster
- for (String name : getAllMonsterNames()) {
- creatures.add(MonsterHelper.getMonster(name));
- }
- // or MonsterHelper.getEncounter
+ // There is unfortunately no list of all monsters in the game. The best we can do is to use MonsterHelper.getEncounter
HashSet seenMonsters = new HashSet<>();
for (String encounter : getAllEncounterNames()) {
Exporter.logger.info("Getting monsters for encounter " + encounter);
diff --git a/src/main/java/sts_exporter/Exporter.java b/src/main/java/sts_exporter/Exporter.java
index b8a1475..cda9383 100644
--- a/src/main/java/sts_exporter/Exporter.java
+++ b/src/main/java/sts_exporter/Exporter.java
@@ -27,13 +27,14 @@ public class Exporter implements PostInitializeSubscriber {
private static final String[] indexTemplates = {"index.html","creatures.html"};
public Exporter() {
- BaseMod.subscribeToPostInitialize(this);
+ BaseMod.subscribe(this);
}
public static void initialize() {
new Exporter();
}
+ @Override
public void receivePostInitialize() {
// set scale to 1.0
//float oldscale = Settings.scale;
diff --git a/src/main/resources/ModTheSpire.config b/src/main/resources/ModTheSpire.config
deleted file mode 100644
index 4f592ee..0000000
--- a/src/main/resources/ModTheSpire.config
+++ /dev/null
@@ -1,4 +0,0 @@
-name=Card Exporter
-author=twanvl
-description=A simple mod that can export card images and other data.
-mts_version=2.4.0
diff --git a/src/main/resources/ModTheSpire.json b/src/main/resources/ModTheSpire.json
new file mode 100644
index 0000000..e67d17e
--- /dev/null
+++ b/src/main/resources/ModTheSpire.json
@@ -0,0 +1,11 @@
+{
+ "modid": "StSExporter",
+ "name": "Card Exporter",
+ "author_list": ["twanvl"],
+ "description": "A simple mod that can export card images and other data.",
+ "version": "0.2.1",
+ "sts_version": "08-23-2018",
+ "mts_version": "3.0.0",
+ "dependencies": ["basemod"],
+ "update_json": "https://api.github.com/repos/twanvl/sts-exporter/releases/latest"
+}