Added think-tanks.

This commit is contained in:
Atermonera
2021-03-18 04:09:42 -04:00
committed by VirgoBot
parent a62bf99795
commit 20f4ff8384
37 changed files with 867 additions and 91 deletions
+27 -14
View File
@@ -21,50 +21,63 @@
return // don't set a label
if(!labels_left)
to_chat(user, "<span class='notice'>No labels left.</span>")
to_chat(user, SPAN_WARNING("\The [src] has no labels left."))
return
if(!label || !length(label))
to_chat(user, "<span class='notice'>No text set.</span>")
to_chat(user, SPAN_WARNING("\The [src] has no label text set."))
return
if(length(A.name) + length(label) > 64)
to_chat(user, "<span class='notice'>Label too big.</span>")
to_chat(user, SPAN_WARNING("\The [src]'s label too big."))
return
if(istype(A, /mob/living/silicon/robot/platform))
var/mob/living/silicon/robot/platform/P = A
if(!P.allowed(user))
to_chat(usr, SPAN_WARNING("Access denied."))
else if(P.client || P.key)
to_chat(user, SPAN_NOTICE("You rename \the [P] to [label]."))
to_chat(P, SPAN_NOTICE("\The [user] renames you to [label]."))
P.custom_name = label
P.SetName(P.custom_name)
else
to_chat(user, SPAN_WARNING("\The [src] is inactive and cannot be renamed."))
return
if(ishuman(A))
to_chat(user, "<span class='notice'>The label refuses to stick to [A.name].</span>")
to_chat(user, SPAN_WARNING("The label refuses to stick to [A.name]."))
return
if(issilicon(A))
to_chat(user, "<span class='notice'>The label refuses to stick to [A.name].</span>")
to_chat(user, SPAN_WARNING("The label refuses to stick to [A.name]."))
return
if(isobserver(A))
to_chat(user, "<span class='notice'>[src] passes through [A.name].</span>")
to_chat(user, SPAN_WARNING("[src] passes through [A.name]."))
return
if(istype(A, /obj/item/weapon/reagent_containers/glass))
to_chat(user, "<span class='notice'>The label can't stick to the [A.name]. (Try using a pen)</span>")
to_chat(user, SPAN_WARNING("The label can't stick to the [A.name] (Try using a pen)."))
return
if(istype(A, /obj/machinery/portable_atmospherics/hydroponics))
var/obj/machinery/portable_atmospherics/hydroponics/tray = A
if(!tray.mechanical)
to_chat(user, "<span class='notice'>How are you going to label that?</span>")
to_chat(user, SPAN_WARNING("How are you going to label that?"))
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>")
user.visible_message( \
SPAN_NOTICE("\The [user] labels [A] as [label]."), \
SPAN_NOTICE("You label [A] as [label]."))
A.name = "[A.name] ([label])"
/obj/item/weapon/hand_labeler/attack_self(mob/user as mob)
mode = !mode
icon_state = "labeler[mode]"
if(mode)
to_chat(user, "<span class='notice'>You turn on \the [src].</span>")
to_chat(user, SPAN_NOTICE("You turn on \the [src]."))
//Now let them chose the text.
var/str = sanitizeSafe(input(user,"Label text?","Set label",""), MAX_NAME_LEN)
if(!str || !length(str))
to_chat(user, "<span class='notice'>Invalid text.</span>")
to_chat(user, SPAN_WARNING("Invalid text."))
return
label = str
to_chat(user, "<span class='notice'>You set the text to '[str]'.</span>")
to_chat(user, SPAN_NOTICE("You set the text to '[str]'."))
else
to_chat(user, "<span class='notice'>You turn off \the [src].</span>")
to_chat(user, SPAN_NOTICE("You turn off \the [src]."))