Added the ability to Drag n Drop an actor's image to map (token).
some fix on editor for symbol
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
# Changelog
|
||||
|
||||
## 1.4.0 - Armies & French PoW
|
||||
- Added Army, Cohort and Fortification sheets.
|
||||
- Added Army's view in GM monitor
|
||||
- Added Army (Actor), Cohort (Item) and Fortification (Item) sheets.
|
||||
- Actor Sheet (PC, NPC, Army) : Added the ability to Drag n Drop an actor's image to map (token).
|
||||
- GM monitor :
|
||||
- Added Armies view.
|
||||
- Added the ability to Drag n Drop an actor's image to map (token).
|
||||
- Added real icons for Inversion and Mantra.
|
||||
- Added Mantra technique type.
|
||||
- Compendiums :
|
||||
|
||||
@@ -70,6 +70,37 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Activate a named TinyMCE text editor
|
||||
* @param {string} name The named data field which the editor modifies.
|
||||
* @param {object} options TinyMCE initialization options passed to TextEditor.create
|
||||
* @param {string} initialContent Initial text content for the editor area.
|
||||
* @override
|
||||
*/
|
||||
activateEditor(name, options = {}, initialContent = "") {
|
||||
if (["data.army_abilities", "data.supplies_logistics", "data.past_battles"].includes(name) && initialContent) {
|
||||
initialContent = game.l5r5e.HelpersL5r5e.convertSymbols(initialContent, false);
|
||||
}
|
||||
super.activateEditor(name, options, initialContent);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called upon form submission after form data is validated
|
||||
* @param event {Event} The initial triggering submission event
|
||||
* @param formData {Object} The object of validated form data with which to update the object
|
||||
* @returns {Promise} A Promise which resolves once the update operation has completed
|
||||
* @override
|
||||
*/
|
||||
async _updateObject(event, formData) {
|
||||
["data.army_abilities", "data.supplies_logistics", "data.past_battles"].forEach((name) => {
|
||||
if (!formData[name]) {
|
||||
return;
|
||||
}
|
||||
formData[name] = game.l5r5e.HelpersL5r5e.convertSymbols(formData[name], true);
|
||||
});
|
||||
return super._updateObject(event, formData);
|
||||
}
|
||||
|
||||
/**
|
||||
* Subscribe to events from the sheet.
|
||||
* @param {jQuery} html HTML content of the sheet.
|
||||
|
||||
@@ -87,13 +87,12 @@ export class BaseSheetL5r5e extends ActorSheet {
|
||||
* @override
|
||||
*/
|
||||
async _updateObject(event, formData) {
|
||||
if (formData["data.notes"]) {
|
||||
formData["data.notes"] = game.l5r5e.HelpersL5r5e.convertSymbols(formData["data.notes"], true);
|
||||
}
|
||||
if (formData["data.description"]) {
|
||||
formData["data.description"] = game.l5r5e.HelpersL5r5e.convertSymbols(formData["data.description"], true);
|
||||
}
|
||||
|
||||
["data.notes", "data.description"].forEach((name) => {
|
||||
if (!formData[name]) {
|
||||
return;
|
||||
}
|
||||
formData[name] = game.l5r5e.HelpersL5r5e.convertSymbols(formData[name], true);
|
||||
});
|
||||
return super._updateObject(event, formData);
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,6 @@ export class ArmyCohortSheetL5r5e extends ItemSheetL5r5e {
|
||||
*/
|
||||
async _updateObject(event, formData) {
|
||||
if (formData["data.abilities"]) {
|
||||
// L5R Symbols
|
||||
formData["data.abilities"] = game.l5r5e.HelpersL5r5e.convertSymbols(formData["data.abilities"], true);
|
||||
}
|
||||
return super._updateObject(event, formData);
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -784,10 +784,10 @@ button {
|
||||
}
|
||||
img {
|
||||
border: none;
|
||||
min-width: 16px;
|
||||
min-height: 16px;
|
||||
max-width: 28px;
|
||||
max-height: 28px;
|
||||
min-width: 24px;
|
||||
min-height: 24px;
|
||||
max-width: 32px;
|
||||
max-height: 32px;
|
||||
}
|
||||
.goodvalue {
|
||||
color: #4e8c69;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<form class="{{cssClass}}" data-lang="{{localize 'I18N.Language'}}" autocomplete="off">
|
||||
{{!-- Sheet Header --}}
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{data.img}}" data-edit="img" title="{{data.name}}"/>
|
||||
<img class="profile-img dragndrop-actor-id pointer" src="{{data.img}}" data-edit="img" data-actor-id="{{actor.id}}" draggable="true" title="{{data.name}}"/>
|
||||
<div class="header-fields identity-wrapper">
|
||||
<h1 class="charname"><input name="name" type="text" value="{{data.name}}" placeholder="Name"/></h1>
|
||||
<div class="readiness">
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
<fieldset class="army-abilities">
|
||||
<label>
|
||||
<strong>{{localize 'l5r5e.army.army_abilities'}}</strong>
|
||||
<textarea type="text" name="data.army_abilities">{{data.data.army_abilities}}</textarea>
|
||||
{{editor content=data.data.army_abilities target="data.army_abilities" button=true editable=options.editable}}
|
||||
</label>
|
||||
</fieldset>
|
||||
</div>
|
||||
@@ -1,7 +1,7 @@
|
||||
<form class="{{cssClass}}" data-lang="{{localize 'I18N.Language'}}" autocomplete="off">
|
||||
{{!-- Sheet Header --}}
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{data.img}}" data-edit="img" title="{{data.name}}"/>
|
||||
<img class="profile-img dragndrop-actor-id pointer" src="{{data.img}}" data-edit="img" data-actor-id="{{actor.id}}" draggable="true" title="{{data.name}}"/>
|
||||
<div class="header-fields identity-wrapper">
|
||||
<h1 class="charname"><input name="name" type="text" value="{{data.name}}" placeholder="Name"/></h1>
|
||||
{{> 'systems/l5r5e/templates/actors/character/identity.html'}}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{{!-- Sheet Header --}}
|
||||
<header class="sheet-header">
|
||||
<div class="header-fields identity-wrapper">
|
||||
<img class="profile-img" src="{{data.img}}" data-edit="img" title="{{data.name}}"/>
|
||||
<img class="profile-img dragndrop-actor-id pointer" src="{{data.img}}" data-edit="img" data-actor-id="{{actor.id}}" draggable="true" title="{{data.name}}"/>
|
||||
<h1 class="charname"><input name="name" type="text" value="{{data.name}}" placeholder="Name"/></h1>
|
||||
{{> 'systems/l5r5e/templates/actors/npc/identity.html'}}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user