feat: Added singleUseSpellBooks setting (disabled by default). Controls whether spell books are consumed when they are bound to a wand

This commit is contained in:
WinDanesz
2023-06-30 15:47:24 +02:00
parent 2903ebfbac
commit e4b7d528f5
3 changed files with 14 additions and 0 deletions
@@ -845,6 +845,9 @@ public class ItemWand extends Item implements IWorkbenchItem, ISpellCastingItem,
if(!(spell.getTier().level > this.tier.level) && spells[i] != spell && spell.isEnabled(SpellProperties.Context.WANDS)){
spells[i] = spell;
changed = true;
if (Wizardry.settings.singleUseSpellBooks) {
spellBooks[i].getStack().shrink(1);
}
}
}
}