diff --git a/code/game/gamemodes/events.dm b/code/game/gamemodes/events.dm index b90fd55c10c..9b65abb3aa7 100644 --- a/code/game/gamemodes/events.dm +++ b/code/game/gamemodes/events.dm @@ -97,8 +97,11 @@ /proc/communications_blackout(var/silent = 1) - //Uncomment below if you want communication blackouts to have a warning. - if(!silent) command_alert("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT") + if(!silent) + command_alert("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT") + else // AIs will always know if there's a comm blackout, rogue AIs could then lie about comm blackouts in the future while they shutdown comms + for(var/mob/living/silicon/ai/A in player_list) + A << "Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT" for(var/obj/machinery/telecomms/T in telecomms_list) T.emp_act(1) diff --git a/code/game/machinery/telecomms/telecomunications.dm b/code/game/machinery/telecomms/telecomunications.dm index 521565eb220..8063c39cedf 100644 --- a/code/game/machinery/telecomms/telecomunications.dm +++ b/code/game/machinery/telecomms/telecomunications.dm @@ -210,7 +210,8 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list() if(prob(100/severity)) if(!(stat & EMPED)) stat |= EMPED - spawn(1600/severity) + var/duration = (300 * 10)/severity + spawn(rand(duration - 20, duration + 20)) // Takes a long time for the machines to reboot. stat &= ~EMPED ..() diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index 466125addb1..61435c75693 100644 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -723,7 +723,8 @@ var/global/list/obj/item/device/pda/PDAs = list() if(signal) if(signal.data["done"]) useTC = 1 - if(P.loc.z in signal.data["level"]) + var/turf/pos = get_turf(P) + if(pos.z in signal.data["level"]) useTC = 2 //Let's make this barely readable if(signal.data["compression"] > 0) diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index cc1c5d95f5e..0c0ad6fdbdf 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -15,6 +15,10 @@ return ..() +/turf/Click() + if(!isAI(usr)) + ..() + /turf/New() ..() for(var/atom/movable/AM as mob|obj in src) diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 9924b679081..5fd0ef1a35f 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -298,7 +298,6 @@ switchCamera(locate(href_list["switchcamera"])) in cameranet.cameras if (href_list["showalerts"]) ai_alerts() - //Carn: holopad requests if (href_list["jumptoholopad"]) var/obj/machinery/hologram/holopad/H = locate(href_list["jumptoholopad"]) @@ -474,18 +473,18 @@ L[A.name] = list(A, (C) ? C : O, list(alarmsource)) if (O) if (C && C.can_use()) - src << "--- [class] alarm detected in [A.name]! ([C.c_tag])" + queueAlarm("--- [class] alarm detected in [A.name]! ([C.c_tag])", class) else if (CL && CL.len) var/foo = 0 var/dat2 = "" for (var/obj/machinery/camera/I in CL) dat2 += text("[][]", (!foo) ? "" : " | ", src, I, I.c_tag) //I'm not fixing this shit... foo = 1 - src << text ("--- [] alarm detected in []! ([])", class, A.name, dat2) + queueAlarm(text ("--- [] alarm detected in []! ([])", class, A.name, dat2), class) else - src << text("--- [] alarm detected in []! (No Camera)", class, A.name) + queueAlarm(text("--- [] alarm detected in []! (No Camera)", class, A.name), class) else - src << text("--- [] alarm detected in []! (No Camera)", class, A.name) + queueAlarm(text("--- [] alarm detected in []! (No Camera)", class, A.name), class) if (viewalerts) ai_alerts() return 1 @@ -502,7 +501,7 @@ cleared = 1 L -= I if (cleared) - src << text("--- [] alarm in [] has been cleared.", class, A.name) + queueAlarm(text("--- [] alarm in [] has been cleared.", class, A.name), class, 0) if (viewalerts) ai_alerts() return !cleared diff --git a/code/modules/mob/living/silicon/ai/freelook/eye.dm b/code/modules/mob/living/silicon/ai/freelook/eye.dm index b72c39c0c6e..4e0551c7b9d 100644 --- a/code/modules/mob/living/silicon/ai/freelook/eye.dm +++ b/code/modules/mob/living/silicon/ai/freelook/eye.dm @@ -65,6 +65,12 @@ del(eyeobj) // No AI, no Eye ..() +/atom/proc/move_camera_by_click() + if(istype(usr, /mob/living/silicon/ai)) + var/mob/living/silicon/ai/AI = usr + if(AI.client.eye == AI.eyeobj) + AI.eyeobj.setLoc(src) + // This will move the AIEye. It will also cause lights near the eye to light up, if toggled. // This is handled in the proc below this one. diff --git a/code/modules/mob/living/silicon/ai/freelook/update_triggers.dm b/code/modules/mob/living/silicon/ai/freelook/update_triggers.dm index f921cdecd5c..03429b34208 100644 --- a/code/modules/mob/living/silicon/ai/freelook/update_triggers.dm +++ b/code/modules/mob/living/silicon/ai/freelook/update_triggers.dm @@ -8,13 +8,6 @@ /turf/proc/visibilityChanged() cameranet.updateVisibility(src) -/atom/proc/move_camera_by_click() - if(istype(usr, /mob/living/silicon/ai)) - var/mob/living/silicon/ai/AI = usr - if(AI.client.eye == AI.eyeobj) - AI.eyeobj.setLoc(src) - -/* /turf/simulated/Del() visibilityChanged() ..() @@ -23,6 +16,8 @@ ..() visibilityChanged() +/* + // STRUCTURES /obj/structure/Del() diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 0830eb361d7..7a885d8bb55 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -345,7 +345,7 @@ else if (O && istype(O, /obj/machinery/camera)) C = O L[A.name] = list(A, (C) ? C : O, list(alarmsource)) - src << text("--- [class] alarm detected in [A.name]!") + queueAlarm(text("--- [class] alarm detected in [A.name]!"), class) // if (viewalerts) robot_alerts() return 1 @@ -363,7 +363,7 @@ cleared = 1 L -= I if (cleared) - src << text("--- [class] alarm in [A.name] has been cleared.") + queueAlarm(text("--- [class] alarm in [A.name] has been cleared."), class, 0) // if (viewalerts) robot_alerts() return !cleared @@ -813,6 +813,10 @@ src << browse(null, t1) return + if (href_list["showalerts"]) + robot_alerts() + return + if (href_list["mod"]) var/obj/item/O = locate(href_list["mod"]) O.attack_self(src) diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index e10dfa59369..fbdd1b82e78 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -4,6 +4,12 @@ voice_name = "synthesized voice" var/syndicate = 0 var/datum/ai_laws/laws = null//Now... THEY ALL CAN ALL HAVE LAWS + var/list/alarms_to_show = list() + var/list/alarms_to_clear = list() + + + var/list/alarm_types_show = list("Motion" = 0, "Fire" = 0, "Atmosphere" = 0, "Power" = 0) + var/list/alarm_types_clear = list("Motion" = 0, "Fire" = 0, "Atmosphere" = 0, "Power" = 0) /mob/living/silicon/proc/cancelAlarm() return @@ -14,6 +20,68 @@ /mob/living/silicon/proc/show_laws() return +/mob/living/silicon/proc/queueAlarm(var/message, var/type, var/incoming = 1) + var/in_cooldown = (alarms_to_show.len > 0 || alarms_to_clear.len > 0) + if(incoming) + alarms_to_show += message + alarm_types_show[type] += 1 + else + alarms_to_clear += message + alarm_types_clear[type] += 1 + + if(!in_cooldown) + spawn(10 * 10) // 10 seconds + + if(alarms_to_show.len < 5) + for(var/msg in alarms_to_show) + src << msg + else if(alarms_to_show.len) + + var/msg = "--- " + + if(alarm_types_show["Motion"]) + msg += "MOTION: [alarm_types_show["Motion"]] alarms detected. - " + + if(alarm_types_show["Fire"]) + msg += "FIRE: [alarm_types_show["Fire"]] Fire alarms detected. - " + + if(alarm_types_show["Atmosphere"]) + msg += "ATMOSPHERE: [alarm_types_show["Atmosphere"]] alarms detected. - " + + if(alarm_types_show["Power"]) + msg += "POWER: [alarm_types_show["Power"]] alarms detected. - " + + msg += "\[Show Alerts\]" + src << msg + + if(alarms_to_clear.len < 3) + for(var/msg in alarms_to_clear) + src << msg + + else if(alarms_to_clear.len) + var/msg = "--- " + + if(alarm_types_clear["Motion"]) + msg += "MOTION: [alarm_types_clear["Motion"]] alarms cleared. - " + + if(alarm_types_clear["Fire"]) + msg += "FIRE: [alarm_types_clear["Fire"]] Fire alarms cleared. - " + + if(alarm_types_clear["Atmosphere"]) + msg += "ATMOSPHERE: [alarm_types_clear["Atmosphere"]] alarms cleared. - " + + if(alarm_types_clear["Power"]) + msg += "POWER: [alarm_types_clear["Power"]] alarms cleared. - " + + msg += "\[Show Alerts\]" + src << msg + + + alarms_to_show = list() + alarms_to_clear = list() + alarm_types_show = list("Motion" = 0, "Fire" = 0, "Atmosphere" = 0, "Power" = 0) + alarm_types_clear = list("Motion" = 0, "Fire" = 0, "Atmosphere" = 0, "Power" = 0) + /mob/living/silicon/drop_item() return diff --git a/html/changelog.html b/html/changelog.html index 39e538dd1a4..a6080f5d2e7 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -48,6 +48,16 @@ Stuff which is in development and not yet visible to players or just code relate should be listed in the changelog upon commit tho. Thanks. --> +
+

28 August 2012

+

Giacom updated:

+ +
+

August 26, 2012

Nodrak updated: