mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 03:25:49 +01:00
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.
This commit is contained in:
@@ -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//=======//
|
||||
|
||||
@@ -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 <b>SUCCESS</b>: \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!"
|
||||
|
||||
Reference in New Issue
Block a user