mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Rewrite examine() to pass a list around
This commit is contained in:
@@ -103,9 +103,9 @@ var/global/list/rad_collectors = list()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/power/rad_collector/examine(mob/user)
|
||||
if (..(user, 3))
|
||||
to_chat(user, "The meter indicates that \the [src] is collecting [last_power] W.")
|
||||
return 1
|
||||
. = ..()
|
||||
if(get_dist(user, src) <= 3)
|
||||
. += "The meter indicates that it is collecting [last_power] W."
|
||||
|
||||
/obj/machinery/power/rad_collector/ex_act(severity)
|
||||
switch(severity)
|
||||
|
||||
@@ -267,15 +267,15 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/power/emitter/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
var/integrity_percentage = round((integrity / initial(integrity)) * 100)
|
||||
switch(integrity_percentage)
|
||||
if(0 to 30)
|
||||
to_chat(user, "<span class='danger'>\The [src] is close to falling apart!</span>")
|
||||
. += "<span class='danger'>It is close to falling apart!</span>"
|
||||
if(31 to 70)
|
||||
to_chat(user, "<span class='danger'>\The [src] is damaged.</span>")
|
||||
. += "<span class='danger'>It is damaged.</span>"
|
||||
if(77 to 99)
|
||||
to_chat(user, "<span class='warning'>\The [src] is slightly damaged.</span>")
|
||||
. += "<span class='warning'It is slightly damaged.</span>"
|
||||
|
||||
//R-UST port
|
||||
/obj/machinery/power/emitter/proc/get_initial_fire_delay()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user