From f3effa8df79d8e9fda9fa93f2257e6ff1a53b1b6 Mon Sep 17 00:00:00 2001 From: Kelenius Date: Mon, 5 Oct 2015 11:40:19 +0300 Subject: [PATCH] Basic encryption hack popup only shows suitable APCs --- .../malfunction/newmalf_ability_trees/HELPERS.dm | 8 +++++--- .../malfunction/newmalf_ability_trees/tree_networking.dm | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/code/game/gamemodes/malfunction/newmalf_ability_trees/HELPERS.dm b/code/game/gamemodes/malfunction/newmalf_ability_trees/HELPERS.dm index 69794c9af3..0d9519504f 100644 --- a/code/game/gamemodes/malfunction/newmalf_ability_trees/HELPERS.dm +++ b/code/game/gamemodes/malfunction/newmalf_ability_trees/HELPERS.dm @@ -163,12 +163,14 @@ command_announcement.Announce(fulltext) -// Proc: get_all_apcs() +// Proc: get_unhacked_apcs() // Parameters: None -// Description: Returns a list of all APCs -/proc/get_all_apcs() +// Description: Returns a list of all unhacked APCs +/proc/get_unhacked_apcs(var/mob/living/silicon/ai/user) var/list/H = list() for(var/obj/machinery/power/apc/A in machines) + if(A.hacker && A.hacker == user) + continue H.Add(A) return H diff --git a/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_networking.dm b/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_networking.dm index f1bad288ad..4a163884c4 100644 --- a/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_networking.dm +++ b/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_networking.dm @@ -38,7 +38,7 @@ // END RESEARCH DATUMS // BEGIN ABILITY VERBS -/datum/game_mode/malfunction/verb/basic_encryption_hack(obj/machinery/power/apc/A as obj in get_all_apcs()) +/datum/game_mode/malfunction/verb/basic_encryption_hack(obj/machinery/power/apc/A as obj in get_unhacked_apcs(src)) set category = "Software" set name = "Basic Encryption Hack" set desc = "10 CPU - Basic encryption hack that allows you to overtake APCs on the station."