From eadf904ff1110722cbddbe60920e88fd36ad58ed Mon Sep 17 00:00:00 2001 From: "vageyenaman@gmail.com" Date: Sun, 11 Mar 2012 20:33:11 +0000 Subject: [PATCH] Applied Carn's Holopad requests patch. Basically allows for people to request the presence of an AI at a holopad. Some work on porta turrets. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3270 316c924e-a436-60f5-8080-3fe189b3f50e --- code/game/machinery/hologram.dm | 14 ++++++++++++++ code/game/machinery/portable_turret.dm | 18 ++++++++++++------ code/modules/mob/living/silicon/ai/ai.dm | 8 ++++++++ html/changelog.html | 8 +++++--- 4 files changed, 39 insertions(+), 9 deletions(-) diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index 55fa212c5ef..d286943583d 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -11,6 +11,20 @@ Possible to do for anyone motivated enough: Give an AI variable for different hologram icons. Itegrate EMP effect to disable the unit. */ +/obj/machinery/hologram/holopad/attack_hand(var/mob/living/carbon/human/user) //Carn: Hologram requests. + if(!istype(user)) + return + if(alert(user,"Would you like to request an AI's presence?",,"Yes","No") == "Yes") + if(last_request + 200 < world.time) //don't spam the AI with requests you jerk! + last_request = world.time + user << "You request an AI's presence." + var/area/area = get_area(src) + for(var/mob/living/silicon/ai/AI in world) + if(!AI.client) continue + AI << "Your presence is requested at \the [area]." + else + user << "A request for AI presence was already sent recently." + /obj/machinery/hologram/holopad/attack_ai(mob/living/silicon/ai/user) if (!istype(user)) return diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index a0d13f008be..256c702dc07 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -40,6 +40,7 @@ var/auth_weapons = 0 // checks if it can shoot people that have a weapon they aren't authorized to have var/stun_all = 0 // if this is active, the turret shoots everything that isn't security or head of staff var/check_anomalies = 1 // checks if it can shoot at unidentified lifeforms (ie xenos) + var/ai = 0 // if active, will shoot at anything not an AI or cyborg var/attacked = 0 // if set to 1, the turret gets pissed off and shoots at people nearby (unless they have sec access!) @@ -312,11 +313,20 @@ Neutralize All Unidentified Life Signs: []
"}, if(emagged) // if emagged, HOLY SHIT EVERYONE IS DANGEROUS beep boop beep targets += C else - - if (C.stat || C.handcuffed) // if the perp is handcuffed or dead/dying, no need to bother really continue // move onto next potential victim! + var/dst = get_dist(src, C) // if it's too far away, why bother? + if (dst > 12) + continue + + if(!istype(C, /mob/living/silicon) && ai) // If it's set to attack all nonsilicons, target them! + if(C.lying) + secondarytargets += C + else + targets += C + continue + if (istype(C, /mob/living/carbon/human)) // if the target is a human, analyze threat level if(src.assess_perp(C)<4) continue // if threat level < 4, keep going @@ -324,10 +334,6 @@ Neutralize All Unidentified Life Signs: []
"}, else if (istype(C, /mob/living/carbon/monkey) || istype(C, /mob/living/silicon)) continue // Don't target monkeys or borgs/AIs you dumb shit - var/dst = get_dist(src, C) // if it's too far away, why bother? - if (dst > 12) - continue - if (C.lying) // if the perp is lying down, it's still a target but a less-important target secondarytargets += C continue diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 38e49576def..c39c2cd7e3b 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -233,6 +233,14 @@ if (href_list["showalerts"]) ai_alerts() + //Carn: holopad requests + if (href_list["jumptoholopad"]) + var/obj/machinery/hologram/holopad/H = locate(href_list["jumptoholopad"]) + if(stat == CONSCIOUS) + if(H) + H.attack_ai(src) //may as well recycle + else + src << "Unable to locate the holopad." if (href_list["lawc"]) // Toggling whether or not a law gets stated by the State Laws verb --NeoFite var/L = text2num(href_list["lawc"]) diff --git a/html/changelog.html b/html/changelog.html index 8bcfcbfc89c..3e503a9879b 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -93,7 +93,7 @@ should be listed in the changelog upon commit tho. Thanks. -->
-

3/11/2012

+

11 March 2012

PolymorphBlue updated:

+

Carnwennan updated:

+
- -

08 March 2012

Nodrak and Carnwennan updated: