diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7784dee..6813857 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,7 @@ Date format : day/month/year
## 1.9.0 - ??/??/2022 - Foundry v10 Compatibility
- Updated the System to FoundryVTT v10.
+- Removed restriction on technique types on drop (Sheet and 20Q).
- Added a `game.user.isFirstGM` property for some traitements (socket and migration) to prevent multiple executions with multiple GM connected.
## 1.8.2 - 24/06/2022 - Unofficial Italian translation
diff --git a/README.md b/README.md
index 707caeb..e536a84 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
# Legend of the Five Rings (5th Edition) authorized by [Edge Studio](https://edge-studio.net/)

-[](https://ko-fi.com/vlyan)
+[](https://ko-fi.com/vlyan)
[](https://forge-vtt.com/bazaar#package=l5r5e)
[](https://www.foundryvtt-hub.com/package/l5r5e/)
[](https://www.foundryvtt-hub.com/package/l5r5e/)
diff --git a/system/scripts/actors/base-character-sheet.js b/system/scripts/actors/base-character-sheet.js
index 094a423..af8fe17 100644
--- a/system/scripts/actors/base-character-sheet.js
+++ b/system/scripts/actors/base-character-sheet.js
@@ -248,10 +248,10 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
itemData.system.in_curriculum = true;
} else {
// Check if technique is allowed for this character
- if (!game.user.isGM && !this.actor.system.techniques[itemData.system.technique_type]) {
- ui.notifications.info(game.i18n.localize("l5r5e.techniques.not_allowed"));
- return;
- }
+ // if (!game.user.isGM && !this.actor.system.techniques[itemData.system.technique_type]) {
+ // ui.notifications.info(game.i18n.localize("l5r5e.techniques.not_allowed"));
+ // return;
+ // }
// Verify cost
itemData.system.xp_cost =
diff --git a/system/scripts/actors/twenty-questions-dialog.js b/system/scripts/actors/twenty-questions-dialog.js
index 2ff4e5e..ed2c845 100644
--- a/system/scripts/actors/twenty-questions-dialog.js
+++ b/system/scripts/actors/twenty-questions-dialog.js
@@ -290,10 +290,10 @@ export class TwentyQuestionsDialog extends FormApplication {
);
return;
}
- } else if (!this.object.data.step3.allowed_techniques?.[item.system.technique_type]) {
- // Tech not allowed
- ui.notifications.info(game.i18n.localize("l5r5e.techniques.not_allowed"));
- return;
+ // } else if (!this.object.data.step3.allowed_techniques?.[item.system.technique_type]) {
+ // // Tech not allowed
+ // ui.notifications.info(game.i18n.localize("l5r5e.techniques.not_allowed"));
+ // return;
}
break;
diff --git a/system/scripts/gm/gm-monitor.js b/system/scripts/gm/gm-monitor.js
index 02ae4a2..02b57c2 100644
--- a/system/scripts/gm/gm-monitor.js
+++ b/system/scripts/gm/gm-monitor.js
@@ -389,9 +389,9 @@ export class GmMonitor extends FormApplication {
const display = (e) => {
return (
e.name +
- ` ( ${e.data.data.range}` +
- ` / ${e.data.data.damage}` +
- ` / ${e.data.data.deadliness})`
+ ` ( ${e.system.range}` +
+ ` / ${e.system.damage}` +
+ ` / ${e.system.deadliness})`
);
};
diff --git a/system/scripts/handlebars.js b/system/scripts/handlebars.js
index c452496..50643e3 100644
--- a/system/scripts/handlebars.js
+++ b/system/scripts/handlebars.js
@@ -64,12 +64,6 @@ export const RegisterHandlebars = function () {
return objects.join("");
});
- // enrichHTML
- Handlebars.registerHelper("enrichHTML", function (text, options = {}) {
- options.async = false;
- return TextEditor.enrichHTML(text, options);
- });
-
// Add a setter
Handlebars.registerHelper("setVar", function (varName, varValue, options) {
options.data.root[varName] = varValue;
@@ -77,8 +71,8 @@ export const RegisterHandlebars = function () {
/**
* Utility conditional, usable in nested expression
- * {{#ifCond (ifCond advancement.type '==' 'technique') '||' (ifCond item.data.technique_type '==' 'kata')}}
- * {{#ifCond '["distinction","passion"]' 'includes' item.data.peculiarity_type}}
+ * {{#ifCond (ifCond advancement.type '==' 'technique') '||' (ifCond item.system.technique_type '==' 'kata')}}
+ * {{#ifCond '["distinction","passion"]' 'includes' item.system.peculiarity_type}}
*/
Handlebars.registerHelper("ifCond", function (a, operator, b, options) {
let result = false;
diff --git a/system/scripts/items/item-sheet.js b/system/scripts/items/item-sheet.js
index 75d4ca9..7d2a81f 100644
--- a/system/scripts/items/item-sheet.js
+++ b/system/scripts/items/item-sheet.js
@@ -114,7 +114,7 @@ export class ItemSheetL5r5e extends BaseItemSheetL5r5e {
}
// If we are a property, the child id need to be different to parent
- if (this.item.type === "property" && this.item.id === item.data._id) {
+ if (this.item.type === "property" && this.item.id === item._id) {
return;
}
diff --git a/system/scripts/migration.js b/system/scripts/migration.js
index 722c688..afdbc3c 100644
--- a/system/scripts/migration.js
+++ b/system/scripts/migration.js
@@ -34,7 +34,7 @@ export class MigrationL5r5e {
// Warn the users
ui.notifications.info(
- `Applying L5R5e System Migration for version ${game.system.data.version}.` +
+ `Applying L5R5e System Migration for version ${game.system.version}.` +
` Please be patient and do not close your game or shut down your server.`,
{ permanent: true }
);
@@ -56,7 +56,7 @@ export class MigrationL5r5e {
// Migrate World Items
for (let item of game.items.contents) {
try {
- const updateData = MigrationL5r5e._migrateItemData(item.data, options);
+ const updateData = MigrationL5r5e._migrateItemData(item, options);
if (!foundry.utils.isEmpty(updateData)) {
console.log(`L5R5E | Migrating Item entity ${item.name}`);
await item.update(updateData);
@@ -70,7 +70,7 @@ export class MigrationL5r5e {
// Migrate Actor Override Tokens
for (let scene of game.scenes.contents) {
try {
- const updateData = MigrationL5r5e._migrateSceneData(scene.data, options);
+ const updateData = MigrationL5r5e._migrateSceneData(scene, options);
if (!foundry.utils.isEmpty(updateData)) {
console.log(`L5R5E | Migrating Scene entity ${scene.name}`);
await scene.update(updateData);
@@ -96,9 +96,9 @@ export class MigrationL5r5e {
try {
const updatedChatList = [];
for (let message of game.collections.get("ChatMessage")) {
- const updateData = MigrationL5r5e._migrateChatMessage(message.data, options);
+ const updateData = MigrationL5r5e._migrateChatMessage(message, options);
if (!foundry.utils.isEmpty(updateData)) {
- updateData["_id"] = message.data._id;
+ updateData["_id"] = message._id;
updatedChatList.push(updateData);
}
}
@@ -113,8 +113,8 @@ export class MigrationL5r5e {
}
// Set the migration as complete
- await game.settings.set("l5r5e", "systemMigrationVersion", game.system.data.version);
- ui.notifications.info(`L5R5e System Migration to version ${game.system.data.version} completed!`, {
+ await game.settings.set("l5r5e", "systemMigrationVersion", game.system.version);
+ ui.notifications.info(`L5R5e System Migration to version ${game.system.version} completed!`, {
permanent: true,
});
}
@@ -147,13 +147,13 @@ export class MigrationL5r5e {
switch (entity) {
case "Actor":
- updateData = MigrationL5r5e._migrateActorData(ent.data);
+ updateData = MigrationL5r5e._migrateActorData(ent);
break;
case "Item":
- updateData = MigrationL5r5e._migrateItemData(ent.data);
+ updateData = MigrationL5r5e._migrateItemData(ent);
break;
case "Scene":
- updateData = MigrationL5r5e._migrateSceneData(ent.data);
+ updateData = MigrationL5r5e._migrateSceneData(ent);
break;
}
if (foundry.utils.isEmpty(updateData)) {
@@ -161,7 +161,7 @@ export class MigrationL5r5e {
}
// Add the entry, if data was changed
- updateData["_id"] = ent.data._id;
+ updateData["_id"] = ent._id;
updateDatasList.push(updateData);
console.log(`L5R5E | Migrating ${entity} entity ${ent.name} in Compendium ${pack.collection}`);
@@ -291,7 +291,7 @@ export class MigrationL5r5e {
*/
static cleanActorData(actorData) {
const model = game.system.model.Actor[actorData.type];
- actorData.data = foundry.utils.filterObject(actorData.data, model);
+ actorData = foundry.utils.filterObject(actorData, model);
return actorData;
}
diff --git a/system/system.json b/system/system.json
index 6af8e48..60b9186 100644
--- a/system/system.json
+++ b/system/system.json
@@ -11,7 +11,7 @@
"version": "1.9.0",
"compatibility": {
"minimum": 10,
- "verified": "10.273"
+ "verified": "10.275"
},
"manifestPlusVersion": "1.2.0",
"socket": true,
diff --git a/system/templates/items/item/item-sheet.html b/system/templates/items/item/item-sheet.html
index ee64496..9403fd9 100644
--- a/system/templates/items/item/item-sheet.html
+++ b/system/templates/items/item/item-sheet.html
@@ -8,7 +8,7 @@
{{!-- properties Tab --}}
{{> 'systems/l5r5e/templates/items/item/item-value.html' }}
diff --git a/tags-bymecoffee.svg b/tags-bymecoffee.svg
new file mode 100644
index 0000000..7545da7
--- /dev/null
+++ b/tags-bymecoffee.svg
@@ -0,0 +1 @@
+
\ No newline at end of file