Merge branch 'develop' into feature/ama3
This commit is contained in:
@@ -10,6 +10,7 @@ on:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Run tests
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
@@ -37,4 +38,22 @@ jobs:
|
||||
- run: npm test
|
||||
env:
|
||||
CI: true
|
||||
lint:
|
||||
name: Run ESLint
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js 12.x
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12.x
|
||||
- name: Install Node.js dependencies
|
||||
run: npm ci
|
||||
- run: npm run yaml:decrypt
|
||||
env:
|
||||
OPTOLITH_KEY: ${{ secrets.OPTOLITH_KEY }}
|
||||
- run: npm run ci:copyschemes
|
||||
- run: npm run lint
|
||||
env:
|
||||
CI: true
|
||||
|
||||
@@ -9,6 +9,7 @@ npm-debug.log*
|
||||
app/**/*.js
|
||||
app/**/*.js.map
|
||||
!app/index.js
|
||||
!app/esmPreload.js
|
||||
/installer/
|
||||
electron-builder.env
|
||||
*.map
|
||||
|
||||
Vendored
+22
-2
@@ -2,7 +2,7 @@
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Debug Main Process",
|
||||
"name": "Electron: Debug Main",
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"cwd": "${workspaceFolder}",
|
||||
@@ -10,8 +10,28 @@
|
||||
"windows": {
|
||||
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd"
|
||||
},
|
||||
"args" : ["."],
|
||||
"runtimeArgs": [
|
||||
"--remote-debugging-port=9223",
|
||||
"."
|
||||
],
|
||||
"outputCapture": "std"
|
||||
},
|
||||
{
|
||||
"name": "Electron: Attach Renderer",
|
||||
"type": "chrome",
|
||||
"request": "attach",
|
||||
"port": 9223,
|
||||
"webRoot": "${workspaceFolder}",
|
||||
"timeout": 30000
|
||||
}
|
||||
],
|
||||
"compounds": [
|
||||
{
|
||||
"name": "Electron: Debug All",
|
||||
"configurations": [
|
||||
"Electron: Debug Main",
|
||||
"Electron: Attach Renderer"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
@@ -23,6 +23,7 @@ export interface RawConfig {
|
||||
sheetCheckAttributeValueVisibility?: boolean
|
||||
enableActiveItemHints: boolean
|
||||
locale?: string
|
||||
fallbackLocale?: string
|
||||
theme?: "light" | "dark"
|
||||
enableEditingHeroAfterCreationPhase?: boolean
|
||||
meleeItemTemplatesCombatTechniqueFilter?: string
|
||||
|
||||
@@ -79,6 +79,9 @@
|
||||
"locale": {
|
||||
"type": "string"
|
||||
},
|
||||
"fallbackLocale": {
|
||||
"type": "string"
|
||||
},
|
||||
"theme": {
|
||||
"enum": ["light", "dark"]
|
||||
},
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
const _require = require("esm")(module)
|
||||
|
||||
process.once('loaded', () => {
|
||||
global.require = _require
|
||||
})
|
||||
Generated
+88
-24
@@ -3118,8 +3118,7 @@
|
||||
"balanced-match": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
|
||||
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
|
||||
"dev": true
|
||||
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
|
||||
},
|
||||
"base": {
|
||||
"version": "0.11.2",
|
||||
@@ -3307,7 +3306,6 @@
|
||||
"version": "1.1.11",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
@@ -3750,8 +3748,7 @@
|
||||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
|
||||
"dev": true
|
||||
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
|
||||
},
|
||||
"concat-stream": {
|
||||
"version": "1.6.2",
|
||||
@@ -3821,8 +3818,7 @@
|
||||
"core-util-is": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
|
||||
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
|
||||
"dev": true
|
||||
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
|
||||
},
|
||||
"cross-spawn": {
|
||||
"version": "6.0.5",
|
||||
@@ -4265,6 +4261,26 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"electron-devtools-installer": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/electron-devtools-installer/-/electron-devtools-installer-3.0.0.tgz",
|
||||
"integrity": "sha512-zll3w/8PvnPiGmL5tBtgSSoSjWnUljsOjJYsYYU12PKLljzWyfD6S75LKTZFn21VYxVbae2OwmjM5uFStLp6nQ==",
|
||||
"requires": {
|
||||
"rimraf": "^3.0.2",
|
||||
"semver": "^7.2.1",
|
||||
"unzip-crx": "^0.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"rimraf": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
|
||||
"integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
|
||||
"requires": {
|
||||
"glob": "^7.1.3"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"electron-log": {
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmjs.org/electron-log/-/electron-log-4.1.2.tgz",
|
||||
@@ -4706,6 +4722,11 @@
|
||||
"integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==",
|
||||
"dev": true
|
||||
},
|
||||
"esm": {
|
||||
"version": "3.2.25",
|
||||
"resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz",
|
||||
"integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA=="
|
||||
},
|
||||
"espree": {
|
||||
"version": "6.1.2",
|
||||
"resolved": "https://registry.npmjs.org/espree/-/espree-6.1.2.tgz",
|
||||
@@ -5237,8 +5258,7 @@
|
||||
"fs.realpath": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
||||
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
|
||||
"dev": true
|
||||
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
|
||||
},
|
||||
"fsevents": {
|
||||
"version": "2.1.3",
|
||||
@@ -5305,7 +5325,6 @@
|
||||
"version": "7.1.4",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz",
|
||||
"integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"fs.realpath": "^1.0.0",
|
||||
"inflight": "^1.0.4",
|
||||
@@ -5596,6 +5615,11 @@
|
||||
"integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==",
|
||||
"dev": true
|
||||
},
|
||||
"immediate": {
|
||||
"version": "3.0.6",
|
||||
"resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz",
|
||||
"integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps="
|
||||
},
|
||||
"import-fresh": {
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz",
|
||||
@@ -5632,7 +5656,6 @@
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
||||
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"once": "^1.3.0",
|
||||
"wrappy": "1"
|
||||
@@ -6090,8 +6113,7 @@
|
||||
"isarray": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
|
||||
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
|
||||
"dev": true
|
||||
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
|
||||
},
|
||||
"isbinaryfile": {
|
||||
"version": "4.0.6",
|
||||
@@ -8468,6 +8490,17 @@
|
||||
"object.assign": "^4.1.0"
|
||||
}
|
||||
},
|
||||
"jszip": {
|
||||
"version": "3.4.0",
|
||||
"resolved": "https://registry.npmjs.org/jszip/-/jszip-3.4.0.tgz",
|
||||
"integrity": "sha512-gZAOYuPl4EhPTXT0GjhI3o+ZAz3su6EhLrKUoAivcKqyqC7laS5JEv4XWZND9BgcDcF83vI85yGbDmDR6UhrIg==",
|
||||
"requires": {
|
||||
"lie": "~3.3.0",
|
||||
"pako": "~1.0.2",
|
||||
"readable-stream": "~2.3.6",
|
||||
"set-immediate-shim": "~1.0.1"
|
||||
}
|
||||
},
|
||||
"keyv": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz",
|
||||
@@ -8519,6 +8552,14 @@
|
||||
"type-check": "~0.3.2"
|
||||
}
|
||||
},
|
||||
"lie": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz",
|
||||
"integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==",
|
||||
"requires": {
|
||||
"immediate": "~3.0.5"
|
||||
}
|
||||
},
|
||||
"lines-and-columns": {
|
||||
"version": "1.1.6",
|
||||
"resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz",
|
||||
@@ -8726,7 +8767,6 @@
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
||||
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
}
|
||||
@@ -9044,7 +9084,6 @@
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
@@ -9140,6 +9179,11 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"pako": {
|
||||
"version": "1.0.11",
|
||||
"resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz",
|
||||
"integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw=="
|
||||
},
|
||||
"parent-module": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
|
||||
@@ -9195,8 +9239,7 @@
|
||||
"path-is-absolute": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
||||
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
|
||||
"dev": true
|
||||
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
|
||||
},
|
||||
"path-key": {
|
||||
"version": "2.0.1",
|
||||
@@ -9334,8 +9377,7 @@
|
||||
"process-nextick-args": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
|
||||
"integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
|
||||
"dev": true
|
||||
"integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
|
||||
},
|
||||
"progress": {
|
||||
"version": "2.0.3",
|
||||
@@ -9574,7 +9616,6 @@
|
||||
"version": "2.3.7",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
|
||||
"integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"core-util-is": "~1.0.0",
|
||||
"inherits": "~2.0.3",
|
||||
@@ -9622,6 +9663,11 @@
|
||||
"symbol-observable": "^1.2.0"
|
||||
}
|
||||
},
|
||||
"redux-devtools-extension": {
|
||||
"version": "2.13.8",
|
||||
"resolved": "https://registry.npmjs.org/redux-devtools-extension/-/redux-devtools-extension-2.13.8.tgz",
|
||||
"integrity": "sha512-8qlpooP2QqPtZHQZRhx3x3OP5skEV1py/zUdMY28WNAocbafxdG2tRD1MWE7sp8obGMNYuLWanhhQ7EQvT1FBg=="
|
||||
},
|
||||
"redux-thunk": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/redux-thunk/-/redux-thunk-2.3.0.tgz",
|
||||
@@ -9938,8 +9984,7 @@
|
||||
"safe-buffer": {
|
||||
"version": "5.1.2",
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
||||
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
|
||||
"dev": true
|
||||
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
|
||||
},
|
||||
"safe-regex": {
|
||||
"version": "1.1.0",
|
||||
@@ -10182,6 +10227,11 @@
|
||||
"integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
|
||||
"dev": true
|
||||
},
|
||||
"set-immediate-shim": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz",
|
||||
"integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E="
|
||||
},
|
||||
"set-value": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz",
|
||||
@@ -11224,6 +11274,16 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"unzip-crx": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/unzip-crx/-/unzip-crx-0.2.0.tgz",
|
||||
"integrity": "sha1-TAuqi9rHViVnVL7KeEPBPXuFjBg=",
|
||||
"requires": {
|
||||
"jszip": "^3.1.0",
|
||||
"mkdirp": "^0.5.1",
|
||||
"yaku": "^0.16.6"
|
||||
}
|
||||
},
|
||||
"update-notifier": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-4.1.0.tgz",
|
||||
@@ -11619,8 +11679,7 @@
|
||||
"wrappy": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
|
||||
"dev": true
|
||||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
|
||||
},
|
||||
"write": {
|
||||
"version": "1.0.3",
|
||||
@@ -11692,6 +11751,11 @@
|
||||
"integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==",
|
||||
"dev": true
|
||||
},
|
||||
"yaku": {
|
||||
"version": "0.16.7",
|
||||
"resolved": "https://registry.npmjs.org/yaku/-/yaku-0.16.7.tgz",
|
||||
"integrity": "sha1-HRlceKqbW/hHnIlblQT9TwhHmE4="
|
||||
},
|
||||
"yallist": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
|
||||
|
||||
+4
-1
@@ -9,15 +9,17 @@
|
||||
},
|
||||
"homepage": "https://github.com/elyukai/optolith-client",
|
||||
"license": "MPL-2.0",
|
||||
"main": "app/main.js",
|
||||
"main": "app/index.js",
|
||||
"dependencies": {
|
||||
"@glennsl/bs-json": "5.0.2",
|
||||
"ajv": "6.12.0",
|
||||
"bs-platform": "7.3.2",
|
||||
"bs-webapi": "0.15.9",
|
||||
"electron-devtools-installer": "^3.0.0",
|
||||
"electron-log": "4.1.2",
|
||||
"electron-updater": "4.3.1",
|
||||
"electron-window-state": "5.0.3",
|
||||
"esm": "^3.2.25",
|
||||
"moment": "2.25.3",
|
||||
"mousetrap": "1.6.5",
|
||||
"react": "16.13.1",
|
||||
@@ -30,6 +32,7 @@
|
||||
"reason-react": "0.8.0",
|
||||
"reductive": "2.0.1",
|
||||
"redux": "4.0.5",
|
||||
"redux-devtools-extension": "^2.13.8",
|
||||
"redux-thunk": "2.3.0",
|
||||
"remark-breaks": "1.0.5",
|
||||
"reselect": "4.0.0",
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
import { fromMaybe, isNothing, Maybe } from "../../Data/Maybe"
|
||||
import { SET_FALLBACK_LOCALE } from "../Constants/ActionTypes"
|
||||
import { Locale } from "../Models/Config"
|
||||
import { getSystemLocale } from "../Utilities/IOUtils"
|
||||
|
||||
export interface SetFallbackLocaleAction {
|
||||
type: SET_FALLBACK_LOCALE
|
||||
payload: {
|
||||
locale: string
|
||||
localeType: "default" | "set"
|
||||
}
|
||||
}
|
||||
|
||||
export const setFallbackLocale =
|
||||
(locale: Maybe<Locale>): SetFallbackLocaleAction => ({
|
||||
type: SET_FALLBACK_LOCALE,
|
||||
payload: {
|
||||
locale: fromMaybe (getSystemLocale ()) (locale),
|
||||
localeType: isNothing (locale) ? "default" : "set",
|
||||
},
|
||||
})
|
||||
@@ -23,7 +23,7 @@ import { UISettingsState } from "../Models/UISettingsState"
|
||||
import { StaticDataRecord } from "../Models/Wiki/WikiModel"
|
||||
import { heroReducer } from "../Reducers/heroReducer"
|
||||
import { user_data_path } from "../Selectors/envSelectors"
|
||||
import { getCurrentHeroId, getHeroes, getLocaleId, getWiki } from "../Selectors/stateSelectors"
|
||||
import { getCurrentHeroId, getHeroes, getLocaleId, getWiki, getFallbackLocaleId } from "../Selectors/stateSelectors"
|
||||
import { getUISettingsState } from "../Selectors/uisettingsSelectors"
|
||||
import { prepareAPCache, prepareAPCacheForHero, writeCache } from "../Utilities/Cache"
|
||||
import { translate } from "../Utilities/I18n"
|
||||
@@ -55,6 +55,7 @@ export const requestConfigSave: ReduxAction<Promise<boolean>> =
|
||||
Just (UISSA.enableEditingHeroAfterCreationPhase (uiSettingsState)),
|
||||
enableAnimations: Just (UISSA.enableAnimations (uiSettingsState)),
|
||||
locale: getLocaleId (state),
|
||||
fallbackLocale: getFallbackLocaleId (state),
|
||||
})
|
||||
|
||||
return pipe_ (
|
||||
|
||||
@@ -147,7 +147,9 @@ export const requestInitialData: ReduxAction<Promise<void>> = async (dispatch, g
|
||||
|
||||
const available_langs = fromRight_ (eavailable_langs)
|
||||
|
||||
const estatic_data = await parseStaticData (fromMaybe (defaultLocale) (Config.A.locale (config)))
|
||||
const estatic_data =
|
||||
await parseStaticData (fromMaybe (defaultLocale) (Config.A.locale (config)))
|
||||
(Config.A.fallbackLocale (config))
|
||||
|
||||
if (isLeft (estatic_data)) {
|
||||
return pipe_ (
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
export const SET_LOCALE = "SET_LOCALE"
|
||||
export type SET_LOCALE = "SET_LOCALE"
|
||||
|
||||
export const SET_FALLBACK_LOCALE = "SET_FALLBACK_LOCALE"
|
||||
export type SET_FALLBACK_LOCALE = "SET_FALLBACK_LOCALE"
|
||||
|
||||
export const RECEIVE_DATA_TABLES = "RECEIVE_DATA_TABLES"
|
||||
export type RECEIVE_DATA_TABLES = "RECEIVE_DATA_TABLES"
|
||||
|
||||
|
||||
+12
-36
@@ -87,7 +87,7 @@ function derivedCharacteristicToString(id) {
|
||||
return "MOV";
|
||||
case /* WoundThreshold */8 :
|
||||
return "WT";
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -284,7 +284,7 @@ function advantageToInt(id) {
|
||||
return 92;
|
||||
case /* Einkommen */27 :
|
||||
return 99;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -449,7 +449,7 @@ function disadvantageToInt(id) {
|
||||
return 72;
|
||||
case /* WenigeVisionen */24 :
|
||||
return 73;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -560,7 +560,7 @@ function combatTechniqueToInt(id) {
|
||||
return 20;
|
||||
case /* Spiesswaffen */19 :
|
||||
return 21;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -683,7 +683,7 @@ function specialAbilityFromInt(id) {
|
||||
return /* Other */[id];
|
||||
case 27 :
|
||||
return /* Universalgenie */90;
|
||||
|
||||
|
||||
}
|
||||
} else {
|
||||
if (id >= 809) {
|
||||
@@ -734,7 +734,7 @@ function specialAbilityFromInt(id) {
|
||||
return /* Other */[id];
|
||||
case 9 :
|
||||
return /* Kraftliniennutzung */76;
|
||||
|
||||
|
||||
}
|
||||
} else if (id >= 663) {
|
||||
if (id >= 751) {
|
||||
@@ -858,7 +858,7 @@ function specialAbilityFromInt(id) {
|
||||
return /* Other */[id];
|
||||
case 87 :
|
||||
return /* TraditionZauberalchimisten */73;
|
||||
|
||||
|
||||
}
|
||||
} else {
|
||||
if (id >= 640) {
|
||||
@@ -887,7 +887,7 @@ function specialAbilityFromInt(id) {
|
||||
return /* Other */[id];
|
||||
case 16 :
|
||||
return /* GebieterDesAspekts */45;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1059,7 +1059,7 @@ function specialAbilityFromInt(id) {
|
||||
return /* TraditionChurchOfPraios */13;
|
||||
case 23 :
|
||||
return /* AspectKnowledge */12;
|
||||
|
||||
|
||||
}
|
||||
} else {
|
||||
if (id >= 30) {
|
||||
@@ -1102,7 +1102,7 @@ function specialAbilityFromInt(id) {
|
||||
return /* Other */[id];
|
||||
case 20 :
|
||||
return /* Language */6;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1307,33 +1307,9 @@ function specialAbilityToInt(id) {
|
||||
return 1391;
|
||||
case /* TraditionBrobimGeoden */96 :
|
||||
return 1438;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
export {
|
||||
unsafePhaseFromInt ,
|
||||
phaseToInt ,
|
||||
unsafeExperienceLevelFromInt ,
|
||||
experienceLevelToInt ,
|
||||
unsafeAttributeFromInt ,
|
||||
attributeToInt ,
|
||||
unsafeDerivedCharacteristicFromString ,
|
||||
derivedCharacteristicToString ,
|
||||
advantageFromInt ,
|
||||
advantageToInt ,
|
||||
disadvantageFromInt ,
|
||||
disadvantageToInt ,
|
||||
unsafeSkillFromInt ,
|
||||
skillToInt ,
|
||||
combatTechniqueFromInt ,
|
||||
combatTechniqueToInt ,
|
||||
unsafeCombatTechniqueGroupFromInt ,
|
||||
combatTechniqueGroupToInt ,
|
||||
propertyFromInt ,
|
||||
propertyToInt ,
|
||||
specialAbilityFromInt ,
|
||||
specialAbilityToInt ,
|
||||
|
||||
}
|
||||
export { unsafePhaseFromInt, phaseToInt, unsafeExperienceLevelFromInt, experienceLevelToInt, unsafeAttributeFromInt, attributeToInt, unsafeDerivedCharacteristicFromString, derivedCharacteristicToString, advantageFromInt, advantageToInt, disadvantageFromInt, disadvantageToInt, unsafeSkillFromInt, skillToInt, combatTechniqueFromInt, combatTechniqueToInt, unsafeCombatTechniqueGroupFromInt, combatTechniqueGroupToInt, propertyFromInt, propertyToInt, specialAbilityFromInt, specialAbilityToInt, };
|
||||
/* No side effect */
|
||||
|
||||
@@ -4,16 +4,19 @@ import { ReduxDispatch } from "../Actions/Actions"
|
||||
import * as ConfigActions from "../Actions/ConfigActions"
|
||||
import * as IOActions from "../Actions/IOActions"
|
||||
import * as LocaleActions from "../Actions/LocaleActions"
|
||||
import * as FallbackLocaleActions from "../Actions/FallbackLocaleActions"
|
||||
import { AppStateRecord } from "../Models/AppState"
|
||||
import { Locale, Theme } from "../Models/Config"
|
||||
import { getUserSelectableSupportedLanguages } from "../Selectors/localeSelectors"
|
||||
import { getLocaleId, getLocaleType } from "../Selectors/stateSelectors"
|
||||
import { getLocaleId, getLocaleType, getFallbackLocaleId, getFallbackLocaleType } from "../Selectors/stateSelectors"
|
||||
import { areAnimationsEnabled, getIsEditingHeroAfterCreationPhaseEnabled, getTheme } from "../Selectors/uisettingsSelectors"
|
||||
import { Settings, SettingsDispatchProps, SettingsOwnProps, SettingsStateProps } from "../Views/Settings/Settings"
|
||||
|
||||
const mapStateToProps = (state: AppStateRecord): SettingsStateProps => ({
|
||||
localeString: getLocaleId (state),
|
||||
localeType: getLocaleType (state),
|
||||
fallbackLocaleString: getFallbackLocaleId (state),
|
||||
fallbackLocaleType: getFallbackLocaleType (state),
|
||||
isEditingHeroAfterCreationPhaseEnabled: getIsEditingHeroAfterCreationPhaseEnabled (state),
|
||||
areAnimationsEnabled: areAnimationsEnabled (state),
|
||||
theme: getTheme (state),
|
||||
@@ -35,6 +38,9 @@ const mapDispatchToProps = (dispatch: ReduxDispatch): SettingsDispatchProps => (
|
||||
setLocale (id: Maybe<Locale>) {
|
||||
dispatch (LocaleActions.setLocale (id))
|
||||
},
|
||||
setFallbackLocale (id: Maybe<Locale>) {
|
||||
dispatch (FallbackLocaleActions.setFallbackLocale (id))
|
||||
},
|
||||
switchEnableAnimations () {
|
||||
dispatch (ConfigActions.switchEnableAnimations ())
|
||||
},
|
||||
|
||||
@@ -158,6 +158,7 @@ export interface Config {
|
||||
sheetCheckAttributeValueVisibility: Maybe<boolean>
|
||||
enableActiveItemHints: boolean
|
||||
locale: Maybe<string>
|
||||
fallbackLocale: Maybe<string>
|
||||
theme: Maybe<Theme>
|
||||
enableEditingHeroAfterCreationPhase: Maybe<boolean>
|
||||
meleeItemTemplatesCombatTechniqueFilter: Maybe<MeleeCombatTechniqueId>
|
||||
@@ -189,6 +190,7 @@ export const Config =
|
||||
sheetCheckAttributeValueVisibility: Just (false),
|
||||
enableActiveItemHints: false,
|
||||
locale: Nothing,
|
||||
fallbackLocale: Nothing,
|
||||
theme: Just (Theme.Dark),
|
||||
enableEditingHeroAfterCreationPhase: Just (false),
|
||||
meleeItemTemplatesCombatTechniqueFilter: Nothing,
|
||||
|
||||
@@ -8,6 +8,8 @@ export interface LocaleState {
|
||||
"@@name": "LocaleState"
|
||||
id: Maybe<string>
|
||||
type: "default" | "set"
|
||||
fallbackId: Maybe<string>
|
||||
fallbackType: "default" | "set"
|
||||
messages: Maybe<L10nRecord>
|
||||
availableLangs: StrMap<Record<Locale>>
|
||||
}
|
||||
@@ -17,6 +19,8 @@ export const LocaleState =
|
||||
<LocaleState> ({
|
||||
id: Nothing,
|
||||
type: "default",
|
||||
fallbackId: Nothing,
|
||||
fallbackType: "default",
|
||||
messages: Nothing,
|
||||
availableLangs: OrderedMap.empty,
|
||||
})
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
|
||||
import * as Curry from "bs-platform/lib/es6/curry.js";
|
||||
import * as Json_decode from "@glennsl/bs-json/src/Json_decode.bs.js";
|
||||
import * as IC$OptolithClient from "../Utilities/IC.bs.js";
|
||||
import * as Curry from "bs-platform/lib/es6/curry.js";
|
||||
import * as Ley_Int$OptolithClient from "../../Data/Ley_Int.bs.js";
|
||||
import * as Yaml_Zip$OptolithClient from "../Utilities/Yaml_Zip.bs.js";
|
||||
import * as JsonStrict$OptolithClient from "../Utilities/JsonStrict.bs.js";
|
||||
import * as Ley_IntMap$OptolithClient from "../../Data/Ley_IntMap.bs.js";
|
||||
import * as Ley_Option$OptolithClient from "../../Data/Ley_Option.bs.js";
|
||||
import * as IC$OptolithClient from "../Utilities/IC.bs.js";
|
||||
import * as JsonStrict$OptolithClient from "../Utilities/JsonStrict.bs.js";
|
||||
import * as Yaml_Zip$OptolithClient from "../Utilities/Yaml_Zip.bs.js";
|
||||
import * as CheckModifier$OptolithClient from "./CheckModifier.bs.js";
|
||||
import * as Static_Erratum$OptolithClient from "./Static_Erratum.bs.js";
|
||||
import * as Static_SourceRef$OptolithClient from "./Static_SourceRef.bs.js";
|
||||
@@ -225,8 +225,5 @@ var Decode = {
|
||||
all: all
|
||||
};
|
||||
|
||||
export {
|
||||
Decode ,
|
||||
|
||||
}
|
||||
export { Decode, };
|
||||
/* Ley_IntMap-OptolithClient Not a pure module */
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
|
||||
import * as Json_decode from "@glennsl/bs-json/src/Json_decode.bs.js";
|
||||
import * as Block from "bs-platform/lib/es6/block.js";
|
||||
import * as Curry from "bs-platform/lib/es6/curry.js";
|
||||
import * as Json_decode from "@glennsl/bs-json/src/Json_decode.bs.js";
|
||||
import * as Dice$OptolithClient from "../Utilities/Dice.bs.js";
|
||||
import * as Ley_Int$OptolithClient from "../../Data/Ley_Int.bs.js";
|
||||
import * as Yaml_Zip$OptolithClient from "../Utilities/Yaml_Zip.bs.js";
|
||||
import * as JsonStrict$OptolithClient from "../Utilities/JsonStrict.bs.js";
|
||||
import * as Ley_IntMap$OptolithClient from "../../Data/Ley_IntMap.bs.js";
|
||||
import * as Ley_IntSet$OptolithClient from "../../Data/Ley_IntSet.bs.js";
|
||||
import * as Ley_Option$OptolithClient from "../../Data/Ley_Option.bs.js";
|
||||
import * as Dice$OptolithClient from "../Utilities/Dice.bs.js";
|
||||
import * as JsonStrict$OptolithClient from "../Utilities/JsonStrict.bs.js";
|
||||
import * as Yaml_Zip$OptolithClient from "../Utilities/Yaml_Zip.bs.js";
|
||||
import * as Static_Erratum$OptolithClient from "./Static_Erratum.bs.js";
|
||||
import * as Static_SourceRef$OptolithClient from "./Static_SourceRef.bs.js";
|
||||
|
||||
@@ -301,8 +301,5 @@ var Decode = {
|
||||
all: all
|
||||
};
|
||||
|
||||
export {
|
||||
Decode ,
|
||||
|
||||
}
|
||||
export { Decode, };
|
||||
/* Ley_IntMap-OptolithClient Not a pure module */
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
|
||||
import * as Json_decode from "@glennsl/bs-json/src/Json_decode.bs.js";
|
||||
import * as Block from "bs-platform/lib/es6/block.js";
|
||||
import * as Curry from "bs-platform/lib/es6/curry.js";
|
||||
import * as Json_decode from "@glennsl/bs-json/src/Json_decode.bs.js";
|
||||
import * as Ley_Int$OptolithClient from "../../Data/Ley_Int.bs.js";
|
||||
import * as Ley_Map$OptolithClient from "../../Data/Ley_Map.bs.js";
|
||||
import * as Ley_List$OptolithClient from "../../Data/Ley_List.bs.js";
|
||||
import * as JsonStrict$OptolithClient from "../Utilities/JsonStrict.bs.js";
|
||||
import * as Ley_IntMap$OptolithClient from "../../Data/Ley_IntMap.bs.js";
|
||||
import * as Ley_Option$OptolithClient from "../../Data/Ley_Option.bs.js";
|
||||
import * as Ley_Function$OptolithClient from "../../Data/Ley_Function.bs.js";
|
||||
import * as Ley_Int$OptolithClient from "../../Data/Ley_Int.bs.js";
|
||||
import * as Ley_IntMap$OptolithClient from "../../Data/Ley_IntMap.bs.js";
|
||||
import * as Ley_List$OptolithClient from "../../Data/Ley_List.bs.js";
|
||||
import * as Ley_Map$OptolithClient from "../../Data/Ley_Map.bs.js";
|
||||
import * as Ley_Option$OptolithClient from "../../Data/Ley_Option.bs.js";
|
||||
import * as JsonStrict$OptolithClient from "../Utilities/JsonStrict.bs.js";
|
||||
import * as Static_Erratum$OptolithClient from "./Static_Erratum.bs.js";
|
||||
import * as Static_SourceRef$OptolithClient from "./Static_SourceRef.bs.js";
|
||||
import * as Static_Prerequisites$OptolithClient from "./Static_Prerequisites.bs.js";
|
||||
import * as Static_SourceRef$OptolithClient from "./Static_SourceRef.bs.js";
|
||||
|
||||
function outerToInt(id) {
|
||||
var variant = id[0];
|
||||
@@ -248,6 +248,12 @@ function resolveCombatTechniques(mgrs) {
|
||||
return resolveWithoutGroups(combatTechniqueToSelectOption, param, param$1);
|
||||
});
|
||||
}
|
||||
var grs = mgrs[0];
|
||||
return (function (param, param$1) {
|
||||
return resolveGroups(combatTechniqueToSelectOption, (function (x) {
|
||||
return x.gr;
|
||||
}), grs, param, param$1);
|
||||
});
|
||||
}
|
||||
|
||||
function liturgicalChantToSelectOption(x) {
|
||||
@@ -269,6 +275,12 @@ function resolveLiturgicalChants(mgrs) {
|
||||
return resolveWithoutGroups(liturgicalChantToSelectOption, param, param$1);
|
||||
});
|
||||
}
|
||||
var grs = mgrs[0];
|
||||
return (function (param, param$1) {
|
||||
return resolveGroups(liturgicalChantToSelectOption, (function (x) {
|
||||
return x.gr;
|
||||
}), grs, param, param$1);
|
||||
});
|
||||
}
|
||||
|
||||
function skillToSelectOption(x) {
|
||||
@@ -290,6 +302,12 @@ function resolveSkills(mgrs) {
|
||||
return resolveWithoutGroups(skillToSelectOption, param, param$1);
|
||||
});
|
||||
}
|
||||
var grs = mgrs[0];
|
||||
return (function (param, param$1) {
|
||||
return resolveGroups(skillToSelectOption, (function (x) {
|
||||
return x.gr;
|
||||
}), grs, param, param$1);
|
||||
});
|
||||
}
|
||||
|
||||
function spellToSelectOption(x) {
|
||||
@@ -311,6 +329,12 @@ function resolveSpells(mgrs) {
|
||||
return resolveWithoutGroups(spellToSelectOption, param, param$1);
|
||||
});
|
||||
}
|
||||
var grs = mgrs[0];
|
||||
return (function (param, param$1) {
|
||||
return resolveGroups(spellToSelectOption, (function (x) {
|
||||
return x.gr;
|
||||
}), grs, param, param$1);
|
||||
});
|
||||
}
|
||||
|
||||
function resolveCategories(blessings, cantrips, combatTechniques, liturgicalChants, skills, spells, categories) {
|
||||
@@ -345,7 +369,7 @@ function resolveCategories(blessings, cantrips, combatTechniques, liturgicalChan
|
||||
return (function (param) {
|
||||
return partial_arg$3(spells, param);
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
}), SelectOptionMap.empty, Ley_Option$OptolithClient.fromOption(/* [] */0, categories));
|
||||
}
|
||||
@@ -442,11 +466,5 @@ var Decode = {
|
||||
mergeSelectOptions: mergeSelectOptions
|
||||
};
|
||||
|
||||
export {
|
||||
Ord ,
|
||||
showId ,
|
||||
SelectOptionMap ,
|
||||
Decode ,
|
||||
|
||||
}
|
||||
export { Ord, showId, SelectOptionMap, Decode, };
|
||||
/* SelectOptionMap Not a pure module */
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
|
||||
import * as Curry from "bs-platform/lib/es6/curry.js";
|
||||
import * as Json_decode from "@glennsl/bs-json/src/Json_decode.bs.js";
|
||||
import * as IC$OptolithClient from "../Utilities/IC.bs.js";
|
||||
import * as Curry from "bs-platform/lib/es6/curry.js";
|
||||
import * as Ley_Int$OptolithClient from "../../Data/Ley_Int.bs.js";
|
||||
import * as Yaml_Zip$OptolithClient from "../Utilities/Yaml_Zip.bs.js";
|
||||
import * as JsonStrict$OptolithClient from "../Utilities/JsonStrict.bs.js";
|
||||
import * as Ley_IntMap$OptolithClient from "../../Data/Ley_IntMap.bs.js";
|
||||
import * as Ley_Option$OptolithClient from "../../Data/Ley_Option.bs.js";
|
||||
import * as IC$OptolithClient from "../Utilities/IC.bs.js";
|
||||
import * as JsonStrict$OptolithClient from "../Utilities/JsonStrict.bs.js";
|
||||
import * as Yaml_Zip$OptolithClient from "../Utilities/Yaml_Zip.bs.js";
|
||||
import * as CheckModifier$OptolithClient from "./CheckModifier.bs.js";
|
||||
import * as Static_Erratum$OptolithClient from "./Static_Erratum.bs.js";
|
||||
import * as Static_SourceRef$OptolithClient from "./Static_SourceRef.bs.js";
|
||||
import * as Static_Prerequisites$OptolithClient from "./Static_Prerequisites.bs.js";
|
||||
import * as Static_SourceRef$OptolithClient from "./Static_SourceRef.bs.js";
|
||||
|
||||
function enhancementLevelL10n(json) {
|
||||
return {
|
||||
@@ -232,8 +232,5 @@ var Decode = {
|
||||
all: all
|
||||
};
|
||||
|
||||
export {
|
||||
Decode ,
|
||||
|
||||
}
|
||||
export { Decode, };
|
||||
/* Ley_IntMap-OptolithClient Not a pure module */
|
||||
|
||||
@@ -136,6 +136,7 @@ export const L10n =
|
||||
|
||||
"settings.title": "",
|
||||
"settings.language": "",
|
||||
"settings.fallbacklanguage": "",
|
||||
"settings.systemlanguage": "",
|
||||
"settings.languagehint": "",
|
||||
"settings.theme": "",
|
||||
|
||||
@@ -2,6 +2,7 @@ import { cnst, ident } from "../../Data/Function"
|
||||
import { set } from "../../Data/Lens"
|
||||
import { bind, fromMaybe, isJust, Just, Nothing } from "../../Data/Maybe"
|
||||
import { Record } from "../../Data/Record"
|
||||
import { SetFallbackLocaleAction } from "../Actions/FallbackLocaleActions"
|
||||
import { ReceiveInitialDataAction } from "../Actions/InitializationActions"
|
||||
import { SetLocaleAction } from "../Actions/LocaleActions"
|
||||
import * as ActionTypes from "../Constants/ActionTypes"
|
||||
@@ -10,19 +11,23 @@ import { LocaleState, LocaleStateL } from "../Models/LocaleState"
|
||||
import { StaticData } from "../Models/Wiki/WikiModel"
|
||||
import { pipe } from "../Utilities/pipe"
|
||||
|
||||
type Action = ReceiveInitialDataAction | SetLocaleAction
|
||||
type Action = ReceiveInitialDataAction | SetLocaleAction | SetFallbackLocaleAction
|
||||
|
||||
export const localeReducer =
|
||||
(action: Action): ident<Record<LocaleState>> => {
|
||||
switch (action.type) {
|
||||
case ActionTypes.RECEIVE_INITIAL_DATA: {
|
||||
const mset_locale = bind (action.payload.config) (Config.A.locale)
|
||||
const mset_fallbackLocale = bind (action.payload.config) (Config.A.fallbackLocale)
|
||||
|
||||
const id = fromMaybe (action.payload.defaultLocale) (mset_locale)
|
||||
const fallbackId = fromMaybe (action.payload.defaultLocale) (mset_fallbackLocale)
|
||||
|
||||
return cnst (LocaleState ({
|
||||
id: Just (id),
|
||||
type: isJust (mset_locale) ? "set" : "default",
|
||||
fallbackId: Just (fallbackId),
|
||||
fallbackType: isJust (mset_fallbackLocale) ? "set" : "default",
|
||||
messages: Just (StaticData.A.ui (action.payload.staticData)),
|
||||
availableLangs: action.payload.availableLangs,
|
||||
}))
|
||||
@@ -36,6 +41,14 @@ export const localeReducer =
|
||||
(action.payload.localeType === "set" ? Just (action.payload.locale) : Nothing)
|
||||
)
|
||||
|
||||
case ActionTypes.SET_FALLBACK_LOCALE:
|
||||
return pipe (
|
||||
set (LocaleStateL.fallbackType)
|
||||
(action.payload.localeType),
|
||||
set (LocaleStateL.fallbackId)
|
||||
(action.payload.localeType === "set" ? Just (action.payload.locale) : Nothing)
|
||||
)
|
||||
|
||||
default:
|
||||
return ident
|
||||
}
|
||||
|
||||
@@ -561,7 +561,7 @@ const filterProfession =
|
||||
? !is_included && is_from_core_book
|
||||
|
||||
// if not reversed, the entry must be in the list to be common
|
||||
: is_included && is_from_core_book
|
||||
: is_included && (is_from_core_book || is_id_included)
|
||||
})
|
||||
(mcommon_profs_for_gr)
|
||||
|
||||
|
||||
@@ -37,6 +37,8 @@ export const getCurrentTab = pipe (ASA.ui, UIA.location)
|
||||
export const getLocaleMessages = pipe (ASA.l10n, LSA.messages)
|
||||
export const getLocaleId = pipe (ASA.l10n, LSA.id)
|
||||
export const getLocaleType = pipe (ASA.l10n, LSA.type)
|
||||
export const getFallbackLocaleId = pipe (ASA.l10n, LSA.fallbackId)
|
||||
export const getFallbackLocaleType = pipe (ASA.l10n, LSA.fallbackType)
|
||||
export const getAvailableLanguages = pipe (ASA.l10n, LSA.availableLangs)
|
||||
|
||||
export const getLocaleAsProp =
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
|
||||
import * as Block from "bs-platform/lib/es6/block.js";
|
||||
import * as Curry from "bs-platform/lib/es6/curry.js";
|
||||
import * as Caml_int32 from "bs-platform/lib/es6/caml_int32.js";
|
||||
import * as IC$OptolithClient from "./IC.bs.js";
|
||||
import * as Curry from "bs-platform/lib/es6/curry.js";
|
||||
import * as Ley_Function$OptolithClient from "../../Data/Ley_Function.bs.js";
|
||||
import * as Ley_Int$OptolithClient from "../../Data/Ley_Int.bs.js";
|
||||
import * as Ley_IntMap$OptolithClient from "../../Data/Ley_IntMap.bs.js";
|
||||
import * as Ley_List$OptolithClient from "../../Data/Ley_List.bs.js";
|
||||
import * as Ley_Option$OptolithClient from "../../Data/Ley_Option.bs.js";
|
||||
import * as Id$OptolithClient from "../Constants/Id.bs.js";
|
||||
import * as Ids$OptolithClient from "../Constants/Ids.bs.js";
|
||||
import * as Intl$OptolithClient from "./Intl.bs.js";
|
||||
import * as Chars$OptolithClient from "./Chars.bs.js";
|
||||
import * as Ley_Int$OptolithClient from "../../Data/Ley_Int.bs.js";
|
||||
import * as Integers$OptolithClient from "./Integers.bs.js";
|
||||
import * as Ley_List$OptolithClient from "../../Data/Ley_List.bs.js";
|
||||
import * as Ley_IntMap$OptolithClient from "../../Data/Ley_IntMap.bs.js";
|
||||
import * as Ley_Option$OptolithClient from "../../Data/Ley_Option.bs.js";
|
||||
import * as Ley_Function$OptolithClient from "../../Data/Ley_Function.bs.js";
|
||||
import * as AdvancedFiltering$OptolithClient from "./AdvancedFiltering.bs.js";
|
||||
import * as Static_SelectOption$OptolithClient from "../Models/Static_SelectOption.bs.js";
|
||||
import * as AdvancedFiltering$OptolithClient from "./AdvancedFiltering.bs.js";
|
||||
import * as Chars$OptolithClient from "./Chars.bs.js";
|
||||
import * as IC$OptolithClient from "./IC.bs.js";
|
||||
import * as Integers$OptolithClient from "./Integers.bs.js";
|
||||
import * as Intl$OptolithClient from "./Intl.bs.js";
|
||||
|
||||
function isActive(x) {
|
||||
return Ley_List$OptolithClient.Extra.notNull(x.active);
|
||||
@@ -70,7 +70,7 @@ function selectOptions(x) {
|
||||
return x[0].selectOptions;
|
||||
case /* SpecialAbility */2 :
|
||||
return x[0].selectOptions;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ function input(x) {
|
||||
return x[0].input;
|
||||
case /* SpecialAbility */2 :
|
||||
return x[0].input;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ function apValue(x) {
|
||||
return x[0].apValue;
|
||||
case /* SpecialAbility */2 :
|
||||
return x[0].apValue;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ function getCustomInput(option) {
|
||||
if (option[0] >= 931971705) {
|
||||
return option[1];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function getGenericId(option) {
|
||||
@@ -200,11 +200,11 @@ function getDefaultNameAddition(staticEntry, heroEntry) {
|
||||
if (variant !== 797131559 && variant >= 345443721) {
|
||||
return ;
|
||||
}
|
||||
|
||||
|
||||
} else if (variant !== 290194801 && variant >= 61643256) {
|
||||
return ;
|
||||
}
|
||||
|
||||
|
||||
} else if (variant !== -920806756 && variant !== -841776939 && variant !== -384382742) {
|
||||
return ;
|
||||
}
|
||||
@@ -213,6 +213,11 @@ function getDefaultNameAddition(staticEntry, heroEntry) {
|
||||
} else {
|
||||
return getSelectOptionName(staticEntry, sid);
|
||||
}
|
||||
if (sid2) {
|
||||
return /* Nothing */0;
|
||||
} else {
|
||||
return getSelectOptionName(staticEntry, match$2);
|
||||
}
|
||||
}
|
||||
|
||||
function getEntrySpecificNameAddition(staticData, staticEntry, heroEntry) {
|
||||
@@ -259,7 +264,7 @@ function getEntrySpecificNameAddition(staticData, staticEntry, heroEntry) {
|
||||
}), Ley_Option$OptolithClient.Monad.$great$great$eq(getOption(1, heroEntry), getCustomInput), Ley_Option$OptolithClient.Monad.$great$great$eq(Ley_Option$OptolithClient.listToOption(heroEntry.options), (function (param) {
|
||||
return getSelectOption(staticEntry, param);
|
||||
})));
|
||||
|
||||
|
||||
}
|
||||
switch (exit) {
|
||||
case 1 :
|
||||
@@ -295,7 +300,7 @@ function getEntrySpecificNameAddition(staticData, staticEntry, heroEntry) {
|
||||
}));
|
||||
}
|
||||
}));
|
||||
|
||||
|
||||
}
|
||||
break;
|
||||
case /* Disadvantage */1 :
|
||||
@@ -486,7 +491,7 @@ function getEntrySpecificNameAddition(staticData, staticEntry, heroEntry) {
|
||||
case /* VisionDerEntrueckung */36 :
|
||||
exit$1 = 2;
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
if (exit$2 === 3) {
|
||||
return Ley_Option$OptolithClient.Monad.$great$great$eq(Ley_Option$OptolithClient.Monad.$great$great$eq(Ley_Option$OptolithClient.listToOption(heroEntry.options), (function (param) {
|
||||
@@ -530,10 +535,10 @@ function getEntrySpecificNameAddition(staticData, staticEntry, heroEntry) {
|
||||
})), (function (x) {
|
||||
return x.name;
|
||||
}));
|
||||
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -567,7 +572,14 @@ function getLevelName(staticData, staticEntry, singleHeroEntry) {
|
||||
} else {
|
||||
return getSpecialAbilityLevelStr(match);
|
||||
}
|
||||
|
||||
var level = match[0];
|
||||
var match$1 = Id$OptolithClient.specialAbilityFromInt(staticEntry[0].id);
|
||||
if (typeof match$1 === "number" && !(match$1 !== 6 || level !== 4)) {
|
||||
return /* Just */[staticData.messages.specialabilities_nativetonguelevel];
|
||||
} else {
|
||||
return /* Just */[getSpecialAbilityLevelStr(level)];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -657,7 +669,7 @@ function getEntrySpecificNameReplacements(addLevelToName, staticEntry, nameAddit
|
||||
default:
|
||||
return mapDefaultWithParens(undefined) + flatLevelName;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -685,7 +697,7 @@ function ensurePerLevel(x) {
|
||||
if (x.tag) {
|
||||
return x[0];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function getDefaultEntryCost(staticEntry, singleHeroEntry) {
|
||||
@@ -708,7 +720,16 @@ function getDefaultEntryCost(staticEntry, singleHeroEntry) {
|
||||
return Ley_List$OptolithClient.Safe.atMay(xs, level - 1 | 0);
|
||||
case /* SpecialAbility */2 :
|
||||
return Ley_List$OptolithClient.Foldable.sum(Ley_List$OptolithClient.take(Ley_Int$OptolithClient.max(1, level), xs));
|
||||
|
||||
|
||||
}
|
||||
var xs = apValue$1[0];
|
||||
switch (staticEntry.tag | 0) {
|
||||
case /* Advantage */0 :
|
||||
case /* Disadvantage */1 :
|
||||
return ListH$OptolithClient.$less$bang$bang$great(xs, level - 1 | 0);
|
||||
case /* SpecialAbility */2 :
|
||||
return /* Just */[ListH$OptolithClient.Foldable.sum(ListH$OptolithClient.take(Int$OptolithClient.max(1, level), xs))];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -739,7 +760,7 @@ function getEntrySpecificCost(isEntryToAdd, staticData, hero, staticEntry, heroE
|
||||
case /* ExceptionalCombatTechnique */5 :
|
||||
exit = 2;
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
} else {
|
||||
exit = 2;
|
||||
@@ -796,7 +817,7 @@ function getEntrySpecificCost(isEntryToAdd, staticData, hero, staticEntry, heroE
|
||||
return Ley_List$OptolithClient.Safe.atMay(apValues, IC$OptolithClient.icToIx($$static.ic));
|
||||
}));
|
||||
}));
|
||||
|
||||
|
||||
}
|
||||
break;
|
||||
case /* Disadvantage */1 :
|
||||
@@ -885,7 +906,7 @@ function getEntrySpecificCost(isEntryToAdd, staticData, hero, staticEntry, heroE
|
||||
case /* BadLuck */11 :
|
||||
case /* PersonalityFlaw */12 :
|
||||
return getDefaultEntryCost(staticEntry, singleHeroEntry);
|
||||
|
||||
|
||||
}
|
||||
return Ley_Option$OptolithClient.Monad.$great$great$eq(level, (function (level) {
|
||||
var match = Ley_List$OptolithClient.Foldable.foldr((function (active, param) {
|
||||
@@ -1070,7 +1091,7 @@ function getEntrySpecificCost(isEntryToAdd, staticData, hero, staticEntry, heroE
|
||||
return Ley_List$OptolithClient.Safe.atMay(apValues, IC$OptolithClient.icToIx($$static.ic));
|
||||
}));
|
||||
}));
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
} else if (match$2 >= 85) {
|
||||
@@ -1127,10 +1148,10 @@ function getEntrySpecificCost(isEntryToAdd, staticData, hero, staticEntry, heroE
|
||||
return Ley_List$OptolithClient.Safe.atMay(apValues, IC$OptolithClient.icToIx($$static.ic));
|
||||
}));
|
||||
}));
|
||||
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1145,7 +1166,7 @@ function getCost(isEntryToAdd, automaticAdvantages, staticData, hero, staticEntr
|
||||
case /* SpecialAbility */2 :
|
||||
modifyAbs = Ley_Function$OptolithClient.id;
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
var customCost = singleHeroEntry.customCost;
|
||||
if (customCost !== undefined) {
|
||||
@@ -1169,14 +1190,5 @@ var AdventurePoints = {
|
||||
getCost: getCost
|
||||
};
|
||||
|
||||
export {
|
||||
isActive ,
|
||||
isActiveM ,
|
||||
Convert ,
|
||||
Accessors ,
|
||||
SelectOptions ,
|
||||
Names ,
|
||||
AdventurePoints ,
|
||||
|
||||
}
|
||||
export { isActive, isActiveM, Convert, Accessors, SelectOptions, Names, AdventurePoints, };
|
||||
/* Ley_IntMap-OptolithClient Not a pure module */
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
|
||||
import * as Curry from "bs-platform/lib/es6/curry.js";
|
||||
import * as Intl$OptolithClient from "./Intl.bs.js";
|
||||
import * as Ley_List$OptolithClient from "../../Data/Ley_List.bs.js";
|
||||
import * as Ley_Function$OptolithClient from "../../Data/Ley_Function.bs.js";
|
||||
import * as Ley_List$OptolithClient from "../../Data/Ley_List.bs.js";
|
||||
import * as Intl$OptolithClient from "./Intl.bs.js";
|
||||
|
||||
function searchByMulti(searchAccessors, filterText, xs) {
|
||||
if (searchAccessors) {
|
||||
@@ -70,12 +70,5 @@ function searchAndSortByMulti(searchAccessors, sortOptions, filterText, xs) {
|
||||
return sortByMulti(sortOptions, searchByMulti(searchAccessors, filterText, xs));
|
||||
}
|
||||
|
||||
export {
|
||||
searchByMulti ,
|
||||
searchStrings ,
|
||||
sortByMulti ,
|
||||
sortStrings ,
|
||||
searchAndSortByMulti ,
|
||||
|
||||
}
|
||||
export { searchByMulti, searchStrings, sortByMulti, sortStrings, searchAndSortByMulti, };
|
||||
/* No side effect */
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
|
||||
import * as Curry from "bs-platform/lib/es6/curry.js";
|
||||
import * as IC$OptolithClient from "./IC.bs.js";
|
||||
import * as Ley_Function$OptolithClient from "../../Data/Ley_Function.bs.js";
|
||||
import * as Ley_Int$OptolithClient from "../../Data/Ley_Int.bs.js";
|
||||
import * as Ley_IntMap$OptolithClient from "../../Data/Ley_IntMap.bs.js";
|
||||
import * as Ley_Option$OptolithClient from "../../Data/Ley_Option.bs.js";
|
||||
import * as IC$OptolithClient from "./IC.bs.js";
|
||||
import * as Traditions$OptolithClient from "./Traditions.bs.js";
|
||||
import * as Ley_Function$OptolithClient from "../../Data/Ley_Function.bs.js";
|
||||
|
||||
function getMissingAp(isInCharacterCreation, apAvailable, apCost) {
|
||||
if (apCost > 0 && !isInCharacterCreation && apCost > apAvailable) {
|
||||
return apCost - apAvailable | 0;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function getDisAdvantagesSubtypeMax(staticData, hero, isMagical) {
|
||||
@@ -142,11 +142,5 @@ var Sum = {
|
||||
getAPSpentOnBlessings: Ley_IntMap$OptolithClient.size
|
||||
};
|
||||
|
||||
export {
|
||||
getMissingAp ,
|
||||
getDisAdvantagesSubtypeMax ,
|
||||
getMissingApForDisAdvantage ,
|
||||
Sum ,
|
||||
|
||||
}
|
||||
export { getMissingAp, getDisAdvantagesSubtypeMax, getMissingApForDisAdvantage, Sum, };
|
||||
/* getApSpentOnAttributes Not a pure module */
|
||||
|
||||
@@ -48,9 +48,5 @@ function flattenActivatableSkill(getValueForTargetId, id, dependencies) {
|
||||
}), dependencies);
|
||||
}
|
||||
|
||||
export {
|
||||
flattenSkill ,
|
||||
flattenActivatableSkill ,
|
||||
|
||||
}
|
||||
export { flattenSkill, flattenActivatableSkill, };
|
||||
/* No side effect */
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
|
||||
import * as Caml_builtin_exceptions from "bs-platform/lib/es6/caml_builtin_exceptions.js";
|
||||
import * as Curry from "bs-platform/lib/es6/curry.js";
|
||||
import * as Js_math from "bs-platform/lib/es6/js_math.js";
|
||||
import * as Id$OptolithClient from "../Constants/Id.bs.js";
|
||||
import * as Ley_Int$OptolithClient from "../../Data/Ley_Int.bs.js";
|
||||
import * as Caml_builtin_exceptions from "bs-platform/lib/es6/caml_builtin_exceptions.js";
|
||||
import * as Ley_List$OptolithClient from "../../Data/Ley_List.bs.js";
|
||||
import * as Ley_IntMap$OptolithClient from "../../Data/Ley_IntMap.bs.js";
|
||||
import * as Ley_List$OptolithClient from "../../Data/Ley_List.bs.js";
|
||||
import * as Ley_Option$OptolithClient from "../../Data/Ley_Option.bs.js";
|
||||
import * as Id$OptolithClient from "../Constants/Id.bs.js";
|
||||
import * as Activatable$OptolithClient from "./Activatable.bs.js";
|
||||
import * as Dependencies$OptolithClient from "./Dependencies.bs.js";
|
||||
|
||||
@@ -163,7 +163,7 @@ function getMinCheckModForRoutine(check, sr) {
|
||||
missingPoints > 0
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -220,7 +220,7 @@ function getParry(heroAttrs, staticEntry, heroEntry) {
|
||||
if (staticEntry.gr === Id$OptolithClient.combatTechniqueGroupToInt(/* Melee */0) && staticEntry.id !== Id$OptolithClient.combatTechniqueToInt(/* ChainWeapons */5) && staticEntry.id !== Id$OptolithClient.combatTechniqueToInt(/* Brawling */7)) {
|
||||
return attributeValueToMod(getMaxPrimaryAttributeValueById(heroAttrs, staticEntry.primary)) + Js_math.floor(Math.round(2.0 / getValueDef$2(heroEntry))) | 0;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function getExceptionalCombatTechniqueBonus(exceptionalCombatTechnique, id) {
|
||||
@@ -265,7 +265,7 @@ function getMinCtrByHunter(onlyOneCombatTechniqueForHunter, staticEntry) {
|
||||
if (onlyOneCombatTechniqueForHunter && staticEntry.gr === Id$OptolithClient.combatTechniqueGroupToInt(/* Ranged */1)) {
|
||||
return 10;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function getMinCtrByDeps(heroCombatTechniques, heroEntry) {
|
||||
@@ -342,7 +342,7 @@ function getMaxSrFromPropertyKnowledge(propertyKnowledge, staticEntry) {
|
||||
if (hasRestriction) {
|
||||
return 14;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function getMax$2(startEl, phase, heroAttrs, exceptionalSkill, propertyKnowledge, staticEntry) {
|
||||
@@ -377,7 +377,7 @@ function getValidSpellsForPropertyKnowledgeCounter(staticSpells, heroSpells) {
|
||||
return spell.property;
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
}), Curry._1(Ley_IntMap$OptolithClient.elems, heroSpells));
|
||||
}
|
||||
|
||||
@@ -394,10 +394,10 @@ function getMinSrFromPropertyKnowledge(counter, activePropertyKnowledges, static
|
||||
if (flattenValue(heroEntry.value) >= 10 && count <= 3) {
|
||||
return 10;
|
||||
}
|
||||
|
||||
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function getMinSrByDeps$1(heroSpells, heroEntry) {
|
||||
@@ -429,7 +429,7 @@ function getMin$2(propertyKnowledge, staticSpells, heroSpells) {
|
||||
if (x) {
|
||||
return x[0];
|
||||
}
|
||||
|
||||
|
||||
})),
|
||||
/* :: */[
|
||||
getMinSrFromPropertyKnowledge(counter, activePropertyKnowledges, staticEntry, heroEntry),
|
||||
@@ -497,7 +497,7 @@ function getMaxSrFromAspectKnowledge(aspectKnowledge, staticEntry) {
|
||||
if (hasRestriction) {
|
||||
return 14;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function getMax$3(startEl, phase, heroAttrs, exceptionalSkill, aspectKnowledge, staticEntry) {
|
||||
@@ -564,7 +564,7 @@ function getMinSrFromAspectKnowledge(counter, activeAspectKnowledges, staticEntr
|
||||
if (isRequired) {
|
||||
return 10;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function getMinSrByDeps$2(heroLiturgicalChants, heroEntry) {
|
||||
@@ -596,7 +596,7 @@ function getMin$3(aspectKnowledge, staticLiturgicalChants, heroLiturgicalChants)
|
||||
if (x) {
|
||||
return x[0];
|
||||
}
|
||||
|
||||
|
||||
})),
|
||||
/* :: */[
|
||||
getMinSrFromAspectKnowledge(counter, activeAspectKnowledges, staticEntry, heroEntry),
|
||||
@@ -627,12 +627,5 @@ var LiturgicalChants = {
|
||||
isDecreasable: isDecreasable$3
|
||||
};
|
||||
|
||||
export {
|
||||
Attributes ,
|
||||
Skills ,
|
||||
CombatTechniques ,
|
||||
Spells ,
|
||||
LiturgicalChants ,
|
||||
|
||||
}
|
||||
export { Attributes, Skills, CombatTechniques, Spells, LiturgicalChants, };
|
||||
/* Ley_IntMap-OptolithClient Not a pure module */
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
|
||||
import * as Ley_Ord$OptolithClient from "../../Data/Ley_Ord.bs.js";
|
||||
import * as Ley_List$OptolithClient from "../../Data/Ley_List.bs.js";
|
||||
import * as Ley_Option$OptolithClient from "../../Data/Ley_Option.bs.js";
|
||||
import * as Ley_Ord$OptolithClient from "../../Data/Ley_Ord.bs.js";
|
||||
|
||||
function getSeparator(type_, staticData) {
|
||||
if (type_) {
|
||||
@@ -50,9 +50,5 @@ var Collator = {
|
||||
compare: compare
|
||||
};
|
||||
|
||||
export {
|
||||
ListFormat ,
|
||||
Collator ,
|
||||
|
||||
}
|
||||
export { ListFormat, Collator, };
|
||||
/* No side effect */
|
||||
|
||||
@@ -156,6 +156,8 @@ export const parseConfig = async () => {
|
||||
validated_data.enableActiveItemHints,
|
||||
locale:
|
||||
Maybe (validated_data.locale),
|
||||
fallbackLocale:
|
||||
Maybe (validated_data.fallbackLocale),
|
||||
theme:
|
||||
validated_data.theme === "dark"
|
||||
? Just (Theme.Dark)
|
||||
@@ -186,6 +188,7 @@ export const writeConfig = (x: Record<Config>): string => {
|
||||
...obj,
|
||||
sheetCheckAttributeValueVisibility: maybeToUndefined (obj.sheetCheckAttributeValueVisibility),
|
||||
locale: maybeToUndefined (obj.locale),
|
||||
fallbackLocale: maybeToUndefined (obj.fallbackLocale),
|
||||
theme: maybeToUndefined (obj.theme),
|
||||
enableEditingHeroAfterCreationPhase: maybeToUndefined (obj.enableEditingHeroAfterCreationPhase),
|
||||
enableAnimations: maybeToUndefined (obj.enableAnimations),
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
|
||||
import * as Curry from "bs-platform/lib/es6/curry.js";
|
||||
import * as Ley_List$OptolithClient from "../../Data/Ley_List.bs.js";
|
||||
import * as Ley_IntMap$OptolithClient from "../../Data/Ley_IntMap.bs.js";
|
||||
import * as Ley_List$OptolithClient from "../../Data/Ley_List.bs.js";
|
||||
import * as Ley_Option$OptolithClient from "../../Data/Ley_Option.bs.js";
|
||||
import * as Activatable$OptolithClient from "./Activatable.bs.js";
|
||||
|
||||
@@ -25,7 +25,7 @@ function getStaticEntries(staticData, mp) {
|
||||
if (isActiveTradition(staticData, trad)) {
|
||||
return Curry._2(Ley_IntMap$OptolithClient.lookup, trad.id, staticData.specialAbilities);
|
||||
}
|
||||
|
||||
|
||||
}), Curry._1(Ley_IntMap$OptolithClient.elems, mp));
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ function getEntries(staticData, mp) {
|
||||
];
|
||||
}), Curry._2(Ley_IntMap$OptolithClient.lookup, trad.id, staticData.specialAbilities), Curry._2(Ley_IntMap$OptolithClient.lookup, trad.id, staticData.magicalTraditions));
|
||||
}
|
||||
|
||||
|
||||
}), Curry._1(Ley_IntMap$OptolithClient.elems, mp));
|
||||
}
|
||||
|
||||
@@ -116,9 +116,5 @@ var Blessed = {
|
||||
numIdToId: numIdToId$1
|
||||
};
|
||||
|
||||
export {
|
||||
Magical ,
|
||||
Blessed ,
|
||||
|
||||
}
|
||||
export { Magical, Blessed, };
|
||||
/* Ley_IntMap-OptolithClient Not a pure module */
|
||||
|
||||
@@ -2,14 +2,17 @@
|
||||
import Ajv from "ajv"
|
||||
import { handleE } from "../../Control/Exception"
|
||||
import { Either, fromLeft_, fromRight_, isLeft, Left } from "../../Data/Either"
|
||||
import { fromJust, isJust, Maybe } from "../../Data/Maybe"
|
||||
import { StaticDataRecord } from "../Models/Wiki/WikiModel"
|
||||
import { parseByFile } from "./YAML/ParseByFile"
|
||||
import { readYamlL10n, readYamlUniv } from "./YAML/Parser"
|
||||
import { getAllSchemes } from "./YAML/Schemes"
|
||||
import { toWiki } from "./YAML/ToRecordsByFile"
|
||||
|
||||
export const parseStaticData : (locale : string) => Promise<Either<Error[], StaticDataRecord>>
|
||||
= async locale => {
|
||||
export const parseStaticData : (locale : string)
|
||||
=> (fallbackLocale : Maybe<string>)
|
||||
=> Promise<Either<Error[], StaticDataRecord>>
|
||||
= locale => async fallbackLocale => {
|
||||
console.time ("parseStaticData")
|
||||
|
||||
const eschemes = await handleE (getAllSchemes ())
|
||||
@@ -28,9 +31,21 @@ export const parseStaticData : (locale : string) => Promise<Either<Error[], Stat
|
||||
|
||||
const univ_parser = readYamlUniv (validator)
|
||||
const l10n_parser = readYamlL10n (locale) (validator)
|
||||
const default_parser = isJust (fallbackLocale)
|
||||
&& fromJust (fallbackLocale) !== locale
|
||||
? readYamlL10n (fromJust (fallbackLocale))
|
||||
(validator)
|
||||
: undefined
|
||||
|
||||
const estatic_data_by_file =
|
||||
(default_parser === undefined)
|
||||
? await parseByFile (univ_parser)
|
||||
(l10n_parser)
|
||||
(undefined)
|
||||
: await parseByFile (univ_parser)
|
||||
(default_parser)
|
||||
(l10n_parser)
|
||||
|
||||
const estatic_data_by_file = await parseByFile (univ_parser)
|
||||
(l10n_parser)
|
||||
|
||||
if (isLeft (estatic_data_by_file)) {
|
||||
const errs = fromLeft_ (estatic_data_by_file)
|
||||
|
||||
@@ -124,7 +124,8 @@ export const toAdvantages : (blessings : StrMap<Record<Blessing>>)
|
||||
spells => pipe (
|
||||
(yaml_mp : YamlNameMap) => zipBy ("id")
|
||||
(yaml_mp.AdvantagesUniv)
|
||||
(yaml_mp.AdvantagesL10n),
|
||||
(yaml_mp.AdvantagesL10nDefault)
|
||||
(yaml_mp.AdvantagesL10nOverride),
|
||||
bindF (pipe (
|
||||
mapM (toAdv (blessings)
|
||||
(cantrips)
|
||||
|
||||
@@ -41,9 +41,11 @@ const toAnimistForce : YamlPairConverterE<AnimistForceUniv, AnimistForceL10n, st
|
||||
|
||||
export const toAnimistForces : YamlFileConverter<string, Record<AnimistForce>>
|
||||
= pipe (
|
||||
(yaml_mp : YamlNameMap) => zipBy ("id")
|
||||
(yaml_mp.AnimistForcesUniv)
|
||||
(yaml_mp.AnimistForcesL10n),
|
||||
(yaml_mp : YamlNameMap) =>
|
||||
zipBy ("id")
|
||||
(yaml_mp.AnimistForcesUniv)
|
||||
(yaml_mp.AnimistForcesL10nDefault)
|
||||
(yaml_mp.AnimistForcesL10nOverride),
|
||||
bindF (pipe (
|
||||
mapM (toAnimistForce),
|
||||
bindF (toMapIntegrity),
|
||||
|
||||
@@ -8,6 +8,7 @@ import { map } from "../Array"
|
||||
import { toMapIntegrity } from "../EntityIntegrity"
|
||||
import { ArcaneBardTraditionL10n } from "../Schema/ArcaneBardTraditions/ArcaneBardTraditions.l10n"
|
||||
import { YamlFileConverter } from "../ToRecordsByFile"
|
||||
import { mergeBy } from "../ZipById"
|
||||
|
||||
|
||||
const toArcaneBardTradition : (x : ArcaneBardTraditionL10n) => [number, Record<NumIdName>]
|
||||
@@ -16,7 +17,9 @@ const toArcaneBardTradition : (x : ArcaneBardTraditionL10n) => [number, Record<N
|
||||
|
||||
export const toArcaneBardTraditions : YamlFileConverter<number, Record<NumIdName>>
|
||||
= pipe (
|
||||
yaml_mp => yaml_mp.ArcaneBardTraditionsL10n,
|
||||
yaml_mp => mergeBy ("id")
|
||||
(yaml_mp.ArcaneBardTraditionsL10nDefault)
|
||||
(yaml_mp.ArcaneBardTraditionsL10nOverride),
|
||||
map (toArcaneBardTradition),
|
||||
toMapIntegrity,
|
||||
second (fromMap)
|
||||
|
||||
@@ -8,6 +8,7 @@ import { map } from "../Array"
|
||||
import { toMapIntegrity } from "../EntityIntegrity"
|
||||
import { ArcaneDancerTraditionL10n } from "../Schema/ArcaneDancerTraditions/ArcaneDancerTraditions.l10n"
|
||||
import { YamlFileConverter } from "../ToRecordsByFile"
|
||||
import { mergeBy } from "../ZipById"
|
||||
|
||||
|
||||
const toArcaneDancerTradition : (x : ArcaneDancerTraditionL10n) => [number, Record<NumIdName>]
|
||||
@@ -16,7 +17,10 @@ const toArcaneDancerTradition : (x : ArcaneDancerTraditionL10n) => [number, Reco
|
||||
|
||||
export const toArcaneDancerTraditions : YamlFileConverter<number, Record<NumIdName>>
|
||||
= pipe (
|
||||
yaml_mp => yaml_mp.ArcaneDancerTraditionsL10n,
|
||||
yaml_mp =>
|
||||
mergeBy ("id")
|
||||
(yaml_mp.ArcaneDancerTraditionsL10nDefault)
|
||||
(yaml_mp.ArcaneDancerTraditionsL10nOverride),
|
||||
map (toArcaneDancerTradition),
|
||||
toMapIntegrity,
|
||||
second (fromMap)
|
||||
|
||||
@@ -8,6 +8,7 @@ import { map } from "../Array"
|
||||
import { toMapIntegrity } from "../EntityIntegrity"
|
||||
import { ArmorTypeL10n } from "../Schema/ArmorTypes/ArmorTypes.l10n"
|
||||
import { YamlFileConverter } from "../ToRecordsByFile"
|
||||
import { mergeBy } from "../ZipById"
|
||||
|
||||
|
||||
const toArmorType : (x : ArmorTypeL10n) => [number, Record<NumIdName>]
|
||||
@@ -16,7 +17,9 @@ const toArmorType : (x : ArmorTypeL10n) => [number, Record<NumIdName>]
|
||||
|
||||
export const toArmorTypes : YamlFileConverter<number, Record<NumIdName>>
|
||||
= pipe (
|
||||
yaml_mp => yaml_mp.ArmorTypesL10n,
|
||||
yaml_mp => mergeBy ("id")
|
||||
(yaml_mp.ArmorTypesL10nDefault)
|
||||
(yaml_mp.ArmorTypesL10nOverride),
|
||||
map (toArmorType),
|
||||
toMapIntegrity,
|
||||
second (fromMap)
|
||||
|
||||
@@ -8,6 +8,7 @@ import { map } from "../Array"
|
||||
import { toMapIntegrity } from "../EntityIntegrity"
|
||||
import { AspectL10n } from "../Schema/Aspects/Aspects.l10n"
|
||||
import { YamlFileConverter } from "../ToRecordsByFile"
|
||||
import { mergeBy } from "../ZipById"
|
||||
|
||||
|
||||
const toAspect : (x : AspectL10n) => [number, Record<NumIdName>]
|
||||
@@ -16,7 +17,9 @@ const toAspect : (x : AspectL10n) => [number, Record<NumIdName>]
|
||||
|
||||
export const toAspects : YamlFileConverter<number, Record<NumIdName>>
|
||||
= pipe (
|
||||
yaml_mp => yaml_mp.AspectsL10n,
|
||||
yaml_mp => mergeBy ("id")
|
||||
(yaml_mp.AspectsL10nDefault)
|
||||
(yaml_mp.AspectsL10nOverride),
|
||||
map (toAspect),
|
||||
toMapIntegrity,
|
||||
second (fromMap)
|
||||
|
||||
@@ -8,11 +8,14 @@ import { pipe } from "../../pipe"
|
||||
import { map } from "../Array"
|
||||
import { toMapIntegrity } from "../EntityIntegrity"
|
||||
import { YamlFileConverter } from "../ToRecordsByFile"
|
||||
import { mergeBy } from "../ZipById"
|
||||
|
||||
|
||||
export const toAttributes : YamlFileConverter<string, Record<Attribute>>
|
||||
= pipe (
|
||||
yaml_mp => yaml_mp.AttributesL10n,
|
||||
yaml_mp => mergeBy ("id")
|
||||
(yaml_mp.AttributesL10nDefault)
|
||||
(yaml_mp.AttributesL10nOverride),
|
||||
map ((x) : [string, Record<Attribute>] => [
|
||||
x .id,
|
||||
Attribute ({
|
||||
|
||||
@@ -36,7 +36,8 @@ export const toBlessedTraditions : YamlFileConverter<string, Record<BlessedTradi
|
||||
(yaml_mp : YamlNameMap) =>
|
||||
zipBy ("id")
|
||||
(yaml_mp.BlessedTraditionsUniv)
|
||||
(yaml_mp.BlessedTraditionsL10n),
|
||||
(yaml_mp.BlessedTraditionsL10nDefault)
|
||||
(yaml_mp.BlessedTraditionsL10nOverride),
|
||||
bindF (pipe (
|
||||
mapM (toBT),
|
||||
bindF (toMapIntegrity),
|
||||
|
||||
@@ -38,9 +38,11 @@ const toBlessing : YamlPairConverterE<BlessingUniv, BlessingL10n, string, Blessi
|
||||
|
||||
export const toBlessings : YamlFileConverter<string, Record<Blessing>>
|
||||
= pipe (
|
||||
(yaml_mp : YamlNameMap) => zipBy ("id")
|
||||
(yaml_mp.BlessingsUniv)
|
||||
(yaml_mp.BlessingsL10n),
|
||||
(yaml_mp : YamlNameMap) =>
|
||||
zipBy ("id")
|
||||
(yaml_mp.BlessingsUniv)
|
||||
(yaml_mp.BlessingsL10nDefault)
|
||||
(yaml_mp.BlessingsL10nOverride),
|
||||
bindF (pipe (
|
||||
mapM (toBlessing),
|
||||
bindF (toMapIntegrity),
|
||||
|
||||
@@ -7,11 +7,14 @@ import { pipe } from "../../pipe"
|
||||
import { map } from "../Array"
|
||||
import { toMapIntegrity } from "../EntityIntegrity"
|
||||
import { YamlFileConverter } from "../ToRecordsByFile"
|
||||
import { mergeBy } from "../ZipById"
|
||||
|
||||
|
||||
export const toBooks : YamlFileConverter<string, Record<Book>>
|
||||
= pipe (
|
||||
yaml_mp => yaml_mp.BooksL10n,
|
||||
yaml_mp => mergeBy ("id")
|
||||
(yaml_mp.BooksL10nDefault)
|
||||
(yaml_mp.BooksL10nOverride),
|
||||
map ((x) : [string, Record<Book>] => [ x .id, Book (x) ]),
|
||||
toMapIntegrity,
|
||||
second (fromMap)
|
||||
|
||||
@@ -8,6 +8,7 @@ import { map } from "../Array"
|
||||
import { toMapIntegrity } from "../EntityIntegrity"
|
||||
import { BrewL10n } from "../Schema/Brews/Brews.l10n"
|
||||
import { YamlFileConverter } from "../ToRecordsByFile"
|
||||
import { mergeBy } from "../ZipById"
|
||||
|
||||
|
||||
const toBrew : (x : BrewL10n) => [number, Record<NumIdName>]
|
||||
@@ -16,7 +17,9 @@ const toBrew : (x : BrewL10n) => [number, Record<NumIdName>]
|
||||
|
||||
export const toBrews : YamlFileConverter<number, Record<NumIdName>>
|
||||
= pipe (
|
||||
yaml_mp => yaml_mp.BrewsL10n,
|
||||
yaml_mp => mergeBy ("id")
|
||||
(yaml_mp.BrewsL10nDefault)
|
||||
(yaml_mp.BrewsL10nOverride),
|
||||
map (toBrew),
|
||||
toMapIntegrity,
|
||||
second (fromMap)
|
||||
|
||||
@@ -48,7 +48,8 @@ export const toCantrips : YamlFileConverter<string, Record<Cantrip>>
|
||||
= pipe (
|
||||
(yaml_mp : YamlNameMap) => zipBy ("id")
|
||||
(yaml_mp.CantripsUniv)
|
||||
(yaml_mp.CantripsL10n),
|
||||
(yaml_mp.CantripsL10nDefault)
|
||||
(yaml_mp.CantripsL10nOverride),
|
||||
bindF (pipe (
|
||||
mapM (toCantrip),
|
||||
bindF (toMapIntegrity),
|
||||
|
||||
@@ -8,6 +8,7 @@ import { map } from "../Array"
|
||||
import { toMapIntegrity } from "../EntityIntegrity"
|
||||
import { CombatSpecialAbilityGroupL10n } from "../Schema/CombatSpecialAbilityGroups/CombatSpecialAbilityGroups.l10n"
|
||||
import { YamlFileConverter } from "../ToRecordsByFile"
|
||||
import { mergeBy } from "../ZipById"
|
||||
|
||||
|
||||
const toCombatSAGroup : (x : CombatSpecialAbilityGroupL10n) => [number, Record<NumIdName>]
|
||||
@@ -16,7 +17,10 @@ const toCombatSAGroup : (x : CombatSpecialAbilityGroupL10n) => [number, Record<N
|
||||
|
||||
export const toCombatSpecialAbilityGroups : YamlFileConverter<number, Record<NumIdName>>
|
||||
= pipe (
|
||||
yaml_mp => yaml_mp.CombatSpecialAbilityGroupsL10n,
|
||||
yaml_mp =>
|
||||
mergeBy ("id")
|
||||
(yaml_mp.CombatSpecialAbilityGroupsL10nDefault)
|
||||
(yaml_mp.CombatSpecialAbilityGroupsL10nOverride),
|
||||
map (toCombatSAGroup),
|
||||
toMapIntegrity,
|
||||
second (fromMap)
|
||||
|
||||
@@ -8,6 +8,7 @@ import { map } from "../Array"
|
||||
import { toMapIntegrity } from "../EntityIntegrity"
|
||||
import { CombatTechniqueGroupL10n } from "../Schema/CombatTechniqueGroups/CombatTechniqueGroups.l10n"
|
||||
import { YamlFileConverter } from "../ToRecordsByFile"
|
||||
import { mergeBy } from "../ZipById"
|
||||
|
||||
|
||||
const toCombatTechniqueGroup : (x : CombatTechniqueGroupL10n) => [number, Record<NumIdName>]
|
||||
@@ -16,7 +17,10 @@ const toCombatTechniqueGroup : (x : CombatTechniqueGroupL10n) => [number, Record
|
||||
|
||||
export const toCombatTechniqueGroups : YamlFileConverter<number, Record<NumIdName>>
|
||||
= pipe (
|
||||
yaml_mp => yaml_mp.CombatTechniqueGroupsL10n,
|
||||
yaml_mp =>
|
||||
mergeBy ("id")
|
||||
(yaml_mp.CombatTechniqueGroupsL10nDefault)
|
||||
(yaml_mp.CombatTechniqueGroupsL10nOverride),
|
||||
map (toCombatTechniqueGroup),
|
||||
toMapIntegrity,
|
||||
second (fromMap)
|
||||
|
||||
@@ -42,7 +42,8 @@ export const toCombatTechniques : YamlFileConverter<string, Record<CombatTechniq
|
||||
(yaml_mp : YamlNameMap) =>
|
||||
zipBy ("id")
|
||||
(yaml_mp.CombatTechniquesUniv)
|
||||
(yaml_mp.CombatTechniquesL10n),
|
||||
(yaml_mp.CombatTechniquesL10nDefault)
|
||||
(yaml_mp.CombatTechniquesL10nOverride),
|
||||
bindF (pipe (
|
||||
map (toCT),
|
||||
toMapIntegrity,
|
||||
|
||||
@@ -10,6 +10,7 @@ import { map } from "../Array"
|
||||
import { toMapIntegrity } from "../EntityIntegrity"
|
||||
import { ConditionL10n } from "../Schema/Conditions/Conditions.l10n"
|
||||
import { YamlFileConverter } from "../ToRecordsByFile"
|
||||
import { mergeBy } from "../ZipById"
|
||||
import { toErrata } from "./ToErrata"
|
||||
import { toSourceRefs } from "./ToSourceRefs"
|
||||
|
||||
@@ -36,7 +37,9 @@ const toCondition : (l10n : ConditionL10n) => [string, Record<Condition>]
|
||||
|
||||
export const toConditions : YamlFileConverter<string, Record<Condition>>
|
||||
= pipe (
|
||||
yaml_mp => yaml_mp.ConditionsL10n,
|
||||
yaml_mp => mergeBy ("id")
|
||||
(yaml_mp.ConditionsL10nDefault)
|
||||
(yaml_mp.ConditionsL10nOverride),
|
||||
map (toCondition),
|
||||
toMapIntegrity,
|
||||
second (fromMap)
|
||||
|
||||
@@ -79,7 +79,8 @@ export const toCultures : YamlFileConverter<string, Record<Culture>>
|
||||
(yaml_mp : YamlNameMap) =>
|
||||
zipBy ("id")
|
||||
(yaml_mp.CulturesUniv)
|
||||
(yaml_mp.CulturesL10n),
|
||||
(yaml_mp.CulturesL10nDefault)
|
||||
(yaml_mp.CulturesL10nOverride),
|
||||
bindF (pipe (
|
||||
mapM (toCulture),
|
||||
bindF (toMapIntegrity),
|
||||
|
||||
@@ -42,7 +42,8 @@ export const toCurses : YamlFileConverter<string, Record<Curse>>
|
||||
= pipe (
|
||||
(yaml_mp : YamlNameMap) => zipBy ("id")
|
||||
(yaml_mp.CursesUniv)
|
||||
(yaml_mp.CursesL10n),
|
||||
(yaml_mp.CursesL10nDefault)
|
||||
(yaml_mp.CursesL10nOverride),
|
||||
bindF (pipe (
|
||||
mapM (toCurse),
|
||||
bindF (toMapIntegrity),
|
||||
|
||||
@@ -9,6 +9,7 @@ import { map } from "../Array"
|
||||
import { toMapIntegrity } from "../EntityIntegrity"
|
||||
import { DerivedCharacteristicId, DerivedCharacteristicL10n } from "../Schema/DerivedCharacteristics/DerivedCharacteristics.l10n"
|
||||
import { YamlFileConverter } from "../ToRecordsByFile"
|
||||
import { mergeBy } from "../ZipById"
|
||||
|
||||
|
||||
type DCId = DerivedCharacteristicId
|
||||
@@ -30,7 +31,10 @@ const toDC : (l10n : DerivedCharacteristicL10n) => [DCId, Record<DerivedCharacte
|
||||
|
||||
export const toDerivedCharacteristics : YamlFileConverter<DCId, Record<DerivedCharacteristic>>
|
||||
= pipe (
|
||||
yaml_mp => yaml_mp.DerivedCharacteristicsL10n,
|
||||
yaml_mp =>
|
||||
mergeBy ("id")
|
||||
(yaml_mp.DerivedCharacteristicsL10nDefault)
|
||||
(yaml_mp.DerivedCharacteristicsL10nOverride),
|
||||
map (toDC),
|
||||
toMapIntegrity,
|
||||
second (fromMap)
|
||||
|
||||
@@ -121,9 +121,11 @@ export const toDisadvantages : (blessings : StrMap<Record<Blessing>>)
|
||||
liturgicalChants =>
|
||||
skills =>
|
||||
spells => pipe (
|
||||
(yaml_mp : YamlNameMap) => zipBy ("id")
|
||||
(yaml_mp.DisadvantagesUniv)
|
||||
(yaml_mp.DisadvantagesL10n),
|
||||
(yaml_mp : YamlNameMap) =>
|
||||
zipBy ("id")
|
||||
(yaml_mp.DisadvantagesUniv)
|
||||
(yaml_mp.DisadvantagesL10nDefault)
|
||||
(yaml_mp.DisadvantagesL10nOverride),
|
||||
bindF (pipe (
|
||||
mapM (toDisadv (blessings)
|
||||
(cantrips)
|
||||
|
||||
@@ -43,7 +43,8 @@ export const toDominationRituals : YamlFileConverter<string, Record<DR>>
|
||||
(yaml_mp : YamlNameMap) =>
|
||||
zipBy ("id")
|
||||
(yaml_mp.DominationRitualsUniv)
|
||||
(yaml_mp.DominationRitualsL10n),
|
||||
(yaml_mp.DominationRitualsL10nDefault)
|
||||
(yaml_mp.DominationRitualsL10nOverride),
|
||||
bindF (pipe (
|
||||
mapM (toDR),
|
||||
bindF (toMapIntegrity),
|
||||
|
||||
@@ -47,7 +47,8 @@ export const toElvenMagicalSongs : YamlFileConverter<string, Record<EMS>>
|
||||
(yaml_mp : YamlNameMap) =>
|
||||
zipBy ("id")
|
||||
(yaml_mp.ElvenMagicalSongsUniv)
|
||||
(yaml_mp.ElvenMagicalSongsL10n),
|
||||
(yaml_mp.ElvenMagicalSongsL10nDefault)
|
||||
(yaml_mp.ElvenMagicalSongsL10nOverride),
|
||||
bindF (pipe (
|
||||
mapM (toEMS),
|
||||
bindF (toMapIntegrity),
|
||||
|
||||
@@ -202,7 +202,8 @@ export const toItemTemplates : YamlFileConverter<string, Record<ItemTemplate>>
|
||||
(yaml_mp : YamlNameMap) =>
|
||||
zipBy ("id")
|
||||
(yaml_mp.EquipmentUniv)
|
||||
(yaml_mp.EquipmentL10n),
|
||||
(yaml_mp.EquipmentL10nDefault)
|
||||
(yaml_mp.EquipmentL10nOverride),
|
||||
bindF (pipe (
|
||||
mapM (toItemTemplate),
|
||||
bindF (toMapIntegrity),
|
||||
|
||||
@@ -8,6 +8,7 @@ import { map } from "../Array"
|
||||
import { toMapIntegrity } from "../EntityIntegrity"
|
||||
import { EquipmentGroupL10n } from "../Schema/EquipmentGroups/EquipmentGroups.l10n"
|
||||
import { YamlFileConverter } from "../ToRecordsByFile"
|
||||
import { mergeBy } from "../ZipById"
|
||||
|
||||
|
||||
const toEquipmentGroup : (x : EquipmentGroupL10n) => [number, Record<NumIdName>]
|
||||
@@ -16,7 +17,9 @@ const toEquipmentGroup : (x : EquipmentGroupL10n) => [number, Record<NumIdName>]
|
||||
|
||||
export const toEquipmentGroups : YamlFileConverter<number, Record<NumIdName>>
|
||||
= pipe (
|
||||
yaml_mp => yaml_mp.EquipmentGroupsL10n,
|
||||
yaml_mp => mergeBy ("id")
|
||||
(yaml_mp.EquipmentGroupsL10nDefault)
|
||||
(yaml_mp.EquipmentGroupsL10nOverride),
|
||||
map (toEquipmentGroup),
|
||||
toMapIntegrity,
|
||||
second (fromMap)
|
||||
|
||||
@@ -33,7 +33,8 @@ export const toEquipmentPackages : YamlFileConverter<string, Record<EquipmentPac
|
||||
(yaml_mp : YamlNameMap) =>
|
||||
zipBy ("id")
|
||||
(yaml_mp.EquipmentPackagesUniv)
|
||||
(yaml_mp.EquipmentPackagesL10n),
|
||||
(yaml_mp.EquipmentPackagesL10nDefault)
|
||||
(yaml_mp.EquipmentPackagesL10nOverride),
|
||||
bindF (pipe (
|
||||
mapM (toEPKG),
|
||||
bindF (toMapIntegrity),
|
||||
|
||||
@@ -35,7 +35,8 @@ export const toExperienceLevels : YamlFileConverter<string, Record<ExperienceLev
|
||||
(yaml_mp : YamlNameMap) =>
|
||||
zipBy ("id")
|
||||
(yaml_mp.ExperienceLevelsUniv)
|
||||
(yaml_mp.ExperienceLevelsL10n),
|
||||
(yaml_mp.ExperienceLevelsL10nDefault)
|
||||
(yaml_mp.ExperienceLevelsL10nOverride),
|
||||
bindF (pipe (
|
||||
mapM (toEL),
|
||||
bindF (toMapIntegrity),
|
||||
|
||||
@@ -8,6 +8,7 @@ import { map } from "../Array"
|
||||
import { toMapIntegrity } from "../EntityIntegrity"
|
||||
import { EyeColorL10n } from "../Schema/EyeColors/EyeColors.l10n"
|
||||
import { YamlFileConverter } from "../ToRecordsByFile"
|
||||
import { mergeBy } from "../ZipById"
|
||||
|
||||
|
||||
const toEyeColor : (x : EyeColorL10n) => [number, Record<NumIdName>]
|
||||
@@ -16,7 +17,9 @@ const toEyeColor : (x : EyeColorL10n) => [number, Record<NumIdName>]
|
||||
|
||||
export const toEyeColors : YamlFileConverter<number, Record<NumIdName>>
|
||||
= pipe (
|
||||
yaml_mp => yaml_mp.EyeColorsL10n,
|
||||
yaml_mp => mergeBy ("id")
|
||||
(yaml_mp.EyeColorsL10nDefault)
|
||||
(yaml_mp.EyeColorsL10nOverride),
|
||||
map (toEyeColor),
|
||||
toMapIntegrity,
|
||||
second (fromMap)
|
||||
|
||||
@@ -35,7 +35,8 @@ export const toFocusRules : YamlFileConverter<string, Record<FocusRule>>
|
||||
(yaml_mp : YamlNameMap) =>
|
||||
zipBy ("id")
|
||||
(yaml_mp.FocusRulesUniv)
|
||||
(yaml_mp.FocusRulesL10n),
|
||||
(yaml_mp.FocusRulesL10nDefault)
|
||||
(yaml_mp.FocusRulesL10nOverride),
|
||||
bindF (pipe (
|
||||
mapM (toFocusRule),
|
||||
bindF (toMapIntegrity),
|
||||
|
||||
@@ -54,7 +54,8 @@ export const toGeodeRituals : YamlFileConverter<string, Record<GeodeRitual>>
|
||||
= pipe (
|
||||
(yaml_mp : YamlNameMap) => zipBy ("id")
|
||||
(yaml_mp.GeodeRitualsUniv)
|
||||
(yaml_mp.GeodeRitualsL10n),
|
||||
(yaml_mp.GeodeRitualsL10nDefault)
|
||||
(yaml_mp.GeodeRitualsL10nOverride),
|
||||
bindF (pipe (
|
||||
mapM (toGeodeRitual),
|
||||
bindF (toMapIntegrity),
|
||||
|
||||
@@ -8,6 +8,7 @@ import { map } from "../Array"
|
||||
import { toMapIntegrity } from "../EntityIntegrity"
|
||||
import { HairColorL10n } from "../Schema/HairColors/HairColors.l10n"
|
||||
import { YamlFileConverter } from "../ToRecordsByFile"
|
||||
import { mergeBy } from "../ZipById"
|
||||
|
||||
|
||||
const toHairColor : (x : HairColorL10n) => [number, Record<NumIdName>]
|
||||
@@ -16,7 +17,9 @@ const toHairColor : (x : HairColorL10n) => [number, Record<NumIdName>]
|
||||
|
||||
export const toHairColors : YamlFileConverter<number, Record<NumIdName>>
|
||||
= pipe (
|
||||
yaml_mp => yaml_mp.HairColorsL10n,
|
||||
yaml_mp => mergeBy ("id")
|
||||
(yaml_mp.HairColorsL10nDefault)
|
||||
(yaml_mp.HairColorsL10nOverride),
|
||||
map (toHairColor),
|
||||
toMapIntegrity,
|
||||
second (fromMap)
|
||||
|
||||
@@ -14,7 +14,6 @@ import { mapM } from "../Either"
|
||||
import { toMapIntegrity } from "../EntityIntegrity"
|
||||
import { LiturgicalChantEnhancementL10n, LiturgicalChantEnhancementLevelL10n } from "../Schema/LiturgicalChantEnhancements/LiturgicalChantEnhancements.l10n"
|
||||
import { LiturgicalChantEnhancementLevelUniv, LiturgicalChantEnhancementUniv } from "../Schema/LiturgicalChantEnhancements/LiturgicalChantEnhancements.univ"
|
||||
import { YamlNameMap } from "../SchemaMap"
|
||||
import { YamlFileConverter } from "../ToRecordsByFile"
|
||||
import { zipBy } from "../ZipById"
|
||||
import { toErrata } from "./ToErrata"
|
||||
@@ -98,10 +97,15 @@ const toSE : (x : [LiturgicalChantEnhancementUniv, LiturgicalChantEnhancementL10
|
||||
|
||||
export const toLiturgicalChantEnhancements : YamlFileConverter<number, Record<SelectOption>>
|
||||
= pipe (
|
||||
(yaml_mp : YamlNameMap) =>
|
||||
({
|
||||
LiturgicalChantEnhancementsUniv,
|
||||
LiturgicalChantEnhancementsL10nDefault,
|
||||
LiturgicalChantEnhancementsL10nOverride,
|
||||
}) =>
|
||||
zipBy ("target")
|
||||
(yaml_mp.LiturgicalChantEnhancementsUniv)
|
||||
(yaml_mp.LiturgicalChantEnhancementsL10n),
|
||||
(LiturgicalChantEnhancementsUniv)
|
||||
(LiturgicalChantEnhancementsL10nDefault)
|
||||
(LiturgicalChantEnhancementsL10nOverride),
|
||||
bindF (pipe (
|
||||
mapM (toSE),
|
||||
bindF (pipe (
|
||||
|
||||
@@ -8,6 +8,7 @@ import { map } from "../Array"
|
||||
import { toMapIntegrity } from "../EntityIntegrity"
|
||||
import { LiturgicalChantGroupL10n } from "../Schema/LiturgicalChantGroups/LiturgicalChantGroups.l10n"
|
||||
import { YamlFileConverter } from "../ToRecordsByFile"
|
||||
import { mergeBy } from "../ZipById"
|
||||
|
||||
|
||||
const toLiturgicalChantGroup : (x : LiturgicalChantGroupL10n) => [number, Record<NumIdName>]
|
||||
@@ -16,7 +17,10 @@ const toLiturgicalChantGroup : (x : LiturgicalChantGroupL10n) => [number, Record
|
||||
|
||||
export const toLiturgicalChantGroups : YamlFileConverter<number, Record<NumIdName>>
|
||||
= pipe (
|
||||
yaml_mp => yaml_mp.LiturgicalChantGroupsL10n,
|
||||
yaml_mp =>
|
||||
mergeBy ("id")
|
||||
(yaml_mp.LiturgicalChantGroupsL10nDefault)
|
||||
(yaml_mp.LiturgicalChantGroupsL10nOverride),
|
||||
map (toLiturgicalChantGroup),
|
||||
toMapIntegrity,
|
||||
second (fromMap)
|
||||
|
||||
@@ -58,7 +58,8 @@ export const toLiturgicalChants : YamlFileConverter<string, Record<LiturgicalCha
|
||||
(yaml_mp : YamlNameMap) =>
|
||||
zipBy ("id")
|
||||
(yaml_mp.LiturgicalChantsUniv)
|
||||
(yaml_mp.LiturgicalChantsL10n),
|
||||
(yaml_mp.LiturgicalChantsL10nDefault)
|
||||
(yaml_mp.LiturgicalChantsL10nOverride),
|
||||
bindF (pipe (
|
||||
mapM (toLC),
|
||||
bindF (toMapIntegrity),
|
||||
|
||||
@@ -47,9 +47,11 @@ const toMagicalDance : YamlPairConverterE<MagicalDanceUniv, MagicalDanceL10n, st
|
||||
|
||||
export const toMagicalDances : YamlFileConverter<string, Record<MagicalDance>>
|
||||
= pipe (
|
||||
(yaml_mp : YamlNameMap) => zipBy ("id")
|
||||
(yaml_mp.MagicalDancesUniv)
|
||||
(yaml_mp.MagicalDancesL10n),
|
||||
(yaml_mp : YamlNameMap) =>
|
||||
zipBy ("id")
|
||||
(yaml_mp.MagicalDancesUniv)
|
||||
(yaml_mp.MagicalDancesL10nDefault)
|
||||
(yaml_mp.MagicalDancesL10nOverride),
|
||||
bindF (pipe (
|
||||
mapM (toMagicalDance),
|
||||
bindF (toMapIntegrity),
|
||||
|
||||
@@ -51,9 +51,11 @@ const toMagicalMelody : YamlPairConverterE<MagicalMelodyUniv, MagicalMelodyL10n,
|
||||
|
||||
export const toMagicalMelodies : YamlFileConverter<string, Record<MM>>
|
||||
= pipe (
|
||||
(yaml_mp : YamlNameMap) => zipBy ("id")
|
||||
(yaml_mp.MagicalMelodiesUniv)
|
||||
(yaml_mp.MagicalMelodiesL10n),
|
||||
(yaml_mp : YamlNameMap) =>
|
||||
zipBy ("id")
|
||||
(yaml_mp.MagicalMelodiesUniv)
|
||||
(yaml_mp.MagicalMelodiesL10nDefault)
|
||||
(yaml_mp.MagicalMelodiesL10nOverride),
|
||||
bindF (pipe (
|
||||
mapM (toMagicalMelody),
|
||||
bindF (toMapIntegrity),
|
||||
|
||||
@@ -41,7 +41,8 @@ export const toMagicalTraditions : YamlFileConverter<string, Record<MagicalTradi
|
||||
(yaml_mp : YamlNameMap) =>
|
||||
zipBy ("id")
|
||||
(yaml_mp.MagicalTraditionsUniv)
|
||||
(yaml_mp.MagicalTraditionsL10n),
|
||||
(yaml_mp.MagicalTraditionsL10nDefault)
|
||||
(yaml_mp.MagicalTraditionsL10nOverride),
|
||||
bindF (pipe (
|
||||
mapM (toMT),
|
||||
bindF (toMapIntegrity),
|
||||
|
||||
@@ -8,6 +8,7 @@ import { map } from "../Array"
|
||||
import { toMapIntegrity } from "../EntityIntegrity"
|
||||
import { OptionalRuleL10n } from "../Schema/OptionalRules/OptionalRules.l10n"
|
||||
import { YamlFileConverter } from "../ToRecordsByFile"
|
||||
import { mergeBy } from "../ZipById"
|
||||
import { toErrata } from "./ToErrata"
|
||||
import { toSourceRefs } from "./ToSourceRefs"
|
||||
|
||||
@@ -27,7 +28,9 @@ const toOptionalRule : (l10n : OptionalRuleL10n) => [string, Record<OptionalRule
|
||||
|
||||
export const toOptionalRules : YamlFileConverter<string, Record<OptionalRule>>
|
||||
= pipe (
|
||||
yaml_mp => yaml_mp.OptionalRulesL10n,
|
||||
yaml_mp => mergeBy ("id")
|
||||
(yaml_mp.OptionalRulesL10nDefault)
|
||||
(yaml_mp.OptionalRulesL10nOverride),
|
||||
map (toOptionalRule),
|
||||
toMapIntegrity,
|
||||
second (fromMap)
|
||||
|
||||
@@ -11,6 +11,7 @@ import { map } from "../Array"
|
||||
import { toMapIntegrity } from "../EntityIntegrity"
|
||||
import { PactL10n } from "../Schema/Pacts/Pacts.l10n"
|
||||
import { YamlFileConverter } from "../ToRecordsByFile"
|
||||
import { mergeBy } from "../ZipById"
|
||||
|
||||
|
||||
const toPact : (l10n : PactL10n) => [number, Record<PactCategory>]
|
||||
@@ -27,7 +28,9 @@ const toPact : (l10n : PactL10n) => [number, Record<PactCategory>]
|
||||
|
||||
export const toPacts : YamlFileConverter<number, Record<PactCategory>>
|
||||
= pipe (
|
||||
yaml_mp => yaml_mp.PactsL10n,
|
||||
yaml_mp => mergeBy ("id")
|
||||
(yaml_mp.PactsL10nDefault)
|
||||
(yaml_mp.PactsL10nOverride),
|
||||
map (toPact),
|
||||
toMapIntegrity,
|
||||
second (fromMap)
|
||||
|
||||
@@ -151,7 +151,8 @@ export const toProfessionVariants : YamlFileConverter<string, Record<ProfessionV
|
||||
(yaml_mp : YamlNameMap) =>
|
||||
zipBy ("id")
|
||||
(yaml_mp.ProfessionVariantsUniv)
|
||||
(yaml_mp.ProfessionVariantsL10n),
|
||||
(yaml_mp.ProfessionVariantsL10nDefault)
|
||||
(yaml_mp.ProfessionVariantsL10nOverride),
|
||||
bindF (pipe (
|
||||
mapM (toPV),
|
||||
bindF (toMapIntegrity),
|
||||
|
||||
@@ -171,7 +171,8 @@ export const toProfessions : YamlFileConverter<string, Record<Profession>>
|
||||
(yaml_mp : YamlNameMap) =>
|
||||
zipBy ("id")
|
||||
(yaml_mp.ProfessionsUniv)
|
||||
(yaml_mp.ProfessionsL10n),
|
||||
(yaml_mp.ProfessionsL10nDefault)
|
||||
(yaml_mp.ProfessionsL10nOverride),
|
||||
bindF (pipe (
|
||||
mapM (toProfession),
|
||||
bindF (toMapIntegrity),
|
||||
|
||||
@@ -8,6 +8,7 @@ import { map } from "../Array"
|
||||
import { toMapIntegrity } from "../EntityIntegrity"
|
||||
import { PropertyL10n } from "../Schema/Properties/Properties.l10n"
|
||||
import { YamlFileConverter } from "../ToRecordsByFile"
|
||||
import { mergeBy } from "../ZipById"
|
||||
|
||||
|
||||
const toProperty : (x : PropertyL10n) => [number, Record<NumIdName>]
|
||||
@@ -16,7 +17,9 @@ const toProperty : (x : PropertyL10n) => [number, Record<NumIdName>]
|
||||
|
||||
export const toProperties : YamlFileConverter<number, Record<NumIdName>>
|
||||
= pipe (
|
||||
yaml_mp => yaml_mp.PropertiesL10n,
|
||||
yaml_mp => mergeBy ("id")
|
||||
(yaml_mp.PropertiesL10nDefault)
|
||||
(yaml_mp.PropertiesL10nOverride),
|
||||
map (toProperty),
|
||||
toMapIntegrity,
|
||||
second (fromMap)
|
||||
|
||||
@@ -45,7 +45,8 @@ export const toRaceVariants : YamlFileConverter<string, Record<RaceVariant>>
|
||||
(yaml_mp : YamlNameMap) =>
|
||||
zipBy ("id")
|
||||
(yaml_mp.RaceVariantsUniv)
|
||||
(yaml_mp.RaceVariantsL10n),
|
||||
(yaml_mp.RaceVariantsL10nDefault)
|
||||
(yaml_mp.RaceVariantsL10nOverride),
|
||||
bindF (pipe (
|
||||
mapM (toRaceVariant),
|
||||
bindF (toMapIntegrity),
|
||||
|
||||
@@ -181,7 +181,8 @@ export const toRaces : YamlFileConverter<string, Record<Race>>
|
||||
(yaml_mp : YamlNameMap) =>
|
||||
zipBy ("id")
|
||||
(yaml_mp.RacesUniv)
|
||||
(yaml_mp.RacesL10n),
|
||||
(yaml_mp.RacesL10nDefault)
|
||||
(yaml_mp.RacesL10nOverride),
|
||||
bindF (pipe (
|
||||
map (toRace),
|
||||
toMapIntegrity,
|
||||
|
||||
@@ -8,6 +8,7 @@ import { map } from "../Array"
|
||||
import { toMapIntegrity } from "../EntityIntegrity"
|
||||
import { ReachL10n } from "../Schema/Reaches/Reaches.l10n"
|
||||
import { YamlFileConverter } from "../ToRecordsByFile"
|
||||
import { mergeBy } from "../ZipById"
|
||||
|
||||
|
||||
const toReach : (x : ReachL10n) => [number, Record<NumIdName>]
|
||||
@@ -16,7 +17,9 @@ const toReach : (x : ReachL10n) => [number, Record<NumIdName>]
|
||||
|
||||
export const toReaches : YamlFileConverter<number, Record<NumIdName>>
|
||||
= pipe (
|
||||
yaml_mp => yaml_mp.ReachesL10n,
|
||||
yaml_mp => mergeBy ("id")
|
||||
(yaml_mp.ReachesL10nDefault)
|
||||
(yaml_mp.ReachesL10nOverride),
|
||||
map (toReach),
|
||||
toMapIntegrity,
|
||||
second (fromMap)
|
||||
|
||||
@@ -48,7 +48,8 @@ export const toRogueSpells : YamlFileConverter<string, Record<RogueSpell>>
|
||||
= pipe (
|
||||
(yaml_mp : YamlNameMap) => zipBy ("id")
|
||||
(yaml_mp.RogueSpellsUniv)
|
||||
(yaml_mp.RogueSpellsL10n),
|
||||
(yaml_mp.RogueSpellsL10nDefault)
|
||||
(yaml_mp.RogueSpellsL10nOverride),
|
||||
bindF (pipe (
|
||||
mapM (toRogueSpell),
|
||||
bindF (toMapIntegrity),
|
||||
|
||||
@@ -8,6 +8,7 @@ import { map } from "../Array"
|
||||
import { toMapIntegrity } from "../EntityIntegrity"
|
||||
import { SkillGroupL10n } from "../Schema/SkillGroups/SkillGroups.l10n"
|
||||
import { YamlFileConverter } from "../ToRecordsByFile"
|
||||
import { mergeBy } from "../ZipById"
|
||||
|
||||
|
||||
const toSkillGroup : (x : SkillGroupL10n) => [number, Record<SkillGroup>]
|
||||
@@ -16,7 +17,9 @@ const toSkillGroup : (x : SkillGroupL10n) => [number, Record<SkillGroup>]
|
||||
|
||||
export const toSkillGroups : YamlFileConverter<number, Record<SkillGroup>>
|
||||
= pipe (
|
||||
yaml_mp => yaml_mp.SkillGroupsL10n,
|
||||
yaml_mp => mergeBy ("id")
|
||||
(yaml_mp.SkillGroupsL10nDefault)
|
||||
(yaml_mp.SkillGroupsL10nOverride),
|
||||
map (toSkillGroup),
|
||||
toMapIntegrity,
|
||||
second (fromMap)
|
||||
|
||||
@@ -60,7 +60,8 @@ const toUses : (x : [SkillUniv, SkillL10n]) => Either<Error[], List<Record<Use>>
|
||||
: pipe_ (
|
||||
zipBy ("id")
|
||||
(univ.uses)
|
||||
(l10n.uses),
|
||||
(l10n.uses)
|
||||
(undefined),
|
||||
second (Just)
|
||||
),
|
||||
second (pipe (
|
||||
@@ -122,7 +123,8 @@ export const toSkills : YamlFileConverter<string, Record<Skill>>
|
||||
= pipe (
|
||||
(yaml_mp : YamlNameMap) => zipBy ("id")
|
||||
(yaml_mp.SkillsUniv)
|
||||
(yaml_mp.SkillsL10n),
|
||||
(yaml_mp.SkillsL10nDefault)
|
||||
(yaml_mp.SkillsL10nOverride),
|
||||
bindF (pipe (
|
||||
mapM (toSkill),
|
||||
bindF (toMapIntegrity),
|
||||
|
||||
@@ -8,6 +8,7 @@ import { map } from "../Array"
|
||||
import { toMapIntegrity } from "../EntityIntegrity"
|
||||
import { SocialStatusL10n } from "../Schema/SocialStatuses/SocialStatuses.l10n"
|
||||
import { YamlFileConverter } from "../ToRecordsByFile"
|
||||
import { mergeBy } from "../ZipById"
|
||||
|
||||
|
||||
const toSocialStatus : (x : SocialStatusL10n) => [number, Record<NumIdName>]
|
||||
@@ -16,7 +17,9 @@ const toSocialStatus : (x : SocialStatusL10n) => [number, Record<NumIdName>]
|
||||
|
||||
export const toSocialStatuses : YamlFileConverter<number, Record<NumIdName>>
|
||||
= pipe (
|
||||
yaml_mp => yaml_mp.SocialStatusesL10n,
|
||||
yaml_mp => mergeBy ("id")
|
||||
(yaml_mp.SocialStatusesL10nDefault)
|
||||
(yaml_mp.SocialStatusesL10nOverride),
|
||||
map (toSocialStatus),
|
||||
toMapIntegrity,
|
||||
second (fromMap)
|
||||
|
||||
@@ -159,9 +159,11 @@ export const toSpecialAbilities : (blessings : StrMap<Record<Blessing>>)
|
||||
spells =>
|
||||
spell_enhancements =>
|
||||
lc_enhancements => pipe (
|
||||
(yaml_mp : YamlNameMap) => zipBy ("id")
|
||||
(yaml_mp.SpecialAbilitiesUniv)
|
||||
(yaml_mp.SpecialAbilitiesL10n),
|
||||
(yaml_mp : YamlNameMap) =>
|
||||
zipBy ("id")
|
||||
(yaml_mp.SpecialAbilitiesUniv)
|
||||
(yaml_mp.SpecialAbilitiesL10nDefault)
|
||||
(yaml_mp.SpecialAbilitiesL10nOverride),
|
||||
bindF (pipe (
|
||||
mapM (toSA (blessings)
|
||||
(cantrips)
|
||||
|
||||
@@ -8,6 +8,7 @@ import { map } from "../Array"
|
||||
import { toMapIntegrity } from "../EntityIntegrity"
|
||||
import { SpecialAbilityGroupL10n } from "../Schema/SpecialAbilityGroups/SpecialAbilityGroups.l10n"
|
||||
import { YamlFileConverter } from "../ToRecordsByFile"
|
||||
import { mergeBy } from "../ZipById"
|
||||
|
||||
|
||||
const toSpecialAbilityGroup : (x : SpecialAbilityGroupL10n) => [number, Record<NumIdName>]
|
||||
@@ -16,7 +17,10 @@ const toSpecialAbilityGroup : (x : SpecialAbilityGroupL10n) => [number, Record<N
|
||||
|
||||
export const toSpecialAbilityGroups : YamlFileConverter<number, Record<NumIdName>>
|
||||
= pipe (
|
||||
yaml_mp => yaml_mp.SpecialAbilityGroupsL10n,
|
||||
yaml_mp =>
|
||||
mergeBy ("id")
|
||||
(yaml_mp.SpecialAbilityGroupsL10nDefault)
|
||||
(yaml_mp.SpecialAbilityGroupsL10nOverride),
|
||||
map (toSpecialAbilityGroup),
|
||||
toMapIntegrity,
|
||||
second (fromMap)
|
||||
|
||||
@@ -101,7 +101,8 @@ export const toSpellEnhancements : YamlFileConverter<number, Record<SelectOption
|
||||
(yaml_mp : YamlNameMap) =>
|
||||
zipBy ("target")
|
||||
(yaml_mp.SpellEnhancementsUniv)
|
||||
(yaml_mp.SpellEnhancementsL10n),
|
||||
(yaml_mp.SpellEnhancementsL10nDefault)
|
||||
(yaml_mp.SpellEnhancementsL10nOverride),
|
||||
bindF (pipe (
|
||||
mapM (toSE),
|
||||
bindF (pipe (
|
||||
|
||||
@@ -8,6 +8,7 @@ import { map } from "../Array"
|
||||
import { toMapIntegrity } from "../EntityIntegrity"
|
||||
import { SpellGroupL10n } from "../Schema/SpellGroups/SpellGroups.l10n"
|
||||
import { YamlFileConverter } from "../ToRecordsByFile"
|
||||
import { mergeBy } from "../ZipById"
|
||||
|
||||
|
||||
const toSpellGroup : (x : SpellGroupL10n) => [number, Record<NumIdName>]
|
||||
@@ -16,7 +17,9 @@ const toSpellGroup : (x : SpellGroupL10n) => [number, Record<NumIdName>]
|
||||
|
||||
export const toSpellGroups : YamlFileConverter<number, Record<NumIdName>>
|
||||
= pipe (
|
||||
yaml_mp => yaml_mp.SpellGroupsL10n,
|
||||
yaml_mp => mergeBy ("id")
|
||||
(yaml_mp.SpellGroupsL10nDefault)
|
||||
(yaml_mp.SpellGroupsL10nOverride),
|
||||
map (toSpellGroup),
|
||||
toMapIntegrity,
|
||||
second (fromMap)
|
||||
|
||||
@@ -65,7 +65,8 @@ export const toSpells : YamlFileConverter<string, Record<Spell>>
|
||||
= pipe (
|
||||
(yaml_mp : YamlNameMap) => zipBy ("id")
|
||||
(yaml_mp.SpellsUniv)
|
||||
(yaml_mp.SpellsL10n),
|
||||
(yaml_mp.SpellsL10nDefault)
|
||||
(yaml_mp.SpellsL10nOverride),
|
||||
bindF (pipe (
|
||||
mapM (toSpell),
|
||||
bindF (toMapIntegrity),
|
||||
|
||||
@@ -8,6 +8,7 @@ import { map } from "../Array"
|
||||
import { toMapIntegrity } from "../EntityIntegrity"
|
||||
import { StateL10n } from "../Schema/States/States.l10n"
|
||||
import { YamlFileConverter } from "../ToRecordsByFile"
|
||||
import { mergeBy } from "../ZipById"
|
||||
import { toErrata } from "./ToErrata"
|
||||
import { toSourceRefs } from "./ToSourceRefs"
|
||||
|
||||
@@ -27,7 +28,9 @@ const toState : (l10n : StateL10n) => [string, Record<State>]
|
||||
|
||||
export const toStates : YamlFileConverter<string, Record<State>>
|
||||
= pipe (
|
||||
yaml_mp => yaml_mp.StatesL10n,
|
||||
yaml_mp => mergeBy ("id")
|
||||
(yaml_mp.StatesL10nDefault)
|
||||
(yaml_mp.StatesL10nOverride),
|
||||
map (toState),
|
||||
toMapIntegrity,
|
||||
second (fromMap)
|
||||
|
||||
@@ -8,6 +8,7 @@ import { map } from "../Array"
|
||||
import { toMapIntegrity } from "../EntityIntegrity"
|
||||
import { SubjectL10n } from "../Schema/Subjects/Subjects.l10n"
|
||||
import { YamlFileConverter } from "../ToRecordsByFile"
|
||||
import { mergeBy } from "../ZipById"
|
||||
|
||||
|
||||
const toSubject : (x : SubjectL10n) => [number, Record<NumIdName>]
|
||||
@@ -16,7 +17,9 @@ const toSubject : (x : SubjectL10n) => [number, Record<NumIdName>]
|
||||
|
||||
export const toSubjects : YamlFileConverter<number, Record<NumIdName>>
|
||||
= pipe (
|
||||
yaml_mp => yaml_mp.SubjectsL10n,
|
||||
yaml_mp => mergeBy ("id")
|
||||
(yaml_mp.SubjectsL10nDefault)
|
||||
(yaml_mp.SubjectsL10nOverride),
|
||||
map (toSubject),
|
||||
toMapIntegrity,
|
||||
second (fromMap)
|
||||
|
||||
@@ -8,6 +8,7 @@ import { map } from "../Array"
|
||||
import { toMapIntegrity } from "../EntityIntegrity"
|
||||
import { TribeL10n } from "../Schema/Tribes/Tribes.l10n"
|
||||
import { YamlFileConverter } from "../ToRecordsByFile"
|
||||
import { mergeBy } from "../ZipById"
|
||||
|
||||
|
||||
const toTribe : (x : TribeL10n) => [number, Record<NumIdName>]
|
||||
@@ -16,7 +17,9 @@ const toTribe : (x : TribeL10n) => [number, Record<NumIdName>]
|
||||
|
||||
export const toTribes : YamlFileConverter<number, Record<NumIdName>>
|
||||
= pipe (
|
||||
yaml_mp => yaml_mp.TribesL10n,
|
||||
yaml_mp => mergeBy ("id")
|
||||
(yaml_mp.TribesL10nDefault)
|
||||
(yaml_mp.TribesL10nOverride),
|
||||
map (toTribe),
|
||||
toMapIntegrity,
|
||||
second (fromMap)
|
||||
|
||||
@@ -3,10 +3,11 @@ import { L10n, L10nRecord } from "../../../Models/Wiki/L10n"
|
||||
import { pipe } from "../../pipe"
|
||||
import { YamlNameMap } from "../SchemaMap"
|
||||
|
||||
|
||||
export const toUI : (locale : string) => (yaml_mp : YamlNameMap) => L10nRecord
|
||||
= locale => pipe (
|
||||
yaml_mp => yaml_mp.UIL10n,
|
||||
yaml_mp => yaml_mp.UIL10nOverride === undefined
|
||||
? yaml_mp.UIL10nDefault
|
||||
: yaml_mp.UIL10nOverride,
|
||||
l10n => L10n ({
|
||||
id: locale,
|
||||
...l10n,
|
||||
|
||||
@@ -51,9 +51,11 @@ const toZibiljaRitual : YamlPairConverterE<ZibiljaRitualUniv, ZibiljaRitualL10n,
|
||||
|
||||
export const toZibiljaRituals : YamlFileConverter<string, Record<ZR>>
|
||||
= pipe (
|
||||
(yaml_mp : YamlNameMap) => zipBy ("id")
|
||||
(yaml_mp.ZibiljaRitualsUniv)
|
||||
(yaml_mp.ZibiljaRitualsL10n),
|
||||
(yaml_mp : YamlNameMap) =>
|
||||
zipBy ("id")
|
||||
(yaml_mp.ZibiljaRitualsUniv)
|
||||
(yaml_mp.ZibiljaRitualsL10nDefault)
|
||||
(yaml_mp.ZibiljaRitualsL10nOverride),
|
||||
bindF (pipe (
|
||||
mapM (toZibiljaRitual),
|
||||
bindF (toMapIntegrity),
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Either, fromLeft_, fromRight_, isLeft, Left, Right } from "../../../Data/Either"
|
||||
import { IO } from "../../../System/IO"
|
||||
|
||||
type MapToEitherIO<L, A> = { [K in keyof A]: IO<Either<L, A [K]>> }
|
||||
type MapToEitherIO<L, A> = { [K in keyof A]: IO<Either<L, A [K]>>|undefined }
|
||||
|
||||
type MapEitherIORejected<L, A> = { [K in keyof A]?: L }
|
||||
|
||||
@@ -13,13 +13,15 @@ export const mapMObjectIO =
|
||||
let err: MapEitherIORejected<L, A> | undefined = undefined
|
||||
|
||||
for (const [ key, ioValue ] of Object.entries (obj) as [keyof A, IO<Either<L, any>>][]) {
|
||||
const value = await ioValue
|
||||
if (ioValue !== undefined) {
|
||||
const value = await ioValue
|
||||
|
||||
if (isLeft (value)) {
|
||||
err = { ...(err ?? {}), [key]: fromLeft_ (value) }
|
||||
}
|
||||
else {
|
||||
res [key] = fromRight_ (value)
|
||||
if (isLeft (value)) {
|
||||
err = { ...(err ?? {}), [key]: fromLeft_ (value) }
|
||||
}
|
||||
else {
|
||||
res [key] = fromRight_ (value)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,191 +1,380 @@
|
||||
/* eslint "@typescript-eslint/type-annotation-spacing": [2, { "before": true, "after": true }] */
|
||||
import { Either } from "../../../Data/Either"
|
||||
import { IO } from "../../../System/IO"
|
||||
import { MapEitherIO, mapMObjectIO } from "./MapEitherIOObject"
|
||||
import { YamlParser } from "./Parser"
|
||||
import { YamlNameMap } from "./SchemaMap"
|
||||
import { YamlNameMap, YamlSchemaMap } from "./SchemaMap"
|
||||
|
||||
const handleOverrideParser =
|
||||
<A extends keyof YamlSchemaMap> (
|
||||
parser : YamlParser | undefined,
|
||||
schemaRef : A
|
||||
) : IO<Either<Error[], YamlSchemaMap[A]>> | undefined =>
|
||||
parser === undefined ? undefined : parser (schemaRef)
|
||||
|
||||
export const parseByFile =
|
||||
(univParser : YamlParser) =>
|
||||
async (l10nParser : YamlParser) : MapEitherIO<Error[], YamlNameMap> =>
|
||||
(defaultParser : YamlParser) =>
|
||||
async (l10nParser : (YamlParser | undefined)) : MapEitherIO<Error[], YamlNameMap> =>
|
||||
mapMObjectIO ({
|
||||
AdvantagesL10n:
|
||||
l10nParser ("Schema/Advantages/Advantages.l10n.schema.json"),
|
||||
AdvantagesL10nOverride:
|
||||
handleOverrideParser (l10nParser, "Schema/Advantages/Advantages.l10n.schema.json"),
|
||||
AdvantagesL10nDefault:
|
||||
defaultParser ("Schema/Advantages/Advantages.l10n.schema.json"),
|
||||
AdvantagesUniv:
|
||||
univParser ("Schema/Advantages/Advantages.univ.schema.json"),
|
||||
AnimistForcesL10n:
|
||||
l10nParser ("Schema/AnimistForces/AnimistForces.l10n.schema.json"),
|
||||
AnimistForcesL10nOverride:
|
||||
handleOverrideParser (l10nParser, "Schema/AnimistForces/AnimistForces.l10n.schema.json"),
|
||||
AnimistForcesL10nDefault:
|
||||
defaultParser ("Schema/AnimistForces/AnimistForces.l10n.schema.json"),
|
||||
AnimistForcesUniv:
|
||||
univParser ("Schema/AnimistForces/AnimistForces.univ.schema.json"),
|
||||
ArcaneBardTraditionsL10n:
|
||||
l10nParser ("Schema/ArcaneBardTraditions/ArcaneBardTraditions.l10n.schema.json"),
|
||||
ArcaneDancerTraditionsL10n:
|
||||
l10nParser ("Schema/ArcaneDancerTraditions/ArcaneDancerTraditions.l10n.schema.json"),
|
||||
ArmorTypesL10n:
|
||||
l10nParser ("Schema/ArmorTypes/ArmorTypes.l10n.schema.json"),
|
||||
AspectsL10n:
|
||||
l10nParser ("Schema/Aspects/Aspects.l10n.schema.json"),
|
||||
AttributesL10n:
|
||||
l10nParser ("Schema/Attributes/Attributes.l10n.schema.json"),
|
||||
BlessedTraditionsL10n:
|
||||
l10nParser ("Schema/BlessedTraditions/BlessedTraditions.l10n.schema.json"),
|
||||
ArcaneBardTraditionsL10nOverride:
|
||||
handleOverrideParser (
|
||||
l10nParser,
|
||||
"Schema/ArcaneBardTraditions/ArcaneBardTraditions.l10n.schema.json"
|
||||
),
|
||||
ArcaneBardTraditionsL10nDefault:
|
||||
defaultParser ("Schema/ArcaneBardTraditions/ArcaneBardTraditions.l10n.schema.json"),
|
||||
ArcaneDancerTraditionsL10nOverride:
|
||||
handleOverrideParser (
|
||||
l10nParser,
|
||||
"Schema/ArcaneDancerTraditions/ArcaneDancerTraditions.l10n.schema.json"
|
||||
),
|
||||
ArcaneDancerTraditionsL10nDefault:
|
||||
defaultParser ("Schema/ArcaneDancerTraditions/ArcaneDancerTraditions.l10n.schema.json"),
|
||||
ArmorTypesL10nOverride:
|
||||
handleOverrideParser (l10nParser, "Schema/ArmorTypes/ArmorTypes.l10n.schema.json"),
|
||||
ArmorTypesL10nDefault:
|
||||
defaultParser ("Schema/ArmorTypes/ArmorTypes.l10n.schema.json"),
|
||||
AspectsL10nOverride:
|
||||
handleOverrideParser (l10nParser, "Schema/Aspects/Aspects.l10n.schema.json"),
|
||||
AspectsL10nDefault:
|
||||
defaultParser ("Schema/Aspects/Aspects.l10n.schema.json"),
|
||||
AttributesL10nOverride:
|
||||
handleOverrideParser (l10nParser, "Schema/Attributes/Attributes.l10n.schema.json"),
|
||||
AttributesL10nDefault:
|
||||
defaultParser ("Schema/Attributes/Attributes.l10n.schema.json"),
|
||||
BlessedTraditionsL10nOverride:
|
||||
handleOverrideParser (
|
||||
l10nParser,
|
||||
"Schema/BlessedTraditions/BlessedTraditions.l10n.schema.json"
|
||||
),
|
||||
BlessedTraditionsL10nDefault:
|
||||
defaultParser ("Schema/BlessedTraditions/BlessedTraditions.l10n.schema.json"),
|
||||
BlessedTraditionsUniv:
|
||||
univParser ("Schema/BlessedTraditions/BlessedTraditions.univ.schema.json"),
|
||||
BlessingsL10n:
|
||||
l10nParser ("Schema/Blessings/Blessings.l10n.schema.json"),
|
||||
BlessingsL10nOverride:
|
||||
handleOverrideParser (l10nParser, "Schema/Blessings/Blessings.l10n.schema.json"),
|
||||
BlessingsL10nDefault:
|
||||
defaultParser ("Schema/Blessings/Blessings.l10n.schema.json"),
|
||||
BlessingsUniv:
|
||||
univParser ("Schema/Blessings/Blessings.univ.schema.json"),
|
||||
BooksL10n:
|
||||
l10nParser ("Schema/Books/Books.l10n.schema.json"),
|
||||
BrewsL10n:
|
||||
l10nParser ("Schema/Brews/Brews.l10n.schema.json"),
|
||||
CantripsL10n:
|
||||
l10nParser ("Schema/Cantrips/Cantrips.l10n.schema.json"),
|
||||
BooksL10nOverride:
|
||||
handleOverrideParser (l10nParser, "Schema/Books/Books.l10n.schema.json"),
|
||||
BooksL10nDefault:
|
||||
defaultParser ("Schema/Books/Books.l10n.schema.json"),
|
||||
BrewsL10nOverride:
|
||||
handleOverrideParser (l10nParser, "Schema/Brews/Brews.l10n.schema.json"),
|
||||
BrewsL10nDefault:
|
||||
defaultParser ("Schema/Brews/Brews.l10n.schema.json"),
|
||||
CantripsL10nOverride:
|
||||
handleOverrideParser (l10nParser, "Schema/Cantrips/Cantrips.l10n.schema.json"),
|
||||
CantripsL10nDefault:
|
||||
defaultParser ("Schema/Cantrips/Cantrips.l10n.schema.json"),
|
||||
CantripsUniv:
|
||||
univParser ("Schema/Cantrips/Cantrips.univ.schema.json"),
|
||||
CombatSpecialAbilityGroupsL10n:
|
||||
CombatSpecialAbilityGroupsL10nOverride:
|
||||
handleOverrideParser (
|
||||
l10nParser,
|
||||
"Schema/CombatSpecialAbilityGroups/CombatSpecialAbilityGroups.l10n.schema.json"
|
||||
),
|
||||
CombatSpecialAbilityGroupsL10nDefault:
|
||||
// eslint-disable-next-line max-len
|
||||
l10nParser ("Schema/CombatSpecialAbilityGroups/CombatSpecialAbilityGroups.l10n.schema.json"),
|
||||
CombatTechniqueGroupsL10n:
|
||||
l10nParser ("Schema/CombatTechniqueGroups/CombatTechniqueGroups.l10n.schema.json"),
|
||||
CombatTechniquesL10n:
|
||||
l10nParser ("Schema/CombatTechniques/CombatTechniques.l10n.schema.json"),
|
||||
defaultParser ("Schema/CombatSpecialAbilityGroups/CombatSpecialAbilityGroups.l10n.schema.json"),
|
||||
CombatTechniqueGroupsL10nOverride:
|
||||
handleOverrideParser (
|
||||
l10nParser,
|
||||
"Schema/CombatTechniqueGroups/CombatTechniqueGroups.l10n.schema.json"
|
||||
),
|
||||
CombatTechniqueGroupsL10nDefault:
|
||||
defaultParser ("Schema/CombatTechniqueGroups/CombatTechniqueGroups.l10n.schema.json"),
|
||||
CombatTechniquesL10nOverride:
|
||||
handleOverrideParser (
|
||||
l10nParser,
|
||||
"Schema/CombatTechniques/CombatTechniques.l10n.schema.json"
|
||||
),
|
||||
CombatTechniquesL10nDefault:
|
||||
defaultParser ("Schema/CombatTechniques/CombatTechniques.l10n.schema.json"),
|
||||
CombatTechniquesUniv:
|
||||
univParser ("Schema/CombatTechniques/CombatTechniques.univ.schema.json"),
|
||||
ConditionsL10n:
|
||||
l10nParser ("Schema/Conditions/Conditions.l10n.schema.json"),
|
||||
CulturesL10n:
|
||||
l10nParser ("Schema/Cultures/Cultures.l10n.schema.json"),
|
||||
ConditionsL10nOverride:
|
||||
handleOverrideParser (l10nParser, "Schema/Conditions/Conditions.l10n.schema.json"),
|
||||
ConditionsL10nDefault:
|
||||
defaultParser ("Schema/Conditions/Conditions.l10n.schema.json"),
|
||||
CulturesL10nOverride:
|
||||
handleOverrideParser (l10nParser, "Schema/Cultures/Cultures.l10n.schema.json"),
|
||||
CulturesL10nDefault:
|
||||
defaultParser ("Schema/Cultures/Cultures.l10n.schema.json"),
|
||||
CulturesUniv:
|
||||
univParser ("Schema/Cultures/Cultures.univ.schema.json"),
|
||||
CursesL10n:
|
||||
l10nParser ("Schema/Curses/Curses.l10n.schema.json"),
|
||||
CursesL10nOverride:
|
||||
handleOverrideParser (l10nParser, "Schema/Curses/Curses.l10n.schema.json"),
|
||||
CursesL10nDefault:
|
||||
defaultParser ("Schema/Curses/Curses.l10n.schema.json"),
|
||||
CursesUniv:
|
||||
univParser ("Schema/Curses/Curses.univ.schema.json"),
|
||||
DerivedCharacteristicsL10n:
|
||||
l10nParser ("Schema/DerivedCharacteristics/DerivedCharacteristics.l10n.schema.json"),
|
||||
DisadvantagesL10n:
|
||||
l10nParser ("Schema/Disadvantages/Disadvantages.l10n.schema.json"),
|
||||
DerivedCharacteristicsL10nOverride:
|
||||
handleOverrideParser (
|
||||
l10nParser,
|
||||
"Schema/DerivedCharacteristics/DerivedCharacteristics.l10n.schema.json"
|
||||
),
|
||||
DerivedCharacteristicsL10nDefault:
|
||||
defaultParser ("Schema/DerivedCharacteristics/DerivedCharacteristics.l10n.schema.json"),
|
||||
DisadvantagesL10nOverride:
|
||||
handleOverrideParser (l10nParser, "Schema/Disadvantages/Disadvantages.l10n.schema.json"),
|
||||
DisadvantagesL10nDefault:
|
||||
defaultParser ("Schema/Disadvantages/Disadvantages.l10n.schema.json"),
|
||||
DisadvantagesUniv:
|
||||
univParser ("Schema/Disadvantages/Disadvantages.univ.schema.json"),
|
||||
DominationRitualsL10n:
|
||||
l10nParser ("Schema/DominationRituals/DominationRituals.l10n.schema.json"),
|
||||
DominationRitualsL10nOverride:
|
||||
handleOverrideParser (
|
||||
l10nParser,
|
||||
"Schema/DominationRituals/DominationRituals.l10n.schema.json"
|
||||
),
|
||||
DominationRitualsL10nDefault:
|
||||
defaultParser ("Schema/DominationRituals/DominationRituals.l10n.schema.json"),
|
||||
DominationRitualsUniv:
|
||||
univParser ("Schema/DominationRituals/DominationRituals.univ.schema.json"),
|
||||
ElvenMagicalSongsL10n:
|
||||
l10nParser ("Schema/ElvenMagicalSongs/ElvenMagicalSongs.l10n.schema.json"),
|
||||
ElvenMagicalSongsL10nOverride:
|
||||
handleOverrideParser (
|
||||
l10nParser,
|
||||
"Schema/ElvenMagicalSongs/ElvenMagicalSongs.l10n.schema.json"
|
||||
),
|
||||
ElvenMagicalSongsL10nDefault:
|
||||
defaultParser ("Schema/ElvenMagicalSongs/ElvenMagicalSongs.l10n.schema.json"),
|
||||
ElvenMagicalSongsUniv:
|
||||
univParser ("Schema/ElvenMagicalSongs/ElvenMagicalSongs.univ.schema.json"),
|
||||
EquipmentL10n:
|
||||
l10nParser ("Schema/Equipment/Equipment.l10n.schema.json"),
|
||||
EquipmentL10nOverride:
|
||||
handleOverrideParser (l10nParser, "Schema/Equipment/Equipment.l10n.schema.json"),
|
||||
EquipmentL10nDefault:
|
||||
defaultParser ("Schema/Equipment/Equipment.l10n.schema.json"),
|
||||
EquipmentUniv:
|
||||
univParser ("Schema/Equipment/Equipment.univ.schema.json"),
|
||||
EquipmentGroupsL10n:
|
||||
l10nParser ("Schema/EquipmentGroups/EquipmentGroups.l10n.schema.json"),
|
||||
EquipmentPackagesL10n:
|
||||
l10nParser ("Schema/EquipmentPackages/EquipmentPackages.l10n.schema.json"),
|
||||
EquipmentGroupsL10nOverride:
|
||||
handleOverrideParser (
|
||||
l10nParser,
|
||||
"Schema/EquipmentGroups/EquipmentGroups.l10n.schema.json"
|
||||
),
|
||||
EquipmentGroupsL10nDefault:
|
||||
defaultParser ("Schema/EquipmentGroups/EquipmentGroups.l10n.schema.json"),
|
||||
EquipmentPackagesL10nOverride:
|
||||
handleOverrideParser (
|
||||
l10nParser,
|
||||
"Schema/EquipmentPackages/EquipmentPackages.l10n.schema.json"
|
||||
),
|
||||
EquipmentPackagesL10nDefault:
|
||||
defaultParser ("Schema/EquipmentPackages/EquipmentPackages.l10n.schema.json"),
|
||||
EquipmentPackagesUniv:
|
||||
univParser ("Schema/EquipmentPackages/EquipmentPackages.univ.schema.json"),
|
||||
ExperienceLevelsL10n:
|
||||
l10nParser ("Schema/ExperienceLevels/ExperienceLevels.l10n.schema.json"),
|
||||
ExperienceLevelsL10nOverride:
|
||||
handleOverrideParser (
|
||||
l10nParser,
|
||||
"Schema/ExperienceLevels/ExperienceLevels.l10n.schema.json"
|
||||
),
|
||||
ExperienceLevelsL10nDefault:
|
||||
defaultParser ("Schema/ExperienceLevels/ExperienceLevels.l10n.schema.json"),
|
||||
ExperienceLevelsUniv:
|
||||
univParser ("Schema/ExperienceLevels/ExperienceLevels.univ.schema.json"),
|
||||
EyeColorsL10n:
|
||||
l10nParser ("Schema/EyeColors/EyeColors.l10n.schema.json"),
|
||||
FocusRulesL10n:
|
||||
l10nParser ("Schema/FocusRules/FocusRules.l10n.schema.json"),
|
||||
EyeColorsL10nOverride:
|
||||
handleOverrideParser (l10nParser, "Schema/EyeColors/EyeColors.l10n.schema.json"),
|
||||
EyeColorsL10nDefault:
|
||||
defaultParser ("Schema/EyeColors/EyeColors.l10n.schema.json"),
|
||||
FocusRulesL10nOverride:
|
||||
handleOverrideParser (l10nParser, "Schema/FocusRules/FocusRules.l10n.schema.json"),
|
||||
FocusRulesL10nDefault:
|
||||
defaultParser ("Schema/FocusRules/FocusRules.l10n.schema.json"),
|
||||
FocusRulesUniv:
|
||||
univParser ("Schema/FocusRules/FocusRules.univ.schema.json"),
|
||||
GeodeRitualsL10n:
|
||||
l10nParser ("Schema/GeodeRituals/GeodeRituals.l10n.schema.json"),
|
||||
GeodeRitualsL10nOverride:
|
||||
handleOverrideParser (l10nParser, "Schema/GeodeRituals/GeodeRituals.l10n.schema.json"),
|
||||
GeodeRitualsL10nDefault:
|
||||
defaultParser ("Schema/GeodeRituals/GeodeRituals.l10n.schema.json"),
|
||||
GeodeRitualsUniv:
|
||||
univParser ("Schema/GeodeRituals/GeodeRituals.univ.schema.json"),
|
||||
HairColorsL10n:
|
||||
l10nParser ("Schema/HairColors/HairColors.l10n.schema.json"),
|
||||
LiturgicalChantEnhancementsL10n:
|
||||
HairColorsL10nOverride:
|
||||
handleOverrideParser (l10nParser, "Schema/HairColors/HairColors.l10n.schema.json"),
|
||||
HairColorsL10nDefault:
|
||||
defaultParser ("Schema/HairColors/HairColors.l10n.schema.json"),
|
||||
LiturgicalChantEnhancementsL10nOverride:
|
||||
handleOverrideParser (
|
||||
l10nParser,
|
||||
"Schema/LiturgicalChantEnhancements/LiturgicalChantEnhancements.l10n.schema.json"
|
||||
),
|
||||
LiturgicalChantEnhancementsL10nDefault:
|
||||
// eslint-disable-next-line max-len
|
||||
l10nParser ("Schema/LiturgicalChantEnhancements/LiturgicalChantEnhancements.l10n.schema.json"),
|
||||
LiturgicalChantEnhancementsUniv:
|
||||
defaultParser ("Schema/LiturgicalChantEnhancements/LiturgicalChantEnhancements.l10n.schema.json"),
|
||||
LiturgicalChantEnhancementsUniv:
|
||||
// eslint-disable-next-line max-len
|
||||
univParser ("Schema/LiturgicalChantEnhancements/LiturgicalChantEnhancements.univ.schema.json"),
|
||||
LiturgicalChantGroupsL10n:
|
||||
l10nParser ("Schema/LiturgicalChantGroups/LiturgicalChantGroups.l10n.schema.json"),
|
||||
LiturgicalChantsL10n:
|
||||
l10nParser ("Schema/LiturgicalChants/LiturgicalChants.l10n.schema.json"),
|
||||
LiturgicalChantGroupsL10nOverride:
|
||||
handleOverrideParser (
|
||||
l10nParser,
|
||||
"Schema/LiturgicalChantGroups/LiturgicalChantGroups.l10n.schema.json"
|
||||
),
|
||||
LiturgicalChantGroupsL10nDefault:
|
||||
defaultParser ("Schema/LiturgicalChantGroups/LiturgicalChantGroups.l10n.schema.json"),
|
||||
LiturgicalChantsL10nOverride:
|
||||
handleOverrideParser (
|
||||
l10nParser,
|
||||
"Schema/LiturgicalChants/LiturgicalChants.l10n.schema.json"
|
||||
),
|
||||
LiturgicalChantsL10nDefault:
|
||||
defaultParser ("Schema/LiturgicalChants/LiturgicalChants.l10n.schema.json"),
|
||||
LiturgicalChantsUniv:
|
||||
univParser ("Schema/LiturgicalChants/LiturgicalChants.univ.schema.json"),
|
||||
MagicalDancesL10n:
|
||||
l10nParser ("Schema/MagicalDances/MagicalDances.l10n.schema.json"),
|
||||
MagicalDancesL10nOverride:
|
||||
handleOverrideParser (l10nParser, "Schema/MagicalDances/MagicalDances.l10n.schema.json"),
|
||||
MagicalDancesL10nDefault:
|
||||
defaultParser ("Schema/MagicalDances/MagicalDances.l10n.schema.json"),
|
||||
MagicalDancesUniv:
|
||||
univParser ("Schema/MagicalDances/MagicalDances.univ.schema.json"),
|
||||
MagicalMelodiesL10n:
|
||||
l10nParser ("Schema/MagicalMelodies/MagicalMelodies.l10n.schema.json"),
|
||||
MagicalMelodiesL10nOverride:
|
||||
handleOverrideParser (
|
||||
l10nParser,
|
||||
"Schema/MagicalMelodies/MagicalMelodies.l10n.schema.json"
|
||||
),
|
||||
MagicalMelodiesL10nDefault:
|
||||
defaultParser ("Schema/MagicalMelodies/MagicalMelodies.l10n.schema.json"),
|
||||
MagicalMelodiesUniv:
|
||||
univParser ("Schema/MagicalMelodies/MagicalMelodies.univ.schema.json"),
|
||||
MagicalTraditionsL10n:
|
||||
l10nParser ("Schema/MagicalTraditions/MagicalTraditions.l10n.schema.json"),
|
||||
MagicalTraditionsL10nOverride:
|
||||
handleOverrideParser (
|
||||
l10nParser,
|
||||
"Schema/MagicalTraditions/MagicalTraditions.l10n.schema.json"
|
||||
),
|
||||
MagicalTraditionsL10nDefault:
|
||||
defaultParser ("Schema/MagicalTraditions/MagicalTraditions.l10n.schema.json"),
|
||||
MagicalTraditionsUniv:
|
||||
univParser ("Schema/MagicalTraditions/MagicalTraditions.univ.schema.json"),
|
||||
OptionalRulesL10n:
|
||||
l10nParser ("Schema/OptionalRules/OptionalRules.l10n.schema.json"),
|
||||
PactsL10n:
|
||||
l10nParser ("Schema/Pacts/Pacts.l10n.schema.json"),
|
||||
ProfessionsL10n:
|
||||
l10nParser ("Schema/Professions/Professions.l10n.schema.json"),
|
||||
OptionalRulesL10nOverride:
|
||||
handleOverrideParser (l10nParser, "Schema/OptionalRules/OptionalRules.l10n.schema.json"),
|
||||
OptionalRulesL10nDefault:
|
||||
defaultParser ("Schema/OptionalRules/OptionalRules.l10n.schema.json"),
|
||||
PactsL10nOverride:
|
||||
handleOverrideParser (l10nParser, "Schema/Pacts/Pacts.l10n.schema.json"),
|
||||
PactsL10nDefault:
|
||||
defaultParser ("Schema/Pacts/Pacts.l10n.schema.json"),
|
||||
ProfessionsL10nOverride:
|
||||
handleOverrideParser (l10nParser, "Schema/Professions/Professions.l10n.schema.json"),
|
||||
ProfessionsL10nDefault:
|
||||
defaultParser ("Schema/Professions/Professions.l10n.schema.json"),
|
||||
ProfessionsUniv:
|
||||
univParser ("Schema/Professions/Professions.univ.schema.json"),
|
||||
ProfessionVariantsL10n:
|
||||
l10nParser ("Schema/ProfessionVariants/ProfessionVariants.l10n.schema.json"),
|
||||
ProfessionVariantsL10nOverride:
|
||||
handleOverrideParser (
|
||||
l10nParser,
|
||||
"Schema/ProfessionVariants/ProfessionVariants.l10n.schema.json"
|
||||
),
|
||||
ProfessionVariantsL10nDefault:
|
||||
defaultParser ("Schema/ProfessionVariants/ProfessionVariants.l10n.schema.json"),
|
||||
ProfessionVariantsUniv:
|
||||
univParser ("Schema/ProfessionVariants/ProfessionVariants.univ.schema.json"),
|
||||
PropertiesL10n:
|
||||
l10nParser ("Schema/Properties/Properties.l10n.schema.json"),
|
||||
RacesL10n:
|
||||
l10nParser ("Schema/Races/Races.l10n.schema.json"),
|
||||
PropertiesL10nOverride:
|
||||
handleOverrideParser (l10nParser, "Schema/Properties/Properties.l10n.schema.json"),
|
||||
PropertiesL10nDefault:
|
||||
defaultParser ("Schema/Properties/Properties.l10n.schema.json"),
|
||||
RacesL10nOverride:
|
||||
handleOverrideParser (l10nParser, "Schema/Races/Races.l10n.schema.json"),
|
||||
RacesL10nDefault:
|
||||
defaultParser ("Schema/Races/Races.l10n.schema.json"),
|
||||
RacesUniv:
|
||||
univParser ("Schema/Races/Races.univ.schema.json"),
|
||||
RaceVariantsL10n:
|
||||
l10nParser ("Schema/RaceVariants/RaceVariants.l10n.schema.json"),
|
||||
RaceVariantsL10nOverride:
|
||||
handleOverrideParser (l10nParser, "Schema/RaceVariants/RaceVariants.l10n.schema.json"),
|
||||
RaceVariantsL10nDefault:
|
||||
defaultParser ("Schema/RaceVariants/RaceVariants.l10n.schema.json"),
|
||||
RaceVariantsUniv:
|
||||
univParser ("Schema/RaceVariants/RaceVariants.univ.schema.json"),
|
||||
ReachesL10n:
|
||||
l10nParser ("Schema/Reaches/Reaches.l10n.schema.json"),
|
||||
RogueSpellsL10n:
|
||||
l10nParser ("Schema/RogueSpells/RogueSpells.l10n.schema.json"),
|
||||
ReachesL10nOverride:
|
||||
handleOverrideParser (l10nParser, "Schema/Reaches/Reaches.l10n.schema.json"),
|
||||
ReachesL10nDefault:
|
||||
defaultParser ("Schema/Reaches/Reaches.l10n.schema.json"),
|
||||
RogueSpellsL10nOverride:
|
||||
handleOverrideParser (l10nParser, "Schema/RogueSpells/RogueSpells.l10n.schema.json"),
|
||||
RogueSpellsL10nDefault:
|
||||
defaultParser ("Schema/RogueSpells/RogueSpells.l10n.schema.json"),
|
||||
RogueSpellsUniv:
|
||||
univParser ("Schema/RogueSpells/RogueSpells.univ.schema.json"),
|
||||
SkillGroupsL10n:
|
||||
l10nParser ("Schema/SkillGroups/SkillGroups.l10n.schema.json"),
|
||||
SkillsL10n:
|
||||
l10nParser ("Schema/Skills/Skills.l10n.schema.json"),
|
||||
SkillGroupsL10nOverride:
|
||||
handleOverrideParser (l10nParser, "Schema/SkillGroups/SkillGroups.l10n.schema.json"),
|
||||
SkillGroupsL10nDefault:
|
||||
defaultParser ("Schema/SkillGroups/SkillGroups.l10n.schema.json"),
|
||||
SkillsL10nOverride:
|
||||
handleOverrideParser (l10nParser, "Schema/Skills/Skills.l10n.schema.json"),
|
||||
SkillsL10nDefault:
|
||||
defaultParser ("Schema/Skills/Skills.l10n.schema.json"),
|
||||
SkillsUniv:
|
||||
univParser ("Schema/Skills/Skills.univ.schema.json"),
|
||||
SocialStatusesL10n:
|
||||
l10nParser ("Schema/SocialStatuses/SocialStatuses.l10n.schema.json"),
|
||||
SpecialAbilitiesL10n:
|
||||
l10nParser ("Schema/SpecialAbilities/SpecialAbilities.l10n.schema.json"),
|
||||
SocialStatusesL10nOverride:
|
||||
handleOverrideParser (l10nParser, "Schema/SocialStatuses/SocialStatuses.l10n.schema.json"),
|
||||
SocialStatusesL10nDefault:
|
||||
defaultParser ("Schema/SocialStatuses/SocialStatuses.l10n.schema.json"),
|
||||
SpecialAbilitiesL10nOverride:
|
||||
handleOverrideParser (
|
||||
l10nParser,
|
||||
"Schema/SpecialAbilities/SpecialAbilities.l10n.schema.json"
|
||||
),
|
||||
SpecialAbilitiesL10nDefault:
|
||||
defaultParser ("Schema/SpecialAbilities/SpecialAbilities.l10n.schema.json"),
|
||||
SpecialAbilitiesUniv:
|
||||
univParser ("Schema/SpecialAbilities/SpecialAbilities.univ.schema.json"),
|
||||
SpecialAbilityGroupsL10n:
|
||||
l10nParser ("Schema/SpecialAbilityGroups/SpecialAbilityGroups.l10n.schema.json"),
|
||||
SpellEnhancementsL10n:
|
||||
l10nParser ("Schema/SpellEnhancements/SpellEnhancements.l10n.schema.json"),
|
||||
SpecialAbilityGroupsL10nOverride:
|
||||
handleOverrideParser (
|
||||
l10nParser,
|
||||
"Schema/SpecialAbilityGroups/SpecialAbilityGroups.l10n.schema.json"
|
||||
),
|
||||
SpecialAbilityGroupsL10nDefault:
|
||||
defaultParser ("Schema/SpecialAbilityGroups/SpecialAbilityGroups.l10n.schema.json"),
|
||||
SpellEnhancementsL10nOverride:
|
||||
handleOverrideParser (
|
||||
l10nParser,
|
||||
"Schema/SpellEnhancements/SpellEnhancements.l10n.schema.json"
|
||||
),
|
||||
SpellEnhancementsL10nDefault:
|
||||
defaultParser ("Schema/SpellEnhancements/SpellEnhancements.l10n.schema.json"),
|
||||
SpellEnhancementsUniv:
|
||||
univParser ("Schema/SpellEnhancements/SpellEnhancements.univ.schema.json"),
|
||||
SpellGroupsL10n:
|
||||
l10nParser ("Schema/SpellGroups/SpellGroups.l10n.schema.json"),
|
||||
SpellsL10n:
|
||||
l10nParser ("Schema/Spells/Spells.l10n.schema.json"),
|
||||
SpellGroupsL10nOverride:
|
||||
handleOverrideParser (l10nParser, "Schema/SpellGroups/SpellGroups.l10n.schema.json"),
|
||||
SpellGroupsL10nDefault:
|
||||
defaultParser ("Schema/SpellGroups/SpellGroups.l10n.schema.json"),
|
||||
SpellsL10nOverride:
|
||||
handleOverrideParser (l10nParser, "Schema/Spells/Spells.l10n.schema.json"),
|
||||
SpellsL10nDefault:
|
||||
defaultParser ("Schema/Spells/Spells.l10n.schema.json"),
|
||||
SpellsUniv:
|
||||
univParser ("Schema/Spells/Spells.univ.schema.json"),
|
||||
StatesL10n:
|
||||
l10nParser ("Schema/States/States.l10n.schema.json"),
|
||||
SubjectsL10n:
|
||||
l10nParser ("Schema/Subjects/Subjects.l10n.schema.json"),
|
||||
TribesL10n:
|
||||
l10nParser ("Schema/Tribes/Tribes.l10n.schema.json"),
|
||||
UIL10n:
|
||||
l10nParser ("Schema/UI/UI.l10n.schema.json"),
|
||||
ZibiljaRitualsL10n:
|
||||
l10nParser ("Schema/ZibiljaRituals/ZibiljaRituals.l10n.schema.json"),
|
||||
StatesL10nOverride:
|
||||
handleOverrideParser (l10nParser, "Schema/States/States.l10n.schema.json"),
|
||||
StatesL10nDefault:
|
||||
defaultParser ("Schema/States/States.l10n.schema.json"),
|
||||
SubjectsL10nOverride:
|
||||
handleOverrideParser (l10nParser, "Schema/Subjects/Subjects.l10n.schema.json"),
|
||||
SubjectsL10nDefault:
|
||||
defaultParser ("Schema/Subjects/Subjects.l10n.schema.json"),
|
||||
TribesL10nOverride:
|
||||
handleOverrideParser (l10nParser, "Schema/Tribes/Tribes.l10n.schema.json"),
|
||||
TribesL10nDefault:
|
||||
defaultParser ("Schema/Tribes/Tribes.l10n.schema.json"),
|
||||
UIL10nOverride:
|
||||
handleOverrideParser (l10nParser, "Schema/UI/UI.l10n.schema.json"),
|
||||
UIL10nDefault:
|
||||
defaultParser ("Schema/UI/UI.l10n.schema.json"),
|
||||
ZibiljaRitualsL10nOverride:
|
||||
handleOverrideParser (l10nParser, "Schema/ZibiljaRituals/ZibiljaRituals.l10n.schema.json"),
|
||||
ZibiljaRitualsL10nDefault:
|
||||
defaultParser ("Schema/ZibiljaRituals/ZibiljaRituals.l10n.schema.json"),
|
||||
ZibiljaRitualsUniv:
|
||||
univParser ("Schema/ZibiljaRituals/ZibiljaRituals.univ.schema.json"),
|
||||
})
|
||||
|
||||
@@ -192,94 +192,152 @@ export type YamlSchemaId = keyof YamlSchemaMap
|
||||
| "Schema/SourceRefs/SourceRefs.schema.json"
|
||||
|
||||
export interface YamlNameMap {
|
||||
AdvantagesL10n : AdvantagesL10n
|
||||
AdvantagesL10nOverride : AdvantagesL10n|undefined
|
||||
AdvantagesL10nDefault : AdvantagesL10n
|
||||
AdvantagesUniv : AdvantagesUniv
|
||||
AnimistForcesL10n : AnimistForcesL10n
|
||||
AnimistForcesL10nOverride : AnimistForcesL10n|undefined
|
||||
AnimistForcesL10nDefault : AnimistForcesL10n
|
||||
AnimistForcesUniv : AnimistForcesUniv
|
||||
ArcaneBardTraditionsL10n : ArcaneBardTraditionsL10n
|
||||
ArcaneDancerTraditionsL10n : ArcaneDancerTraditionsL10n
|
||||
ArmorTypesL10n : ArmorTypesL10n
|
||||
AspectsL10n : AspectsL10n
|
||||
AttributesL10n : AttributesL10n
|
||||
BlessedTraditionsL10n : BlessedTraditionsL10n
|
||||
ArcaneBardTraditionsL10nOverride : ArcaneBardTraditionsL10n|undefined
|
||||
ArcaneBardTraditionsL10nDefault : ArcaneBardTraditionsL10n
|
||||
ArcaneDancerTraditionsL10nOverride : ArcaneDancerTraditionsL10n|undefined
|
||||
ArcaneDancerTraditionsL10nDefault : ArcaneDancerTraditionsL10n
|
||||
ArmorTypesL10nOverride : ArmorTypesL10n|undefined
|
||||
ArmorTypesL10nDefault : ArmorTypesL10n
|
||||
AspectsL10nOverride : AspectsL10n|undefined
|
||||
AspectsL10nDefault : AspectsL10n
|
||||
AttributesL10nOverride : AttributesL10n|undefined
|
||||
AttributesL10nDefault : AttributesL10n
|
||||
BlessedTraditionsL10nOverride : BlessedTraditionsL10n|undefined
|
||||
BlessedTraditionsL10nDefault : BlessedTraditionsL10n
|
||||
BlessedTraditionsUniv : BlessedTraditionsUniv
|
||||
BlessingsL10n : BlessingsL10n
|
||||
BlessingsL10nOverride : BlessingsL10n|undefined
|
||||
BlessingsL10nDefault : BlessingsL10n
|
||||
BlessingsUniv : BlessingsUniv
|
||||
BooksL10n : BooksL10n
|
||||
BrewsL10n : BrewsL10n
|
||||
CantripsL10n : CantripsL10n
|
||||
BooksL10nOverride : BooksL10n|undefined
|
||||
BooksL10nDefault : BooksL10n
|
||||
BrewsL10nOverride : BrewsL10n
|
||||
BrewsL10nDefault : BrewsL10n
|
||||
CantripsL10nOverride : CantripsL10n|undefined
|
||||
CantripsL10nDefault : CantripsL10n
|
||||
CantripsUniv : CantripsUniv
|
||||
CombatSpecialAbilityGroupsL10n : CombatSpecialAbilityGroupsL10n
|
||||
CombatTechniqueGroupsL10n : CombatTechniqueGroupsL10n
|
||||
CombatTechniquesL10n : CombatTechniquesL10n
|
||||
CombatSpecialAbilityGroupsL10nOverride : CombatSpecialAbilityGroupsL10n|undefined
|
||||
CombatSpecialAbilityGroupsL10nDefault : CombatSpecialAbilityGroupsL10n
|
||||
CombatTechniqueGroupsL10nOverride : CombatTechniqueGroupsL10n|undefined
|
||||
CombatTechniqueGroupsL10nDefault : CombatTechniqueGroupsL10n
|
||||
CombatTechniquesL10nOverride : CombatTechniquesL10n|undefined
|
||||
CombatTechniquesL10nDefault : CombatTechniquesL10n
|
||||
CombatTechniquesUniv : CombatTechniquesUniv
|
||||
ConditionsL10n : ConditionsL10n
|
||||
CulturesL10n : CulturesL10n
|
||||
ConditionsL10nOverride : ConditionsL10n|undefined
|
||||
ConditionsL10nDefault : ConditionsL10n
|
||||
CulturesL10nOverride : CulturesL10n|undefined
|
||||
CulturesL10nDefault : CulturesL10n
|
||||
CulturesUniv : CulturesUniv
|
||||
CursesL10n : CursesL10n
|
||||
CursesL10nOverride : CursesL10n|undefined
|
||||
CursesL10nDefault : CursesL10n
|
||||
CursesUniv : CursesUniv
|
||||
DerivedCharacteristicsL10n : DerivedCharacteristicsL10n
|
||||
DisadvantagesL10n : DisadvantagesL10n
|
||||
DerivedCharacteristicsL10nOverride : DerivedCharacteristicsL10n|undefined
|
||||
DerivedCharacteristicsL10nDefault : DerivedCharacteristicsL10n
|
||||
DisadvantagesL10nOverride : DisadvantagesL10n|undefined
|
||||
DisadvantagesL10nDefault : DisadvantagesL10n
|
||||
DisadvantagesUniv : DisadvantagesUniv
|
||||
DominationRitualsL10n : DominationRitualsL10n
|
||||
DominationRitualsL10nOverride : DominationRitualsL10n|undefined
|
||||
DominationRitualsL10nDefault : DominationRitualsL10n
|
||||
DominationRitualsUniv : DominationRitualsUniv
|
||||
ElvenMagicalSongsL10n : ElvenMagicalSongsL10n
|
||||
ElvenMagicalSongsL10nOverride : ElvenMagicalSongsL10n|undefined
|
||||
ElvenMagicalSongsL10nDefault : ElvenMagicalSongsL10n
|
||||
ElvenMagicalSongsUniv : ElvenMagicalSongsUniv
|
||||
EquipmentL10n : EquipmentL10n
|
||||
EquipmentL10nOverride : EquipmentL10n|undefined
|
||||
EquipmentL10nDefault : EquipmentL10n
|
||||
EquipmentUniv : EquipmentUniv
|
||||
EquipmentGroupsL10n : EquipmentGroupsL10n
|
||||
EquipmentPackagesL10n : EquipmentPackagesL10n
|
||||
EquipmentGroupsL10nOverride : EquipmentGroupsL10n|undefined
|
||||
EquipmentGroupsL10nDefault : EquipmentGroupsL10n
|
||||
EquipmentPackagesL10nOverride : EquipmentPackagesL10n|undefined
|
||||
EquipmentPackagesL10nDefault : EquipmentPackagesL10n
|
||||
EquipmentPackagesUniv : EquipmentPackagesUniv
|
||||
ExperienceLevelsL10n : ExperienceLevelsL10n
|
||||
ExperienceLevelsL10nOverride : ExperienceLevelsL10n|undefined
|
||||
ExperienceLevelsL10nDefault : ExperienceLevelsL10n
|
||||
ExperienceLevelsUniv : ExperienceLevelsUniv
|
||||
EyeColorsL10n : EyeColorsL10n
|
||||
FocusRulesL10n : FocusRulesL10n
|
||||
EyeColorsL10nOverride : EyeColorsL10n|undefined
|
||||
EyeColorsL10nDefault : EyeColorsL10n
|
||||
FocusRulesL10nOverride : FocusRulesL10n|undefined
|
||||
FocusRulesL10nDefault : FocusRulesL10n
|
||||
FocusRulesUniv : FocusRulesUniv
|
||||
GeodeRitualsL10n : GeodeRitualsL10n
|
||||
GeodeRitualsL10nOverride : GeodeRitualsL10n|undefined
|
||||
GeodeRitualsL10nDefault : GeodeRitualsL10n
|
||||
GeodeRitualsUniv : GeodeRitualsUniv
|
||||
HairColorsL10n : HairColorsL10n
|
||||
LiturgicalChantEnhancementsL10n : LiturgicalChantEnhancementsL10n
|
||||
HairColorsL10nOverride : HairColorsL10n|undefined
|
||||
HairColorsL10nDefault : HairColorsL10n
|
||||
LiturgicalChantEnhancementsL10nOverride : LiturgicalChantEnhancementsL10n|undefined
|
||||
LiturgicalChantEnhancementsL10nDefault : LiturgicalChantEnhancementsL10n
|
||||
LiturgicalChantEnhancementsUniv : LiturgicalChantEnhancementsUniv
|
||||
LiturgicalChantGroupsL10n : LiturgicalChantGroupsL10n
|
||||
LiturgicalChantsL10n : LiturgicalChantsL10n
|
||||
LiturgicalChantGroupsL10nOverride : LiturgicalChantGroupsL10n|undefined
|
||||
LiturgicalChantGroupsL10nDefault : LiturgicalChantGroupsL10n
|
||||
LiturgicalChantsL10nOverride : LiturgicalChantsL10n|undefined
|
||||
LiturgicalChantsL10nDefault : LiturgicalChantsL10n
|
||||
LiturgicalChantsUniv : LiturgicalChantsUniv
|
||||
MagicalDancesL10n : MagicalDancesL10n
|
||||
MagicalDancesL10nOverride : MagicalDancesL10n|undefined
|
||||
MagicalDancesL10nDefault : MagicalDancesL10n
|
||||
MagicalDancesUniv : MagicalDancesUniv
|
||||
MagicalMelodiesL10n : MagicalMelodiesL10n
|
||||
MagicalMelodiesL10nOverride : MagicalMelodiesL10n|undefined
|
||||
MagicalMelodiesL10nDefault : MagicalMelodiesL10n
|
||||
MagicalMelodiesUniv : MagicalMelodiesUniv
|
||||
MagicalTraditionsL10n : MagicalTraditionsL10n
|
||||
MagicalTraditionsL10nOverride : MagicalTraditionsL10n|undefined
|
||||
MagicalTraditionsL10nDefault : MagicalTraditionsL10n
|
||||
MagicalTraditionsUniv : MagicalTraditionsUniv
|
||||
OptionalRulesL10n : OptionalRulesL10n
|
||||
PactsL10n : PactsL10n
|
||||
ProfessionsL10n : ProfessionsL10n
|
||||
OptionalRulesL10nOverride : OptionalRulesL10n|undefined
|
||||
OptionalRulesL10nDefault : OptionalRulesL10n
|
||||
PactsL10nOverride : PactsL10n|undefined
|
||||
PactsL10nDefault : PactsL10n
|
||||
ProfessionsL10nOverride : ProfessionsL10n|undefined
|
||||
ProfessionsL10nDefault : ProfessionsL10n
|
||||
ProfessionsUniv : ProfessionsUniv
|
||||
ProfessionVariantsL10n : ProfessionVariantsL10n
|
||||
ProfessionVariantsL10nOverride : ProfessionVariantsL10n|undefined
|
||||
ProfessionVariantsL10nDefault : ProfessionVariantsL10n
|
||||
ProfessionVariantsUniv : ProfessionVariantsUniv
|
||||
PropertiesL10n : PropertiesL10n
|
||||
RacesL10n : RacesL10n
|
||||
PropertiesL10nOverride : PropertiesL10n|undefined
|
||||
PropertiesL10nDefault : PropertiesL10n
|
||||
RacesL10nOverride : RacesL10n|undefined
|
||||
RacesL10nDefault : RacesL10n
|
||||
RacesUniv : RacesUniv
|
||||
RaceVariantsL10n : RaceVariantsL10n
|
||||
RaceVariantsL10nOverride : RaceVariantsL10n|undefined
|
||||
RaceVariantsL10nDefault : RaceVariantsL10n
|
||||
RaceVariantsUniv : RaceVariantsUniv
|
||||
ReachesL10n : ReachesL10n
|
||||
RogueSpellsL10n : RogueSpellsL10n
|
||||
ReachesL10nOverride : ReachesL10n|undefined
|
||||
ReachesL10nDefault : ReachesL10n
|
||||
RogueSpellsL10nOverride : RogueSpellsL10n|undefined
|
||||
RogueSpellsL10nDefault : RogueSpellsL10n
|
||||
RogueSpellsUniv : RogueSpellsUniv
|
||||
SkillGroupsL10n : SkillGroupsL10n
|
||||
SkillsL10n : SkillsL10n
|
||||
SkillGroupsL10nOverride : SkillGroupsL10n|undefined
|
||||
SkillGroupsL10nDefault : SkillGroupsL10n
|
||||
SkillsL10nOverride : SkillsL10n|undefined
|
||||
SkillsL10nDefault : SkillsL10n
|
||||
SkillsUniv : SkillsUniv
|
||||
SocialStatusesL10n : SocialStatusesL10n
|
||||
SpecialAbilitiesL10n : SpecialAbilitiesL10n
|
||||
SocialStatusesL10nOverride : SocialStatusesL10n|undefined
|
||||
SocialStatusesL10nDefault : SocialStatusesL10n
|
||||
SpecialAbilitiesL10nOverride : SpecialAbilitiesL10n|undefined
|
||||
SpecialAbilitiesL10nDefault : SpecialAbilitiesL10n
|
||||
SpecialAbilitiesUniv : SpecialAbilitiesUniv
|
||||
SpecialAbilityGroupsL10n : SpecialAbilityGroupsL10n
|
||||
SpellEnhancementsL10n : SpellEnhancementsL10n
|
||||
SpecialAbilityGroupsL10nOverride : SpecialAbilityGroupsL10n|undefined
|
||||
SpecialAbilityGroupsL10nDefault : SpecialAbilityGroupsL10n
|
||||
SpellEnhancementsL10nOverride : SpellEnhancementsL10n|undefined
|
||||
SpellEnhancementsL10nDefault : SpellEnhancementsL10n
|
||||
SpellEnhancementsUniv : SpellEnhancementsUniv
|
||||
SpellGroupsL10n : SpellGroupsL10n
|
||||
SpellsL10n : SpellsL10n
|
||||
SpellGroupsL10nOverride : SpellGroupsL10n|undefined
|
||||
SpellGroupsL10nDefault : SpellGroupsL10n
|
||||
SpellsL10nOverride : SpellsL10n|undefined
|
||||
SpellsL10nDefault : SpellsL10n
|
||||
SpellsUniv : SpellsUniv
|
||||
StatesL10n : StatesL10n
|
||||
SubjectsL10n : SubjectsL10n
|
||||
TribesL10n : TribesL10n
|
||||
UIL10n : UIL10n
|
||||
ZibiljaRitualsL10n : ZibiljaRitualsL10n
|
||||
StatesL10nOverride : StatesL10n|undefined
|
||||
StatesL10nDefault : StatesL10n
|
||||
SubjectsL10nOverride : SubjectsL10n|undefined
|
||||
SubjectsL10nDefault : SubjectsL10n
|
||||
TribesL10nOverride : TribesL10n|undefined
|
||||
TribesL10nDefault : TribesL10n
|
||||
UIL10nOverride : UIL10n|undefined
|
||||
UIL10nDefault : UIL10n
|
||||
ZibiljaRitualsL10nOverride : ZibiljaRitualsL10n|undefined
|
||||
ZibiljaRitualsL10nDefault : ZibiljaRitualsL10n
|
||||
ZibiljaRitualsUniv : ZibiljaRitualsUniv
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,55 @@ export type ObjectWithKey<K extends string, A extends string | number> = {
|
||||
[B in K] : A
|
||||
}
|
||||
|
||||
/**
|
||||
* merges two arrays by the property name 'key'. If the element exists in main, it
|
||||
* will be used, if not the element from def will be used.
|
||||
*/
|
||||
export const mergeBy : <K extends string> (key : K)
|
||||
=> <A extends string | number, B extends ObjectWithKey<K, A>> (def : B[])
|
||||
=> (main : B[]|undefined)
|
||||
=> B[]
|
||||
= key => base => override => {
|
||||
type A1 = ArrayValue<typeof base> extends ObjectWithKey<string, infer A>
|
||||
? A
|
||||
: never
|
||||
const result : ArrayValue<typeof base>[] = []
|
||||
|
||||
// collect all possible keys
|
||||
const allkeys : (string | number)[] = []
|
||||
|
||||
for (const b of base) {
|
||||
allkeys.push (b[key])
|
||||
}
|
||||
|
||||
if (override !== undefined) {
|
||||
for (const b of base) {
|
||||
if (!allkeys.includes (b[key])) {
|
||||
allkeys.push (b[key])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// merge
|
||||
for (const k of allkeys) {
|
||||
const b = base.find (x => (x[key] as A1) === (k as A1))
|
||||
const o = override === undefined
|
||||
? undefined
|
||||
: override.find (x => (x[key] as A1) === (k as A1))
|
||||
|
||||
if (o === undefined) {
|
||||
if (b !== undefined) {
|
||||
result.push (b)
|
||||
}
|
||||
}
|
||||
else {
|
||||
result.push (o)
|
||||
}
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* `zipById key os rs` zips two arrays by the property named `key`. There must
|
||||
@@ -21,27 +70,52 @@ export type ObjectWithKey<K extends string, A extends string | number> = {
|
||||
*/
|
||||
export const zipBy : <K extends string> (key : K)
|
||||
=> <A extends string | number, B extends ObjectWithKey<K, A>> (os : B[])
|
||||
=> <C extends ObjectWithKey<K, A>> (rs : C[])
|
||||
=> <C extends ObjectWithKey<K, A>> (base : C[])
|
||||
=> (override : C[]|undefined)
|
||||
=> Either<Error[], [B, C][]>
|
||||
= key => os => rs => {
|
||||
= key => os => base => override => {
|
||||
type A1 = ArrayValue<typeof os> extends ObjectWithKey<string, infer A>
|
||||
? A
|
||||
: never
|
||||
|
||||
const ress : [ArrayValue<typeof os>, ArrayValue<typeof rs>][]
|
||||
? A
|
||||
: never
|
||||
const ress : [ArrayValue<typeof os>, ArrayValue<typeof override>][]
|
||||
= []
|
||||
|
||||
const errs : Error[]
|
||||
= []
|
||||
|
||||
for (const r of rs) {
|
||||
const o = os .find (x => (x[key] as A1) === (r[key] as A1))
|
||||
// collect all possible keys
|
||||
const allkeys : (string|number)[] = []
|
||||
for (const b of base) {
|
||||
allkeys.push (b[key])
|
||||
}
|
||||
if (override !== undefined) {
|
||||
for (const b of base) {
|
||||
if (!allkeys.includes (b[key])) {
|
||||
allkeys.push (b[key])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (o === undefined) {
|
||||
errs.push (new Error (`zipById: No matching entry found for "${JSON.stringify (r)}"`))
|
||||
// merge for all keys
|
||||
for (const k of allkeys) {
|
||||
const u = os .find (x => (x[key] as A1) === (k as A1))
|
||||
const b = base.find (x => (x[key] as A1) === (k as A1))
|
||||
const o = override === undefined
|
||||
? undefined
|
||||
: override.find (x => (x[key] as A1) === (k as A1))
|
||||
|
||||
if (u === undefined) {
|
||||
errs.push (new Error (`zipById: No matching entry found for "${JSON.stringify (k)}"`))
|
||||
}
|
||||
else if (o === undefined) {
|
||||
// no override found, fall back to base.
|
||||
if (b !== undefined) {
|
||||
ress.push ([ u, b ])
|
||||
}
|
||||
}
|
||||
else {
|
||||
ress.push ([ o, r ])
|
||||
// override found
|
||||
ress.push ([ u, o ])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -256,7 +256,7 @@ export const ActivatableAddListItem: React.FC<ActivatableAddListItemProps> = pro
|
||||
active={Maybe.elem (IAA.id (item)) (selectedForInfo)}
|
||||
>
|
||||
<ListItemLeft>
|
||||
<ListItemName name={IAA.name (item)} />
|
||||
<ListItemName name={IAA.name (item)} onClick={handleSelectForInfo} />
|
||||
{fromMaybe (null as React.ReactNode) (mlevelElementBefore)}
|
||||
{fromMaybe (null as React.ReactNode) (mselectElement)}
|
||||
{fromMaybe (null as React.ReactNode) (msecondSelectElement)}
|
||||
|
||||
@@ -149,6 +149,7 @@ const ActivatableRemoveListItem: React.FC<ActivatableRemoveListItemProps> = prop
|
||||
(AAA_.addName (item))
|
||||
: AAA_.name (item)
|
||||
}
|
||||
onClick={handleSelectForInfo}
|
||||
/>
|
||||
<ListItemSelections>
|
||||
{pipe_ (
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user