From 12a050c34723fce045abdd171b000c7f76aa6419 Mon Sep 17 00:00:00 2001 From: Ben Straub Date: Thu, 7 Nov 2024 06:36:55 -0800 Subject: [PATCH] SI regions in dropdown --- src/module/vue/sf-locationsheet.vue | 47 ++++++++++++++++++++++++----- 1 file changed, 39 insertions(+), 8 deletions(-) diff --git a/src/module/vue/sf-locationsheet.vue b/src/module/vue/sf-locationsheet.vue index 08611b3cf..9307cb505 100644 --- a/src/module/vue/sf-locationsheet.vue +++ b/src/module/vue/sf-locationsheet.vue @@ -9,14 +9,8 @@ > {{ $t('IRONSWORN.Region') }} @@ -157,6 +151,7 @@ import { IdParser } from '../datasworn2' import MceEditor from './components/mce-editor.vue' import SheetBasic from './sheet-basic.vue' import IronBtn from './components/buttons/iron-btn.vue' +import { IronswornSettings } from '../helpers/settings' const props = defineProps<{ data: { actor: ActorSource<'location'> } @@ -174,6 +169,42 @@ const state = reactive({ firstLookHighlight: false }) +const regions: { label: string; value: string }[] = [] +for (const ruleset of IronswornSettings.enabledRulesets) { + if (ruleset === 'starforged') { + regions.push( + { + label: game.i18n.localize('IRONSWORN.REGION.Terminus'), + value: 'terminus' + }, + { + label: game.i18n.localize('IRONSWORN.REGION.Outlands'), + value: 'outlands' + }, + { + label: game.i18n.localize('IRONSWORN.REGION.Expanse'), + value: 'expanse' + } + ) + } + if (ruleset === 'sundered_isles') { + regions.push( + { + label: game.i18n.localize('IRONSWORN.REGION.Myriads'), + value: 'myriads' + }, + { + label: game.i18n.localize('IRONSWORN.REGION.Margins'), + value: 'margins' + }, + { + label: game.i18n.localize('IRONSWORN.REGION.Reaches'), + value: 'reaches' + } + ) + } +} + function randomImage(subtype, klass): string | void { if (subtype === 'planet') { const name = klass.capitalize()