mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 22:19:30 +01:00
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user