Files
Aurora.3/code/modules/paperwork/handlabeler.dm
sieve32@gmail.com 459c558898 -Make holodeck eswords a child of obj/item/weapon/holo instead of regular eswords, clumsy check removed as a result, and you can no longer do things like cutting through walls or doors or what have you. (Fixes Issue 665)
-Redid icons to be more optimized at compile by setting icon = 'icons/folder/icon.dmi' instead of just icon = 'icon.dmi', meaning that Dream Maker doesn't have to search through every single file for every single .dmi. This shouldn't lead to any errors because of how I went about it, plus the fact that Dream Maker would have freaked out if I screwed something up. Also moved around 2 icons that weren't sorted well.

r4146 compile time: 1 minute, 40 seconds
r4147 compile time: 45 seconds

[VGTG]

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4147 316c924e-a436-60f5-8080-3fe189b3f50e
2012-07-23 00:48:51 +00:00

50 lines
1.4 KiB
Plaintext

/obj/item/weapon/hand_labeler
name = "Hand labeler"
icon = 'icons/obj/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 = copytext(reject_bad_text(input(usr,"Label text?","Set label","")),1,MAX_NAME_LEN)
if(!str || !length(str))
usr << "\red Invalid text."
return
label = str
usr << "\blue You set the text to '[str]'."
else
usr << "\blue You turn off the hand labeler."