diff --git a/modules/pegasus-actor.js b/modules/pegasus-actor.js index 4340bc4..2dd7a25 100644 --- a/modules/pegasus-actor.js +++ b/modules/pegasus-actor.js @@ -2044,7 +2044,7 @@ export class PegasusActor extends Actor { } // Check size if (item.type == "vehiclemodule" || item.type == "vehicleweaponmodule") { - item.system.space = item.system.space || 0 + item.system.space = item.system?.space || 0 if (this.system.modules.usedvms + Number(item.system.space) > this.system.modules.totalvms) { ChatMessage.create({ content: `No more room available to host module ${item.name}. Module is not added to the vehicle.` }) return false diff --git a/modules/pegasus-vehicle-sheet.js b/modules/pegasus-vehicle-sheet.js index 1c0cdad..ef978f6 100644 --- a/modules/pegasus-vehicle-sheet.js +++ b/modules/pegasus-vehicle-sheet.js @@ -308,7 +308,8 @@ export class PegasusVehicleSheet extends ActorSheet { if (item == undefined) { item = this.actor.items.get( dragData.uuid ) } - let ret = await this.actor.preprocessItemVehicle( event, item, true ) + let itemFull = await PegasusUtility.searchItem( item ) + let ret = await this.actor.preprocessItemVehicle( event, itemFull, true ) if ( ret ) { super._onDropItem(event, dragData) } diff --git a/template.json b/template.json index 16bf87e..e473f1a 100644 --- a/template.json +++ b/template.json @@ -291,42 +291,42 @@ "topspeed": "", "shieldlevel": 0, "armourlevel": 0, - "is3D": false + "is3D": false }, "reararc": { "label": "Rear Arc", "topspeed": "", "shieldlevel": 0, "armourlevel": 0, - "is3D": false + "is3D": false }, "rightarc": { "label": "Right Arc", "topspeed": "", "shieldlevel": 0, "armourlevel": 0, - "is3D": false + "is3D": false }, "leftarc": { "label": "Left Arc", "topspeed": "", "shieldlevel": 0, "armourlevel": 0, - "is3D": false + "is3D": false }, "toparc": { "label": "Top Arc", "topspeed": "", "shieldlevel": 0, "armourlevel": 0, - "is3D": true + "is3D": true }, "bottomarc": { "label": "Bottom Arc", "topspeed": "", "shieldlevel": 0, "armourlevel": 0, - "is3D": true + "is3D": true } } } @@ -365,7 +365,8 @@ "combatmodule", "propulsionmodule", "vehiclemodule", - "vehicleweaponmodule" + "vehicleweaponmodule", + "cargo" ], "effect": { "type": "", @@ -680,7 +681,8 @@ "idr": "", "cost": 0, "size": 0, - "space": 0 + "space": 0, + "description": "" }, "vehicleweaponmodule": { "location": "", @@ -699,7 +701,14 @@ "idr": "", "cost": 0, "extradamage": false, - "extradamagevalue": 0 + "extradamagevalue": 0, + "description": "" + }, + "cargo": { + "capacity": 0, + "idr": "", + "value": 0, + "description": "" } } } \ No newline at end of file diff --git a/templates/partial-vehicle-stat-block.html b/templates/partial-vehicle-stat-block.html index 7cfb146..77ad67e 100644 --- a/templates/partial-vehicle-stat-block.html +++ b/templates/partial-vehicle-stat-block.html @@ -5,8 +5,12 @@ + {{#if (eq key "ad")}} +

{{upper stat.abbrev}}

+ {{else}}

{{upper stat.abbrev}}

+ {{/if}}