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

@@ -112,20 +112,17 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
return 1
/obj/structure/particle_accelerator/examine(mob/user)
switch(src.construction_state)
. = ..()
switch(construction_state)
if(0)
src.desc = text("A [name], looks like it's not attached to the flooring")
. += "Looks like it's not attached to the flooring."
if(1)
src.desc = text("A [name], it is missing some cables")
. += "It is missing some cables."
if(2)
src.desc = text("A [name], the panel is open")
. += "The panel is open."
if(3)
src.desc = text("The [name] is assembled")
if(powered)
src.desc = src.desc_holder
..()
return
. += "It is assembled."
/obj/structure/particle_accelerator/attackby(obj/item/W, mob/user)
if(istool(W))
@@ -295,19 +292,17 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
return
/obj/machinery/particle_accelerator/examine(mob/user)
switch(src.construction_state)
. = ..()
switch(construction_state)
if(0)
src.desc = text("A [name], looks like it's not attached to the flooring")
. += "Looks like it's not attached to the flooring."
if(1)
src.desc = text("A [name], it is missing some cables")
. += "It is missing some cables."
if(2)
src.desc = text("A [name], the panel is open")
. += "The panel is open."
if(3)
src.desc = text("The [name] is assembled")
if(powered)
src.desc = src.desc_holder
..()
return
. += "It is assembled."
/obj/machinery/particle_accelerator/attackby(obj/item/W, mob/user)

View File

@@ -37,11 +37,11 @@
..()
/obj/machinery/particle_smasher/examine(mob/user)
..()
if(user in view(1))
to_chat(user, "<span class='notice'>\The [src] contains:</span>")
. = ..()
if(Adjacent(user))
. += "<span class='notice'>\The [src] contains:</span>"
for(var/obj/item/I in contents)
to_chat(user, "<span class='notice'>\the [I]</span>")
. += "<span class='notice'>\the [I]</span>"
/obj/machinery/particle_smasher/attackby(obj/item/W as obj, mob/user as mob)
if(W.type == /obj/item/device/analyzer)