From c24e2b7af2d5b5cb21fd7c78e514153fb5ba9865 Mon Sep 17 00:00:00 2001 From: Byroks Date: Mon, 8 Jan 2024 12:28:41 +0100 Subject: [PATCH 01/12] Update .gitea/workflows/add-issue-to-project.yaml --- .gitea/workflows/add-issue-to-project.yaml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/add-issue-to-project.yaml b/.gitea/workflows/add-issue-to-project.yaml index 98e3139..dd67485 100644 --- a/.gitea/workflows/add-issue-to-project.yaml +++ b/.gitea/workflows/add-issue-to-project.yaml @@ -1,13 +1,15 @@ -name: Adds all issues to project board +name: Move new issues into To Do + +on: + issues: + types: [opened] jobs: - add-to-project: - name: Add issue to project + automate-project-columns: runs-on: ubuntu-latest steps: - - uses: actions/add-to-project@v0.5.0 + - uses: alex-page/github-project-automation-plus@v0.8.3 with: - project-url: https://git.byroks.de/MidgardVTT-Entwicklung/-/projects/3 - github-token: ${{ secrets.GH_TOKEN }} - labeled: bug, enhancement - label-operator: OR \ No newline at end of file + project: Midgard 5 Entwicklung + column: To Do + repo-token: ${{ secrets.GH_TOKEN }} \ No newline at end of file From 31a4ccfda1e4845a7c96858b696a5246668c6ebf Mon Sep 17 00:00:00 2001 From: Byroks Date: Mon, 8 Jan 2024 12:37:43 +0100 Subject: [PATCH 02/12] Update .gitea/workflows/add-issue-to-project.yaml --- .gitea/workflows/add-issue-to-project.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/add-issue-to-project.yaml b/.gitea/workflows/add-issue-to-project.yaml index dd67485..db1314e 100644 --- a/.gitea/workflows/add-issue-to-project.yaml +++ b/.gitea/workflows/add-issue-to-project.yaml @@ -12,4 +12,4 @@ jobs: with: project: Midgard 5 Entwicklung column: To Do - repo-token: ${{ secrets.GH_TOKEN }} \ No newline at end of file + repo-token: ${{ secrets.RUNNER_ACCESS_TOKEN }} \ No newline at end of file From f8b65c030fc70a03a6fca838a67f653dabde06c4 Mon Sep 17 00:00:00 2001 From: Byroks Date: Mon, 8 Jan 2024 12:39:39 +0100 Subject: [PATCH 03/12] Update .gitea/workflows/add-issue-to-project.yaml --- .gitea/workflows/add-issue-to-project.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/add-issue-to-project.yaml b/.gitea/workflows/add-issue-to-project.yaml index db1314e..ab10277 100644 --- a/.gitea/workflows/add-issue-to-project.yaml +++ b/.gitea/workflows/add-issue-to-project.yaml @@ -10,6 +10,6 @@ jobs: steps: - uses: alex-page/github-project-automation-plus@v0.8.3 with: - project: Midgard 5 Entwicklung + project: Backlog column: To Do repo-token: ${{ secrets.RUNNER_ACCESS_TOKEN }} \ No newline at end of file From ff74871a0cccb77896fb284aa2051a3d3d693079 Mon Sep 17 00:00:00 2001 From: Byroks Date: Mon, 8 Jan 2024 12:56:49 +0100 Subject: [PATCH 04/12] Update .gitea/workflows/add-issue-to-project.yaml --- .gitea/workflows/add-issue-to-project.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/add-issue-to-project.yaml b/.gitea/workflows/add-issue-to-project.yaml index ab10277..06f7a54 100644 --- a/.gitea/workflows/add-issue-to-project.yaml +++ b/.gitea/workflows/add-issue-to-project.yaml @@ -12,4 +12,4 @@ jobs: with: project: Backlog column: To Do - repo-token: ${{ secrets.RUNNER_ACCESS_TOKEN }} \ No newline at end of file + repo-token: ${{ secrets.GH_TOKEN }} \ No newline at end of file From 41fb1a88799e952c2aeefc8ea4ba99e0f5fb4ca1 Mon Sep 17 00:00:00 2001 From: Byroks Date: Mon, 8 Jan 2024 16:02:37 +0100 Subject: [PATCH 05/12] Update .gitea/workflows/add-issue-to-project.yaml --- .gitea/workflows/add-issue-to-project.yaml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/add-issue-to-project.yaml b/.gitea/workflows/add-issue-to-project.yaml index 06f7a54..c700d20 100644 --- a/.gitea/workflows/add-issue-to-project.yaml +++ b/.gitea/workflows/add-issue-to-project.yaml @@ -3,13 +3,12 @@ name: Move new issues into To Do on: issues: types: [opened] - jobs: - automate-project-columns: + createCard: runs-on: ubuntu-latest steps: - - uses: alex-page/github-project-automation-plus@v0.8.3 + - name: Create or Update Project Card + uses: peter-evans/create-or-update-project-card@v2 with: - project: Backlog - column: To Do - repo-token: ${{ secrets.GH_TOKEN }} \ No newline at end of file + project-name: Midgard 5 Entwicklung + column-name: To Do \ No newline at end of file From 2ac8a6bba4b40ad6807b190cf744064be665f4ff Mon Sep 17 00:00:00 2001 From: Byroks Date: Mon, 8 Jan 2024 16:09:13 +0100 Subject: [PATCH 06/12] Update .gitea/workflows/add-issue-to-project.yaml --- .gitea/workflows/add-issue-to-project.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/add-issue-to-project.yaml b/.gitea/workflows/add-issue-to-project.yaml index c700d20..53e65ff 100644 --- a/.gitea/workflows/add-issue-to-project.yaml +++ b/.gitea/workflows/add-issue-to-project.yaml @@ -11,4 +11,5 @@ jobs: uses: peter-evans/create-or-update-project-card@v2 with: project-name: Midgard 5 Entwicklung + project-location: ${{ gitea.repository }} column-name: To Do \ No newline at end of file From f38ef8aa6d9884b713ce0ba161486d14cf76b77b Mon Sep 17 00:00:00 2001 From: Byroks Date: Mon, 8 Jan 2024 16:16:04 +0100 Subject: [PATCH 07/12] Update .gitea/workflows/add-issue-to-project.yaml --- .gitea/workflows/add-issue-to-project.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/add-issue-to-project.yaml b/.gitea/workflows/add-issue-to-project.yaml index 53e65ff..25f9e35 100644 --- a/.gitea/workflows/add-issue-to-project.yaml +++ b/.gitea/workflows/add-issue-to-project.yaml @@ -10,6 +10,6 @@ jobs: - name: Create or Update Project Card uses: peter-evans/create-or-update-project-card@v2 with: - project-name: Midgard 5 Entwicklung + project-number: 3 project-location: ${{ gitea.repository }} column-name: To Do \ No newline at end of file From 2a36b8eaa1810851fa7101654ebd12e10bfb554d Mon Sep 17 00:00:00 2001 From: Byroks Date: Mon, 8 Jan 2024 20:38:50 +0100 Subject: [PATCH 08/12] Update .gitea/workflows/add-issue-to-project.yaml --- .gitea/workflows/add-issue-to-project.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/add-issue-to-project.yaml b/.gitea/workflows/add-issue-to-project.yaml index 25f9e35..33062c9 100644 --- a/.gitea/workflows/add-issue-to-project.yaml +++ b/.gitea/workflows/add-issue-to-project.yaml @@ -7,9 +7,9 @@ jobs: createCard: runs-on: ubuntu-latest steps: - - name: Create or Update Project Card - uses: peter-evans/create-or-update-project-card@v2 - with: - project-number: 3 - project-location: ${{ gitea.repository }} - column-name: To Do \ No newline at end of file + -name: Close Issue + run: > + curl -X PATCH -H "Content-Type: application/xml" + -H "Authorization: token ${{ secrets.GITEA_TOKEN }} + -d '{ "state": "To Do" }' + "${{ gitea.event.issue.url }}" \ No newline at end of file From 7358b67da2afff8a0e027096f262277dac03fccf Mon Sep 17 00:00:00 2001 From: Byroks Date: Mon, 8 Jan 2024 20:41:05 +0100 Subject: [PATCH 09/12] Update .gitea/workflows/add-issue-to-project.yaml --- .gitea/workflows/add-issue-to-project.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/add-issue-to-project.yaml b/.gitea/workflows/add-issue-to-project.yaml index 33062c9..f263eff 100644 --- a/.gitea/workflows/add-issue-to-project.yaml +++ b/.gitea/workflows/add-issue-to-project.yaml @@ -8,8 +8,8 @@ jobs: runs-on: ubuntu-latest steps: -name: Close Issue - run: > - curl -X PATCH -H "Content-Type: application/xml" - -H "Authorization: token ${{ secrets.GITEA_TOKEN }} - -d '{ "state": "To Do" }' - "${{ gitea.event.issue.url }}" \ No newline at end of file + run: > + curl -X PATCH -H "Content-Type: application/xml" + -H "Authorization: token ${{ secrets.GITEA_TOKEN }} + -d '{ "state": "closed" }' + "${{ gitea.event.issue.url }}" \ No newline at end of file From a606750b237637dce75b6d9743b4ee17f85ac960 Mon Sep 17 00:00:00 2001 From: Byroks Date: Mon, 8 Jan 2024 20:41:15 +0100 Subject: [PATCH 10/12] Update .gitea/workflows/add-issue-to-project.yaml --- .gitea/workflows/add-issue-to-project.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/add-issue-to-project.yaml b/.gitea/workflows/add-issue-to-project.yaml index f263eff..a8d9954 100644 --- a/.gitea/workflows/add-issue-to-project.yaml +++ b/.gitea/workflows/add-issue-to-project.yaml @@ -8,8 +8,8 @@ jobs: runs-on: ubuntu-latest steps: -name: Close Issue - run: > - curl -X PATCH -H "Content-Type: application/xml" - -H "Authorization: token ${{ secrets.GITEA_TOKEN }} - -d '{ "state": "closed" }' - "${{ gitea.event.issue.url }}" \ No newline at end of file + run: > + curl -X PATCH -H "Content-Type: application/xml" + -H "Authorization: token ${{ secrets.GITEA_TOKEN }} + -d '{ "state": "closed" }' + "${{ gitea.event.issue.url }}" \ No newline at end of file From 7368673ba3e22b864c62cbfb5eaa4639fc68d2f5 Mon Sep 17 00:00:00 2001 From: Byroks Date: Mon, 8 Jan 2024 20:42:22 +0100 Subject: [PATCH 11/12] Update .gitea/workflows/add-issue-to-project.yaml --- .gitea/workflows/add-issue-to-project.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/add-issue-to-project.yaml b/.gitea/workflows/add-issue-to-project.yaml index a8d9954..e8af0bb 100644 --- a/.gitea/workflows/add-issue-to-project.yaml +++ b/.gitea/workflows/add-issue-to-project.yaml @@ -7,9 +7,9 @@ jobs: createCard: runs-on: ubuntu-latest steps: - -name: Close Issue + - name: Close Issue run: > curl -X PATCH -H "Content-Type: application/xml" -H "Authorization: token ${{ secrets.GITEA_TOKEN }} - -d '{ "state": "closed" }' + -d '{ "state": "To Do" }' "${{ gitea.event.issue.url }}" \ No newline at end of file From b5b75aa2c63e47d4dc9feb23ccaafbf089ee14a1 Mon Sep 17 00:00:00 2001 From: Byroks Date: Mon, 15 Jan 2024 14:15:30 +0100 Subject: [PATCH 12/12] #18 Remove ContainerId from containers (#29) Changes + remove containerId variable from containers as it's not needed Reviewed-on: https://git.byroks.de/MidgardVTT-Entwicklung/foundry-vtt-system-midgard5/pulls/29 Reviewed-by: oskaloq --- source/module/actors/M5Character.ts | 43 ++++++++++++++--------------- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/source/module/actors/M5Character.ts b/source/module/actors/M5Character.ts index be1be10..3a23ab5 100644 --- a/source/module/actors/M5Character.ts +++ b/source/module/actors/M5Character.ts @@ -145,11 +145,10 @@ export class M5Character extends Actor { ret.stats.perceptionFW = 6; ret.stats.drinking = this.modResult(0); ret.stats.drinkingFW = Math.floor(ret.attributes.ko.value / 10); - ret.stats.hoardMin = M5Character.levelThreshold.at (ret.level - 1)/2; - ret.stats.hoardNext = M5Character.levelThreshold.at (ret.level)/2; - ret.stats.wealth = data.info.gold + data.info.silver/10 + data.info.copper/100; + ret.stats.hoardMin = M5Character.levelThreshold.at(ret.level - 1) / 2; + ret.stats.hoardNext = M5Character.levelThreshold.at(ret.level) / 2; + ret.stats.wealth = data.info.gold + data.info.silver / 10 + data.info.copper / 100; ret.stats.hoard = 0; - if (!skip?.mods) { const aggregate = new M5ModAggregate(data, ret); @@ -177,14 +176,14 @@ export class M5Character extends Actor { let label = item.name; if (item.system.magic) { label += "*"; - }; - if (item.system.valuable) { + } + if (item.system.valuable) { ret.stats.wealth += item.system.value || 0; - }; + } if (item.system.hoarded) { ret.stats.hoard += item.system.value || 0; } - + let icon = item.img; let rollable = false; @@ -195,7 +194,7 @@ export class M5Character extends Actor { break; } } - + ret.gear.items[item.id] = { label: label, icon: icon, @@ -243,13 +242,11 @@ export class M5Character extends Actor { calc: item.system.calc, equipped: item.system?.equipped, weight: item.system.weight || 0, - containerId: item.system.containerId || "", value: item.system.value || 0, currency: item.system.currency || "", quantity: item.system.quantity || 0, rollExist: rollable, }; - }); } @@ -262,8 +259,8 @@ export class M5Character extends Actor { let label = item.name; if (item.system.magic) { label += "*"; - }; - + } + ret.gear.effects[item.id] = { label: label, magic: item.system.magic, @@ -306,21 +303,21 @@ export class M5Character extends Actor { (item.system.stats.damageBonus < 0 ? "" : "+") + item.system.stats.damageBonus + ")"; - }; + } if (item.system.valuable) { ret.stats.wealth += item.system.value || 0; - }; + } if (item.system.hoarded) { ret.stats.hoard += item.system.value || 0; } - + ret.gear.weapons[item.id] = { label: label, skillId: item.system.skillId, magic: item.system.magic, valuable: item.system?.valuable, hoarded: item.system?.hoarded, - value: item.system.value || 0, + value: item.system.value || 0, calc: item.system.calc, }; }); @@ -335,14 +332,14 @@ export class M5Character extends Actor { let label = item.name; if (item.system.magic) { label += "*(" + (item.system.stats.defenseBonus < 0 ? "" : "+") + item.system.stats.defenseBonus + ")"; - }; + } if (item.system.valuable) { ret.stats.wealth += item.system.value || 0; - }; + } if (item.system.hoarded) { ret.stats.hoard += item.system.value || 0; } - + ret.gear.defensiveWeapons[item.id] = { label: label, skillId: item.system.skillId, @@ -364,14 +361,14 @@ export class M5Character extends Actor { let label = item.name; if (item.system.magic) { label += "*"; - }; + } if (item.system.valuable) { ret.stats.wealth += item.system.value || 0; - }; + } if (item.system.hoarded) { ret.stats.hoard += item.system.value || 0; } - + ret.gear.armor[item.id] = { label: label, magic: item.system.magic,