From 1123476af6a58a46830893b5c03a85abfc963343 Mon Sep 17 00:00:00 2001 From: Nazsgull Date: Wed, 16 Dec 2020 21:28:11 +0100 Subject: [PATCH] Nerfs Lava Staff (#13971) * Nerfs Lava Staff so it cannot be used outside mining z level Added a timer and a spark system to spawn sparks when lava staff malfuntions. Lava staff will check what z level is his user on, and if it's not mining will only spawn a few sparks. * Updates description Old description made little sense as lava staff will no longer work at the emergency shuttle. * Update code/modules/mining/lavaland/loot/ashdragon_loot.dm Adds spaces between method call parameters. Co-authored-by: Kyep <16434066+Kyep@users.noreply.github.com> * Removes unused spark effect system Since I'm using do_spark() I don t really need a whole spark system. * Gets rid of "timerMalfuntion" var Instead of using 2 variables to do the same, "timer" will now control the cooldown for when the staff works and for when it malfunctions. * Removes unnecesary time check * Update code/modules/mining/lavaland/loot/ashdragon_loot.dm as suggested by @farie82 Co-authored-by: farie82 * Update code/modules/mining/lavaland/loot/ashdragon_loot.dm as suggested by @farie82 Co-authored-by: farie82 Co-authored-by: awdaw Co-authored-by: Kyep <16434066+Kyep@users.noreply.github.com> Co-authored-by: farie82 --- code/modules/mining/lavaland/loot/ashdragon_loot.dm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/code/modules/mining/lavaland/loot/ashdragon_loot.dm b/code/modules/mining/lavaland/loot/ashdragon_loot.dm index 601bf356801..364a5b0e18e 100644 --- a/code/modules/mining/lavaland/loot/ashdragon_loot.dm +++ b/code/modules/mining/lavaland/loot/ashdragon_loot.dm @@ -158,7 +158,7 @@ /obj/item/lava_staff name = "staff of lava" - desc = "The ability to fill the emergency shuttle with lava. What more could you want out of life?" + desc = "The power of fire and rocks in your hands!" icon_state = "staffofstorms" item_state = "staffofstorms" icon = 'icons/obj/guns/magic.dmi' @@ -192,6 +192,12 @@ if(is_type_in_typecache(target, banned_turfs)) return + if(!is_mining_level(user.z)) //Will only spawn a few sparks if not on mining z level + timer = world.time + create_delay + 1 + user.visible_message("[user]'s [src] malfunctions!") + do_sparks(5, FALSE, user) + return + if(target in view(user.client.view, get_turf(user))) var/turf/simulated/T = get_turf(target)