From 5524b0fa039480b19738ccd6cae0fe520fbe6860 Mon Sep 17 00:00:00 2001 From: Seris02 Date: Mon, 20 Jan 2020 13:00:24 +0800 Subject: [PATCH] yes. --- code/datums/action.dm | 4 ++-- code/game/machinery/_machinery.dm | 2 +- .../objects/items/implants/implant_hijack.dm | 17 ++++++++++------- code/modules/power/apc.dm | 2 +- code/modules/power/lighting.dm | 2 +- 5 files changed, 15 insertions(+), 12 deletions(-) diff --git a/code/datums/action.dm b/code/datums/action.dm index 4b0f25ee5b..2eb8e5a350 100644 --- a/code/datums/action.dm +++ b/code/datums/action.dm @@ -559,7 +559,7 @@ return var/area/area = areas[removeAPC] var/obj/machinery/power/apc/apc = area.get_apc() - if (!apc) + if (!apc || !(apc in owner.siliconaccessareas)) return apc.hijacker = null apc.update_icon() @@ -581,7 +581,7 @@ return var/area/area = areas[accessAPC] var/obj/machinery/power/apc/apc = area.get_apc() - if (!apc) + if (!apc || !(apc in owner.siliconaccessareas)) return apc.ui_interact(owner) diff --git a/code/game/machinery/_machinery.dm b/code/game/machinery/_machinery.dm index 4ceefa94f6..0beec56d4d 100644 --- a/code/game/machinery/_machinery.dm +++ b/code/game/machinery/_machinery.dm @@ -224,7 +224,7 @@ Class Procs: return !(stat & (NOPOWER|BROKEN|MAINT)) /obj/machinery/can_interact(mob/user) - var/silicon = issiliconoradminghost(user) || hasSiliconAccessInArea(user,get_area(src)) + var/silicon = hasSiliconAccessInArea(user,get_area(src)) || IsAdminGhost(user) if((stat & (NOPOWER|BROKEN)) && !(interaction_flags_machine & INTERACT_MACHINE_OFFLINE)) return FALSE if(panel_open && !(interaction_flags_machine & INTERACT_MACHINE_OPEN)) diff --git a/code/game/objects/items/implants/implant_hijack.dm b/code/game/objects/items/implants/implant_hijack.dm index 0601c4a4f9..81078a47ed 100644 --- a/code/game/objects/items/implants/implant_hijack.dm +++ b/code/game/objects/items/implants/implant_hijack.dm @@ -8,8 +8,8 @@ var/toggled = FALSE icon_state = "hijack" var/eye_color - var/stealthmode = FALSE - var/stealthcooldown = 0 + //var/stealthmode = FALSE + //var/stealthcooldown = 0 /obj/item/implant/hijack/activate() . = ..() @@ -18,13 +18,13 @@ imp_in.click_intercept = src imp_in.siliconaccesstoggle = TRUE to_chat(imp_in,"You turn on [src]'s silicon interactions.") - if (ishuman(imp_in) && !stealthmode) + if (ishuman(imp_in)/* && !stealthmode*/) toggle_eyes(TRUE) else imp_in.click_intercept = null imp_in.siliconaccesstoggle = FALSE to_chat(imp_in,"You turn off [src]'s silicon interactions.") - if (ishuman(imp_in) && !stealthmode) + if (ishuman(imp_in)/* && !stealthmode*/) toggle_eyes(FALSE) /obj/item/implant/hijack/proc/toggle_eyes(on) @@ -58,8 +58,8 @@ /obj/item/implant/hijack/proc/InterceptClickOn(mob/living/user,params,atom/object) if (user.get_active_held_item() || isitem(object) || !toggled || user.incapacitated()) return - if (stealthmode == FALSE && istype(object,/obj/machinery/power/apc)) - hijack_remotely() + //if (stealthmode == FALSE && istype(object,/obj/machinery/power/apc)) + // hijack_remotely() var/area/a = get_area(object) if (!hasSiliconAccessInArea(imp_in,a)) return @@ -80,6 +80,7 @@ object.attack_ai(imp_in) return TRUE +/* for later /obj/item/implant/hijack/proc/hijack_remotely(/obj/machinery/power/apc/apc) if (apc.hijacker) return //can't remotely hijack an already hijacked APC @@ -89,4 +90,6 @@ apc.update_icon() cooldown = world.time + 2 MINUTES toggle_eyes(TRUE) - stealthmode = FALSE \ No newline at end of file + stealthmode = FALSE + +*/ \ No newline at end of file diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index db4f7ee1ad..dfea727a87 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -970,7 +970,7 @@ . = ..() if (!QDELETED(remote_control) && user == remote_control.operator) . = UI_INTERACTIVE - if (hasSiliconAccessInArea(user,area)) + if (user == hijacker && hasSiliconAccessInArea(user,area)) . = UI_INTERACTIVE /obj/machinery/power/apc/ui_act(action, params) diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index b0e79ea44b..1f05c7298e 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -333,7 +333,7 @@ else if (hijacked) BR = BR * 1.5 PO = PO * 1.5 - CO = color ? color : LIGHT_COLOR_YELLOW + CO = color || LIGHT_COLOR_YELLOW else if (nightshift_enabled) BR = nightshift_brightness PO = nightshift_light_power