Fix #69 : Size management
This commit is contained in:
@ -121,6 +121,7 @@ export class PegasusActor extends Actor {
|
||||
this.system.encCapacity = this.getEncumbranceCapacity()
|
||||
this.buildContainerTree()
|
||||
this.updatePPP()
|
||||
this.updateSize()
|
||||
}
|
||||
if (this.type == 'vehicle') {
|
||||
this.computeVehicleStats();
|
||||
@ -375,6 +376,18 @@ export class PegasusActor extends Actor {
|
||||
this.update({ 'system.ppp.spentPPP': ppp })
|
||||
}
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
updateSize() {
|
||||
let sizeBonus = 0
|
||||
for(let effect of this.items) {
|
||||
if (effect.type == "effect" && effect.system.effectlevel > 0 && effect.system.affectsize) {
|
||||
sizeBonus += effect.system.effectlevel
|
||||
}
|
||||
}
|
||||
if (sizeBonus != this.system.biodata.sizebonus) {
|
||||
setTimeout(500, this.update( {'system.biodata.sizebonus': sizeBonus}) )
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async activatePower(itemId) {
|
||||
|
Reference in New Issue
Block a user