From 2baaed412202f0f73ae90191b7ed42d5cc4979ed Mon Sep 17 00:00:00 2001 From: SamCroswell Date: Mon, 23 Dec 2013 02:08:10 -0500 Subject: [PATCH] Energy Net Fix I've implemented a fix for the energy net, it's a little hack-ey, but nothing horrible. The original code set your anchor to one, which means you can't be pushed, pulled, or grabbed. The coder seems to have assumed it also restricted your movement, and it does not. So I set the affected mob's weaken to 300, which is more than enough to let the energy net run it's course. And reset it to 0 in the event the net is broken or completes the teleportation. I also removed the inability to kidnap mobs without a player in them, because it's a pain in the ass to test things like this when you need a second player to help you with it. --- code/game/gamemodes/events/ninja_abilities.dm | 44 +++++++++---------- code/game/gamemodes/events/ninja_equipment.dm | 2 + 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/code/game/gamemodes/events/ninja_abilities.dm b/code/game/gamemodes/events/ninja_abilities.dm index 9353dd5801e..abe9a6d9bb5 100644 --- a/code/game/gamemodes/events/ninja_abilities.dm +++ b/code/game/gamemodes/events/ninja_abilities.dm @@ -191,30 +191,30 @@ Must right click on a mob to activate.*/ var/C = 500 if(!ninjacost(C,80)&&iscarbon(M)) // Nets now cost 8,000 var/mob/living/carbon/human/U = affecting - if(M.client)//Monkeys without a client can still step_to() and bypass the net. Also, netting inactive people is lame. + //if(M.client)//Monkeys without a client can still step_to() and bypass the net. Also, netting inactive people is lame. //if(M)//DEBUG - if(!locate(/obj/effect/energy_net) in M.loc)//Check if they are already being affected by an energy net. - for(var/turf/T in getline(U.loc, M.loc)) - if(T.density)//Don't want them shooting nets through walls. It's kind of cheesy. - U << "You may not use an energy net through solid obstacles!" - return - spawn(0) - U.Beam(M,"n_beam",,15) - M.anchored = 1//Anchors them so they can't move. - U.say("Get over here!") - var/obj/effect/energy_net/E = new /obj/effect/energy_net(M.loc) - E.layer = M.layer+1//To have it appear one layer above the mob. - for(var/mob/O in viewers(U, 3)) - O.show_message(text("\red [] caught [] with an energy net!", U, M), 1) - E.affecting = M - E.master = U - spawn(0)//Parallel processing. - E.process(M) - cell.charge-=(C*100) // Nets now cost what should be most of a standard battery, since your taking someone out of the round - else - U << "They are already trapped inside an energy net." + if(!locate(/obj/effect/energy_net) in M.loc)//Check if they are already being affected by an energy net. + for(var/turf/T in getline(U.loc, M.loc)) + if(T.density)//Don't want them shooting nets through walls. It's kind of cheesy. + U << "You may not use an energy net through solid obstacles!" + return + spawn(0) + U.Beam(M,"n_beam",,15) + M.anchored = 1//Anchors them so they can't move. + M.SetWeakened(500) + var/obj/effect/energy_net/E = new /obj/effect/energy_net(M.loc) + E.layer = M.layer+1//To have it appear one layer above the mob. + for(var/mob/O in viewers(U, 3)) + O.show_message(text("\red [] caught [] with an energy net!", U, M), 1) + E.affecting = M + E.master = U + spawn(0)//Parallel processing. + E.process(M) + cell.charge-=(C*100) // Nets now cost what should be most of a standard battery, since your taking someone out of the round else - U << "They will bring no honor to your Clan!" + U << "They are already trapped inside an energy net." + //else + //U << "They will bring no honor to your Clan!" return //=======//ADRENALINE BOOST//=======// diff --git a/code/game/gamemodes/events/ninja_equipment.dm b/code/game/gamemodes/events/ninja_equipment.dm index c05827b1593..af96ca50880 100644 --- a/code/game/gamemodes/events/ninja_equipment.dm +++ b/code/game/gamemodes/events/ninja_equipment.dm @@ -1330,6 +1330,7 @@ It is possible to destroy the net by the occupant or someone else. if(affecting) var/mob/living/carbon/M = affecting M.anchored = 0 + M.SetWeakened(0) for(var/mob/O in viewers(src, 3)) O.show_message(text("[] was recovered from the energy net!", M.name), 1, text("You hear a grunt."), 2) if(!isnull(master))//As long as they still exist. @@ -1386,6 +1387,7 @@ It is possible to destroy the net by the occupant or someone else. master << "\blue SUCCESS: \black transport procedure of \the [affecting] complete." M.anchored = 0//Important. + M.SetWeakened(0) else//And they are free. M << "\blue You are free of the net!"