From b2192f053016f350e9cc685576f6a337b5bb1ac5 Mon Sep 17 00:00:00 2001 From: Ghommie Date: Sun, 7 Jul 2019 05:06:03 +0200 Subject: [PATCH 1/3] Fixes up space ninja's energy net. --- .../suit/n_suit_verbs/energy_net_nets.dm | 4 +-- .../ninja/suit/n_suit_verbs/ninja_net.dm | 32 ++++++++++--------- 2 files changed, 19 insertions(+), 17 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 c98a0440e3..334136cc33 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 @@ -18,8 +18,8 @@ It is possible to destroy the net by the occupant or someone else. can_buckle = 1 buckle_lying = 0 buckle_prevents_pull = TRUE - var/mob/living/carbon/affecting//Who it is currently affecting, if anyone. - var/mob/living/carbon/master//Who shot web. Will let this person know if the net was successful or failed. + var/mob/living/carbon/affecting //Who it is currently affecting, if anyone. + var/mob/living/carbon/master //Who shot web. Will let this person know if the net was successful or failed. var/check = 15//30 seconds before teleportation. Could be extended I guess. var/success = FALSE 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 41f7b8af83..24105dbb0b 100644 --- a/code/modules/ninja/suit/n_suit_verbs/ninja_net.dm +++ b/code/modules/ninja/suit/n_suit_verbs/ninja_net.dm @@ -7,28 +7,30 @@ //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!") + var/list/candidates = list() + for(var/mob/M in oview(H)) + if(!M.client)//Monkeys without a client can still step_to() and bypass the net. Also, netting inactive people is lame. 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!") + for(var/obj/structure/energy_net/E in get_turf(M))//Check if they are already being affected by an energy net. + if(E.affecting == M) continue - Candidates+=mob + for(var/A in getline(get_turf(H), get_turf(M))) + var/turf/T = A + if(is_blocked_turf(T, TRUE)) //Don't want them shooting nets through walls. It's kind of cheesy. + continue + LAZYADD(candidates, M) - if(Candidates.len == 1) - C = Candidates[1] + if(!LAZYLEN(candidates)) + return FALSE + + if(candidates.len == 1) + C = candidates[1] else - C = input("Select who to capture:","Capture who?",null) as null|mob in Candidates + C = input("Select who to capture:","Capture who?",null) as null|mob in candidates if(QDELETED(C)||!(C in oview(H))) - return 0 + return FALSE if(!ninjacost(200,N_STEALTH_CANCEL)) H.Beam(C,"n_beam",time=15) From 696dd2839b5229050db139b360b8db5afce67550 Mon Sep 17 00:00:00 2001 From: Ghommie Date: Sun, 7 Jul 2019 05:13:14 +0200 Subject: [PATCH 2/3] clunky. --- code/modules/ninja/suit/n_suit_verbs/ninja_net.dm | 4 ---- 1 file changed, 4 deletions(-) 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 24105dbb0b..a22ab6e5f3 100644 --- a/code/modules/ninja/suit/n_suit_verbs/ninja_net.dm +++ b/code/modules/ninja/suit/n_suit_verbs/ninja_net.dm @@ -14,10 +14,6 @@ for(var/obj/structure/energy_net/E in get_turf(M))//Check if they are already being affected by an energy net. if(E.affecting == M) continue - for(var/A in getline(get_turf(H), get_turf(M))) - var/turf/T = A - if(is_blocked_turf(T, TRUE)) //Don't want them shooting nets through walls. It's kind of cheesy. - continue LAZYADD(candidates, M) if(!LAZYLEN(candidates)) From 3404131f3a8a6960e10314baf1bffe8abc56b4a2 Mon Sep 17 00:00:00 2001 From: Ghommie Date: Sun, 7 Jul 2019 05:19:13 +0200 Subject: [PATCH 3/3] don't init yet. --- code/modules/ninja/suit/n_suit_verbs/ninja_net.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 a22ab6e5f3..61355ca89b 100644 --- a/code/modules/ninja/suit/n_suit_verbs/ninja_net.dm +++ b/code/modules/ninja/suit/n_suit_verbs/ninja_net.dm @@ -7,7 +7,7 @@ //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/list/candidates = list() + var/list/candidates for(var/mob/M in oview(H)) if(!M.client)//Monkeys without a client can still step_to() and bypass the net. Also, netting inactive people is lame. continue