mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-30 15:38:02 +01:00
Rewrite examine() to pass a list around
This commit is contained in:
@@ -68,8 +68,9 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
var/spam_proof = FALSE // If true, it can't be spammed by random events.
|
||||
|
||||
/obj/item/device/pda/examine(mob/user)
|
||||
if(..(user, 1))
|
||||
to_chat(user, "The time [stationtime2text()] is displayed in the corner of the screen.")
|
||||
. = ..()
|
||||
if(Adjacent(user))
|
||||
. += "The time [stationtime2text()] is displayed in the corner of the screen."
|
||||
|
||||
/obj/item/device/pda/CtrlClick()
|
||||
if(issilicon(usr))
|
||||
|
||||
@@ -108,9 +108,9 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
|
||||
// Parameters: user - the user doing the examining
|
||||
// Description: Allows the user to click a link when examining to look at video if one is going.
|
||||
/obj/item/device/communicator/examine(mob/user)
|
||||
. = ..(user, 1)
|
||||
if(. && video_source)
|
||||
to_chat(user, "<span class='notice'>It looks like it's on a video call: <a href='?src=\ref[src];watchvideo=1'>\[view\]</a></span>")
|
||||
. = ..()
|
||||
if(Adjacent(user) && video_source)
|
||||
. += "<span class='notice'>It looks like it's on a video call: <a href='?src=\ref[src];watchvideo=1'>\[view\]</a></span>"
|
||||
|
||||
// Proc: initialize_exonet()
|
||||
// Parameters: 1 (user - the person the communicator belongs to)
|
||||
@@ -131,28 +131,22 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
|
||||
// Parameters: 1 (user - the person examining the device)
|
||||
// Description: Shows all the voice mobs inside the device, and their status.
|
||||
/obj/item/device/communicator/examine(mob/user)
|
||||
if(!..(user))
|
||||
return
|
||||
|
||||
var/msg = ""
|
||||
. = ..()
|
||||
|
||||
for(var/mob/living/voice/voice in contents)
|
||||
msg += "<span class='notice'>On the screen, you can see a image feed of [voice].</span>\n"
|
||||
msg += "<span class='warning'>"
|
||||
|
||||
. += "<span class='notice'>On the screen, you can see a image feed of [voice].</span>"
|
||||
|
||||
if(voice && voice.key)
|
||||
switch(voice.stat)
|
||||
if(CONSCIOUS)
|
||||
if(!voice.client)
|
||||
msg += "[voice] appears to be asleep.\n" //afk
|
||||
. += "<span class='warning'>[voice] appears to be asleep.</span>" //afk
|
||||
if(UNCONSCIOUS)
|
||||
msg += "[voice] doesn't appear to be conscious.\n"
|
||||
. += "<span class='warning'>[voice] doesn't appear to be conscious.</span>"
|
||||
if(DEAD)
|
||||
msg += "<span class='deadsay'>[voice] appears to have died...</span>\n" //Hopefully this never has to be used.
|
||||
. += "<span class='deadsay'>[voice] appears to have died...</span>" //Hopefully this never has to be used.
|
||||
else
|
||||
msg += "<span class='notice'>The device doesn't appear to be transmitting any data.</span>\n"
|
||||
msg += "</span>"
|
||||
to_chat(user, msg)
|
||||
return
|
||||
. += "<span class='notice'>The device doesn't appear to be transmitting any data.</span>"
|
||||
|
||||
// Proc: emp_act()
|
||||
// Parameters: None
|
||||
|
||||
@@ -86,23 +86,20 @@
|
||||
set_light(0)
|
||||
|
||||
/obj/item/device/flashlight/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
if(power_use && brightness_level)
|
||||
var/tempdesc
|
||||
tempdesc += "\The [src] is set to [brightness_level]. "
|
||||
. += "\The [src] is set to [brightness_level]."
|
||||
if(cell)
|
||||
tempdesc += "\The [src] has a \the [cell] attached. "
|
||||
. += "\The [src] has a \the [cell] attached."
|
||||
|
||||
if(cell.charge <= cell.maxcharge*0.25)
|
||||
tempdesc += "It appears to have a low amount of power remaining."
|
||||
. += "It appears to have a low amount of power remaining."
|
||||
else if(cell.charge > cell.maxcharge*0.25 && cell.charge <= cell.maxcharge*0.5)
|
||||
tempdesc += "It appears to have an average amount of power remaining."
|
||||
. += "It appears to have an average amount of power remaining."
|
||||
else if(cell.charge > cell.maxcharge*0.5 && cell.charge <= cell.maxcharge*0.75)
|
||||
tempdesc += "It appears to have an above average amount of power remaining."
|
||||
. += "It appears to have an above average amount of power remaining."
|
||||
else if(cell.charge > cell.maxcharge*0.75 && cell.charge <= cell.maxcharge)
|
||||
tempdesc += "It appears to have a high amount of power remaining."
|
||||
|
||||
to_chat(user, "[tempdesc]")
|
||||
. += "It appears to have a high amount of power remaining."
|
||||
|
||||
/obj/item/device/flashlight/attack_self(mob/user)
|
||||
if(power_use)
|
||||
|
||||
@@ -110,8 +110,8 @@
|
||||
choose_colour()
|
||||
|
||||
/obj/item/device/floor_painter/examine(mob/user)
|
||||
..(user)
|
||||
to_chat(user, "It is configured to produce the '[decal]' decal with a direction of '[paint_dir]' using [paint_colour] paint.")
|
||||
. = ..()
|
||||
. += "It is configured to produce the '[decal]' decal with a direction of '[paint_dir]' using [paint_colour] paint."
|
||||
|
||||
/obj/item/device/floor_painter/verb/choose_colour()
|
||||
set name = "Choose Colour"
|
||||
|
||||
@@ -33,9 +33,9 @@
|
||||
update_sound()
|
||||
|
||||
/obj/item/device/geiger/examine(mob/user)
|
||||
..(user)
|
||||
. = ..()
|
||||
get_radiation()
|
||||
to_chat(user, "<span class='warning'>[scanning ? "Ambient" : "Stored"] radiation level: [radiation_count ? radiation_count : "0"]Bq.</span>")
|
||||
. += "<span class='warning'>[scanning ? "Ambient" : "Stored"] radiation level: [radiation_count ? radiation_count : "0"]Bq.</span>"
|
||||
|
||||
/obj/item/device/geiger/rad_act(amount)
|
||||
if(!amount || !scanning)
|
||||
|
||||
@@ -13,11 +13,11 @@
|
||||
/obj/item/device/holowarrant/examine(mob/user)
|
||||
. = ..()
|
||||
if(active)
|
||||
to_chat(user, "It's a holographic warrant for '[active.fields["namewarrant"]]'.")
|
||||
. += "It's a holographic warrant for '[active.fields["namewarrant"]]'."
|
||||
if(in_range(user, src) || istype(user, /mob/observer/dead))
|
||||
show_content(user)
|
||||
show_content(user) //Opens a browse window, not chatbox related
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You have to go closer if you want to read it.</span>")
|
||||
. += "<span class='notice'>You have to go closer if you want to read it.</span>"
|
||||
|
||||
//hit yourself with it
|
||||
/obj/item/device/holowarrant/attack_self(mob/living/user as mob)
|
||||
|
||||
@@ -64,8 +64,9 @@
|
||||
..()
|
||||
|
||||
/obj/item/device/lightreplacer/examine(mob/user)
|
||||
if(..(user, 2))
|
||||
to_chat(user, "It has [uses] lights remaining.")
|
||||
. = ..()
|
||||
if(get_dist(user, src) <= 2)
|
||||
. += "It has [uses] lights remaining."
|
||||
|
||||
/obj/item/device/lightreplacer/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/stack/material) && W.get_material_name() == "glass")
|
||||
|
||||
@@ -125,8 +125,8 @@
|
||||
choose_colour_secure()
|
||||
|
||||
/obj/item/device/closet_painter/examine(mob/user)
|
||||
..(user)
|
||||
to_chat(user, "It is configured to produce the '[colour]' paint scheme or the '[colour_secure]' secure closet paint scheme.")
|
||||
. = ..()
|
||||
. += "It is configured to produce the '[colour]' paint scheme or the '[colour_secure]' secure closet paint scheme."
|
||||
|
||||
/obj/item/device/closet_painter/verb/choose_colour()
|
||||
set name = "Choose Colour"
|
||||
|
||||
@@ -63,8 +63,8 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/item/device/modkit/examine(mob/user)
|
||||
..(user)
|
||||
to_chat(user, "It looks as though it modifies hardsuits to fit [target_species] users.")
|
||||
. = ..()
|
||||
. += "It looks as though it modifies hardsuits to fit [target_species] users."
|
||||
|
||||
/obj/item/device/modkit/tajaran
|
||||
name = "tajaran hardsuit modification kit"
|
||||
|
||||
@@ -27,5 +27,5 @@
|
||||
mode = input("Which colour do you want to use?", "Pipe painter", mode) in modes
|
||||
|
||||
/obj/item/device/pipe_painter/examine(mob/user)
|
||||
..(user)
|
||||
to_chat(user, "It is in [mode] mode.")
|
||||
. = ..()
|
||||
. += "It is in [mode] mode."
|
||||
|
||||
@@ -37,11 +37,11 @@
|
||||
return list_secure_channels()
|
||||
|
||||
/obj/item/device/radio/headset/examine(mob/user)
|
||||
if(!(..(user, 1) && radio_desc))
|
||||
return
|
||||
. = ..()
|
||||
|
||||
to_chat(user, "The following channels are available:")
|
||||
to_chat(user, radio_desc)
|
||||
if(radio_desc && Adjacent(user))
|
||||
. += "The following channels are available:"
|
||||
. += radio_desc
|
||||
|
||||
/obj/item/device/radio/headset/handle_message_mode(mob/living/M as mob, list/message_pieces, channel)
|
||||
if(channel == "special")
|
||||
|
||||
@@ -581,12 +581,18 @@ var/global/list/default_medbay_channels = list(
|
||||
|
||||
/obj/item/device/radio/examine(mob/user)
|
||||
. = ..()
|
||||
<<<<<<< HEAD
|
||||
if ((in_range(src, user) || loc == user))
|
||||
if (b_stat)
|
||||
user.show_message("<span class='notice'>\The [src] can be attached and modified!</span>")
|
||||
=======
|
||||
|
||||
if((in_range(src, user) || loc == user))
|
||||
if(b_stat)
|
||||
. += "<span class='notice'>\The [src] can be attached and modified!</span>"
|
||||
>>>>>>> 6c6644f... Rewrite examine() to pass a list around (#7038)
|
||||
else
|
||||
user.show_message("<span class='notice'>\The [src] can not be modified or attached!</span>")
|
||||
return
|
||||
. += "<span class='notice'>\The [src] can not be modified or attached!</span>"
|
||||
|
||||
/obj/item/device/radio/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
|
||||
@@ -84,9 +84,9 @@
|
||||
camtype = /obj/machinery/camera/bug/spy
|
||||
|
||||
/obj/item/device/camerabug/examine(mob/user)
|
||||
. = ..(user, 0)
|
||||
if(.)
|
||||
to_chat(user, "It has a tiny camera inside. Needs to be both configured and brought in contact with monitor device to be fully functional.")
|
||||
. = ..()
|
||||
if(get_dist(user, src) == 0)
|
||||
. += "It has a tiny camera inside. Needs to be both configured and brought in contact with monitor device to be fully functional."
|
||||
|
||||
/obj/item/device/camerabug/attackby(obj/item/W as obj, mob/living/user as mob)
|
||||
if(istype(W, /obj/item/device/bug_monitor))
|
||||
@@ -215,9 +215,9 @@
|
||||
origin_tech = list(TECH_DATA = 1, TECH_ENGINEERING = 1, TECH_ILLEGAL = 3)
|
||||
|
||||
/obj/item/device/bug_monitor/spy/examine(mob/user)
|
||||
. = ..(user, 1)
|
||||
if(.)
|
||||
to_chat(user, "The time '12:00' is blinking in the corner of the screen and \the [src] looks very cheaply made.")
|
||||
. = ..()
|
||||
if(Adjacent(user))
|
||||
. += "The time '12:00' is blinking in the corner of the screen and \the [src] looks very cheaply made."
|
||||
|
||||
/obj/machinery/camera/bug/check_eye(var/mob/user as mob)
|
||||
return 0
|
||||
|
||||
@@ -173,24 +173,25 @@
|
||||
icon_state = "suitcooler0"
|
||||
|
||||
/obj/item/device/suit_cooling_unit/examine(mob/user)
|
||||
if(!..(user, 1))
|
||||
return
|
||||
. = ..()
|
||||
|
||||
if (on)
|
||||
if (attached_to_suit(src.loc))
|
||||
to_chat(user, "It's switched on and running.")
|
||||
if(Adjacent(user))
|
||||
|
||||
if (on)
|
||||
if (attached_to_suit(src.loc))
|
||||
. += "It's switched on and running."
|
||||
else
|
||||
. += "It's switched on, but not attached to anything."
|
||||
else
|
||||
to_chat(user, "It's switched on, but not attached to anything.")
|
||||
else
|
||||
to_chat(user, "It is switched off.")
|
||||
. += "It is switched off."
|
||||
|
||||
if (cover_open)
|
||||
if(cell)
|
||||
to_chat(user, "The panel is open, exposing the [cell].")
|
||||
if (cover_open)
|
||||
if(cell)
|
||||
. += "The panel is open, exposing the [cell]."
|
||||
else
|
||||
. += "The panel is open."
|
||||
|
||||
if (cell)
|
||||
. += "The charge meter reads [round(cell.percent())]%."
|
||||
else
|
||||
to_chat(user, "The panel is open.")
|
||||
|
||||
if (cell)
|
||||
to_chat(user, "The charge meter reads [round(cell.percent())]%.")
|
||||
else
|
||||
to_chat(user, "It doesn't have a power cell installed.")
|
||||
. += "It doesn't have a power cell installed."
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
..()
|
||||
|
||||
/obj/item/device/tvcamera/examine()
|
||||
..()
|
||||
to_chat(usr, "Video feed is [camera.status ? "on" : "off"]")
|
||||
to_chat(usr, "Audio feed is [radio.broadcasting ? "on" : "off"]")
|
||||
. = ..()
|
||||
. += "Video feed is [camera.status ? "on" : "off"]"
|
||||
. += "Audio feed is [radio.broadcasting ? "on" : "off"]"
|
||||
|
||||
/obj/item/device/tvcamera/Initialize()
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user