- 20Q template sync on the actor for old ronin
- Added ability to drop a (Curriculum) Journal to have a button in school experience tab.
This commit is contained in:
@@ -1,12 +1,13 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## 1.3.2 - Ronin Bubble Everywhere
|
## 1.3.2 - Ronin's Bubble
|
||||||
- Replaced moving description in items by a big popup on hover.
|
- Replaced moving description in items by a big popup on hover.
|
||||||
- Added PoW Revised 20Q
|
- Added PoW Revised 20Q (for old Ronin, just modify the template in 20Q to change the character sheet fields).
|
||||||
- Added Bushido tenets on Social tab in sheet for all (I think this is useful for players, and it's in Core rulebook so... why this is not by default ;) ).
|
- Added Bushido tenets on Social tab in sheet for all (I think this is useful for players, and it's in Core rulebook so... why this is not by default ;) ).
|
||||||
- Added English/French Journal Compendiums for Conditions and Terrain Qualities (thanks to TesserWract).
|
- Added English/French Journal Compendiums for Conditions and Terrain Qualities (thanks to TesserWract).
|
||||||
- Added FoV Terrain Compendium.
|
- Added FoV Terrain Compendium.
|
||||||
- Added PoW Name Tables compendium : Qamarist Names, Ivory Kingdoms Names, Rokugani Names and Ujik Names.
|
- Added PoW Name Tables compendium : Qamarist Names, Ivory Kingdoms Names, Rokugani Names and Ujik Names.
|
||||||
|
- Added ability to drop a (Curriculum) Journal to have a button in school experience tab.
|
||||||
- Fixed school compendium: "Kuni Warden School" from "Scorpion" to "Crab".
|
- Fixed school compendium: "Kuni Warden School" from "Scorpion" to "Crab".
|
||||||
- Fixed roll for RollTable not showing the text.
|
- Fixed roll for RollTable not showing the text.
|
||||||
- Fixed some Pdf Copy-Paste error in school cursus that make L instead of I: Lkoma/Lsawa/Luchi...
|
- Fixed some Pdf Copy-Paste error in school cursus that make L instead of I: Lkoma/Lsawa/Luchi...
|
||||||
|
|||||||
@@ -345,7 +345,8 @@
|
|||||||
"curriculum_validate": "Complete this rank",
|
"curriculum_validate": "Complete this rank",
|
||||||
"rarity_modifier": "Rarity modifier",
|
"rarity_modifier": "Rarity modifier",
|
||||||
"item_pattern": "Item Patterns",
|
"item_pattern": "Item Patterns",
|
||||||
"signature_scroll": "Signature Scrolls"
|
"signature_scroll": "Signature Scrolls",
|
||||||
|
"school_curriculum_journal": "Drop curriculum's journal in sheet to link it"
|
||||||
},
|
},
|
||||||
"character_types": {
|
"character_types": {
|
||||||
"character": "Player Character",
|
"character": "Player Character",
|
||||||
|
|||||||
@@ -345,7 +345,8 @@
|
|||||||
"curriculum_validate": "Completar este rango",
|
"curriculum_validate": "Completar este rango",
|
||||||
"rarity_modifier": "Rarity modifier",
|
"rarity_modifier": "Rarity modifier",
|
||||||
"item_pattern": "Item patterns",
|
"item_pattern": "Item patterns",
|
||||||
"signature_scroll": "Signature scrolls"
|
"signature_scroll": "Signature scrolls",
|
||||||
|
"school_curriculum_journal": "Drop curriculum's journal in sheet to link it"
|
||||||
},
|
},
|
||||||
"character_types": {
|
"character_types": {
|
||||||
"character": "Personaje jugador",
|
"character": "Personaje jugador",
|
||||||
|
|||||||
@@ -345,7 +345,8 @@
|
|||||||
"curriculum_validate": "Valider la progression",
|
"curriculum_validate": "Valider la progression",
|
||||||
"rarity_modifier": "Modificateur de rareté",
|
"rarity_modifier": "Modificateur de rareté",
|
||||||
"item_pattern": "Procédés de fabrication",
|
"item_pattern": "Procédés de fabrication",
|
||||||
"signature_scroll": "Rouleaux de marque"
|
"signature_scroll": "Rouleaux de marque",
|
||||||
|
"school_curriculum_journal": "Déposer le journal du curriculum dans la feuille pour le lier"
|
||||||
},
|
},
|
||||||
"character_types": {
|
"character_types": {
|
||||||
"character": "Personnage Joueur",
|
"character": "Personnage Joueur",
|
||||||
|
|||||||
@@ -103,6 +103,81 @@ export class CharacterSheetL5r5e extends BaseSheetL5r5e {
|
|||||||
this._tabs
|
this._tabs
|
||||||
.find((e) => e._navSelector === ".advancements-tabs")
|
.find((e) => e._navSelector === ".advancements-tabs")
|
||||||
.activate("advancement_rank_" + (this.actor.data.data.identity.school_rank || 0));
|
.activate("advancement_rank_" + (this.actor.data.data.identity.school_rank || 0));
|
||||||
|
|
||||||
|
// Open linked school curriculum journal
|
||||||
|
html.find(`.school-journal-link`).on("click", async (event) => {
|
||||||
|
event.preventDefault();
|
||||||
|
event.stopPropagation();
|
||||||
|
|
||||||
|
const actorJournal = this.actor.data.data.identity.school_curriculum_journal;
|
||||||
|
const journal = await this._getJournal(actorJournal.id, actorJournal.pack);
|
||||||
|
if (journal) {
|
||||||
|
journal.sheet.render(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle dropped data on the Actor sheet
|
||||||
|
* @param {DragEvent} event
|
||||||
|
*/
|
||||||
|
async _onDrop(event) {
|
||||||
|
// *** Everything below here is only needed if the sheet is editable ***
|
||||||
|
if (!this.options.editable) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Curriculum Journal
|
||||||
|
const json = event.dataTransfer.getData("text/plain");
|
||||||
|
if (!json) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const data = JSON.parse(json);
|
||||||
|
if (data.type !== "JournalEntry") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const journal = await this._getJournal(data.id, data.pack);
|
||||||
|
if (!journal) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.actor.data.data.identity.school_curriculum_journal = {
|
||||||
|
id: journal.data._id,
|
||||||
|
name: journal.data.name,
|
||||||
|
pack: data.pack || null,
|
||||||
|
};
|
||||||
|
|
||||||
|
await this.actor.update({
|
||||||
|
data: {
|
||||||
|
identity: {
|
||||||
|
school_curriculum_journal: this.actor.data.data.identity.school_curriculum_journal,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the Journal in Pack or in World
|
||||||
|
* @param id
|
||||||
|
* @param pack
|
||||||
|
* @return {Promise<game.l5r5e.JournalL5r5e>}
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
async _getJournal(id, pack = null) {
|
||||||
|
let journal;
|
||||||
|
if (pack) {
|
||||||
|
// Compendium
|
||||||
|
journal = await game.packs.get(pack)?.getDocument(id);
|
||||||
|
} else {
|
||||||
|
// World
|
||||||
|
journal = game.journal.get(id);
|
||||||
|
}
|
||||||
|
if (!journal || !(journal instanceof game.l5r5e.JournalL5r5e) || !journal.data?._id) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
return journal;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -366,6 +366,7 @@ export class TwentyQuestionsDialog extends FormApplication {
|
|||||||
this.actor.data.data.twenty_questions = this.object.data;
|
this.actor.data.data.twenty_questions = this.object.data;
|
||||||
await this.actor.update({
|
await this.actor.update({
|
||||||
data: {
|
data: {
|
||||||
|
template: formData["template"],
|
||||||
twenty_questions: this.object.data,
|
twenty_questions: this.object.data,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -79,11 +79,12 @@ Hooks.once("init", async () => {
|
|||||||
AbilityDie,
|
AbilityDie,
|
||||||
HelpersL5r5e,
|
HelpersL5r5e,
|
||||||
ItemL5r5e,
|
ItemL5r5e,
|
||||||
|
JournalL5r5e,
|
||||||
RollL5r5e,
|
RollL5r5e,
|
||||||
|
ActorL5r5e,
|
||||||
DicePickerDialog,
|
DicePickerDialog,
|
||||||
RollnKeepDialog,
|
RollnKeepDialog,
|
||||||
GmToolsDialog,
|
GmToolsDialog,
|
||||||
ActorL5r5e,
|
|
||||||
HelpDialog,
|
HelpDialog,
|
||||||
sockets: new SocketHandlerL5r5e(),
|
sockets: new SocketHandlerL5r5e(),
|
||||||
migrations: MigrationL5r5e,
|
migrations: MigrationL5r5e,
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
"family": "",
|
"family": "",
|
||||||
"school": "",
|
"school": "",
|
||||||
"school_rank": 1,
|
"school_rank": 1,
|
||||||
|
"school_curriculum_journal": {},
|
||||||
"roles": ""
|
"roles": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -115,8 +116,8 @@
|
|||||||
"character": {
|
"character": {
|
||||||
"templates": ["identity", "rings", "social", "skills", "techniques", "conflict", "advancement"],
|
"templates": ["identity", "rings", "social", "skills", "techniques", "conflict", "advancement"],
|
||||||
"template": "core",
|
"template": "core",
|
||||||
"zeni": 0,
|
"twenty_questions": {},
|
||||||
"twenty_questions": {}
|
"zeni": 0
|
||||||
},
|
},
|
||||||
"npc": {
|
"npc": {
|
||||||
"templates": ["rings", "social", "techniques", "conflict"],
|
"templates": ["rings", "social", "techniques", "conflict"],
|
||||||
|
|||||||
@@ -15,7 +15,14 @@
|
|||||||
</fieldset>
|
</fieldset>
|
||||||
{{!-- School progession --}}
|
{{!-- School progession --}}
|
||||||
<fieldset class="advancement advancements-body">
|
<fieldset class="advancement advancements-body">
|
||||||
<legend class="tools">{{localize 'l5r5e.school'}} <a data-item-type="advancement" class="advancement-control item-add" title="{{localize 'l5r5e.global.add'}}"><i class="fas fa-plus"></i></a></legend>
|
<legend class="tools">
|
||||||
|
{{#if data.data.identity.school_curriculum_journal.id}}
|
||||||
|
<a class="school-journal-link"><i class="fas fa-search"></i></a> {{data.data.identity.school_curriculum_journal.name}}
|
||||||
|
{{else}}
|
||||||
|
{{localize 'l5r5e.school'}} ({{localize 'l5r5e.advancements.school_curriculum_journal'}})
|
||||||
|
{{/if}}
|
||||||
|
<a data-item-type="advancement" class="advancement-control item-add" title="{{localize 'l5r5e.global.add'}}"><i class="fas fa-plus"></i></a>
|
||||||
|
</legend>
|
||||||
<nav class="advancements-tabs tabs" data-group="advancements">
|
<nav class="advancements-tabs tabs" data-group="advancements">
|
||||||
<a class="item advancements-tab" data-tab="advancement_rank_0">{{localize 'l5r5e.advancements.school_rank_0'}}</a>
|
<a class="item advancements-tab" data-tab="advancement_rank_0">{{localize 'l5r5e.advancements.school_rank_0'}}</a>
|
||||||
{{#each data.advancementsListByRank as |rankObject|}}
|
{{#each data.advancementsListByRank as |rankObject|}}
|
||||||
|
|||||||
Reference in New Issue
Block a user