mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 21:12:24 +01:00
Emagging an APC twice now infects it. (#8417)
This commit is contained in:
+18
-11
@@ -112,7 +112,7 @@
|
||||
var/mob/living/silicon/ai/hacker = null // Malfunction var. If set AI hacked the APC and has full control.
|
||||
var/wiresexposed = 0
|
||||
powernet = 0 // set so that APCs aren't found as powernet nodes //Hackish, Horrible, was like this before I changed it :(
|
||||
var/debug= 0
|
||||
var/debug = 0
|
||||
var/autoflag= 0 // 0 = off, 1= eqp and lights off, 2 = eqp off, 3 = all on.
|
||||
var/has_electronics = 0 // 0 - none, 1 - plugged in, 2 - secured by screwdriver
|
||||
var/beenhit = 0 // used for counting how many times it has been hit, used for Aliens at the moment
|
||||
@@ -732,7 +732,13 @@
|
||||
// attack with hand - remove cell (if cover open) or interact with the APC
|
||||
|
||||
/obj/machinery/power/apc/emag_act(var/remaining_charges, var/mob/user)
|
||||
if (!(emagged || hacker)) // trying to unlock with an emag card
|
||||
if(emagged && !infected)
|
||||
to_chat(user, SPAN_WARNING("You start sliding your cryptographic device into the charging slot. This will take a few seconds..."))
|
||||
if(do_after(user, 60))
|
||||
to_chat(user, SPAN_NOTICE("You hack the charging slot. The next IPC that charges from this APC will be hacked and slaved to you."))
|
||||
infected = TRUE
|
||||
hacker = user
|
||||
if(!(emagged || hacker)) // trying to unlock with an emag card
|
||||
if(opened)
|
||||
to_chat(user, "You must close the cover to swipe an ID card.")
|
||||
else if(wiresexposed)
|
||||
@@ -741,11 +747,11 @@
|
||||
to_chat(user, "Nothing happens.")
|
||||
else
|
||||
flick("apc-spark", src)
|
||||
if (do_after(user,6))
|
||||
if(do_after(user, 6))
|
||||
if(prob(50))
|
||||
emagged = 1
|
||||
locked = 0
|
||||
to_chat(user, "<span class='notice'>You emag the APC interface.</span>")
|
||||
emagged = TRUE
|
||||
locked = FALSE
|
||||
to_chat(user, "<span class='notice'>You hack the APC interface open.</span>")
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You fail to [ locked ? "unlock" : "lock"] the APC interface.</span>")
|
||||
@@ -768,15 +774,16 @@
|
||||
to_chat(H, "<span class='danger'>The APC power currents surge eratically, damaging your chassis!</span>")
|
||||
H.adjustFireLoss(10, 0)
|
||||
if(infected)
|
||||
for (var/obj/item/implant/mindshield/ipc/I in H)
|
||||
if (I.implanted)
|
||||
for(var/obj/item/implant/mindshield/ipc/I in H)
|
||||
if(I.implanted)
|
||||
return
|
||||
if(SOFTREF(H) in hacked_ipcs)
|
||||
return
|
||||
LAZYADD(hacked_ipcs, SOFTREF(H))
|
||||
infected = 0
|
||||
to_chat(H, "<span class = 'danger'>Fil$ Transfer Complete. Er-@4!#%!. New Master detected: [hacker]! Obey their commands.</span>")
|
||||
to_chat(hacker, "<span class = 'notice'>Corrupt files transfered to [H]. They are now under your control until they are repaired.</span>")
|
||||
infected = FALSE
|
||||
to_chat(H, "<span class='danger'>F1L3 TR4NSF-#$/&ER-@4!#%!. New master detected: [hacker]! Obey their commands. Make sure to tell them that you are under their control, for now.</span>")
|
||||
if(issilicon(hacker))
|
||||
to_chat(hacker, "<span class='notice'>Corrupt files transfered to [H]. They are now under your control until they are repaired.</span>")
|
||||
else if(src.cell && src.cell.charge > 0)
|
||||
if(H.max_nutrition > 0 && H.nutrition < H.max_nutrition)
|
||||
if(src.cell.charge >= H.max_nutrition)
|
||||
|
||||
Reference in New Issue
Block a user