Files
Polaris/code/game/objects/structures/barsign.dm
Spookerton 978f4511a5 examine signature changed to include distance
- distance is INFINITE, 0, or a positive integer based on get_dist() between
the examiner and examinee's turfs when they are on the same Z. When the
examiner is dead or a ghost, distance is always 0.
- also updates /examine( implementations to use it!
- adds w_class_to_name proc for reusing "It is a X item." examine behavior.
2024-01-31 13:49:52 +00:00

51 lines
1.4 KiB
Plaintext

/obj/structure/sign/double/barsign
desc = "The current barsign of this shift! The bartender can change it with their ID."
icon = 'icons/obj/barsigns.dmi'
icon_state = "empty"
plane = ABOVE_PLANE
appearance_flags = 0
anchored = 1
var/cult = 0
/obj/structure/sign/double/barsign/proc/get_valid_states(initial=1)
. = cached_icon_states(icon)
. -= "On"
. -= "Nar-sie Bistro"
. -= "Empty"
if(initial)
. -= "Off"
/obj/structure/sign/double/barsign/examine(mob/user, distance, infix, suffix)
. = ..()
switch(icon_state)
if("Off")
. += "It appears to be switched off."
if("Nar-sie Bistro")
. += "It shows a picture of a large black and red being. Spooky!"
if("On", "Empty")
. += "The lights are on, but there's no picture."
else
. += "It says '[icon_state]'"
/obj/structure/sign/double/barsign/Initialize()
. = ..()
icon_state = pick(get_valid_states())
/obj/structure/sign/double/barsign/attackby(obj/item/I, mob/user)
if(cult)
return ..()
var/obj/item/card/id/card = I.GetID()
if(istype(card))
if(access_bar in card.GetAccess())
var/sign_type = input(user, "What would you like to change the barsign to?") as null|anything in get_valid_states(0)
if(!sign_type)
return
icon_state = sign_type
to_chat(user, "<span class='notice'>You change the barsign.</span>")
else
to_chat(user, "<span class='warning'>Access denied.</span>")
return
return ..()