From 8f7c88059e5173efcfd786e50bf28475dd1ee2a2 Mon Sep 17 00:00:00 2001 From: Seth Scherer Date: Mon, 3 Jan 2022 15:52:23 -0500 Subject: [PATCH] ACTUALLY fixes the spidercharge (#63717) * fix * mistake --- code/modules/ninja/ninja_explosive.dm | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/code/modules/ninja/ninja_explosive.dm b/code/modules/ninja/ninja_explosive.dm index 66d049e4c00..2e87264f059 100644 --- a/code/modules/ninja/ninja_explosive.dm +++ b/code/modules/ninja/ninja_explosive.dm @@ -23,28 +23,27 @@ return ..() /obj/item/grenade/c4/ninja/detonate(mob/living/lanced_by) + var/datum/antagonist/ninja/ninja_antag = detonator.mind.has_antag_datum(/datum/antagonist/ninja) + if(!check_loc(detonator, ninja_antag)) // if its moved, deactivate the c4 + new /obj/item/grenade/c4/ninja(target.loc) + target.cut_overlay(plastic_overlay, TRUE) + qdel(src) + return . = ..() //Since we already did the checks in afterattack, the denonator must be a ninja with the bomb objective. if(!detonator) return - var/datum/antagonist/ninja/ninja_antag = detonator.mind.has_antag_datum(/datum/antagonist/ninja) - //buuuuuuuuuuuuuuut the c4 may have moved - if(!check_loc(detonator, ninja_antag)) - return var/datum/objective/plant_explosive/objective = locate() in ninja_antag.objectives objective.completed = TRUE /obj/item/grenade/c4/ninja/proc/check_loc(mob/user, datum/antagonist/ninja/ninja_antag) var/datum/objective/plant_explosive/objective = locate() in ninja_antag.objectives if(!objective) - if (active) - say("Invalid location!") - else - to_chat(user, span_notice("You can't seem to activate the charge. It's location-locked, but you don't know where to detonate it.")) + to_chat(user, span_notice("You can't seem to activate the charge. It's location-locked, but you don't know where to detonate it.")) return FALSE if(objective.detonation_location != get_area(user)) if (active) - say("Invalid location!") + say("Invalid location!") // TODO: make c4 code not be complete shit and actually set active to true else to_chat(user, span_notice("This isn't the location you're supposed to use this!")) return FALSE