From 534fcb04fb2a86ca490d4b9b789f4d84c460ba48 Mon Sep 17 00:00:00 2001 From: LeRatierBretonnien Date: Wed, 7 Aug 2024 17:27:08 +0200 Subject: [PATCH] Manage game systems --- less/skillcat-sheet/skillcat-sheet.less | 3 +++ module/config.js | 6 +++++ module/rfrp-utility.js | 23 +++++++++++++++++- module/sheets/actors/rmss_player_sheet.js | 2 +- module/sheets/skills/rmss_skill_sheet.js | 2 +- .../{000062.log => 000070.log} | 0 packs/skill_categories/CURRENT | 2 +- packs/skill_categories/LOG | 16 ++++++------ packs/skill_categories/LOG.old | 16 ++++++------ packs/skill_categories/MANIFEST-000060 | Bin 135 -> 0 bytes packs/skill_categories/MANIFEST-000068 | Bin 0 -> 135 bytes rmss.css | 3 +++ system.json | 4 +-- template.json | 1 + .../skills/rmss-skill-category-sheet.html | 17 +++++++++---- 15 files changed, 68 insertions(+), 27 deletions(-) rename packs/skill_categories/{000062.log => 000070.log} (100%) delete mode 100644 packs/skill_categories/MANIFEST-000060 create mode 100644 packs/skill_categories/MANIFEST-000068 diff --git a/less/skillcat-sheet/skillcat-sheet.less b/less/skillcat-sheet/skillcat-sheet.less index 342fdff..4e76023 100644 --- a/less/skillcat-sheet/skillcat-sheet.less +++ b/less/skillcat-sheet/skillcat-sheet.less @@ -27,4 +27,7 @@ font-family: Signika, sans-serif; font-size: 12px; text-align: center; +} +.select-fixed-width { + width: 100px; } \ No newline at end of file diff --git a/module/config.js b/module/config.js index 6a790ce..1feac9c 100644 --- a/module/config.js +++ b/module/config.js @@ -21,6 +21,12 @@ rmss.difficulties = { absurd: {key: "absurd", label:"Absurd (-70)", value: -70}, }; +rmss.gameSystems = [ + {key: "common", label:"Common"}, + {key: "merp", label:"Middle Earth Role Playing (MERP)"}, + {key: "rmfrp", label:"Rolemaster Fantasy Role Playing (RMFRP)"}, +]; + rmss.combatSituations = [ {key: "none", label:"None (0)", modifier: 0}, {key: "melee", label:"Melee environment (-20)", modifier: -20}, diff --git a/module/rfrp-utility.js b/module/rfrp-utility.js index d7cfa34..3b5c56a 100644 --- a/module/rfrp-utility.js +++ b/module/rfrp-utility.js @@ -8,8 +8,12 @@ export class RFRPUtility { /* -------------------------------------------- */ static async ready() { + this.registerSettings(); + + this.gameSystem = game.settings.get("fvtt-rolemaster-frp", "game_system"); + const skillCategories = await RFRPUtility.loadCompendium("fvtt-rolemaster-frp.skill_categories") - this.skillCategories = skillCategories.map(i => i.toObject()) + this.skillCategories = skillCategories.map(i => i.toObject()).filter( i => i.system.game_system == "common" || i.system.game_system == this.gameSystem); } /* -------------------------------------------- */ @@ -17,6 +21,23 @@ export class RFRPUtility { return this.skillCategories } + /* -------------------------------------------- */ + static registerSettings() { + game.settings.register("fvtt-rolemaster-frp", "game_system", { + name: "Game System", + hint: "List of Game Systems", + scope: "world", + default: "rmfrp", + requiresReload: true, + type: String, + config: true, + choices: { + rmfrp: "Rolemaster Fantasy Role Playing (RMFRP)", + merp: "Middle Earth Role Playing (MERP)" + } + }); + + } /* -------------------------------------------- */ static async loadCompendiumData(compendium) { const pack = game.packs.get(compendium); diff --git a/module/sheets/actors/rmss_player_sheet.js b/module/sheets/actors/rmss_player_sheet.js index 2ddd700..09a3ad9 100644 --- a/module/sheets/actors/rmss_player_sheet.js +++ b/module/sheets/actors/rmss_player_sheet.js @@ -208,7 +208,7 @@ export default class RMSSPlayerSheet extends ActorSheet { context.spells = spells; // Dump context to console - console.log(context); + console.log("ACTOR CONTEXT", context); } diff --git a/module/sheets/skills/rmss_skill_sheet.js b/module/sheets/skills/rmss_skill_sheet.js index 8ceb8b3..19be1b8 100644 --- a/module/sheets/skills/rmss_skill_sheet.js +++ b/module/sheets/skills/rmss_skill_sheet.js @@ -76,7 +76,7 @@ export default class RMSSSkillSheet extends ItemSheet { if (this.item.isEmbedded) { skillCategories = this.item.parent.items.filter(it => it.type == "skill_category"); } - console.log("CATEG", skillCategories); + //console.log("CATEG", skillCategories); return (skillCategories); } diff --git a/packs/skill_categories/000062.log b/packs/skill_categories/000070.log similarity index 100% rename from packs/skill_categories/000062.log rename to packs/skill_categories/000070.log diff --git a/packs/skill_categories/CURRENT b/packs/skill_categories/CURRENT index 0556986..284d53f 100644 --- a/packs/skill_categories/CURRENT +++ b/packs/skill_categories/CURRENT @@ -1 +1 @@ -MANIFEST-000060 +MANIFEST-000068 diff --git a/packs/skill_categories/LOG b/packs/skill_categories/LOG index 848126a..6b88349 100644 --- a/packs/skill_categories/LOG +++ b/packs/skill_categories/LOG @@ -1,8 +1,8 @@ -2024/08/03-16:17:28.988843 7f2b120006c0 Recovering log #58 -2024/08/03-16:17:29.000009 7f2b120006c0 Delete type=3 #56 -2024/08/03-16:17:29.000149 7f2b120006c0 Delete type=0 #58 -2024/08/03-16:40:12.660059 7f2b110006c0 Level-0 table #63: started -2024/08/03-16:40:12.660133 7f2b110006c0 Level-0 table #63: 0 bytes OK -2024/08/03-16:40:12.666773 7f2b110006c0 Delete type=0 #61 -2024/08/03-16:40:12.677428 7f2b110006c0 Manual compaction at level-0 from '!items!1HevhbCbvMonyQXe' @ 72057594037927935 : 1 .. '!items!yRIFroc5VC9Oj3qY' @ 0 : 0; will stop at (end) -2024/08/03-16:40:12.689036 7f2b110006c0 Manual compaction at level-1 from '!items!1HevhbCbvMonyQXe' @ 72057594037927935 : 1 .. '!items!yRIFroc5VC9Oj3qY' @ 0 : 0; will stop at (end) +2024/08/07-17:16:18.797577 7f33982006c0 Recovering log #66 +2024/08/07-17:16:18.808374 7f33982006c0 Delete type=3 #64 +2024/08/07-17:16:18.808471 7f33982006c0 Delete type=0 #66 +2024/08/07-17:26:53.698667 7f33978006c0 Level-0 table #71: started +2024/08/07-17:26:53.698733 7f33978006c0 Level-0 table #71: 0 bytes OK +2024/08/07-17:26:53.705983 7f33978006c0 Delete type=0 #69 +2024/08/07-17:26:53.706219 7f33978006c0 Manual compaction at level-0 from '!items!1HevhbCbvMonyQXe' @ 72057594037927935 : 1 .. '!items!yRIFroc5VC9Oj3qY' @ 0 : 0; will stop at (end) +2024/08/07-17:26:53.706260 7f33978006c0 Manual compaction at level-1 from '!items!1HevhbCbvMonyQXe' @ 72057594037927935 : 1 .. '!items!yRIFroc5VC9Oj3qY' @ 0 : 0; will stop at (end) diff --git a/packs/skill_categories/LOG.old b/packs/skill_categories/LOG.old index 6fbc724..da765ad 100644 --- a/packs/skill_categories/LOG.old +++ b/packs/skill_categories/LOG.old @@ -1,8 +1,8 @@ -2024/08/02-16:48:51.596152 7f2b120006c0 Recovering log #54 -2024/08/02-16:48:51.607028 7f2b120006c0 Delete type=3 #52 -2024/08/02-16:48:51.607119 7f2b120006c0 Delete type=0 #54 -2024/08/02-17:06:25.130824 7f2b110006c0 Level-0 table #59: started -2024/08/02-17:06:25.130880 7f2b110006c0 Level-0 table #59: 0 bytes OK -2024/08/02-17:06:25.137382 7f2b110006c0 Delete type=0 #57 -2024/08/02-17:06:25.160338 7f2b110006c0 Manual compaction at level-0 from '!items!1HevhbCbvMonyQXe' @ 72057594037927935 : 1 .. '!items!yRIFroc5VC9Oj3qY' @ 0 : 0; will stop at (end) -2024/08/02-17:06:25.160385 7f2b110006c0 Manual compaction at level-1 from '!items!1HevhbCbvMonyQXe' @ 72057594037927935 : 1 .. '!items!yRIFroc5VC9Oj3qY' @ 0 : 0; will stop at (end) +2024/08/07-16:51:16.599301 7f33996006c0 Recovering log #62 +2024/08/07-16:51:16.610580 7f33996006c0 Delete type=3 #60 +2024/08/07-16:51:16.610673 7f33996006c0 Delete type=0 #62 +2024/08/07-17:16:03.322418 7f33978006c0 Level-0 table #67: started +2024/08/07-17:16:03.322491 7f33978006c0 Level-0 table #67: 0 bytes OK +2024/08/07-17:16:03.329046 7f33978006c0 Delete type=0 #65 +2024/08/07-17:16:03.356030 7f33978006c0 Manual compaction at level-0 from '!items!1HevhbCbvMonyQXe' @ 72057594037927935 : 1 .. '!items!yRIFroc5VC9Oj3qY' @ 0 : 0; will stop at (end) +2024/08/07-17:16:03.395552 7f33978006c0 Manual compaction at level-1 from '!items!1HevhbCbvMonyQXe' @ 72057594037927935 : 1 .. '!items!yRIFroc5VC9Oj3qY' @ 0 : 0; will stop at (end) diff --git a/packs/skill_categories/MANIFEST-000060 b/packs/skill_categories/MANIFEST-000060 deleted file mode 100644 index 9172303106b150c8b08787319da0d6557589afff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 135 zcmdn)y)HJ1fss)vC$%g!CnZVGsj?)sJhM2}IX|}`u_&=5zlfcQb^BgMdBx0<)ZAi4 zLyy$5j3nozGT;2X%D{+JMl%L5fXP<|dAb$lC!2;jTl!}i7e+FgLgcGFS`9cD7@2H2 V8JO)@vfS;Y=YY6&K&}Hz762#eBkceH diff --git a/packs/skill_categories/MANIFEST-000068 b/packs/skill_categories/MANIFEST-000068 new file mode 100644 index 0000000000000000000000000000000000000000..db0564a11c54e66a5462f54ebfc101b67e0082c7 GIT binary patch literal 135 zcmdn)y)HJ1fss)vC$%g!CnZVGsj?)sJhM2}IX|}`u_&=5zlfcQb^BgMdBx0<)ZAi4 zLyy$5j3nozGT;2X%D{+JMl%L5fXP<|dAb$lC!2;jTl!}i7e+FgLgcxpJ)6zJz{upv W$-wN!l6B$pPZbc?4aoIi$pQdU#wJ_< literal 0 HcmV?d00001 diff --git a/rmss.css b/rmss.css index ac7b6ac..40eafdc 100644 --- a/rmss.css +++ b/rmss.css @@ -494,6 +494,9 @@ font-size: 12px; text-align: center; } +.select-fixed-width { + width: 100px; +} .applicable-stats-grid-container { display: grid; grid-template-columns: [app-stat-1] 33% [app-stat-2] 33% [app-stat-3] 33%; diff --git a/system.json b/system.json index ec93038..472ed56 100644 --- a/system.json +++ b/system.json @@ -3,7 +3,7 @@ "title": "Rolemaster FRP System", "description": "The Rolemaster FRP system for FoundryVTT.", "manifest": "https://www.uberwald.me/gitea/public/fvtt-rolemaster-frp/raw/branch/develop/system.json", - "download": "https://www.uberwald.me/gitea/public/fvtt-rolemaster-frp/archive/v12.0.7.zip", + "download": "https://www.uberwald.me/gitea/public/fvtt-rolemaster-frp/archive/v12.0.8.zip", "authors": [ { "name": "Cynicide", @@ -14,7 +14,7 @@ "email": "" } ], - "version": "12.0.7", + "version": "12.0.8", "compatibility": { "minimum": "12", "verified": "12" diff --git a/template.json b/template.json index 9f3b13b..8b305c5 100644 --- a/template.json +++ b/template.json @@ -332,6 +332,7 @@ "skill_category": { "templates": ["base"], "applicable_stats": "None", + "game_system": "common", "app_stat_1": "None", "app_stat_2": "None", "app_stat_3": "None", diff --git a/templates/sheets/skills/rmss-skill-category-sheet.html b/templates/sheets/skills/rmss-skill-category-sheet.html index d3a6fd1..331b658 100644 --- a/templates/sheets/skills/rmss-skill-category-sheet.html +++ b/templates/sheets/skills/rmss-skill-category-sheet.html @@ -4,12 +4,19 @@

-
Rank Bonus Progression - +
+
Rank Bonus Progression + +
+
Game system + +
-
+
Applicable Stat 1