-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
+19 -5
View File
@@ -152,15 +152,29 @@
if(istype(W, /obj/item/weapon/screwdriver))
playsound(src.loc, 'Screwdriver.ogg', 50, 1)
user << "\blue You connect the lense."
var/B
var/obj/machinery/camera/B = null
if(motion == 1)
B = new /obj/machinery/camera/motion( src.loc )
else
B = new /obj/machinery/camera( src.loc )
B:network = "SS13"
B:network = input(usr, "Which network would you like to connect this camera to?", "Set Network", "SS13")
direct = input(user, "Direction?", "Assembling Camera", null) in list( "NORTH", "EAST", "SOUTH", "WEST" )
B:dir = text2dir(direct)
// To prevent people exploiting the fact that it doesn't delete the assembly until the user is done
// entering the camera options.
src.loc = B
//Auto detect walls and turn camera based on wall locations.
B.auto_turn()
B.network = "SS13"
B.network = input(usr, "Which network would you like to connect this camera to?", "Set Network", "SS13")
for(var/i = 5; i >= 0; i -= 1)
direct = input(user, "Direction?", "Assembling Camera", null) in list("LEAVE IT", "NORTH", "EAST", "SOUTH", "WEST" )
if(direct != "LEAVE IT")
B.dir = text2dir(direct)
if(i != 0)
var/confirm = alert(user, "Is this what you want? Chances Remaining: [i]", "Confirmation", "Yes", "No")
if(confirm == "Yes")
break
del(src)
prime()