diff --git a/scripts/shop.js b/scripts/shop.js index 62fb396..02bde8b 100644 --- a/scripts/shop.js +++ b/scripts/shop.js @@ -38,7 +38,7 @@ class Shop { log(module_name, "Initializing shop object"); let specialization_mapping = { general: { - compendiums: game.settings.get("ffg-star-wars-enhancements", "general_shop_compendiums"), + compendiums: game.settings.get("ffg-star-wars-enhancements", "general_shop_compendiums").split(","), types: [ "weapon", "gear", @@ -48,7 +48,7 @@ class Shop { ], }, armor: { - compendiums: game.settings.get("ffg-star-wars-enhancements", "armor_shop_compendiums"), + compendiums: game.settings.get("ffg-star-wars-enhancements", "armor_shop_compendiums").split(","), types: [ "armour", "armor", // attachments use the US spelling while items use the UK spelling @@ -56,11 +56,11 @@ class Shop { ], }, gear: { - compendiums: game.settings.get("ffg-star-wars-enhancements", "gear_shop_compendiums"), + compendiums: game.settings.get("ffg-star-wars-enhancements", "gear_shop_compendiums").split(","), types: ["gear", "itemattachment"], }, weapon: { - compendiums: game.settings.get("ffg-star-wars-enhancements", "weapon_shop_compendiums"), + compendiums: game.settings.get("ffg-star-wars-enhancements", "weapon_shop_compendiums").split(","), types: ["weapon", "itemattachment"], }, nerf_herder: { diff --git a/scripts/shop_sheet.js b/scripts/shop_sheet.js index 44875af..394c74f 100644 --- a/scripts/shop_sheet.js +++ b/scripts/shop_sheet.js @@ -17,37 +17,33 @@ export function init() { hint: game.i18n.localize("ffg-star-wars-enhancements.shop.setting.general.hint"), scope: "world", config: true, - type: Array, - default: [ - "starwarsffg.oggdudearmor", - "starwarsffg.oggdudegear", - "starwarsffg.oggdudeweapons", - "starwarsffg.oggdudegenericattachments", - ], + type: String, + default: + "starwarsffg.oggdudearmor,starwarsffg.oggdudegear,starwarsffg.oggdudeweapons,starwarsffg.oggdudegenericattachments", }); game.settings.register("ffg-star-wars-enhancements", "armor_shop_compendiums", { name: game.i18n.localize("ffg-star-wars-enhancements.shop.setting.armor.name"), hint: game.i18n.localize("ffg-star-wars-enhancements.shop.setting.armor.hint"), scope: "world", config: true, - type: Array, - default: ["starwarsffg.oggdudearmor", "starwarsffg.oggdudearmorattachments"], + type: String, + default: "starwarsffg.oggdudearmor,starwarsffg.oggdudearmorattachments", }); game.settings.register("ffg-star-wars-enhancements", "gear_shop_compendiums", { name: game.i18n.localize("ffg-star-wars-enhancements.shop.setting.gear.name"), hint: game.i18n.localize("ffg-star-wars-enhancements.shop.setting.gear.hint"), scope: "world", config: true, - type: Array, - default: ["starwarsffg.oggdudegear", "starwarsffg.oggdudegenericattachments"], + type: String, + default: "starwarsffg.oggdudegear,starwarsffg.oggdudegenericattachments", }); game.settings.register("ffg-star-wars-enhancements", "weapon_shop_compendiums", { name: game.i18n.localize("ffg-star-wars-enhancements.shop.setting.weapon.name"), hint: game.i18n.localize("ffg-star-wars-enhancements.shop.setting.weapon.hint"), scope: "world", config: true, - type: Array, - default: ["starwarsffg.oggdudeweapons", "starwarsffg.oggdudeweaponattachments"], + type: String, + default: "starwarsffg.oggdudeweapons,starwarsffg.oggdudeweaponattachments", }); }