diff --git a/code/modules/projectiles/projectile/magic.dm b/code/modules/projectiles/projectile/magic.dm index ab5f7eafd2b..8bb95b2ede5 100644 --- a/code/modules/projectiles/projectile/magic.dm +++ b/code/modules/projectiles/projectile/magic.dm @@ -396,7 +396,7 @@ var/weld = TRUE var/created = FALSE //prevents creation of more then one locker if it has multiple hits var/locker_suck = TRUE - var/obj/structure/closet/locker_temp_instance = /obj/structure/closet/decay + var/obj/structure/closet/decay/locker_temp_instance /obj/projectile/magic/locker/Initialize() . = ..() @@ -434,7 +434,7 @@ /obj/structure/closet/decay breakout_time = 600 icon_welded = null - var/magic_icon = "cursed" + icon_state = "cursed" var/weakened_icon = "decursed" var/auto_destroy = TRUE @@ -442,18 +442,12 @@ . = ..() if(auto_destroy) addtimer(CALLBACK(src, .proc/bust_open), 5 MINUTES) - addtimer(CALLBACK(src, .proc/magicly_lock), 5) - -/obj/structure/closet/decay/proc/magicly_lock() - if(!welded) - return - icon_state = magic_icon - update_icon() /obj/structure/closet/decay/after_weld(weld_state) if(weld_state) unmagify() +///Fade away into nothing /obj/structure/closet/decay/proc/decay() animate(src, alpha = 0, time = 30) addtimer(CALLBACK(GLOBAL_PROC, .proc/qdel, src), 30) @@ -461,16 +455,14 @@ /obj/structure/closet/decay/open(mob/living/user, force = FALSE) . = ..() if(.) - if(icon_state == magic_icon) //check if we used the magic icon at all before giving it the lesser magic icon - unmagify() - else - addtimer(CALLBACK(src, .proc/decay), 15 SECONDS) + unmagify() +///Give it the lesser magic icon and tell it to delete itself /obj/structure/closet/decay/proc/unmagify() icon_state = weakened_icon update_icon() + addtimer(CALLBACK(src, .proc/decay), 15 SECONDS) - icon_welded = "welded" /obj/projectile/magic/flying name = "bolt of flying"