mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
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
This commit is contained in:
@@ -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: <i>[desc]</i>."
|
||||
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: <i>[word1] [word2] [word3]</i>."
|
||||
else
|
||||
usr << "Explosive Runes inscription in blood. It reads: <i>[desc]</i>."
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -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("<html><head><title>[area.name] APC wires</title></head><body><B>Access Panel</B><br>\n")
|
||||
|
||||
for(var/wiredesc in apcwirelist)
|
||||
@@ -536,6 +522,23 @@
|
||||
user.machine = src
|
||||
var/t = "<html><head><title>[area.name] APC</title></head><body><TT><B>Area Power Controller</B> ([area.name])<HR>"
|
||||
|
||||
//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 += "<I>(Swipe ID card to unlock inteface.)</I><BR>"
|
||||
t += "Main breaker : <B>[operating ? "On" : "Off"]</B><BR>"
|
||||
@@ -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,6 +769,7 @@
|
||||
(istype(robot) && (robot in malfai.connected_robots)) \
|
||||
) \
|
||||
)
|
||||
if(!loud)
|
||||
user << "\red \The [src] have AI control disabled!"
|
||||
user << browse(null, "window=apc")
|
||||
user.machine = null
|
||||
@@ -775,6 +779,7 @@
|
||||
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,7 +792,8 @@
|
||||
return 1
|
||||
|
||||
/obj/machinery/power/apc/Topic(href, href_list, var/usingUI = 1)
|
||||
if (!can_use(usr))
|
||||
if(!(isrobot(usr) && (href_list["apcwires"] || href_list["pulse"])))
|
||||
if(!can_use(usr, 1))
|
||||
return
|
||||
src.add_fingerprint(usr)
|
||||
usr.machine = src
|
||||
|
||||
Reference in New Issue
Block a user