Add consequenes to actor sheet
This commit is contained in:
parent
147ab741de
commit
c65f1b8246
@ -95,7 +95,13 @@ export class SoSActorSheet extends ActorSheet {
|
||||
this.actor.resetDeck();
|
||||
this.render(true);
|
||||
});
|
||||
|
||||
html.find('.consequence-severity').click((event) => {
|
||||
const li = $(event.currentTarget).parents(".item");
|
||||
const item = this.actor.getOwnedItem(li.data("item-id"));
|
||||
let severity = $(event.currentTarget).val();
|
||||
this.actor.updateOwnedItem( { _id: item._id, 'data.severity': severity});
|
||||
this.render(true);
|
||||
});
|
||||
html.find('.lock-unlock-sheet').click((event) => {
|
||||
this.options.editStatSkill = !this.options.editStatSkill;
|
||||
this.render(true);
|
||||
|
@ -2,7 +2,7 @@
|
||||
"name": "foundryvtt-shadows-over-sol",
|
||||
"title": "Shadows over Sol",
|
||||
"description": "Shadows over Sol for FoundryVTT",
|
||||
"version": "0.0.11",
|
||||
"version": "0.0.12",
|
||||
"manifestPlusVersion": "1.0.0",
|
||||
"minimumCoreVersion": "0.7.5",
|
||||
"compatibleCoreVersion": "0.7.9",
|
||||
|
@ -164,6 +164,15 @@
|
||||
<li class="item flexrow list-item" data-item-id="{{conseq._id}}">
|
||||
<img class="sheet-skill-img" src="{{conseq.img}}"/>
|
||||
<span class="conseq-label"><a>{{conseq.name}}</a></span>
|
||||
<select class="stat-value flexrow consequence-severity" type="text" name="conseq.data.severity" value="{{conseq.data.severity}}" data-dtype="String">
|
||||
{{#select conseq.data.severity}}
|
||||
<option value="none">None</option>
|
||||
<option value="light">Light</option>
|
||||
<option value="moderate">Moderate</option>
|
||||
<option value="severe">Severe</option>
|
||||
<option value="critical">Critical</option>
|
||||
{{/select}}
|
||||
</select>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
|
Loading…
Reference in New Issue
Block a user