Ninjas cannot place the spider bomb in places where it will not detonate (#95858)

This commit is contained in:
Leland Kemble
2026-04-26 15:08:26 +02:00
committed by GitHub
parent c88706c200
commit b5b6c25c7a
@@ -51,7 +51,7 @@
if(!IS_SPACE_NINJA(user))
say("Access denied.")
return FALSE
if(!check_loc(user))
if(!check_loc(bomb_target, user))
return FALSE
if(!..())
return FALSE
@@ -59,7 +59,7 @@
return TRUE
/obj/item/grenade/c4/ninja/detonate(mob/living/lanced_by)
if(!check_loc(detonator.resolve())) // if its moved, deactivate the c4
if(!check_loc(target, detonator.resolve())) // if its moved, deactivate the c4
var/obj/item/grenade/c4/ninja/new_c4 = new /obj/item/grenade/c4/ninja(target.loc)
new_c4.detonation_area = detonation_area
new_c4.say("Invalid location!")
@@ -87,11 +87,11 @@
* Arguments
* * mob/user - The planter of the c4
*/
/obj/item/grenade/c4/ninja/proc/check_loc(mob/user)
/obj/item/grenade/c4/ninja/proc/check_loc(atom/bomb_target, mob/user)
if(isnull(detonation_area))
balloon_alert(user, "no location set!")
return FALSE
if((get_area(target) != detonation_area) && (get_area(src) != detonation_area))
if(get_area(bomb_target) != detonation_area)
if (!active)
balloon_alert(user, "wrong location!")
return FALSE