Fix #42
This commit is contained in:
@@ -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
|
||||
|
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user