Merge pull request #14031 from KorPhaeron/AI

New malf power (lipreading) + points rebalancing
This commit is contained in:
tkdrg
2016-01-01 23:19:26 -03:00
4 changed files with 37 additions and 11 deletions

View File

@@ -111,7 +111,7 @@
module_name = "AI Turret Upgrade"
mod_pick_name = "turret"
description = "Improves the power and health of all AI turrets. This effect is permanent."
cost = 50
cost = 30
one_time = 1
power_type = /mob/living/silicon/ai/proc/upgrade_turrets
@@ -298,7 +298,7 @@
mod_pick_name = "overload"
description = "Overloads an electrical machine, causing a small explosion. 2 uses."
uses = 2
cost = 15
cost = 20
power_type = /mob/living/silicon/ai/proc/overload_machine
@@ -327,7 +327,7 @@
mod_pick_name = "override"
description = "Overrides a machine's programming, causing it to rise up and attack everyone except other machines. 4 uses."
uses = 4
cost = 15
cost = 30
power_type = /mob/living/silicon/ai/proc/override_machine
@@ -605,4 +605,23 @@
if(AM.mod_pick_name == href_list["showdesc"])
temp = AM.description
src.use(usr)
return
return
/datum/AI_Module/large/eavesdrop
module_name = "Enhanced Surveillance"
mod_pick_name = "eavesdrop"
description = "Via a combination of hidden microphones and lip reading software, you are able to use your cameras to listen in on conversations."
cost = 30
one_time = 1
power_type = /mob/living/silicon/ai/proc/surveillance
/mob/living/silicon/ai/proc/surveillance()
set category = "Malfunction"
set name = "Enhanced Surveillance"
if(eyeobj)
eyeobj.relay_speech = TRUE
src << "<span class='notice'>OTA firmware distribution complete! Cameras upgraded: Enhanced surveillance package online.</span>"
verbs -= /mob/living/silicon/ai/proc/surveillance

View File

@@ -146,10 +146,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
if(speaker && masters.len && !radio_freq)//Master is mostly a safety in case lag hits or something. Radio_freq so AIs dont hear holopad stuff through radios.
for(var/mob/living/silicon/ai/master in masters)
if(masters[master] && speaker != master)
raw_message = master.lang_treat(speaker, message_langs, raw_message, spans)
var/name_used = speaker.GetVoice()
var/rendered = "<i><span class='game say'>Holopad received, <span class='name'>[name_used]</span> <span class='message'>[raw_message]</span></span></i>"
master.show_message(rendered, 2)
master.relay_speech(message, speaker, message_langs, raw_message, radio_freq, spans)
/obj/machinery/hologram/holopad/proc/create_holo(mob/living/silicon/ai/A, turf/T = loc)
var/obj/effect/overlay/holo_pad_hologram/h = new(T)//Spawn a blank effect at the location.

View File

@@ -842,4 +842,10 @@ var/list/ai_list = list()
//get_turf_pixel() is because APCs in maint aren't actually in view of the inner camera
if(M && cameranet && !cameranet.checkTurfVis(get_turf_pixel(M)) && !apc_override)
return
return 1
return 1
/mob/living/silicon/ai/proc/relay_speech(message, atom/movable/speaker, message_langs, raw_message, radio_freq, list/spans)
raw_message = lang_treat(speaker, message_langs, raw_message, spans)
var/name_used = speaker.GetVoice()
var/rendered = "<i><span class='game say'>Relayed Speech: <span class='name'>[name_used]</span> <span class='message'>[raw_message]</span></span></i>"
show_message(rendered, 2)

View File

@@ -6,9 +6,10 @@
/mob/camera/aiEye
name = "Inactive AI Eye"
invisibility = 100
var/list/visibleCameraChunks = list()
var/mob/living/silicon/ai/ai = null
var/relay_speech = FALSE
// Use this when setting the aiEye's location.
// It will also stream the chunk that the new loc is in.
@@ -78,7 +79,6 @@
if (user.camera_light_on)
user.light_cameras()
// Return to the Core.
/mob/living/silicon/ai/proc/view_core()
@@ -104,3 +104,7 @@
return //won't work if dead
acceleration = !acceleration
usr << "Camera acceleration has been toggled [acceleration ? "on" : "off"]."
/mob/camera/aiEye/Hear(message, atom/movable/speaker, message_langs, raw_message, radio_freq, list/spans)
if(relay_speech && speaker && ai && !radio_freq && speaker != ai && near_camera(speaker))
ai.relay_speech(message, speaker, message_langs, raw_message, radio_freq, spans)