Merge tgstation r4572 into bs12_with_tgport, fixed missing title screen (tgside problem?), some conflicts

Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
Cael_Aislinn
2012-08-28 20:22:22 +10:00
parent eacd84b212
commit e6078b100f
15 changed files with 127 additions and 41 deletions
+5 -6
View File
@@ -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]! (<A HREF=?src=\ref[src];switchcamera=\ref[C]>[C.c_tag]</A>)"
queueAlarm("--- [class] alarm detected in [A.name]! (<A HREF=?src=\ref[src];switchcamera=\ref[C]>[C.c_tag]</A>)", class)
else if (CL && CL.len)
var/foo = 0
var/dat2 = ""
for (var/obj/machinery/camera/I in CL)
dat2 += text("[]<A HREF=?src=\ref[];switchcamera=\ref[]>[]</A>", (!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
@@ -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.
@@ -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()
@@ -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)
@@ -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 += "<A href=?src=\ref[src];showalerts=1'>\[Show Alerts\]</a>"
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 += "<A href=?src=\ref[src];showalerts=1'>\[Show Alerts\]</a>"
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
+6 -6
View File
@@ -108,7 +108,7 @@
if ((killing == 2 && state == 3))
if(assailant.loc != kill_loc)
for(var/mob/O in viewers(assailant, null))
O.show_message(text("\red [] lost his tightened grip on []'s neck!", assailant, affecting), 1)
O.show_message(text("\red [] lost \his tightened grip on []'s neck!", assailant, affecting), 1)
killing = 0
hud1.icon_state = "disarm/kill"
return
@@ -134,7 +134,7 @@
if (state >= 3)
if (!( killing ))
for(var/mob/O in viewers(assailant, null))
O.show_message(text("\red [] has temporarily tightened his grip on []!", assailant, affecting), 1)
O.show_message(text("\red [] has temporarily tightened \his grip on []!", assailant, affecting), 1)
//Foreach goto(97)
assailant.next_move = world.time + 10
//affecting.stunned = max(2, affecting.stunned)
@@ -198,7 +198,7 @@
return
for(var/mob/O in viewers(assailant, null))
O.show_message(text("\red [] has reinforced his grip on [] (now neck)!", assailant, affecting), 1)
O.show_message(text("\red [] has reinforced \his grip on [] (now neck)!", assailant, affecting), 1)
state = 3
icon_state = "grabbed+1"
@@ -212,7 +212,7 @@
else
if (state >= 3 && !killing)
for(var/mob/O in viewers(assailant, null))
O.show_message(text("\red [] starts to tighten his grip on []'s neck!", assailant, affecting), 1)
O.show_message(text("\red [] starts to tighten \his grip on []'s neck!", assailant, affecting), 1)
hud1.icon_state = "disarm/kill1"
killing = 1
if(do_after(assailant, 50))
@@ -227,7 +227,7 @@
killing = 2
kill_loc = assailant.loc
for(var/mob/O in viewers(assailant, null))
O.show_message(text("\red [] has tightened his grip on []'s neck!", assailant, affecting), 1)
O.show_message(text("\red [] has tightened \his grip on []'s neck!", assailant, affecting), 1)
affecting.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been strangled (kill intent) by [assailant.name] ([assailant.ckey])</font>")
assailant.attack_log += text("\[[time_stamp()]\] <font color='red'>Strangled (kill intent) [affecting.name] ([affecting.ckey])</font>")
log_attack("<font color='red'>[assailant.name] ([assailant.ckey]) Strangled (kill intent) [affecting.name] ([affecting.ckey])</font>")
@@ -236,7 +236,7 @@
affecting.losebreath += 1
else
for(var/mob/O in viewers(assailant, null))
O.show_message(text("\red [] was unable to tighten his grip on []'s neck!", assailant, affecting), 1)
O.show_message(text("\red [] was unable to tighten \his grip on []'s neck!", assailant, affecting), 1)
killing = 0
hud1.icon_state = "disarm/kill"
return