Added labelling for hydro trays.

This commit is contained in:
Zuhayr
2015-02-04 10:54:18 +10:30
parent 61f4699da2
commit 3b60a5959e
4 changed files with 68 additions and 26 deletions
+10 -2
View File
@@ -6,12 +6,12 @@
var/label = null
var/labels_left = 30
var/mode = 0 //off or on.
/obj/item/weapon/hand_labeler/attack()
return
/obj/item/weapon/hand_labeler/afterattack(atom/A, mob/user as mob, proximity)
if(!proximity)
if(!proximity)
return
if(!mode) //if it's off, give up.
return
@@ -39,6 +39,14 @@
if(istype(A, /obj/item/weapon/reagent_containers/glass))
user << "<span class='notice'>The label can't stick to the [A.name]. (Try using a pen)</span>"
return
if(istype(A, /obj/machinery/portable_atmospherics/hydroponics))
var/obj/machinery/portable_atmospherics/hydroponics/tray = A
if(!tray.mechanical)
user << "<span class='notice'>How are you going to label that?</span>"
return
tray.labelled = label
spawn(1)
tray.update_icon()
user.visible_message("<span class='notice'>[user] labels [A] as [label].</span>", \
"<span class='notice'>You label [A] as [label].</span>")