forked from GitHub-Mirrors/foundry-sw5e
Always create a new power cell
This commit is contained in:
parent
e2f002292b
commit
ffffe5da52
1 changed files with 1 additions and 1 deletions
|
@ -664,7 +664,7 @@ export default class ActorSheet5e extends ActorSheet {
|
||||||
return sourceId && (sourceId === itemData.flags.core?.sourceId) &&
|
return sourceId && (sourceId === itemData.flags.core?.sourceId) &&
|
||||||
(i.type === "consumable");
|
(i.type === "consumable");
|
||||||
});
|
});
|
||||||
if ( similarItem ) {
|
if ( similarItem && itemData.name !== "Power Cell" ) { // Always create a new powercell instead of increasing quantity
|
||||||
return similarItem.update({
|
return similarItem.update({
|
||||||
'data.quantity': similarItem.data.data.quantity + Math.max(itemData.data.quantity, 1)
|
'data.quantity': similarItem.data.data.quantity + Math.max(itemData.data.quantity, 1)
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue