Merge pull request #12144 from Shadowlight213/MalfBrain

Makes the Ai braindead message not appear if the AI shunts
This commit is contained in:
phil235
2015-10-10 12:21:17 +02:00
3 changed files with 4 additions and 1 deletions
+1
View File
@@ -45,6 +45,7 @@ var/list/ai_list = list()
var/list/datum/AI_Module/current_modules = list()
var/fire_res_on_core = 0
var/can_dominate_mechs = 0
var/shunted = 0 //1 if the AI is currently shunted. Used to differentiate between shunted and ghosted/braindead
var/control_disabled = 0 // Set to 1 to stop AI from interacting via Click()
var/malfhacking = 0 // More or less a copy of the above var, so that malf AIs can hack and still get new cyborgs -- NeoFite
@@ -18,7 +18,7 @@
if (src.stat == UNCONSCIOUS)
msg += "It is non-responsive and displaying the text: \"RUNTIME: Sensory Overload, stack 26/3\".\n"
msg += "</span>"
if (!src.client)
if (shunted == 0 && !src.client)
msg += "[src]Core.exe has stopped responding! NTOS is searching for a solution to the problem...\n"
msg += "*---------*</span>"
+2
View File
@@ -886,6 +886,7 @@
src.occupier.parent = malf.parent
else
src.occupier.parent = malf
malf.shunted = 1
malf.mind.transfer_to(src.occupier)
src.occupier.eyeobj.name = "[src.occupier.name] (AI Eye)"
if(malf.parent)
@@ -903,6 +904,7 @@
return
if(src.occupier.parent && src.occupier.parent.stat != 2)
src.occupier.mind.transfer_to(src.occupier.parent)
src.occupier.parent.shunted = 0
src.occupier.parent.adjustOxyLoss(src.occupier.getOxyLoss())
src.occupier.parent.cancel_camera()
qdel(src.occupier)