Skip to content

Commit

Permalink
Merge pull request #444 from vttred/fix/movement-details-patch
Browse files Browse the repository at this point in the history
fix: move details now save to monsters correctly
  • Loading branch information
anthonyronda authored May 25, 2023
2 parents 1f2eedd + 0598246 commit 31882ad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/module/actor/entity.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ export default class OseActor extends Actor {
if (source?.prototypeToken?.texture?.img === "") {
source.prototypeToken.texture.img = "icons/svg/mystery-man.svg";
}
// Fixing missing movement.value by moving it to details.movement
if (source?.system?.movement?.value && !source?.system?.details.movement){
source.system.details.movement = source.system.movement.value;
delete source.system.movement.value;
}

return source;
}

Expand Down
2 changes: 1 addition & 1 deletion src/templates/actors/partials/monster-attributes-tab.html
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ <h4 class="item-name" title="{{item.name}}">
<li class="attacks-description">
{{#unless isNew}}
<label>{{ localize "OSE.movement.details" }}</label>
<input name="system.movement.value" type="text" value="{{system.movement.value}}" data-dtype="String" />
<input name="system.details.movement" type="text" value="{{system.details.movement}}" data-dtype="String" />
{{else}}
<button data-action="generate-saves">{{localize "OSE.dialog.generateSaves"}}</button>
{{/unless}}
Expand Down

0 comments on commit 31882ad

Please sign in to comment.