From deade8f96846ebd27fd7ea04a04a35beed7265b4 Mon Sep 17 00:00:00 2001 From: ATH1909 <42606352+ATH1909@users.noreply.github.com> Date: Sun, 25 Oct 2020 15:52:40 -0500 Subject: [PATCH] Gamer(025) moment --- .../antagonists/wizard/equipment/spellbook.dm | 12 ++++++++++++ code/modules/projectiles/guns/ballistic/rifle.dm | 2 ++ 2 files changed, 14 insertions(+) diff --git a/code/modules/antagonists/wizard/equipment/spellbook.dm b/code/modules/antagonists/wizard/equipment/spellbook.dm index 0f0ee164ea3..884958a7242 100644 --- a/code/modules/antagonists/wizard/equipment/spellbook.dm +++ b/code/modules/antagonists/wizard/equipment/spellbook.dm @@ -229,12 +229,24 @@ cost = 3 no_coexistance_typecache = /obj/effect/proc_holder/spell/targeted/infinite_guns/arcane_barrage +/datum/spellbook_entry/infinite_guns/Refund(mob/living/carbon/human/user, obj/item/spellbook/book) + for (var/obj/item/currentItem in user.get_all_gear()) + if (currentItem.type == /obj/item/gun/ballistic/rifle/boltaction/enchanted) + qdel(currentItem) + return ..() + /datum/spellbook_entry/arcane_barrage name = "Arcane Barrage" spell_type = /obj/effect/proc_holder/spell/targeted/infinite_guns/arcane_barrage cost = 3 no_coexistance_typecache = /obj/effect/proc_holder/spell/targeted/infinite_guns/gun +/datum/spellbook_entry/arcane_barrage/Refund(mob/living/carbon/human/user, obj/item/spellbook/book) + for (var/obj/item/currentItem in user.get_all_gear()) + if (currentItem.type == /obj/item/gun/ballistic/rifle/boltaction/enchanted/arcane_barrage) + qdel(currentItem) + return ..() + /datum/spellbook_entry/barnyard name = "Barnyard Curse" spell_type = /obj/effect/proc_holder/spell/pointed/barnyardcurse diff --git a/code/modules/projectiles/guns/ballistic/rifle.dm b/code/modules/projectiles/guns/ballistic/rifle.dm index e6f61be9a48..c661f0189d0 100644 --- a/code/modules/projectiles/guns/ballistic/rifle.dm +++ b/code/modules/projectiles/guns/ballistic/rifle.dm @@ -102,6 +102,8 @@ /obj/item/gun/ballistic/rifle/boltaction/enchanted/dropped() . = ..() guns_left = 0 + magazine = null + chambered = null /obj/item/gun/ballistic/rifle/boltaction/enchanted/proc/discard_gun(mob/living/user) user.throw_item(pick(oview(7,get_turf(user))))