Fix #42
This commit is contained in:
parent
423948626a
commit
1e37ae3eb1
@ -2044,7 +2044,7 @@ export class PegasusActor extends Actor {
|
|||||||
}
|
}
|
||||||
// Check size
|
// Check size
|
||||||
if (item.type == "vehiclemodule" || item.type == "vehicleweaponmodule") {
|
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) {
|
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.` })
|
ChatMessage.create({ content: `No more room available to host module ${item.name}. Module is not added to the vehicle.` })
|
||||||
return false
|
return false
|
||||||
|
@ -308,7 +308,8 @@ export class PegasusVehicleSheet extends ActorSheet {
|
|||||||
if (item == undefined) {
|
if (item == undefined) {
|
||||||
item = this.actor.items.get( dragData.uuid )
|
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 ) {
|
if ( ret ) {
|
||||||
super._onDropItem(event, dragData)
|
super._onDropItem(event, dragData)
|
||||||
}
|
}
|
||||||
|
@ -365,7 +365,8 @@
|
|||||||
"combatmodule",
|
"combatmodule",
|
||||||
"propulsionmodule",
|
"propulsionmodule",
|
||||||
"vehiclemodule",
|
"vehiclemodule",
|
||||||
"vehicleweaponmodule"
|
"vehicleweaponmodule",
|
||||||
|
"cargo"
|
||||||
],
|
],
|
||||||
"effect": {
|
"effect": {
|
||||||
"type": "",
|
"type": "",
|
||||||
@ -680,7 +681,8 @@
|
|||||||
"idr": "",
|
"idr": "",
|
||||||
"cost": 0,
|
"cost": 0,
|
||||||
"size": 0,
|
"size": 0,
|
||||||
"space": 0
|
"space": 0,
|
||||||
|
"description": ""
|
||||||
},
|
},
|
||||||
"vehicleweaponmodule": {
|
"vehicleweaponmodule": {
|
||||||
"location": "",
|
"location": "",
|
||||||
@ -699,7 +701,14 @@
|
|||||||
"idr": "",
|
"idr": "",
|
||||||
"cost": 0,
|
"cost": 0,
|
||||||
"extradamage": false,
|
"extradamage": false,
|
||||||
"extradamagevalue": 0
|
"extradamagevalue": 0,
|
||||||
|
"description": ""
|
||||||
|
},
|
||||||
|
"cargo": {
|
||||||
|
"capacity": 0,
|
||||||
|
"idr": "",
|
||||||
|
"value": 0,
|
||||||
|
"description": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -5,8 +5,12 @@
|
|||||||
<img class="stat-icon" src="systems/fvtt-pegasus-rpg/images/icons/icon_vehicle_{{stat.abbrev}}.webp">
|
<img class="stat-icon" src="systems/fvtt-pegasus-rpg/images/icons/icon_vehicle_{{stat.abbrev}}.webp">
|
||||||
</span>
|
</span>
|
||||||
<span class="stat-label stat-margin" name="{{key}}">
|
<span class="stat-label stat-margin" name="{{key}}">
|
||||||
|
{{#if (eq key "ad")}}
|
||||||
|
<h4 class="stat-text-white stat-margin">{{upper stat.abbrev}}</h4>
|
||||||
|
{{else}}
|
||||||
<h4 class="stat-text-white stat-margin"><a class="roll-stat stat-margin"
|
<h4 class="stat-text-white stat-margin"><a class="roll-stat stat-margin"
|
||||||
data-stat-key="{{key}}">{{upper stat.abbrev}}</a></h4>
|
data-stat-key="{{key}}">{{upper stat.abbrev}}</a></h4>
|
||||||
|
{{/if}}
|
||||||
</span>
|
</span>
|
||||||
<select class="status-small-label color-class-common" type="text" name="system.statistics.{{key}}.level"
|
<select class="status-small-label color-class-common" type="text" name="system.statistics.{{key}}.level"
|
||||||
value="{{stat.level}}" data-dtype="Number" disabled>
|
value="{{stat.level}}" data-dtype="Number" disabled>
|
||||||
|
Loading…
Reference in New Issue
Block a user