mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Malf AIs get a screen alarm while hacking, fixes a bug with hacking APCs (#27836)
* new screen alarm, show it to ais, fix endless hacking * dumb mistake * why are alerts so fucking annoying * jump to the APC * new malf spell backround * haha dont leave it at 999
This commit is contained in:
@@ -76,6 +76,7 @@
|
||||
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/malfhack = 0 //New var for my changes to AI malf. --NeoFite
|
||||
var/mob/living/silicon/ai/hacking_ai = null //The AI that is currently attempting to hack this APC
|
||||
var/mob/living/silicon/ai/malfai = null //See above --NeoFite
|
||||
var/malflocked = 0 //used for malfs locking down APCs
|
||||
// luminosity = 1
|
||||
@@ -930,11 +931,14 @@
|
||||
to_chat(malfai, "Beginning override of APC systems. This will take [time_required/10] seconds, and you cannot hack other APC's during the process.")
|
||||
malfai.malfhack = src
|
||||
malfai.malfhacking = 1
|
||||
hacking_ai = malfai
|
||||
malfai.handle_regular_hud_updates()
|
||||
sleep(time_required)
|
||||
if(src && malfai)
|
||||
if (!src.aidisabled)
|
||||
malfai.malfhack = null
|
||||
malfai.malfhacking = 0
|
||||
hacking_ai = null
|
||||
locked = 1
|
||||
if(M && STATION_Z == z)
|
||||
M.apcs++
|
||||
@@ -943,6 +947,7 @@
|
||||
else
|
||||
src.malfai = usr
|
||||
to_chat(malfai, "Hack complete. The APC is now under your exclusive control. [STATION_Z == z?"You now have [M.apcs] under your control.":"As this APC is not located on the station, it is not contributing to your control of it."]")
|
||||
malfai.handle_regular_hud_updates()
|
||||
update_icon()
|
||||
|
||||
else if (href_list["occupyapc"])
|
||||
@@ -1001,7 +1006,7 @@
|
||||
if(malf.parent)
|
||||
qdel(malf)
|
||||
malf = null
|
||||
src.occupant.add_spell(new /spell/aoe_turf/corereturn, "grey_spell_ready",/obj/abstract/screen/movable/spell_master/malf)
|
||||
src.occupant.add_spell(new /spell/aoe_turf/corereturn, "malf_spell_ready",/obj/abstract/screen/movable/spell_master/malf)
|
||||
src.occupant.cancel_camera()
|
||||
if (seclevel2num(get_security_level()) == SEC_LEVEL_DELTA)
|
||||
for(var/obj/item/weapon/pinpointer/point in pinpointer_list)
|
||||
@@ -1335,6 +1340,10 @@ obj/machinery/power/apc/proc/autoset(var/val, var/on)
|
||||
var/area/this_area = get_area(src)
|
||||
if(this_area.areaapc == src)
|
||||
this_area.remove_apc(src)
|
||||
if(hacking_ai) //APC got destroyed mid-hack
|
||||
hacking_ai.malfhack = null
|
||||
hacking_ai.malfhacking = 0
|
||||
to_chat(hacking_ai, "<span class='warning'>The APC you were currently hacking was destroyed.</span>")
|
||||
if(malfai && operating)
|
||||
var/datum/faction/malf/M = find_active_faction_by_type(/datum/faction/malf)
|
||||
if (M && STATION_Z == z)
|
||||
|
||||
Reference in New Issue
Block a user