From 1105514f1765db0dadd84e51235be6f3c0aed772 Mon Sep 17 00:00:00 2001 From: TullyBurnalot Date: Tue, 12 Jul 2016 00:08:56 +0100 Subject: [PATCH 1/5] Revamps AI Integrity EMP'ing - AI Integrity Restorer can no longer be broken if EMP'd; - AIs inside AI Integrity Restorers suffer 200 Brute Damage if the Restorer is hit by an EMP - If the AI Integrity Restorer is hit by an EMP, the restoration process is stopped and the AI takes 200 Brute Loss --- code/game/machinery/computer/aifixer.dm | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/code/game/machinery/computer/aifixer.dm b/code/game/machinery/computer/aifixer.dm index 343f421b4e8..4cf4cd4e45d 100644 --- a/code/game/machinery/computer/aifixer.dm +++ b/code/game/machinery/computer/aifixer.dm @@ -7,17 +7,11 @@ req_access = list(access_captain, access_robotics, access_heads) var/mob/living/silicon/ai/occupant = null var/active = 0 + var/restoring = 0 light_color = LIGHT_COLOR_PURPLE /obj/machinery/computer/aifixer/attackby(I as obj, user as mob, params) - if(occupant && istype(I, /obj/item/weapon/screwdriver)) - if(stat & (NOPOWER|BROKEN)) - to_chat(user, "The screws on [name]'s screen won't budge.") - else - to_chat(user, "The screws on [name]'s screen won't budge and it emits a warning beep.") - return - else ..() /obj/machinery/computer/aifixer/attack_ai(var/mob/user as mob) @@ -62,7 +56,8 @@ if(href_list["fix"]) src.active = 1 - while(src.occupant.health < 100) + restoring = 1 + while(src.occupant.health < 100 && restoring) src.occupant.adjustOxyLoss(-1) src.occupant.adjustFireLoss(-1) src.occupant.adjustToxLoss(-1) @@ -74,6 +69,7 @@ dead_mob_list -= src.occupant living_mob_list += src.occupant sleep(10) + restoring = 0 src.active = 0 src.add_fingerprint(usr) @@ -135,3 +131,10 @@ to_chat(user, "ERROR: Reconstruction in progress.") else if(!occupant) to_chat(user, "ERROR: Unable to locate artificial intelligence.") + +/obj/machinery/computer/aifixer/emp_act() + if(occupant) + restoring = 0 + occupant.adjustBruteLoss(200) + return + ..() \ No newline at end of file From 8682da932a5f24c983fb7a5e1d8686865cf880f5 Mon Sep 17 00:00:00 2001 From: TullyBurnalot Date: Tue, 12 Jul 2016 04:09:49 +0100 Subject: [PATCH 2/5] EMPing Restorers kills AIs inside - No needless merges happened - AI Integrity Restorers, if EMP'd, ghost any AI player inside, then destroys said AI --- code/game/machinery/computer/aifixer.dm | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/code/game/machinery/computer/aifixer.dm b/code/game/machinery/computer/aifixer.dm index 4cf4cd4e45d..0cbd12a5d0d 100644 --- a/code/game/machinery/computer/aifixer.dm +++ b/code/game/machinery/computer/aifixer.dm @@ -7,7 +7,6 @@ req_access = list(access_captain, access_robotics, access_heads) var/mob/living/silicon/ai/occupant = null var/active = 0 - var/restoring = 0 light_color = LIGHT_COLOR_PURPLE @@ -56,8 +55,7 @@ if(href_list["fix"]) src.active = 1 - restoring = 1 - while(src.occupant.health < 100 && restoring) + while(src.occupant.health < 100) src.occupant.adjustOxyLoss(-1) src.occupant.adjustFireLoss(-1) src.occupant.adjustToxLoss(-1) @@ -69,7 +67,6 @@ dead_mob_list -= src.occupant living_mob_list += src.occupant sleep(10) - restoring = 0 src.active = 0 src.add_fingerprint(usr) @@ -134,7 +131,9 @@ /obj/machinery/computer/aifixer/emp_act() if(occupant) - restoring = 0 - occupant.adjustBruteLoss(200) + occupant.ghostize() + qdel(occupant) + occupant = null return - ..() \ No newline at end of file + else + ..() From 2ca5a17c5a1263dee77814742a80ef0a3f7d1089 Mon Sep 17 00:00:00 2001 From: TullyBurnalot Date: Tue, 12 Jul 2016 04:24:45 +0100 Subject: [PATCH 3/5] Removes trailing return --- code/game/machinery/computer/aifixer.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/game/machinery/computer/aifixer.dm b/code/game/machinery/computer/aifixer.dm index 0cbd12a5d0d..24351c58921 100644 --- a/code/game/machinery/computer/aifixer.dm +++ b/code/game/machinery/computer/aifixer.dm @@ -134,6 +134,5 @@ occupant.ghostize() qdel(occupant) occupant = null - return else ..() From bf42990e1b42f375cd9b0b73bf8a40c79d604af6 Mon Sep 17 00:00:00 2001 From: TullyBurnalot Date: Sat, 16 Jul 2016 18:05:42 +0100 Subject: [PATCH 4/5] - Fixes explosions and AI Fixers - AI Fixer cannot be screwdrivered if it's normal, or has no power - AI Fixer can be screwdrivered if it's broken via an explosion with an AI inside. This, of course, kills the AI --- code/game/machinery/computer/aifixer.dm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/code/game/machinery/computer/aifixer.dm b/code/game/machinery/computer/aifixer.dm index 24351c58921..ab72c5bf7a8 100644 --- a/code/game/machinery/computer/aifixer.dm +++ b/code/game/machinery/computer/aifixer.dm @@ -11,6 +11,16 @@ light_color = LIGHT_COLOR_PURPLE /obj/machinery/computer/aifixer/attackby(I as obj, user as mob, params) + if(occupant && istype(I, /obj/item/weapon/screwdriver)) + if(stat & BROKEN) + ..() + if(stat & NOPOWER) + to_chat(user, "The screws on [name]'s screen won't budge.") + return + else + to_chat(user, "The screws on [name]'s screen won't budge and it emits a warning beep!.") + return + else ..() /obj/machinery/computer/aifixer/attack_ai(var/mob/user as mob) From cdb1778c553b907f6c441a23b884af0055181844 Mon Sep 17 00:00:00 2001 From: TullyBurnalot Date: Wed, 27 Jul 2016 00:38:22 +0100 Subject: [PATCH 5/5] Removes returns, adds Destroy() --- code/game/machinery/computer/aifixer.dm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/code/game/machinery/computer/aifixer.dm b/code/game/machinery/computer/aifixer.dm index ab72c5bf7a8..097efa2c75c 100644 --- a/code/game/machinery/computer/aifixer.dm +++ b/code/game/machinery/computer/aifixer.dm @@ -16,10 +16,8 @@ ..() if(stat & NOPOWER) to_chat(user, "The screws on [name]'s screen won't budge.") - return else to_chat(user, "The screws on [name]'s screen won't budge and it emits a warning beep!.") - return else ..() @@ -139,6 +137,13 @@ else if(!occupant) to_chat(user, "ERROR: Unable to locate artificial intelligence.") +/obj/machinery/computer/aifixer/Destroy() + if(occupant) + occupant.ghostize() + qdel(occupant) + occupant = null + return ..() + /obj/machinery/computer/aifixer/emp_act() if(occupant) occupant.ghostize()