Some assembly fixes and tidying up. Plus, improved infrared emitters, with new sprites by Pewtershmitz!

Removed the infra sensor, as it was buggy, and, to be perfectly honest, utterly pointless.
Slightly improved and moved dice code.

Fixes issue 366.
Fixes issue 317.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4555 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
petethegoat@gmail.com
2012-08-26 22:44:04 +00:00
parent 474294466a
commit c14f242b4e
13 changed files with 173 additions and 287 deletions
+17 -17
View File
@@ -1,6 +1,5 @@
/obj/item/device/assembly_holder
name = "Assembly"
desc = "Holds various devices"//Fix this by adding dynamic desc
icon = 'icons/obj/assemblies/new_assemblies.dmi'
icon_state = "holder"
item_state = "assembly"
@@ -44,7 +43,7 @@
D2.loc = src
a_left = D
a_right = D2
src.name = "[D.name] [D2.name] assembly"
name = "[D.name]-[D2.name] assembly"
update_icon()
return 1
@@ -52,8 +51,8 @@
attach_special(var/obj/O, var/mob/user)
if(!O) return
if(!O.IsSpecialAssembly()) return 0
/*
if(O:Attach_Holder())
/* if(O:Attach_Holder())
special_assembly = O
update_icon()
src.name = "[a_left.name] [a_right.name] [special_assembly.name] assembly"
@@ -62,15 +61,16 @@
update_icon()
src.overlays = null
overlays = null
if(a_left)
src.overlays += a_left:small_icon_state_left
for(var/O in a_left:small_icon_state_overlays)
src.overlays += text("[]_l", O)
overlays += "[initial(a_left.icon_state)]_left" //the initial() is probably unnecessary, but you just know
for(var/O in a_left.attached_overlays) //someone is gonna fuck around with the icon_state in the future
overlays += "[O]_l"
if(a_right)
src.overlays += a_right:small_icon_state_right
for(var/O in a_right:small_icon_state_overlays)
src.overlays += text("[]_r", O)
src.overlays += "[initial(a_right.icon_state)]_right"
for(var/O in a_right.attached_overlays)
overlays += "[O]_r"
/* if(special_assembly)
special_assembly.update_icon()
if(special_assembly:small_icon_state)
@@ -84,9 +84,9 @@
..()
if ((in_range(src, usr) || src.loc == usr))
if (src.secured)
usr.show_message("The [src.name] is ready!")
usr << "\The [src] is ready!"
else
usr.show_message("The [src.name] can be attached!")
usr << "\The [src] can be attached!"
return
@@ -123,15 +123,15 @@
attackby(obj/item/weapon/W as obj, mob/user as mob)
if(isscrewdriver(W))
if(!a_left || !a_right)
user.show_message("\red BUG:Assembly part missing, please report this!")
user << "\red BUG:Assembly part missing, please report this!"
return
a_left.toggle_secure()
a_right.toggle_secure()
secured = !secured
if(secured)
user.show_message("\blue The [src.name] is ready!")
user << "\blue \The [src] is ready!"
else
user.show_message("\blue The [src.name] can now be taken apart!")
user << "\blue \The [src] can now be taken apart!"
update_icon()
return
else if(W.IsSpecialAssembly())
@@ -145,7 +145,7 @@
src.add_fingerprint(user)
if(src.secured)
if(!a_left || !a_right)
user.show_message("\red Assembly part missing!")
user << "\red Assembly part missing!"
return
if(istype(a_left,a_right.type))//If they are the same type it causes issues due to window code
switch(alert("Which side would you like to use?",,"Left","Right"))