mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-06 07:22:15 +00:00
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. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3253 316c924e-a436-60f5-8080-3fe189b3f50e
53 lines
1.4 KiB
Plaintext
53 lines
1.4 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." |