Merge pull request #11244 from Kelenius/hackMe

Basic encryption hack popup only shows suitable APCs
This commit is contained in:
Chinsky
2015-10-06 20:29:51 +03:00
2 changed files with 6 additions and 4 deletions

View File

@@ -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

View File

@@ -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."