mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
AI APC hacking improvements (#19203)
* AI hacking timer moved to AI mob from APC * Adds APC hacking alert * Adds notification when hacking an APC
This commit is contained in:
@@ -212,7 +212,6 @@
|
||||
var/datum/browser/popup = new(user, "microwave", name, 300, 300)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
return
|
||||
|
||||
/***********************************
|
||||
* Microwave Menu Handling/Cooking
|
||||
@@ -340,4 +339,3 @@
|
||||
if ("dispose")
|
||||
dispose()
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
@@ -156,7 +156,9 @@ var/list/ai_list = list()
|
||||
shuttle_caller_list -= src
|
||||
SSshuttle.autoEvac()
|
||||
qdel(eyeobj) // No AI, no Eye
|
||||
return ..()
|
||||
malfhack = null
|
||||
|
||||
. = ..()
|
||||
|
||||
|
||||
/mob/living/silicon/ai/verb/pick_icon()
|
||||
@@ -319,8 +321,6 @@ var/list/ai_list = list()
|
||||
if(C)
|
||||
C.post_status("shuttle")
|
||||
|
||||
return
|
||||
|
||||
/mob/living/silicon/ai/cancel_camera()
|
||||
src.view_core()
|
||||
|
||||
@@ -384,8 +384,6 @@ var/list/ai_list = list()
|
||||
if (stat != DEAD)
|
||||
adjustBruteLoss(30)
|
||||
|
||||
return
|
||||
|
||||
/mob/living/silicon/ai/Topic(href, href_list)
|
||||
if(usr != src)
|
||||
return
|
||||
@@ -469,7 +467,6 @@ var/list/ai_list = list()
|
||||
return
|
||||
|
||||
..()
|
||||
return
|
||||
|
||||
/mob/living/silicon/ai/proc/switchCamera(obj/machinery/camera/C)
|
||||
|
||||
@@ -745,7 +742,6 @@ var/list/ai_list = list()
|
||||
light_cameras()
|
||||
|
||||
src << "Camera lights activated."
|
||||
return
|
||||
|
||||
//AI_CAMERA_LUMINOSITY
|
||||
|
||||
@@ -897,3 +893,27 @@ var/list/ai_list = list()
|
||||
if(..()) //successfully ressuscitated from death
|
||||
icon_state = "ai"
|
||||
. = 1
|
||||
|
||||
/mob/living/silicon/ai/proc/malfhacked(obj/machinery/power/apc/apc)
|
||||
malfhack = null
|
||||
malfhacking = FALSE
|
||||
|
||||
if(!istype(apc) || qdeleted(apc) || apc.stat & BROKEN)
|
||||
src << "Hack aborted. The designated APC no longer exists on the \
|
||||
power network."
|
||||
playsound(get_turf(src), 'sound/machines/buzz-two.ogg', 50, 1)
|
||||
else if(apc.aidisabled)
|
||||
src << "Hack aborted. \The [apc] is no longer responding \
|
||||
to our systems."
|
||||
playsound(get_turf(src), 'sound/machines/buzz-sigh.ogg', 50, 1)
|
||||
else
|
||||
malf_picker.processing_time += 10
|
||||
|
||||
apc.malfai = parent || src
|
||||
apc.malfhack = TRUE
|
||||
apc.locked = TRUE
|
||||
|
||||
playsound(get_turf(src), 'sound/machines/ding.ogg', 50, 1)
|
||||
src << "Hack complete. \The [apc] is now under your \
|
||||
exclusive control."
|
||||
apc.update_icon()
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
setDir(SOUTH)
|
||||
|
||||
if(auto_name)
|
||||
name = "[get_area(src)] APC"
|
||||
name = "\improper [get_area(src)] APC"
|
||||
|
||||
pixel_x = (src.tdir & 3)? 0 : (src.tdir == 4 ? 24 : -24)
|
||||
pixel_y = (src.tdir & 3)? (src.tdir ==1 ? 24 : -24) : 0
|
||||
@@ -147,7 +147,7 @@
|
||||
qdel(cell)
|
||||
if(terminal)
|
||||
disconnect_terminal()
|
||||
return ..()
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/power/apc/proc/make_terminal()
|
||||
// create a terminal object at the same position as original turf loc
|
||||
@@ -797,24 +797,11 @@
|
||||
malf << "Beginning override of APC systems. This takes some time, and you cannot perform other actions during the process."
|
||||
malf.malfhack = src
|
||||
malf.malfhacking = TRUE
|
||||
addtimer(src, "malfhacked", 600, FALSE, malf)
|
||||
addtimer(malf, "malfhacked", 600, FALSE, src)
|
||||
|
||||
/obj/machinery/power/apc/proc/malfhacked(mob/living/silicon/ai/malf)
|
||||
if(!istype(malf))
|
||||
return
|
||||
malf.malfhack = null
|
||||
malf.malfhacking = FALSE
|
||||
if(src && !src.aidisabled)
|
||||
malf.malf_picker.processing_time += 10
|
||||
|
||||
malfai = malf.parent || malf
|
||||
malfhack = TRUE
|
||||
locked = TRUE
|
||||
|
||||
malf << "Hack complete. The APC is now under your exclusive control."
|
||||
update_icon()
|
||||
else
|
||||
malf << "Hack aborted. The designated APC has stopped responding and no longer exists on the power network."
|
||||
var/obj/screen/alert/hackingapc/A
|
||||
A = malf.throw_alert("hackingapc", /obj/screen/alert/hackingapc)
|
||||
A.target = src
|
||||
|
||||
/obj/machinery/power/apc/proc/malfoccupy(mob/living/silicon/ai/malf)
|
||||
if(!istype(malf))
|
||||
|
||||
Reference in New Issue
Block a user