-Added a new global list. Cameras will hold every camera created and is kept up to date by the Camera's New() and Del(). Much faster than having everything loop the world. AI camera movement seems faster too.

-Fixed Issue 415

-Tweaked creating new cameras. When you create a camera from a camera assembly, it will now auto detect the direction it should be in. I also added a confirmation message which allows you to re choose the direction with up to 5 chances; to avoid infinite loops.

-Made the New Player Options window a little bit slimmer.

-Forgot to add a changelog for my last commit.


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4096 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
giacomand@gmail.com
2012-07-17 16:23:47 +00:00
parent 01ab14455a
commit 7575c9a9cf
10 changed files with 81 additions and 26 deletions
+2 -2
View File
@@ -57,7 +57,7 @@ var/intercom_range_display_status = 0
del(C)
if(camera_range_display_status)
for(var/obj/machinery/camera/C in world)
for(var/obj/machinery/camera/C in Cameras)
new/obj/effect/debugging/camera_range(C.loc)
feedback_add_details("admin_verb","mCRD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -73,7 +73,7 @@ var/intercom_range_display_status = 0
var/list/obj/machinery/camera/CL = list()
for(var/obj/machinery/camera/C in world)
for(var/obj/machinery/camera/C in Cameras)
CL += C
var/output = {"<B>CAMERA ANNOMALITIES REPORT</B><HR>
+9 -10
View File
@@ -269,12 +269,12 @@
var/mob/living/silicon/ai/A = locate(href_list["track2"])
if(A && target)
A:cameraFollow = target
A.cameraFollow = target
A << text("Now tracking [] on camera.", target.name)
if (usr.machine == null)
usr.machine = usr
while (usr:cameraFollow == target)
while (src.cameraFollow == target)
usr << "Target is not on or near any active cameras on the station. We'll check again in 5 seconds (unless you use the cancel-camera verb)."
sleep(40)
continue
@@ -356,17 +356,16 @@
/mob/living/silicon/ai/proc/switchCamera(var/obj/machinery/camera/C)
usr:cameraFollow = null
if (!C)
src.cameraFollow = null
if (!C || stat == 2 || !C.status || C.network != network)
machine = null
reset_view(null)
return 0
if (stat == 2 || !C.status || C.network != network) return 0
// ok, we're alive, camera is good and in our network...
machine = src
src:current = C
src.current = C
reset_view(C)
return 1
@@ -429,7 +428,7 @@
set name = "Cancel Camera View"
reset_view(null)
machine = null
src:cameraFollow = null
src.cameraFollow = null
//Replaces /mob/living/silicon/ai/verb/change_network() in ai.dm & camera.dm
//Adds in /mob/living/silicon/ai/proc/ai_network_change() instead
@@ -439,14 +438,14 @@
set name = "Change Camera Network"
reset_view(null)
machine = null
src:cameraFollow = null
src.cameraFollow = null
var/cameralist[0]
if(usr.stat == 2)
usr << "You can't change your camera network because you are dead!"
return
for (var/obj/machinery/camera/C in world)
for (var/obj/machinery/camera/C in Cameras)
if(!C.status)
continue
if(C.network == "AI Satellite")
+1 -1
View File
@@ -42,7 +42,7 @@
var/area/A = get_area(old)
var/list/old_types = dd_text2list("[A.type]", "/")
for(var/obj/machinery/camera/current in world)
for(var/obj/machinery/camera/current in Cameras)
if(user.network != current.network) continue
if(!current.status) continue // ignore disabled cameras
+1 -1
View File
@@ -195,7 +195,7 @@
usr << "You can't change your camera network because you are dead!"
return
for (var/obj/machinery/camera/C in world)
for (var/obj/machinery/camera/C in Cameras)
if(!C.status)
continue
else
+1 -1
View File
@@ -56,7 +56,7 @@
output += "</div>"
src << browse(output,"window=playersetup;size=250x240;can_close=0")
src << browse(output,"window=playersetup;size=210x240;can_close=0")
return
proc/Playmusic()