From 3916fc643f599639abe247339dc2f9f24b7e5d46 Mon Sep 17 00:00:00 2001 From: Patrick Wieth Date: Wed, 8 Nov 2023 12:27:36 +0100 Subject: [PATCH 1/2] fixes empty abilities --- src/views/CardCreatorPage.vue | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/views/CardCreatorPage.vue b/src/views/CardCreatorPage.vue index 0e41c99e..9509dea3 100644 --- a/src/views/CardCreatorPage.vue +++ b/src/views/CardCreatorPage.vue @@ -1185,6 +1185,21 @@ export default { } } + // if an ability was created, but it has no effect, then this should be fixed + if (newModel.Abilities.length > 0) { + let effectsList = R.flatten(R.map( + x => R.values(R.pluck("Effects", x)), + newModel.Abilities)) + + if (R.any(y => y === undefined, effectsList)) { + this.notifyFail( + "Useless Ability", + "Card has an Ability, which does not do anything. Please add an Effect to the Ability." + ); + return; + } + } + // check if the old Keywords and RulesTexts should be restored let checkZeroAmount = () => { return (this.model.AdditionalCost.SacrificeCost && this.model.AdditionalCost.SacrificeCost.Amount == 0) || @@ -1211,6 +1226,7 @@ export default { newModel.image = this.model.image newModel.balanceAnchor = this.model.balanceAnchor + // many characters will not make it into the blockchain, so here we check if all is valid ASCII let checkASCII = (string, origin) => { string.split('').forEach(char => { if (!isASCII(char)) { From 518da0c1022bb9ebf9a307cc272385fd6a2208d2 Mon Sep 17 00:00:00 2001 From: lxgr-linux <64218491+lxgr-linux@users.noreply.github.com> Date: Wed, 29 Nov 2023 12:24:06 +0100 Subject: [PATCH 2/2] Added lxgr deployment action --- .github/workflows/main.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..40f47e9f --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,31 @@ +on: + pull_request: + types: [opened, labeled, unlabeled, synchronize] + workflow_dispatch: +env: + # Setting an environment variable with the value of a configuration variable + tag_name: ${{ + contains(github.event.pull_request.labels.*.name, 'deploy_5173') && 'deploy_5173' || + (contains(github.event.pull_request.labels.*.name, 'deploy_5174') && 'deploy_5175' || "") + }} + + +jobs: + run_pull: + if: ${{ env.tag_name != "" }} + name: run pull + runs-on: ubuntu-latest + + steps: + - name: install ssh keys + # check this thread to understand why its needed: + # https://stackoverflow.com/a/70447517 + run: | + echo env.tag_name + install -m 600 -D /dev/null ~/.ssh/id_rsa + echo "${{ secrets.LXGR_DEPLOY_PRIV }}" > ~/.ssh/id_rsa + ssh-keyscan -H ${{ secrets.LXGR_HOST }} > ~/.ssh/known_hosts + - name: connect and pull + run: ssh ${{ secrets.LXGR_USER }}@${{ secrets.LXGR_HOST }} "cd ~/$tag_name && git fetch && git checkout ${{ github.event.pull_request.base.ref }} && git pull && npm i && exit" + - name: cleanup + run: rm -rf ~/.ssh