Skip to content

Commit

Permalink
🎸 feat |Drawing|Add flat movement penalty config
Browse files Browse the repository at this point in the history
  • Loading branch information
caewok committed Aug 29, 2024
1 parent 498791b commit c9ae97e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
3 changes: 3 additions & 0 deletions languages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@
"elevationruler.drawingconfig.movementPenalty.name": "Movement Bonus/Penalty",
"elevationruler.drawingconfig.movementPenalty.hint": "Set to 1 for no penalty. Values greater than one penalize movement by that percent; values less than one effectively grant a bonus to movement. For example, set to 2 to double movement through this area. Movement under the drawing elevation will be ignored.",

"elevationruler.drawingconfig.flatMovementPenalty.name": "Use Flat Penalty",
"elevationruler.drawingconfig.flatMovementPenalty.hint": "If enabled, treats the penalty as a fixed amount. For example, set to 5 to add +5 to each square of movement. Negative values provide flat bonuses to movement.",

"elevationruler.clearMovement": "Clear Combatant Movement",
"elevationruler.waypoint": "waypoint",
"elevationruler.up": "up",
Expand Down
1 change: 1 addition & 0 deletions scripts/const.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const TEMPLATES = {
export const FLAGS = {
MOVEMENT_SELECTION: "selectedMovementType",
MOVEMENT_PENALTY: "movementPenalty",
MOVEMENT_PENALTY_FLAT: "flatMovementPenalty",
SCENE: {
BACKGROUND_ELEVATION: "backgroundElevation"
},
Expand Down
10 changes: 9 additions & 1 deletion templates/drawing-config.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,18 @@
<div class="form-group">
<label for="elevationruler.movementPenalty">{{ localize "elevationruler.drawingconfig.movementPenalty.name" }}</label>
<div class="form-fields">
{{rangePicker name="flags.elevationruler.movementPenalty" value=object.flags.elevationruler.movementPenalty step=0.1 min=0.1 max=10}}
<input type="number" step="0.1" name="flags.elevationruler.movementPenalty" value="{{object.flags.elevationruler.movementPenalty}}">
</div>
<p class="hint">{{ localize "elevationruler.drawingconfig.movementPenalty.hint" }}</p>
</div>

<div class="form-group">
<label for="elevationruler.flatMovementPenalty">{{ localize "elevationruler.drawingconfig.flatMovementPenalty.name" }}</label>
<div class="form-fields">
<input type="checkbox" name="flags.elevationruler.flatMovementPenalty" {{checked object.flags.elevationruler.flatMovementPenalty}}/>
</div>
<p class="hint">{{ localize "elevationruler.drawingconfig.flatMovementPenalty.hint" }}</p>
</div>

</legend>
</fieldset>

0 comments on commit c9ae97e

Please sign in to comment.