This commit is contained in:
2022-09-26 17:35:44 +02:00
parent 423948626a
commit 1e37ae3eb1
4 changed files with 25 additions and 11 deletions

View File

@ -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