Energy net tweak to make it less clunky to use.
This commit is contained in:
@@ -59,6 +59,9 @@ It is possible to destroy the net by the occupant or someone else.
|
||||
continue
|
||||
H.dropItemToGround(W)
|
||||
|
||||
if(affecting in GLOB.alive_mob_list) //Feel free to suggest a better check if it's alive.
|
||||
affecting.revive(1, 1) //Basically a full heal, including limbs/organs.
|
||||
|
||||
playsound(affecting, 'sound/effects/sparks4.ogg', 50, 1)
|
||||
new /obj/effect/temp_visual/dir_setting/ninja/phase/out(affecting.drop_location(), affecting.dir)
|
||||
|
||||
|
||||
@@ -2,21 +2,34 @@
|
||||
//Allows the ninja to kidnap people
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjanet()
|
||||
var/mob/living/carbon/human/H = affecting
|
||||
var/mob/living/carbon/C = input("Select who to capture:","Capture who?",null) as null|mob in oview(H)
|
||||
var/mob/living/carbon/C
|
||||
|
||||
//If there's only one valid target, let's actually try to capture it, rather than forcing
|
||||
//the user to fiddle with the dialog displaying a list of one
|
||||
//Also, let's make this smarter and not list mobs you can't currently net.
|
||||
var/Candidates[]
|
||||
for(var/mob/mob in oview(H))
|
||||
if(!mob.client)//Monkeys without a client can still step_to() and bypass the net. Also, netting inactive people is lame.
|
||||
//to_chat(H, "<span class='warning'>[C.p_they(TRUE)] will bring no honor to your Clan!</span>")
|
||||
continue
|
||||
if(locate(/obj/structure/energy_net) in get_turf(mob))//Check if they are already being affected by an energy net.
|
||||
//to_chat(H, "<span class='warning'>[C.p_they(TRUE)] are already trapped inside an energy net!</span>")
|
||||
continue
|
||||
for(var/turf/T in getline(get_turf(H), get_turf(mob)))
|
||||
if(T.density)//Don't want them shooting nets through walls. It's kind of cheesy.
|
||||
//to_chat(H, "<span class='warning'>You may not use an energy net through solid obstacles!</span>")
|
||||
continue
|
||||
Candidates+=mob
|
||||
|
||||
if(Candidates.len == 1)
|
||||
C = Candidates[1]
|
||||
else
|
||||
C = input("Select who to capture:","Capture who?",null) as null|mob in Candidates
|
||||
|
||||
|
||||
if(QDELETED(C)||!(C in oview(H)))
|
||||
return 0
|
||||
|
||||
if(!C.client)//Monkeys without a client can still step_to() and bypass the net. Also, netting inactive people is lame.
|
||||
to_chat(H, "<span class='warning'>[C.p_they(TRUE)] will bring no honor to your Clan!</span>")
|
||||
return
|
||||
if(locate(/obj/structure/energy_net) in get_turf(C))//Check if they are already being affected by an energy net.
|
||||
to_chat(H, "<span class='warning'>[C.p_they(TRUE)] are already trapped inside an energy net!</span>")
|
||||
return
|
||||
for(var/turf/T in getline(get_turf(H), get_turf(C)))
|
||||
if(T.density)//Don't want them shooting nets through walls. It's kind of cheesy.
|
||||
to_chat(H, "<span class='warning'>You may not use an energy net through solid obstacles!</span>")
|
||||
return
|
||||
if(!ninjacost(200,N_STEALTH_CANCEL))
|
||||
H.Beam(C,"n_beam",time=15)
|
||||
H.say("Get over here!", forced = "ninja net")
|
||||
|
||||
Reference in New Issue
Block a user