Skip to content

Commit

Permalink
fix: Characteristics and mods visible. Ugly, but visible.
Browse files Browse the repository at this point in the history
  • Loading branch information
xdy committed Jul 4, 2020
1 parent 507786e commit 94ffd9c
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 21 deletions.
62 changes: 51 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions src/module/actors/actor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,18 @@ export default class TwodsixActor extends Actor {
c["mod"] = Math.floor((c["value"] - 6) / 3);
}

data.upp = this._upp(actorData);
// data.upp = this._upp(actorData);

}

_upp(actorData: ActorData) {
const data = actorData.data;

for (const abl of Object.values(data.characteristics as Record<any, any>)) {
if (abl.short != 'PSI') data.upp += this._pseudoHex(abl.value);
}
return data;
}
// _upp(actorData: ActorData) {
// const data = actorData.data;
//
// for (const abl of Object.values(data.characteristics as Record<any, any>)) {
// if (abl.short != 'PSI') data.upp += this._pseudoHex(abl.value);
// }
// return data;
// }

_pseudoHex(value: number) {
switch (value) {
Expand Down
2 changes: 1 addition & 1 deletion static/templates/actors/actor-sheet.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ <h1 class="charname">
<div class="characteristics grid grid-3col">
{{#each data.characteristics as |characteristic key|}}
<div class="characteristic flexrow flex-group-center">
<label for="data.characteristics.{{key}}.value" class="resource-label">data.characteristics.{{key}}.short</label>
<label for="data.characteristics.{{key}}.value" class="resource-label">{{characteristic.short}}</label>
<input id="data.characteristics.{{key}}.value" type="text" name="data.characteristics.{{key}}.value"
value="{{characteristic.value}}" data-dtype="Number"/>
<span class="characteristic-mod rollable" data-roll="2d6+@characteristics.{{key}}.mod"
Expand Down

0 comments on commit 94ffd9c

Please sign in to comment.