Fix #52
This commit is contained in:
parent
c0c6231b4c
commit
919420eac4
@ -2086,13 +2086,34 @@ export class PegasusActor extends Actor {
|
||||
level += Number(armour.system.armourdicevalue)
|
||||
}
|
||||
}
|
||||
//console.log(">>>> AMROR, ", level, arc.armourlevel)
|
||||
if (level != Number(arc.armourlevel)) {
|
||||
arc.armourlevel = level
|
||||
setTimeout(500, this.update({ [`system.arcs.${arcKey}`]: arc }))
|
||||
}
|
||||
}
|
||||
|
||||
// Shield management
|
||||
if (item.type == "vehiclemodule" && item.system.category == "shield") {
|
||||
let shieldsList = this.items.filter(item => item.type == "vehiclemodule" && item.system.category == "shield") || []
|
||||
shieldsList.push(item)
|
||||
let level = 0
|
||||
for (let armour of shieldsList) {
|
||||
if (armour.system.shielddicevalue > 0) {
|
||||
level += Number(armour.system.shielddicevalue)
|
||||
}
|
||||
}
|
||||
let shift = 500
|
||||
for( let loc of __LocationsArmour) {
|
||||
let arcKey = loc + "arc"
|
||||
let arc = duplicate(this.system.arcs[arcKey])
|
||||
if (level != Number(arc.shieldlevel)) {
|
||||
arc.shieldlevel = level
|
||||
setTimeout(shift, this.update({ [`system.arcs.${arcKey}`]: arc }))
|
||||
shift += 200
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return true
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user