Rewrite examine() to pass a list around

This commit is contained in:
Aronai Sieyes
2020-04-29 16:42:16 -04:00
committed by VirgoBot
parent 8c5c0a7cfb
commit 6ebd249748
214 changed files with 2021 additions and 1120 deletions

View File

@@ -42,9 +42,9 @@ var/list/marker_beacon_colors = list(
update_icon()
/obj/item/stack/marker_beacon/examine(mob/user)
..()
to_chat(user, "<span class='notice'>Use in-hand to place a [singular_name].</span>")
to_chat(user, "<span class='notice'>Alt-click to select a color. Current color is [picked_color].</span>")
. = ..()
. += "<span class='notice'>Use in-hand to place a [singular_name].</span>"
. += "<span class='notice'>Alt-click to select a color. Current color is [picked_color].</span>"
/obj/item/stack/marker_beacon/update_icon()
icon_state = "[initial(icon_state)][lowertext(picked_color)]"
@@ -93,8 +93,8 @@ var/list/marker_beacon_colors = list(
update_icon()
/obj/structure/marker_beacon/examine(mob/user)
..()
to_chat(user, "<span class='notice'>Alt-click to select a color. Current color is [picked_color].</span>")
. = ..()
. += "<span class='notice'>Alt-click to select a color. Current color is [picked_color].</span>"
/obj/structure/marker_beacon/update_icon()
while(!picked_color || !marker_beacon_colors[picked_color])

View File

@@ -58,11 +58,13 @@
item_state = initial(icon_state)
/obj/item/stack/examine(mob/user)
if(..(user, 1))
. = ..()
if(Adjacent(user))
if(!uses_charge)
to_chat(user, "There are [src.amount] [src.singular_name]\s in the stack.")
. += "There are [src.amount] [src.singular_name]\s in the stack."
else
to_chat(user, "There is enough charge for [get_amount()].")
. += "There is enough charge for [get_amount()]."
/obj/item/stack/attack_self(mob/user as mob)
list_recipes(user)