Files
CHOMPStation2/code/modules/paperwork/handlabeler.dm
Ren Erthilo 1b5e0b5588 TG: (Paperwork overhaul, not actually added until we decide what to do with it.)
Large bureaucracy overhaul.
This affects clipboards, hand labelers, paper, paper bins, pens, photocopiers,
and stamps.
Everything (that I've changed significantly) should be BETTER.

NO paths have been changed.
All of the above have been added to the paperwork module (pending rename to
bureaucracy, which is COOLER).
SPRITES for most of the above (except photocopiers) are now in bureaucracy.dmi.

Clipboards in particular are MASSIVELY IMPROVED.
Hand labelers can now be turned ON AND OFF, to make it simpler to avoid
labelling tables.
This includes work in progress FOLDERS, which currently do NOTHING.
Revision: r3253
Author: 	 petethegoat
2012-04-25 23:17:21 +01:00

53 lines
1.3 KiB
Plaintext

/obj/item/weapon/hand_labeler
name = "Hand labeler"
icon = 'bureaucracy.dmi'
icon_state = "labeler0"
item_state = "flight"
var/label = null
var/labels_left = 30
var/mode = 0 //off or on.
/obj/item/weapon/hand_labeler/afterattack(atom/A, mob/user as mob)
if(!mode) //if it's off, give up.
return
if(A==loc) // if placing the labeller into something (e.g. backpack)
return // don't set a label
if(!labels_left)
user << "\blue No labels left."
return
if(!label || !length(label))
user << "\blue No text set."
return
if(length(A.name) + length(label) > 64)
user << "\blue Label too big."
return
if(ishuman(A))
user << "\blue You can't label humans."
return
if(issilicon(A))
user << "\blue You can't label cyborgs."
return
for(var/mob/M in viewers())
if ((M.client && !( M.blinded )))
M << "\blue [user] labels [A] as [label]."
A.name = "[A.name] ([label])"
/obj/item/weapon/hand_labeler/attack_self()
mode = !mode
icon_state = "labeler[mode]"
if(mode)
usr << "\blue You turn on the hand labeler."
//Now let them chose the text.
var/str = input(usr,"Label text?","Set label","")
if(!str || !length(str))
usr << "\red Invalid text."
return
if(length(str) > 64)
usr << "\red Text too long."
return
label = str
usr << "\blue You set the text to '[str]'."
else
usr << "\blue You turn off the hand labeler."