From 1efec9ad2118ff3724e1eb50be409a4a1fab5533 Mon Sep 17 00:00:00 2001 From: "johnsonmt88@gmail.com" Date: Wed, 25 Jul 2012 00:51:17 +0000 Subject: [PATCH] Cyborgs can now repair APC's with the AI wire cut. Fixes Issue 679. - This is a very hackish way to do it.. I don't like it, but it'll work for now. apc's could do with some recoding. Someone seemed to mix up some indentations in cult rune examines. Fixes Issue 680. - Cultists examining a rune will be able to read the words. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4167 316c924e-a436-60f5-8080-3fe189b3f50e --- code/game/magic/cultist/ritual.dm | 6 ++-- code/modules/power/apc.dm | 52 +++++++++++++++++-------------- 2 files changed, 33 insertions(+), 25 deletions(-) diff --git a/code/game/magic/cultist/ritual.dm b/code/game/magic/cultist/ritual.dm index 3d6a42e257..acb0f1849b 100644 --- a/code/game/magic/cultist/ritual.dm +++ b/code/game/magic/cultist/ritual.dm @@ -107,18 +107,20 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology", if(!iscultist(usr)) usr << "A strange collection of symbols drawn in blood." + return + /* Explosions... really? if(desc && !usr.stat) usr << "It reads: [desc]." sleep(30) explosion(src.loc, 0, 2, 5, 5) if(src) del(src) - return - + */ if(!desc) usr << "A spell circle drawn in blood. It reads: [word1] [word2] [word3]." else usr << "Explosive Runes inscription in blood. It reads: [desc]." + return diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 84cbb0234f..c585efc418 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -446,8 +446,8 @@ // attack with hand - remove cell (if cover open) or interact with the APC /obj/machinery/power/apc/attack_hand(mob/user) - if (!can_use(user)) - return +// if (!can_use(user)) This already gets called in interact() and in topic() +// return src.add_fingerprint(user) if(opened && (!istype(user, /mob/living/silicon))) if(cell) @@ -502,21 +502,7 @@ if(!user) return - if ( (get_dist(src, user) > 1 )) - if (!istype(user, /mob/living/silicon)) - user.machine = null - user << browse(null, "window=apc") - return - else if (istype(user, /mob/living/silicon) && src.aidisabled && !src.malfhack) - user << "AI control for this APC interface has been disabled." - user << browse(null, "window=apc") - return - else if (src.malfai) - if ((src.malfai != user && src.malfai != user:parent) && !islinked(user, malfai)) - user << "AI control for this APC interface has been disabled." - user << browse(null, "window=apc") - return - if(wiresexposed && (!istype(user, /mob/living/silicon))) + if(wiresexposed /*&& (!istype(user, /mob/living/silicon))*/) //Commented out the typecheck to allow engiborgs to repair damaged apcs. var/t1 = text("[area.name] APC wiresAccess Panel
\n") for(var/wiredesc in apcwirelist) @@ -536,6 +522,23 @@ user.machine = src var/t = "[area.name] APCArea Power Controller ([area.name])
" + //This goes after the wire stuff. They should be able to fix a physical problem when a wire is cut + if ( (get_dist(src, user) > 1 )) + if (!istype(user, /mob/living/silicon)) + user.machine = null + user << browse(null, "window=apc") + return + else if (istype(user, /mob/living/silicon) && src.aidisabled && !src.malfhack) + user << "AI control for this APC interface has been disabled." + user << browse(null, "window=apc") + return + else if (src.malfai) + if ((src.malfai != user && src.malfai != user:parent) && !islinked(user, malfai)) + user << "AI control for this APC interface has been disabled." + user << browse(null, "window=apc") + return + + if(locked && (!istype(user, /mob/living/silicon))) t += "(Swipe ID card to unlock inteface.)
" t += "Main breaker : [operating ? "On" : "Off"]
" @@ -738,7 +741,7 @@ src.aidisabled = 0 src.updateDialog() -/obj/machinery/power/apc/proc/can_use(mob/user as mob) //used by attack_hand() and Topic() +/obj/machinery/power/apc/proc/can_use(mob/user as mob, var/loud = 0) //used by attack_hand() and Topic() if (user.stat) user << "\red You must be conscious to use this [src]!" return 0 @@ -766,15 +769,17 @@ (istype(robot) && (robot in malfai.connected_robots)) \ ) \ ) - user << "\red \The [src] have AI control disabled!" - user << browse(null, "window=apc") - user.machine = null + if(!loud) + user << "\red \The [src] have AI control disabled!" + user << browse(null, "window=apc") + user.machine = null return 0 else if ((!in_range(src, user) || !istype(src.loc, /turf))) user << browse(null, "window=apc") user.machine = null return 0 + var/mob/living/carbon/human/H = user if (istype(H)) if(H.getBrainLoss() >= 60) @@ -787,8 +792,9 @@ return 1 /obj/machinery/power/apc/Topic(href, href_list, var/usingUI = 1) - if (!can_use(usr)) - return + if(!(isrobot(usr) && (href_list["apcwires"] || href_list["pulse"]))) + if(!can_use(usr, 1)) + return src.add_fingerprint(usr) usr.machine = src if (href_list["apcwires"])