Skip to content

Commit

Permalink
update Posture on tab sheet in process
Browse files Browse the repository at this point in the history
  • Loading branch information
mjeffw committed Aug 24, 2024
1 parent 904f49c commit dc36f25
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 16 deletions.
8 changes: 7 additions & 1 deletion lib/moustachewax.js
Original file line number Diff line number Diff line change
Expand Up @@ -466,10 +466,16 @@ export default function () {
})

Handlebars.registerHelper('listAllPostures', function () {
let postures = GURPS.StatusEffect.getAllPostures()
const postures = GURPS.StatusEffect.getAllPostures()
return postures
})

Handlebars.registerHelper('getPosture', function (name) {
const postures = GURPS.StatusEffect.getAllPostures()
return postures[name] ?? {} // synthetic "Standing" object
})


Handlebars.registerHelper('showTheMath', function () {
return game.settings.get(settings.SYSTEM_NAME, settings.SETTING_SHOW_THE_MATH) ? 'checked' : ''
})
Expand Down
31 changes: 16 additions & 15 deletions templates/actor/sections/conditions.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,25 @@
{{/each}}
</div>
</details>
{{!--
<select id='maneuver' name='system.conditions.maneuver' style='font-size: 90%; max-width: 14em;' {{disabled (or
isEditing (not (inCombat this)))}}>
<option value='undefined' {{select-if ../system.conditions.maneuver 'undefined' }}>
{{i18n "GURPS.none"}}
</option>
{{#each (listAllManeuvers) as |this key|}}
<option value='{{key}}' {{select-if ../system.conditions.maneuver key}}>
{{i18n this.label}}
</option>
{{/each}}
</select>
--}}
</div>
{{/if}}


<div class='label'>{{i18n 'GURPS.modifierPosture'}}:</div>
<div class='field' style="border: none;">
<div class="'field details">
<details>
<summary>
{{#with (getPosture system.conditions.posture) as |posture|}}
<img class="button" src='{{posture.icon}}' title="{{i18n posture.label}}" alt='{{posture.name}}' />
{{/with}}
</summary>
<div class="popup square5x4">
{{#each (listAllPostures) as |this key|}}
<img class="button" src='{{icon}}' title="{{i18n label}}" alt='{{key}}' />
{{/each}}
</details>
</div>
{{!-- <div class='field' style="border: none;">
<select id='posture' name='system.conditions.posture' style='font-size: 90%;' {{disabled isEditing}}>
<option value='standing' {{select-if ../system.conditions.posture 'standing' }}>{{i18n 'GURPS.STATUSStanding'}}
</option>
Expand All @@ -45,7 +45,8 @@
</option>
{{/each}}
</select>
</div>
</div> --}}

<div class='label' for='move-mode'>{{i18n 'GURPS.moveModeType'}}:</div>
<div class='field' style='border: none'>
<select id='move-mode' style='font-size: 90%; max-width: 14em;' {{disabled (or isEditing (lt (length system.move)
Expand Down

0 comments on commit dc36f25

Please sign in to comment.