ACTUALLY fixes the spidercharge (#63717)

* fix

* mistake
This commit is contained in:
Seth Scherer
2022-01-03 14:52:23 -06:00
committed by GitHub
parent ee729d3a75
commit 8f7c88059e
+8 -9
View File
@@ -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