diff --git a/code/game/machinery/computer/computer.dm b/code/game/machinery/computer/computer.dm index ff88f89c5a..b639334c01 100644 --- a/code/game/machinery/computer/computer.dm +++ b/code/game/machinery/computer/computer.dm @@ -101,6 +101,20 @@ return text +/obj/machinery/computer/attack_ghost(user as mob) + return src.attack_hand(user) + +/obj/machinery/computer/attack_hand(user as mob) + /* Observers can view computers, but not actually use them via Topic*/ + if(istype(user, /mob/dead/observer)) return 0 + return ..() + +/obj/machinery/computer/Topic(href, href_list) + /* Can't use topic as observer by default */ + if(istype(usr, /mob/dead/observer)) return 0 + return ..() + + /obj/machinery/computer/attackby(I as obj, user as mob) if(istype(I, /obj/item/weapon/screwdriver) && circuit) playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) diff --git a/code/game/machinery/computer/law.dm b/code/game/machinery/computer/law.dm index 5c970f9d67..2d73e17da8 100644 --- a/code/game/machinery/computer/law.dm +++ b/code/game/machinery/computer/law.dm @@ -50,7 +50,9 @@ else usr << "[src.current.name] selected for law changes." return - + + attack_ghost(user as mob) + return 1 /obj/machinery/computer/borgupload @@ -83,3 +85,6 @@ else usr << "[src.current.name] selected for law changes." return + + attack_ghost(user as mob) + return 1 diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index 04b8c5644a..2ae7abed3d 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -9,6 +9,10 @@ var/one_time_use = 0 //Used for one-time-use teleport cards (such as clown planet coordinates.) //Setting this to 1 will set src.locked to null after a player enters the portal and will not allow hand-teles to open portals to that location. +/* Ghosts can't use this */ +/obj/machinery/computer/attack_ghost(user as mob) + return 1 + /obj/machinery/computer/teleporter/New() src.id = "[rand(1000, 9999)]" ..() @@ -80,9 +84,11 @@ /obj/machinery/teleport/station/attack_ai() src.attack_hand() -/obj/machinery/computer/teleporter/attack_hand() - if(stat & (NOPOWER|BROKEN)) - return +/obj/machinery/computer/teleporter/attack_hand(user as mob) + if(..()) return + + /* Ghosts can't use this one because it's a direct selection */ + if(istype(user, /mob/dead/observer)) return var/list/L = list() var/list/areaindex = list()