Roll Mod - 0.1.4
Creature abilities now properly support the 'Roll' field.
This commit is contained in:
@@ -527,12 +527,27 @@ export class MothershipActor extends Actor {
|
||||
if (!item.name && isNaN(itemName))
|
||||
itemName = item.charAt(0)?.toUpperCase() + item.toLowerCase().slice(1);
|
||||
|
||||
|
||||
var rollInsert = '';
|
||||
|
||||
if(item.data.roll){
|
||||
let r = new Roll(item.data.roll, {});
|
||||
r.roll();
|
||||
|
||||
rollInsert = '\
|
||||
<div class="rollh2" style="text-transform: lowercase;">'+item.data.roll+'</div>\
|
||||
<div class="roll-grid">\
|
||||
<div class="roll-result">'+r._total+'</div>\
|
||||
</div>';
|
||||
}
|
||||
|
||||
var templateData = {
|
||||
actor: this,
|
||||
stat: {
|
||||
name: itemName.toUpperCase()
|
||||
},
|
||||
item: item,
|
||||
insert: rollInsert,
|
||||
onlyDesc: true,
|
||||
};
|
||||
|
||||
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
"name": "mosh",
|
||||
"title": "MoSh - Unofficial Mothership",
|
||||
"description": "The unofficial Mothership system for FoundryVTT.",
|
||||
"version": "0.1.3c",
|
||||
"version": "0.1.4",
|
||||
"minimumCoreVersion": "0.7.0",
|
||||
"compatibleCoreVersion": "0.7.7",
|
||||
"compatibleCoreVersion": "0.7.9",
|
||||
"templateVersion": 2,
|
||||
"author": "Futilrevenge",
|
||||
"esmodules": ["module/mosh.js"],
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
</div>
|
||||
<div style="text-align: right"><img class="roll-image" src="{{item.img}}" title="{{item.name}}" /></div>
|
||||
</div>
|
||||
{{{insert}}}
|
||||
<div class="description">
|
||||
<div class="body">{{{item.data.description}}}</div>
|
||||
<br />
|
||||
|
||||
Reference in New Issue
Block a user