diff --git a/src/playercards/PlayerCardPanel.ttslua b/src/playercards/PlayerCardPanel.ttslua index 9e0210a9..90e58924 100644 --- a/src/playercards/PlayerCardPanel.ttslua +++ b/src/playercards/PlayerCardPanel.ttslua @@ -1,5 +1,5 @@ require("playercards/PlayerCardPanelData") -local spawnBag = require("playercards/spawnbag/SpawnBag") +local spawnBag = require("playercards/SpawnBag") local arkhamDb = require("arkhamdb/ArkhamDb") -- Size and position information for the three rows of class buttons diff --git a/src/playercards/spawnbag/SpawnBag.ttslua b/src/playercards/SpawnBag.ttslua similarity index 100% rename from src/playercards/spawnbag/SpawnBag.ttslua rename to src/playercards/SpawnBag.ttslua diff --git a/src/playercards/spawnbag/BondedBag.ttslua b/src/playercards/spawnbag/BondedBag.ttslua deleted file mode 100644 index 61dad998..00000000 --- a/src/playercards/spawnbag/BondedBag.ttslua +++ /dev/null @@ -1,77 +0,0 @@ -local spawnBag = require("playercards/spawnbag/SpawnBag") - -SPAWN_SPEC = { - name = "BondedCards", - cards = { - "05314", -- Soothing Melody - "06277", -- Wish Eater - "06019", -- Bloodlust - "06022", -- Pendant of the Queen - "05317", -- Blood-rite - "06113", -- Essence of the Dream - "06028", -- Stars Are Right - "06025", -- Guardian of the Crystallizer - "06283", -- Unbound Beast - "06032", -- Zeal - "06031", -- Hope - "06033", -- Augur - "06331", -- Dream Parasite - "06015a", -- Dream-Gate - }, - globalPos = { x = -33.88, y = 1.5, z = 85.61 }, - rotation = { x = 0, y = 270, z = 0 }, - spread = true, -} - -function onLoad(savedData) - if (savedData ~= nil) then - local saveState = JSON.decode(savedData) - if (saveState.spawnBagState ~= nil) then - spawnBag.loadFromSave(saveState.spawnBagState) - end - end - createActionButtons() -end - -function onSave() - local saveState = { - spawnBagState = spawnBag.getStateForSave(), - } - return JSON.encode(saveState) -end - -function createActionButtons() - self.createButton({ - label="Place", - click_function="buttonClick_place", - function_owner=self, - position={1,0.1,2.1}, - rotation={0,0,0}, - height=350, - width=800, - font_size=250, - color={0,0,0}, - font_color={1,1,1} - }) - self.createButton({ - label="Recall", - click_function="buttonClick_recall", - function_owner=self, - position={-1,0.1,2.1}, - rotation={0,0,0}, - height=350, - width=800, - font_size=250, - color={0,0,0}, - font_color={1,1,1} - }) -end - -function buttonClick_place() - spawnBag.spawn(SPAWN_SPEC) -end - --- Recalls objects to bag from table -function buttonClick_recall() - spawnBag.recall() -end diff --git a/src/playercards/spawnbag/UpgradeSheetBag.ttslua b/src/playercards/spawnbag/UpgradeSheetBag.ttslua deleted file mode 100644 index 4ffc531d..00000000 --- a/src/playercards/spawnbag/UpgradeSheetBag.ttslua +++ /dev/null @@ -1,88 +0,0 @@ -local spawnBag = require("playercards/spawnbag/SpawnBag") - -local UPGRADES_SPEC = { - name = "UpgradeSheets", - cards = { - "09040-c", -- Alchemical Distillation - "09023-c", -- Custom Modifications - "09059-c", -- Damning Testimony - "09041-c", -- Emperical Hypothesis - "09060-c", -- Friends in Low Places - "09101-c", -- Grizzled - "09061-c", -- Honed Instinct - "09021-c", -- Hunter's Armor - "09119-c", -- Hyperphysical Shotcaster - "09079-c", -- Living Ink - "09100-c", -- Makeshift Trap - "09099-c", -- Pocket Multi Tool - "09081-c", -- Power Word - "09022-c", -- Runic Axe - "09080-c", -- Summoned Servitor - "09042-c", -- Raven's Quill - }, - globalPos = { x = -42.71, y = 1.5, z = 85.61 }, - rotation = { x = 0, y = 270, z = 0 }, - spread = true, -} -local SERVITOR_SPEC = { - name = "SummonedServitorMini", - cards = { - "09080-m", - }, - globalPos = { x = -45.84, y = 1.5, z = 53.41 }, - rotation = { x = 0, y = 270, z = 0 }, -} - -function onLoad(savedData) - if (savedData ~= nil) then - local saveState = JSON.decode(savedData) - if (saveState.spawnBagState ~= nil) then - spawnBag.loadFromSave(saveState.spawnBagState) - end - end - createActionButtons() -end - -function onSave() - local saveState = { - spawnBagState = spawnBag.getStateForSave(), - } - return JSON.encode(saveState) -end - -function createActionButtons() - self.createButton({ - label="Place", - click_function="buttonClick_place", - function_owner=self, - position={1,0.1,2.1}, - rotation={0,0,0}, - height=350, - width=800, - font_size=250, - color={0,0,0}, - font_color={1,1,1} - }) - self.createButton({ - label="Recall", - click_function="buttonClick_recall", - function_owner=self, - position={-1,0.1,2.1}, - rotation={0,0,0}, - height=350, - width=800, - font_size=250, - color={0,0,0}, - font_color={1,1,1} - }) -end - -function buttonClick_place() - spawnBag.spawn(UPGRADES_SPEC) - spawnBag.spawn(SERVITOR_SPEC) -end - --- Recalls objects to bag from table -function buttonClick_recall() - spawnBag.recall() -end