Skip to content

Commit 31882ad

Browse files
authored
Merge pull request vttred#444 from vttred/fix/movement-details-patch
fix: move details now save to monsters correctly
2 parents 1f2eedd + 0598246 commit 31882ad

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/module/actor/entity.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ export default class OseActor extends Actor {
2525
if (source?.prototypeToken?.texture?.img === "") {
2626
source.prototypeToken.texture.img = "icons/svg/mystery-man.svg";
2727
}
28+
// Fixing missing movement.value by moving it to details.movement
29+
if (source?.system?.movement?.value && !source?.system?.details.movement){
30+
source.system.details.movement = source.system.movement.value;
31+
delete source.system.movement.value;
32+
}
33+
2834
return source;
2935
}
3036

src/templates/actors/partials/monster-attributes-tab.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ <h4 class="item-name" title="{{item.name}}">
145145
<li class="attacks-description">
146146
{{#unless isNew}}
147147
<label>{{ localize "OSE.movement.details" }}</label>
148-
<input name="system.movement.value" type="text" value="{{system.movement.value}}" data-dtype="String" />
148+
<input name="system.details.movement" type="text" value="{{system.details.movement}}" data-dtype="String" />
149149
{{else}}
150150
<button data-action="generate-saves">{{localize "OSE.dialog.generateSaves"}}</button>
151151
{{/unless}}

0 commit comments

Comments
 (0)