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))
|
if(!iscultist(usr))
|
||||||
usr << "A strange collection of symbols drawn in blood."
|
usr << "A strange collection of symbols drawn in blood."
|
||||||
|
return
|
||||||
|
/* Explosions... really?
|
||||||
if(desc && !usr.stat)
|
if(desc && !usr.stat)
|
||||||
usr << "It reads: <i>[desc]</i>."
|
usr << "It reads: <i>[desc]</i>."
|
||||||
sleep(30)
|
sleep(30)
|
||||||
explosion(src.loc, 0, 2, 5, 5)
|
explosion(src.loc, 0, 2, 5, 5)
|
||||||
if(src)
|
if(src)
|
||||||
del(src)
|
del(src)
|
||||||
return
|
*/
|
||||||
|
|
||||||
if(!desc)
|
if(!desc)
|
||||||
usr << "A spell circle drawn in blood. It reads: <i>[word1] [word2] [word3]</i>."
|
usr << "A spell circle drawn in blood. It reads: <i>[word1] [word2] [word3]</i>."
|
||||||
else
|
else
|
||||||
usr << "Explosive Runes inscription in blood. It reads: <i>[desc]</i>."
|
usr << "Explosive Runes inscription in blood. It reads: <i>[desc]</i>."
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -446,8 +446,8 @@
|
|||||||
// attack with hand - remove cell (if cover open) or interact with the APC
|
// attack with hand - remove cell (if cover open) or interact with the APC
|
||||||
|
|
||||||
/obj/machinery/power/apc/attack_hand(mob/user)
|
/obj/machinery/power/apc/attack_hand(mob/user)
|
||||||
if (!can_use(user))
|
// if (!can_use(user)) This already gets called in interact() and in topic()
|
||||||
return
|
// return
|
||||||
src.add_fingerprint(user)
|
src.add_fingerprint(user)
|
||||||
if(opened && (!istype(user, /mob/living/silicon)))
|
if(opened && (!istype(user, /mob/living/silicon)))
|
||||||
if(cell)
|
if(cell)
|
||||||
@@ -502,21 +502,7 @@
|
|||||||
if(!user)
|
if(!user)
|
||||||
return
|
return
|
||||||
|
|
||||||
if ( (get_dist(src, user) > 1 ))
|
if(wiresexposed /*&& (!istype(user, /mob/living/silicon))*/) //Commented out the typecheck to allow engiborgs to repair damaged apcs.
|
||||||
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)))
|
|
||||||
var/t1 = text("<html><head><title>[area.name] APC wires</title></head><body><B>Access Panel</B><br>\n")
|
var/t1 = text("<html><head><title>[area.name] APC wires</title></head><body><B>Access Panel</B><br>\n")
|
||||||
|
|
||||||
for(var/wiredesc in apcwirelist)
|
for(var/wiredesc in apcwirelist)
|
||||||
@@ -536,6 +522,23 @@
|
|||||||
user.machine = src
|
user.machine = src
|
||||||
var/t = "<html><head><title>[area.name] APC</title></head><body><TT><B>Area Power Controller</B> ([area.name])<HR>"
|
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)))
|
if(locked && (!istype(user, /mob/living/silicon)))
|
||||||
t += "<I>(Swipe ID card to unlock inteface.)</I><BR>"
|
t += "<I>(Swipe ID card to unlock inteface.)</I><BR>"
|
||||||
t += "Main breaker : <B>[operating ? "On" : "Off"]</B><BR>"
|
t += "Main breaker : <B>[operating ? "On" : "Off"]</B><BR>"
|
||||||
@@ -738,7 +741,7 @@
|
|||||||
src.aidisabled = 0
|
src.aidisabled = 0
|
||||||
src.updateDialog()
|
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)
|
if (user.stat)
|
||||||
user << "\red You must be conscious to use this [src]!"
|
user << "\red You must be conscious to use this [src]!"
|
||||||
return 0
|
return 0
|
||||||
@@ -766,15 +769,17 @@
|
|||||||
(istype(robot) && (robot in malfai.connected_robots)) \
|
(istype(robot) && (robot in malfai.connected_robots)) \
|
||||||
) \
|
) \
|
||||||
)
|
)
|
||||||
user << "\red \The [src] have AI control disabled!"
|
if(!loud)
|
||||||
user << browse(null, "window=apc")
|
user << "\red \The [src] have AI control disabled!"
|
||||||
user.machine = null
|
user << browse(null, "window=apc")
|
||||||
|
user.machine = null
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
if ((!in_range(src, user) || !istype(src.loc, /turf)))
|
if ((!in_range(src, user) || !istype(src.loc, /turf)))
|
||||||
user << browse(null, "window=apc")
|
user << browse(null, "window=apc")
|
||||||
user.machine = null
|
user.machine = null
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
var/mob/living/carbon/human/H = user
|
var/mob/living/carbon/human/H = user
|
||||||
if (istype(H))
|
if (istype(H))
|
||||||
if(H.getBrainLoss() >= 60)
|
if(H.getBrainLoss() >= 60)
|
||||||
@@ -787,8 +792,9 @@
|
|||||||
return 1
|
return 1
|
||||||
|
|
||||||
/obj/machinery/power/apc/Topic(href, href_list, var/usingUI = 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"])))
|
||||||
return
|
if(!can_use(usr, 1))
|
||||||
|
return
|
||||||
src.add_fingerprint(usr)
|
src.add_fingerprint(usr)
|
||||||
usr.machine = src
|
usr.machine = src
|
||||||
if (href_list["apcwires"])
|
if (href_list["apcwires"])
|
||||||
|
|||||||
Reference in New Issue
Block a user