From f9c249b644a5a3a6f8e3dfa20d70150cc640b183 Mon Sep 17 00:00:00 2001 From: Useroth Date: Sat, 27 Apr 2019 15:03:34 +0200 Subject: [PATCH] Energy net tweak to make it less clunky to use. --- .../suit/n_suit_verbs/energy_net_nets.dm | 3 ++ .../ninja/suit/n_suit_verbs/ninja_net.dm | 35 +++++++++++++------ 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm b/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm index 270e1f106f..e2609e8d09 100644 --- a/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm +++ b/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm @@ -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) diff --git a/code/modules/ninja/suit/n_suit_verbs/ninja_net.dm b/code/modules/ninja/suit/n_suit_verbs/ninja_net.dm index 8c8f92e522..41f7b8af83 100644 --- a/code/modules/ninja/suit/n_suit_verbs/ninja_net.dm +++ b/code/modules/ninja/suit/n_suit_verbs/ninja_net.dm @@ -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, "[C.p_they(TRUE)] will bring no honor to your Clan!") + 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, "[C.p_they(TRUE)] are already trapped inside an energy net!") + 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, "You may not use an energy net through solid obstacles!") + 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, "[C.p_they(TRUE)] will bring no honor to your Clan!") - 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, "[C.p_they(TRUE)] are already trapped inside an energy net!") - 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, "You may not use an energy net through solid obstacles!") - return if(!ninjacost(200,N_STEALTH_CANCEL)) H.Beam(C,"n_beam",time=15) H.say("Get over here!", forced = "ninja net")