Rewrite examine() to pass a list around

This commit is contained in:
Aronai Sieyes
2020-04-29 16:42:50 -04:00
committed by VirgoBot
parent 8c5c0a7cfb
commit 6ebd249748
214 changed files with 2021 additions and 1120 deletions
@@ -200,8 +200,9 @@
set_frequency(frequency)
/obj/machinery/atmospherics/binary/dp_vent_pump/examine(mob/user)
if(..(user, 1))
to_chat(user, "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W")
. = ..()
if(Adjacent(user))
. += "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W"
/obj/machinery/atmospherics/unary/vent_pump/power_change()
+2 -2
View File
@@ -15,8 +15,8 @@ GLOBAL_LIST_EMPTY(shutoff_valves)
icon_state = "vclamp[open]"
/obj/machinery/atmospherics/valve/shutoff/examine(var/mob/user)
..()
to_chat(user, "The automatic shutoff circuit is [close_on_leaks ? "enabled" : "disabled"].")
. = ..()
. += "The automatic shutoff circuit is [close_on_leaks ? "enabled" : "disabled"]."
/obj/machinery/atmospherics/valve/shutoff/Initialize()
. = ..()
@@ -178,6 +178,6 @@
..()
/obj/machinery/atmospherics/unary/freezer/examine(mob/user)
..(user)
. = ..()
if(panel_open)
to_chat(user, "The maintenance hatch is open.")
. += "The maintenance hatch is open."
@@ -165,6 +165,6 @@
..()
/obj/machinery/atmospherics/unary/heater/examine(mob/user)
..(user)
..()
if(panel_open)
to_chat(user, "The maintenance hatch is open.")
. += "The maintenance hatch is open."
@@ -414,12 +414,13 @@
..()
/obj/machinery/atmospherics/unary/vent_pump/examine(mob/user)
if(..(user, 1))
to_chat(user, "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W")
. = ..()
if(Adjacent(user))
. += "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W"
else
to_chat(user, "You are too far away to read the gauge.")
. += "You are too far away to read the gauge."
if(welded)
to_chat(user, "It seems welded shut.")
. += "It seems welded shut."
/obj/machinery/atmospherics/unary/vent_pump/power_change()
var/old_stat = stat
@@ -287,7 +287,8 @@
deconstruct()
/obj/machinery/atmospherics/unary/vent_scrubber/examine(mob/user)
if(..(user, 1))
to_chat(user, "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W")
. = ..()
if(Adjacent(user))
. += "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W"
else
to_chat(user, "You are too far away to read the gauge.")
. += "You are too far away to read the gauge."
+2 -2
View File
@@ -307,5 +307,5 @@
deconstruct()
/obj/machinery/atmospherics/valve/examine(mob/user)
..()
to_chat(user, "It is [open ? "open" : "closed"].")
. = ..()
. += "It is [open ? "open" : "closed"]."
+4 -5
View File
@@ -169,7 +169,7 @@
return found
//All atoms
/atom/proc/examine(mob/user, var/distance = -1, var/infix = "", var/suffix = "")
/atom/proc/examine(mob/user, var/infix = "", var/suffix = "")
//This reformat names to get a/an properly working on item descriptions when they are bloody
var/f_name = "\a [src][infix]."
if(src.blood_DNA && !istype(src, /obj/effect/decal))
@@ -182,16 +182,15 @@
else
f_name += "oil-stained [name][infix]."
to_chat(user, "[bicon(src)] That's [f_name] [suffix]")
to_chat(user,desc)
var/list/output = list("[bicon(src)] That's [f_name] [suffix]", desc)
if(user.client?.examine_text_mode == EXAMINE_MODE_INCLUDE_USAGE)
to_chat(user, description_info)
output += description_info
if(user.client?.examine_text_mode == EXAMINE_MODE_SWITCH_TO_PANEL)
user.client.statpanel = "Examine" // Switch to stat panel
return distance == -1 || (get_dist(src, user) <= distance)
return output
// called by mobs when e.g. having the atom as their machine, pulledby, loc (AKA mob being inside the atom) or buckled var set.
// see code/modules/mob/mob_movement.dm for more.
+5 -4
View File
@@ -84,9 +84,9 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa","
..()
examine(mob/user)
..()
. = ..()
if(iscultist(user))
to_chat(user, "This spell circle reads: <i>[word1] [word2] [word3]</i>.")
. += "This spell circle reads: <i>[word1] [word2] [word3]</i>."
attackby(I as obj, user as mob)
@@ -422,10 +422,11 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa","
return
examine(mob/user)
. = ..()
if(!iscultist(user))
to_chat(user, "An old, dusty tome with frayed edges and a sinister looking cover.")
. += "An old, dusty tome with frayed edges and a sinister looking cover."
else
to_chat(user, "The scriptures of Nar-Sie, The One Who Sees, The Geometer of Blood. Contains the details of every ritual his followers could think of. Most of these are useless, though.")
. += "The scriptures of Nar-Sie, The One Who Sees, The Geometer of Blood. Contains the details of every ritual his followers could think of. Most of these are useless, though."
/obj/item/weapon/book/tome/cultify()
return
+2 -2
View File
@@ -51,10 +51,10 @@
icon_state = "pinonfar"
/obj/item/weapon/pinpointer/examine(mob/user)
..(user)
. = ..()
for(var/obj/machinery/nuclearbomb/bomb in machines)
if(bomb.timing)
to_chat(user, "Extreme danger. Arming signal detected. Time remaining: [bomb.timeleft]")
. += "Extreme danger. Arming signal detected. Time remaining: [bomb.timeleft]"
@@ -23,8 +23,8 @@
uses = 1
/obj/item/weapon/disposable_teleporter/examine(mob/user)
..()
to_chat(user, "[uses] uses remaining.")
. = ..()
. += "[uses] uses remaining."
/obj/item/weapon/disposable_teleporter/attack_self(mob/user as mob)
if(!uses)
+2 -2
View File
@@ -49,8 +49,8 @@
to_chat(usr, "<span class='warning'>There's no more cable on the reel.</span>")
/obj/machinery/cablelayer/examine(mob/user)
..()
to_chat(user, "\The [src]'s cable reel has [cable.amount] length\s left.")
. = ..()
. += "[src]'s cable reel has [cable.amount] length\s left."
/obj/machinery/cablelayer/proc/load_cable(var/obj/item/stack/cable_coil/CC)
if(istype(CC) && CC.amount)
+7 -9
View File
@@ -77,24 +77,22 @@
radio_connection.post_signal(src, signal)
/obj/machinery/meter/examine(mob/user)
var/t = "A gas flow meter. "
. = ..()
if(get_dist(user, src) > 3 && !(istype(user, /mob/living/silicon/ai) || istype(user, /mob/observer/dead)))
t += "<span class='warning'>You are too far away to read it.</span>"
. += "<span class='warning'>You are too far away to read it.</span>"
else if(stat & (NOPOWER|BROKEN))
t += "<span class='warning'>The display is off.</span>"
. += "<span class='warning'>The display is off.</span>"
else if(src.target)
else if(target)
var/datum/gas_mixture/environment = target.return_air()
if(environment)
t += "The pressure gauge reads [round(environment.return_pressure(), 0.01)] kPa; [round(environment.temperature,0.01)]K ([round(environment.temperature-T0C,0.01)]&deg;C)"
. += "The pressure gauge reads [round(environment.return_pressure(), 0.01)] kPa; [round(environment.temperature,0.01)]K ([round(environment.temperature-T0C,0.01)]&deg;C)"
else
t += "The sensor error light is blinking."
. += "The sensor error light is blinking."
else
t += "The connect error light is blinking."
to_chat(user,t)
. += "The connect error light is blinking."
/obj/machinery/meter/Click()
+2 -2
View File
@@ -89,9 +89,9 @@
. = ..()
var/biomass = get_biomass_volume()
if(biomass)
to_chat(user, "<span class='notice'>It is loaded with [biomass] units of biomass.</span>")
. += "<span class='notice'>It is loaded with [biomass] units of biomass.</span>"
else
to_chat(user, "<span class='notice'>It is not loaded with any biomass.</span>")
. += "<span class='notice'>It is not loaded with any biomass.</span>"
/obj/machinery/organ_printer/RefreshParts()
// Print Delay updating
+5 -6
View File
@@ -39,12 +39,11 @@
overlays.Cut()
/obj/machinery/cell_charger/examine(mob/user)
if(!..(user, 5))
return
to_chat(user, "[charging ? "[charging]" : "Nothing"] is in [src].")
if(charging)
to_chat(user, "Current charge: [charging.charge] / [charging.maxcharge]")
. = ..()
if(get_dist(user, src) <= 5)
. += "[charging ? "[charging]" : "Nothing"] is in [src]."
if(charging)
. += "Current charge: [charging.charge] / [charging.maxcharge]"
/obj/machinery/cell_charger/attackby(obj/item/weapon/W, mob/user)
if(stat & BROKEN)
+2 -3
View File
@@ -534,9 +534,8 @@
to_chat(user, "You flip the write-protect tab to [read_only ? "protected" : "unprotected"].")
/obj/item/weapon/disk/data/examine(mob/user)
..(user)
to_chat(user, text("The write-protect tab is set to [read_only ? "protected" : "unprotected"]."))
return
. = ..()
. += "The write-protect tab is set to [read_only ? "protected" : "unprotected"]."
/*
* Diskette Box
+6 -7
View File
@@ -1020,13 +1020,12 @@
var/active = 0 //if the ship is on
/obj/item/weapon/orion_ship/examine(mob/user)
..()
if(!(in_range(user, src)))
return
if(!active)
to_chat(user, span("notice", "There's a little switch on the bottom. It's flipped down."))
else
to_chat(user, span("notice", "There's a little switch on the bottom. It's flipped up."))
. = ..()
if(in_range(user, src))
if(!active)
. += span("notice", "There's a little switch on the bottom. It's flipped down.")
else
. += span("notice", "There's a little switch on the bottom. It's flipped up.")
/obj/item/weapon/orion_ship/attack_self(mob/user)
if(active)
+3 -3
View File
@@ -19,11 +19,11 @@
return temp_access
/obj/item/weapon/card/id/guest/examine(mob/user)
..(user)
. = ..()
if (world.time < expiration_time)
to_chat(user, "<span class='notice'>This pass expires at [worldtime2stationtime(expiration_time)].</span>")
. += "<span class='notice'>This pass expires at [worldtime2stationtime(expiration_time)].</span>"
else
to_chat(user, "<span class='warning'>It expired at [worldtime2stationtime(expiration_time)].</span>")
. += "<span class='warning'>It expired at [worldtime2stationtime(expiration_time)].</span>"
/obj/item/weapon/card/id/guest/read()
if(!Adjacent(usr))
+4 -4
View File
@@ -332,13 +332,13 @@
/obj/machinery/door/examine(mob/user)
. = ..()
if(src.health <= 0)
to_chat(user, "\The [src] is broken!")
. += "It is broken!"
else if(src.health < src.maxhealth / 4)
to_chat(user, "\The [src] looks like it's about to break!")
. += "It looks like it's about to break!"
else if(src.health < src.maxhealth / 2)
to_chat(user, "\The [src] looks seriously damaged!")
. += "It looks seriously damaged!"
else if(src.health < src.maxhealth * 3/4)
to_chat(user, "\The [src] shows signs of damage!")
. += "It shows signs of damage!"
/obj/machinery/door/proc/set_broken()
+9 -8
View File
@@ -79,14 +79,15 @@
return get_material_by_name(DEFAULT_WALL_MATERIAL)
/obj/machinery/door/firedoor/examine(mob/user)
. = ..(user, 1)
if(!. || !density)
return
. = ..()
if(!Adjacent(user))
return .
if(pdiff >= FIREDOOR_MAX_PRESSURE_DIFF)
to_chat(user, "<span class='warning'>WARNING: Current pressure differential is [pdiff]kPa! Opening door may result in injury!</span>")
. += "<span class='warning'>WARNING: Current pressure differential is [pdiff]kPa! Opening door may result in injury!</span>"
to_chat(user, "<b>Sensor readings:</b>")
. += "<b>Sensor readings:</b>"
for(var/index = 1; index <= tile_info.len; index++)
var/o = "&nbsp;&nbsp;"
switch(index)
@@ -100,7 +101,7 @@
o += "WEST: "
if(tile_info[index] == null)
o += "<span class='warning'>DATA UNAVAILABLE</span>"
to_chat(user, o)
. += o
continue
var/celsius = convert_k2c(tile_info[index][1])
var/pressure = tile_info[index][2]
@@ -108,14 +109,14 @@
o += "[celsius]&deg;C</span> "
o += "<span style='color:blue'>"
o += "[pressure]kPa</span></li>"
to_chat(user, o)
. += o
if(islist(users_to_open) && users_to_open.len)
var/users_to_open_string = users_to_open[1]
if(users_to_open.len >= 2)
for(var/i = 2 to users_to_open.len)
users_to_open_string += ", [users_to_open[i]]"
to_chat(user, "These people have opened \the [src] during an alert: [users_to_open_string].")
. += "These people have opened \the [src] during an alert: [users_to_open_string]."
/obj/machinery/door/firedoor/Bumped(atom/AM)
if(p_open || operating)
+2 -3
View File
@@ -64,12 +64,11 @@
..()
/obj/machinery/floorlayer/examine(mob/user)
..()
. = ..()
var/dismantle = mode["dismantle"]
var/laying = mode["laying"]
var/collect = mode["collect"]
var/message = "<span class='notice'>\The [src] [!T ? "don't " : ""]has [!T ? "" : "[T.get_amount()] [T] "]tile\s, dismantle is [dismantle ? "on" : "off"], laying is [laying ? "on" : "off"], collect is [collect ? "on" : "off"].</span>"
to_chat(user,message)
. += "<span class='notice'>[src] [!T ? "don't " : ""]has [!T ? "" : "[T.get_amount()] [T] "]tile\s, dismantle is [dismantle ? "on" : "off"], laying is [laying ? "on" : "off"], collect is [collect ? "on" : "off"].</span>"
/obj/machinery/floorlayer/proc/reset()
on=0
+2 -2
View File
@@ -213,9 +213,9 @@
density = TRUE
/obj/structure/frame/examine(mob/user)
..()
. = ..()
if(circuit)
to_chat(user, "It has \a [circuit] installed.")
. += "It has \a [circuit] installed."
/obj/structure/frame/proc/update_desc()
var/D
+10 -11
View File
@@ -165,21 +165,20 @@
to_chat(usr, "The IV drip is now [mode ? "injecting" : "taking blood"].")
/obj/machinery/iv_drip/examine(mob/user)
..(user)
if(!(user in view(2)) && user != src.loc)
return
. = ..()
to_chat(user, "The IV drip is [mode ? "injecting" : "taking blood"].")
if(get_dist(user, src) <= 2)
. += "The IV drip is [mode ? "injecting" : "taking blood"]."
if(beaker)
if(beaker.reagents && beaker.reagents.reagent_list.len)
to_chat(user, "<span class='notice'>Attached is \a [beaker] with [beaker.reagents.total_volume] units of liquid.</span>")
if(beaker)
if(beaker.reagents?.reagent_list?.len)
. += "<span class='notice'>Attached is \a [beaker] with [beaker.reagents.total_volume] units of liquid.</span>"
else
. += "<span class='notice'>Attached is an empty [beaker].</span>"
else
to_chat(user, "<span class='notice'>Attached is an empty [beaker].</span>")
else
to_chat(user, "<span class='notice'>No chemicals are attached.</span>")
. += "<span class='notice'>No chemicals are attached.</span>"
to_chat(user, "<span class='notice'>[attached ? attached : "No one"] is attached.</span>")
. += "<span class='notice'>[attached ? attached : "No one"] is attached.</span>"
/obj/machinery/iv_drip/CanPass(atom/movable/mover, turf/target)
if(istype(mover) && mover.checkpass(PASSTABLE)) //allow bullets, beams, thrown objects, mice, drones, and the like through.
+3 -2
View File
@@ -50,8 +50,9 @@
set_light(2, 0.1, on ? "#82FF4C" : "#F86060")
/obj/machinery/light_switch/examine(mob/user)
if(..(user, 1))
to_chat(user, "A light switch. It is [on? "on" : "off"].")
. = ..()
if(Adjacent(user))
. += "A light switch. It is [on? "on" : "off"]."
/obj/machinery/light_switch/attack_hand(mob/user)
+2 -2
View File
@@ -148,9 +148,9 @@
/obj/machinery/oxygen_pump/examine(var/mob/user)
. = ..()
if(tank)
to_chat(user, "The meter shows [round(tank.air_contents.return_pressure())] kPa.")
. += "The meter shows [round(tank.air_contents.return_pressure())] kPa."
else
to_chat(user, "<span class='warning'>It is missing a tank!</span>")
. += "<span class='warning'>It is missing a tank!</span>"
/obj/machinery/oxygen_pump/process()
+2 -2
View File
@@ -115,8 +115,8 @@
..()
/obj/machinery/pipelayer/examine(mob/user)
..()
to_chat(user, "\The [src] has [metal] sheet\s, is set to produce [P_type_t], and auto-dismantling is [!a_dis?"de":""]activated.")
. = ..()
. += "[src] has [metal] sheet\s, is set to produce [P_type_t], and auto-dismantling is [!a_dis?"de":""]activated."
/obj/machinery/pipelayer/proc/reset()
on = 0
+6 -6
View File
@@ -26,13 +26,13 @@
return
/obj/machinery/recharger/examine(mob/user)
if(!..(user, 5))
return
. = ..()
to_chat(user, "[charging ? "[charging]" : "Nothing"] is in [src].")
if(charging)
var/obj/item/weapon/cell/C = charging.get_cell()
to_chat(user, "Current charge: [C.charge] / [C.maxcharge]")
if(get_dist(user, src) <= 5)
. += "[charging ? "[charging]" : "Nothing"] is in [src]."
if(charging)
var/obj/item/weapon/cell/C = charging.get_cell()
. += "Current charge: [C.charge] / [C.maxcharge]"
/obj/machinery/recharger/attackby(obj/item/weapon/G as obj, mob/user as mob)
var/allowed = 0
+2 -2
View File
@@ -115,8 +115,8 @@
/obj/machinery/recharge_station/examine(mob/user)
..(user)
to_chat(user, "The charge meter reads: [round(chargepercentage())]%")
. = ..()
. += "The charge meter reads: [round(chargepercentage())]%"
/obj/machinery/recharge_station/proc/chargepercentage()
if(!cell)
+4 -4
View File
@@ -29,13 +29,13 @@
set_light(0)
/obj/machinery/space_heater/examine(mob/user)
..(user)
. = ..()
to_chat(user, "The heater is [on ? "on" : "off"] and the hatch is [panel_open ? "open" : "closed"].")
. += "The heater is [on ? "on" : "off"] and the hatch is [panel_open ? "open" : "closed"]."
if(panel_open)
to_chat(user, "The power cell is [cell ? "installed" : "missing"].")
. += "The power cell is [cell ? "installed" : "missing"]."
else
to_chat(user, "The charge meter reads [cell ? round(cell.percent(),1) : 0]%")
. += "The charge meter reads [cell ? round(cell.percent(),1) : 0]%"
return
/obj/machinery/space_heater/powered()
+2 -2
View File
@@ -148,9 +148,9 @@
return 0
/obj/machinery/status_display/examine(mob/user)
. = ..(user)
. = ..()
if(mode != STATUS_DISPLAY_BLANK && mode != STATUS_DISPLAY_ALERT)
to_chat(user, "The display says:<br>\t[sanitize(message1)]<br>\t[sanitize(message2)]")
. += "The display says:<br>\t[sanitize(message1)]<br>\t[sanitize(message2)]"
/obj/machinery/status_display/proc/set_message(m1, m2)
if(m1)
+2 -2
View File
@@ -38,8 +38,8 @@
return 0
/obj/item/mecha_parts/mecha_equipment/examine(mob/user)
..()
to_chat(user, "<span class='notice'>\The [src] will fill [equip_type?"a [equip_type]":"any"] slot.</span>")
. = ..()
. += "<span class='notice'>[src] will fill [equip_type?"a [equip_type]":"any"] slot.</span>"
/obj/item/mecha_parts/mecha_equipment/New()
..()
+9 -11
View File
@@ -267,25 +267,23 @@
return 0
/obj/mecha/examine(mob/user)
..(user)
. = ..()
var/integrity = health/initial(health)*100
switch(integrity)
if(85 to 100)
to_chat(user, "It's fully intact.")
. += "It's fully intact."
if(65 to 85)
to_chat(user, "It's slightly damaged.")
. += "It's slightly damaged."
if(45 to 65)
to_chat(user, "It's badly damaged.")
. += "It's badly damaged."
if(25 to 45)
to_chat(user, "It's heavily damaged.")
. += "It's heavily damaged."
else
to_chat(user, "It's falling apart.")
if(equipment && equipment.len)
to_chat(user, "It's equipped with:")
. += "It's falling apart."
if(equipment?.len)
. += "It's equipped with:"
for(var/obj/item/mecha_parts/mecha_equipment/ME in equipment)
to_chat(user, "[bicon(ME)] [ME]")
return
. += "[bicon(ME)] [ME]"
/obj/mecha/proc/drop_item()//Derpfix, but may be useful in future for engineering exosuits.
return
@@ -159,8 +159,8 @@ var/global/list/image/splatter_cache=list()
icon_state = "writing1"
/obj/effect/decal/cleanable/blood/writing/examine(mob/user)
..(user)
to_chat(user, "It reads: <font color='[basecolor]'>\"[message]\"</font>")
. = ..()
. += "It reads: <font color='[basecolor]'>\"[message]\"</font>"
/obj/effect/decal/cleanable/blood/gibs
name = "gibs"
+2 -2
View File
@@ -197,7 +197,7 @@
src.loc = T
// See inventory_sizes.dm for the defines.
/obj/item/examine(mob/user, var/distance = -1)
/obj/item/examine(mob/user)
var/size
switch(src.w_class)
if(ITEMSIZE_TINY)
@@ -210,7 +210,7 @@
size = "bulky"
if(ITEMSIZE_HUGE)
size = "huge"
return ..(user, distance, "", "It is a [size] item.")
return ..(user, "", "It is a [size] item.")
/obj/item/attack_hand(mob/living/user as mob)
if (!user) return
+3 -3
View File
@@ -13,9 +13,9 @@
var/static/radial_pickup = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_pickup")
/obj/item/weapon/deskbell/examine(mob/user)
..()
. = ..()
if(broken)
to_chat(user,"<b>It looks damaged, the ringer is stuck firmly inside.</b>")
. += "<b>It looks damaged, the ringer is stuck firmly inside.</b>"
/obj/item/weapon/deskbell/attack(mob/target as mob, mob/living/user as mob)
if(!broken)
@@ -49,7 +49,7 @@
// Once the player has decided their option, choose the behaviour that will happen under said option.
switch(choice)
if("examine")
examine(user)
user.examinate(src)
if("use")
if(check_ability(user))
+4 -4
View File
@@ -219,13 +219,13 @@
syringe.reagents.trans_to_mob(H, 30, CHEM_BLOOD)
/obj/structure/closet/body_bag/cryobag/examine(mob/user)
..()
. = ..()
if(Adjacent(user)) //The bag's rather thick and opaque from a distance.
to_chat(user, "<span class='info'>You peer into \the [src].</span>")
. += "<span class='info'>You peer into \the [src].</span>"
if(syringe)
to_chat(user, "<span class='info'>It has a syringe added to it.</span>")
. += "<span class='info'>It has a syringe added to it.</span>"
for(var/mob/living/L in contents)
L.examine(user)
. += L.examine(user)
/obj/structure/closet/body_bag/cryobag/attackby(obj/item/W, mob/user)
if(opened)
+3 -2
View File
@@ -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
+7 -10
View File
@@ -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"
+2 -2
View File
@@ -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"
+2 -2
View File
@@ -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)
..()
+6 -6
View File
@@ -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
+18 -17
View File
@@ -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."
+3 -3
View File
@@ -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()
. = ..()
+6 -6
View File
@@ -11,8 +11,8 @@
var/list/allowed_types = list()
/obj/item/device/kit/examine()
..()
to_chat(usr, "It has [uses] use\s left.")
. = ..()
. += "It has [uses] use\s left."
/obj/item/device/kit/proc/use(var/amt, var/mob/user)
uses -= amt
@@ -216,11 +216,11 @@
/obj/item/device/kit/paint/examine()
..()
to_chat(usr, "This kit will convert an exosuit into: [new_name].")
to_chat(usr, "This kit can be used on the following exosuit models:")
. = ..()
. += "This kit will convert an exosuit into: [new_name]."
. += "This kit can be used on the following exosuit models:"
for(var/exotype in allowed_types)
to_chat(usr, "- [capitalize(exotype)]")
. += "- [capitalize(exotype)]"
/obj/item/device/kit/paint/customize(var/obj/mecha/M, var/mob/user)
if(!can_customize(M))
+3 -3
View File
@@ -27,9 +27,9 @@
var/obj/item/clothing/accessory/badge/corptag // The tag on the bag.
/obj/structure/closet/body_bag/cryobag/robobag/examine(mob/user)
..()
if(Adjacent(user) && corptag)
to_chat(user, "<span class='notice'>\The [src] has a [corptag] attached to it.</span>")
. = ..()
if(corptag && Adjacent(user))
. += "<span class='notice'>[src] has a [corptag] attached to it.</span>"
/obj/structure/closet/body_bag/cryobag/robobag/update_icon()
overlays.Cut()
@@ -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])
+5 -3
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)
+11 -10
View File
@@ -154,8 +154,9 @@
drop_sound = 'sound/items/drop/gun.ogg'
examine(mob/user)
if(..(user, 2) && bullets)
to_chat(user, "<span class='notice'>It is loaded with [bullets] foam darts!</span>")
. = ..()
if(bullets && get_dist(user, src) <= 2)
. += "<span class='notice'>It is loaded with [bullets] foam darts!</span>"
attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/toy/ammo/crossbow))
@@ -315,8 +316,8 @@
update_icon()
/obj/item/toy/sword/examine(mob/user)
..()
to_chat(user, "<span class='notice'>Alt-click to recolor it.</span>")
. = ..()
. += "<span class='notice'>Alt-click to recolor it.</span>"
/obj/item/toy/sword/attackby(obj/item/weapon/W, mob/user)
if(istype(W, /obj/item/device/multitool) && !active)
@@ -824,11 +825,11 @@
var/obj/item/stored_item // Note: Stored items can't be bigger than the plushie itself.
/obj/structure/plushie/examine(mob/user)
..()
. = ..()
if(opened)
to_chat(user, "<i>You notice an incision has been made on [src].</i>")
. += "<i>You notice an incision has been made on [src].</i>"
if(in_range(user, src) && stored_item)
to_chat(user, "<i>You can see something in there...</i>")
. += "<i>You can see something in there...</i>"
/obj/structure/plushie/attack_hand(mob/user)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
@@ -923,11 +924,11 @@
/obj/item/toy/plushie/examine(mob/user)
..()
. = ..()
if(opened)
to_chat(user, "<i>You notice an incision has been made on [src].</i>")
. += "<i>You notice an incision has been made on [src].</i>"
if(in_range(user, src) && stored_item)
to_chat(user, "<i>You can see something in there...</i>")
. += "<i>You can see something in there...</i>"
/obj/item/toy/plushie/attack_self(mob/user as mob)
if(stored_item && opened && !searching)
+2 -2
View File
@@ -41,8 +41,8 @@
return ..()
/obj/item/weapon/rcd/examine(mob/user)
..()
to_chat(user, display_resources())
. = ..()
. += display_resources()
// Used to show how much stuff (matter units, cell charge, etc) is left inside.
/obj/item/weapon/rcd/proc/display_resources()
+3 -2
View File
@@ -33,8 +33,9 @@ RSF
w_class = ITEMSIZE_NORMAL
/obj/item/weapon/rsf/examine(mob/user)
if(..(user, 0))
to_chat(user,"<span class='notice'>It currently holds [stored_matter]/30 fabrication-units.</span>")
. = ..()
if(get_dist(user, src) == 0)
. += "<span class='notice'>It currently holds [stored_matter]/30 fabrication-units.</span>"
/obj/item/weapon/rsf/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
@@ -149,22 +149,21 @@ CIGARETTE PACKETS ARE IN FANCY.DM
..()
/obj/item/clothing/mask/smokable/examine(mob/user)
..()
if(is_pipe)
return
var/smoke_percent = round((smoketime / max_smoketime) * 100)
switch(smoke_percent)
if(90 to INFINITY)
to_chat(user, "[src] is still fresh.")
if(60 to 90)
to_chat(user, "[src] has a good amount of burn time remaining.")
if(30 to 60)
to_chat(user, "[src] is about half finished.")
if(10 to 30)
to_chat(user, "[src] is starting to burn low.")
else
to_chat(user, "[src] is nearly burnt out!")
. = ..()
if(!is_pipe)
var/smoke_percent = round((smoketime / max_smoketime) * 100)
switch(smoke_percent)
if(90 to INFINITY)
. += "[src] is still fresh."
if(60 to 90)
. += "[src] has a good amount of burn time remaining."
if(30 to 60)
. += "[src] is about half finished."
if(10 to 30)
. += "[src] is starting to burn low."
else
. += "[src] is nearly burnt out!"
/obj/item/clothing/mask/smokable/proc/light(var/flavor_text = "[usr] lights the [name].")
if(!src.lit)
+227
View File
@@ -0,0 +1,227 @@
/obj/item/clothing/mask/smokable/ecig
name = "electronic cigarette"
desc = "Device with modern approach to smoking."
icon = 'icons/obj/ecig.dmi'
var/active = 0
//var/obj/item/weapon/cell/ec_cell = /obj/item/weapon/cell/device
var/cartridge_type = /obj/item/weapon/reagent_containers/ecig_cartridge/med_nicotine
var/obj/item/weapon/reagent_containers/ecig_cartridge/ec_cartridge
w_class = ITEMSIZE_TINY
slot_flags = SLOT_EARS | SLOT_MASK
attack_verb = list("attacked", "poked", "battered")
body_parts_covered = 0
var/brightness_on = 1
chem_volume = 0 //ecig has no storage on its own but has reagent container created by parent obj
item_state = "ecigoff"
var/icon_off
var/icon_empty
var/ecig_colors = list(null, COLOR_DARK_GRAY, COLOR_RED_GRAY, COLOR_BLUE_GRAY, COLOR_GREEN_GRAY, COLOR_PURPLE_GRAY)
/obj/item/clothing/mask/smokable/ecig/New()
..()
ec_cartridge = new cartridge_type(src)
/obj/item/clothing/mask/smokable/ecig/simple
name = "simple electronic cigarette"
desc = "A cheap Lucky 1337 electronic cigarette, styled like a traditional cigarette."
icon_state = "ccigoff"
icon_off = "ccigoff"
icon_empty = "ccigoff"
icon_on = "ccigon"
/obj/item/clothing/mask/smokable/ecig/util
name = "electronic cigarette"
desc = "A popular utilitarian model electronic cigarette, the ONI-55. Comes in a variety of colors."
icon_state = "ecigoff1"
icon_off = "ecigoff1"
icon_empty = "ecigoff1"
icon_on = "ecigon"
/obj/item/clothing/mask/smokable/ecig/util/New()
..()
color = pick(ecig_colors)
/obj/item/clothing/mask/smokable/ecig/deluxe
name = "deluxe electronic cigarette"
desc = "A premium model eGavana MK3 electronic cigarette, shaped like a cigar."
icon_state = "pcigoff1"
icon_off = "pcigoff1"
icon_empty = "pcigoff2"
icon_on = "pcigon"
/obj/item/clothing/mask/smokable/ecig/process()
if(ishuman(loc))
var/mob/living/carbon/human/C = loc
if (src == C.wear_mask && C.check_has_mouth()) // if it's in the human/monkey mouth, transfer reagents to the mob
if (!active || !ec_cartridge || !ec_cartridge.reagents.total_volume)//no cartridge
active=0//autodisable the cigarette
STOP_PROCESSING(SSobj, src)
update_icon()
return
ec_cartridge.reagents.trans_to_mob(C, REM, CHEM_INGEST, 0.4) // Most of it is not inhaled... balance reasons.
/obj/item/clothing/mask/smokable/ecig/update_icon()
if (active)
item_state = icon_on
icon_state = icon_on
set_light(brightness_on)
else if (ec_cartridge)
set_light(0)
item_state = icon_off
icon_state = icon_off
else
icon_state = icon_empty
item_state = icon_empty
set_light(0)
if(ismob(loc))
var/mob/living/M = loc
M.update_inv_wear_mask(0)
M.update_inv_l_hand(0)
M.update_inv_r_hand(1)
/obj/item/clothing/mask/smokable/ecig/attackby(var/obj/item/I, var/mob/user as mob)
if(istype(I, /obj/item/weapon/reagent_containers/ecig_cartridge))
if (ec_cartridge)//can't add second one
to_chat(user, "<span class='notice'>A cartridge has already been installed.</span> ")
else//fits in new one
user.remove_from_mob(I)
I.forceMove(src)//I.loc=src
ec_cartridge = I
update_icon()
to_chat(user, "<span class='notice'>You insert [I] into [src].</span> ")
/obj/item/clothing/mask/smokable/ecig/attack_self(mob/user as mob)
if (active)
active=0
STOP_PROCESSING(SSobj, src)
to_chat(user, "<span class='notice'>You turn off \the [src]. </span> ")
update_icon()
else
if (!ec_cartridge)
to_chat(user, "<span class='notice'>You can't use it with no cartridge installed!.</span> ")
return
active=1
START_PROCESSING(SSobj, src)
to_chat(user, "<span class='notice'>You turn on \the [src]. </span> ")
update_icon()
/obj/item/clothing/mask/smokable/ecig/attack_hand(mob/user as mob)//eject cartridge
if(user.get_inactive_hand() == src)//if being hold
if (ec_cartridge)
active=0
user.put_in_hands(ec_cartridge)
to_chat(user, "<span class='notice'>You eject [ec_cartridge] from \the [src].</span> ")
ec_cartridge = null
update_icon()
else
..()
/obj/item/weapon/reagent_containers/ecig_cartridge
name = "tobacco flavour cartridge"
desc = "A small metal cartridge, used with electronic cigarettes, which contains an atomizing coil and a solution to be atomized."
w_class = ITEMSIZE_TINY
icon = 'icons/obj/ecig.dmi'
icon_state = "ecartridge"
matter = list("metal" = 50, "glass" = 10)
volume = 20
flags = OPENCONTAINER
/obj/item/weapon/reagent_containers/ecig_cartridge/New()
create_reagents(volume)
/obj/item/weapon/reagent_containers/ecig_cartridge/examine(mob/user as mob)//to see how much left
. = ..()
. += "The cartridge has [reagents.total_volume] units of liquid remaining."
//flavours
/obj/item/weapon/reagent_containers/ecig_cartridge/blank
name = "ecigarette cartridge"
desc = "A small metal cartridge which contains an atomizing coil."
/obj/item/weapon/reagent_containers/ecig_cartridge/blanknico
name = "flavorless nicotine cartridge"
desc = "A small metal cartridge which contains an atomizing coil and a solution to be atomized. The label says you can add whatever flavoring agents you want."
/obj/item/weapon/reagent_containers/ecig_cartridge/blanknico/New()
..()
reagents.add_reagent("nicotine", 5)
reagents.add_reagent("water", 10)
/obj/item/weapon/reagent_containers/ecig_cartridge/med_nicotine
name = "tobacco flavour cartridge"
desc = "A small metal cartridge which contains an atomizing coil and a solution to be atomized. The label says its tobacco flavored."
/obj/item/weapon/reagent_containers/ecig_cartridge/med_nicotine/New()
..()
reagents.add_reagent("nicotine", 5)
reagents.add_reagent("water", 15)
/obj/item/weapon/reagent_containers/ecig_cartridge/high_nicotine
name = "high nicotine tobacco flavour cartridge"
desc = "A small metal cartridge which contains an atomizing coil and a solution to be atomized. The label says its tobacco flavored, with extra nicotine."
/obj/item/weapon/reagent_containers/ecig_cartridge/high_nicotine/New()
..()
reagents.add_reagent("nicotine", 10)
reagents.add_reagent("water", 10)
/obj/item/weapon/reagent_containers/ecig_cartridge/orange
name = "orange flavour cartridge"
desc = "A small metal cartridge which contains an atomizing coil and a solution to be atomized. The label says its orange flavored."
/obj/item/weapon/reagent_containers/ecig_cartridge/orange/New()
..()
reagents.add_reagent("nicotine", 5)
reagents.add_reagent("water", 10)
reagents.add_reagent("orangejuice", 5)
/obj/item/weapon/reagent_containers/ecig_cartridge/mint
name = "mint flavour cartridge"
desc = "A small metal cartridge which contains an atomizing coil and a solution to be atomized. The label says its mint flavored."
/obj/item/weapon/reagent_containers/ecig_cartridge/mint/New()
..()
reagents.add_reagent("nicotine", 5)
reagents.add_reagent("water", 10)
reagents.add_reagent("menthol", 5)
/obj/item/weapon/reagent_containers/ecig_cartridge/watermelon
name = "watermelon flavour cartridge"
desc = "A small metal cartridge which contains an atomizing coil and a solution to be atomized. The label says its watermelon flavored."
/obj/item/weapon/reagent_containers/ecig_cartridge/watermelon/New()
..()
reagents.add_reagent("nicotine", 5)
reagents.add_reagent("water", 10)
reagents.add_reagent("watermelonjuice", 5)
/obj/item/weapon/reagent_containers/ecig_cartridge/grape
name = "grape flavour cartridge"
desc = "A small metal cartridge which contains an atomizing coil and a solution to be atomized. The label says its grape flavored."
/obj/item/weapon/reagent_containers/ecig_cartridge/grape/New()
..()
reagents.add_reagent("nicotine", 5)
reagents.add_reagent("water", 10)
reagents.add_reagent("grapejuice", 5)
/obj/item/weapon/reagent_containers/ecig_cartridge/lemonlime
name = "lemon-lime flavour cartridge"
desc = "A small metal cartridge which contains an atomizing coil and a solution to be atomized. The label says its lemon-lime flavored."
/obj/item/weapon/reagent_containers/ecig_cartridge/lemonlime/New()
..()
reagents.add_reagent("nicotine", 5)
reagents.add_reagent("water", 10)
reagents.add_reagent("lemon_lime", 5)
/obj/item/weapon/reagent_containers/ecig_cartridge/coffee
name = "coffee flavour cartridge"
desc = "A small metal cartridge which contains an atomizing coil and a solution to be atomized. The label says its coffee flavored."
/obj/item/weapon/reagent_containers/ecig_cartridge/coffee/New()
..()
reagents.add_reagent("nicotine", 5)
reagents.add_reagent("water", 10)
reagents.add_reagent("coffee", 5)
/*
/obj/item/weapon/reagent_containers/ecig_cartridge/cannabis
name = "herb flavour cartridge"
desc = "A small metal cartridge which contains an atomizing coil and a solution to be atomized. The label seems to be suspiciously scuffed off..."
/obj/item/weapon/reagent_containers/ecig_cartridge/cannabis/New()
..()
reagents.add_reagent("nicotine", 5)
reagents.add_reagent("water", 10)
reagents.add_reagent("cannabis", 5)
*/
@@ -40,8 +40,14 @@
. = ..()
/obj/item/weapon/extinguisher/examine(mob/user)
<<<<<<< HEAD
if(..(user, 0))
to_chat(user, "[bicon(src)] [src.name] contains [src.reagents.total_volume] units of foam left!") //VOREStation Edit
=======
. = ..()
if(get_dist(user, src) == 0)
. += "[src] has [src.reagents.total_volume] units of water left!"
>>>>>>> 6c6644f... Rewrite examine() to pass a list around (#7038)
/obj/item/weapon/extinguisher/attack_self(mob/user as mob)
safety = !safety
@@ -164,8 +164,9 @@
/obj/item/weapon/wrapping_paper/examine(mob/user)
if(..(user, 1))
to_chat(user, "There is about [src.amount] square units of paper left!")
. = ..()
if(Adjacent(user))
. += "There is about [src.amount] square units of paper left!"
/obj/item/weapon/wrapping_paper/attack(mob/target as mob, mob/user as mob)
if (!istype(target, /mob/living/carbon/human)) return
@@ -118,9 +118,9 @@
to_chat(user, "<span class='warning'>\The [W] is empty.</span>")
/obj/item/weapon/grenade/chem_grenade/examine(mob/user)
..(user)
. = ..()
if(detonator)
to_chat(user, "With attached [detonator.name]")
. += "It has [detonator.name] attached to it."
/obj/item/weapon/grenade/chem_grenade/activate(mob/user as mob)
if(active) return
@@ -45,13 +45,12 @@
/obj/item/weapon/grenade/examine(mob/user)
if(..(user, 0))
. = ..()
if(get_dist(user, src) == 0)
if(det_time > 1)
to_chat(user, "The timer is set to [det_time/10] seconds.")
return
if(det_time == null)
return
to_chat(user, "\The [src] is set for instant detonation.")
. += "The timer is set to [det_time/10] seconds."
else if(det_time == null)
. += "\The [src] is set for instant detonation."
/obj/item/weapon/grenade/attack_self(mob/user as mob)
@@ -32,12 +32,11 @@
var/survey_points = 0 // For redeeming at explorer equipment vendors.
/obj/item/weapon/card/id/examine(mob/user)
set src in oview(1)
if(in_range(usr, src))
show(usr)
to_chat(usr,desc)
. = ..()
if(in_range(user, src))
show(user) //Not chat related
else
to_chat(usr, "<span class='warning'>It is too far away.</span>")
. += "<span class='warning'>It is too far away to read.</span>"
/obj/item/weapon/card/id/proc/prevent_tracking()
return 0
@@ -36,7 +36,7 @@
IC.emp_act(severity)
/obj/item/weapon/implant/integrated_circuit/examine(mob/user)
IC.examine(user)
return IC.examine(user)
/obj/item/weapon/implant/integrated_circuit/attackby(var/obj/item/O, var/mob/user)
if(O.is_crowbar() || istype(O, /obj/item/device/integrated_electronics) || istype(O, /obj/item/integrated_circuit) || O.is_screwdriver() || istype(O, /obj/item/weapon/cell/device) )
@@ -113,9 +113,9 @@ obj/item/weapon/chainsaw/proc/get_fuel()
return reagents.get_reagent_amount("fuel")
obj/item/weapon/chainsaw/examine(mob/user)
if(..(user,0))
if(max_fuel)
to_chat(usr, "<span class = 'notice'>The [src] feels like it contains roughtly [get_fuel()] units of fuel left.</span>")
. = ..()
if(max_fuel && get_dist(user, src) == 0)
. += "<span class = 'notice'>The [src] feels like it contains roughtly [get_fuel()] units of fuel left.</span>"
obj/item/weapon/chainsaw/suicide_act(mob/user)
var/datum/gender/TU = gender_datums[user.get_visible_gender()]
@@ -36,13 +36,11 @@
..()
/obj/item/weapon/material/gravemarker/examine(mob/user)
..()
if(get_dist(src, user) < 4)
if(grave_name)
to_chat(user, "Here Lies [grave_name]")
if(get_dist(src, user) < 2)
if(epitaph)
to_chat(user, epitaph)
. = ..()
if(grave_name && get_dist(src, user) < 4)
. += "Here Lies [grave_name]"
if(epitaph && get_dist(src, user) < 2)
. += epitaph
/obj/item/weapon/material/gravemarker/update_icon()
if(icon_changes)
@@ -41,7 +41,8 @@
/obj/item/weapon/material/sharpeningkit/examine(mob/user, distance)
. = ..()
to_chat(user, "There [uses == 1 ? "is" : "are"] [uses] [material] [uses == 1 ? src.material.sheet_singular_name : src.material.sheet_plural_name] left for use.")
. += "There [uses == 1 ? "is" : "are"] [uses] [material] [uses == 1 ? src.material.sheet_singular_name : src.material.sheet_plural_name] left for use."
/obj/item/weapon/material/sharpeningkit/Initialize()
. = ..()
setrepair()
@@ -86,14 +86,12 @@
return null
/obj/item/weapon/melee/energy/examine(mob/user)
if(!..(user, 1))
return
if(use_cell)
. = ..()
if(use_cell && Adjacent(user))
if(bcell)
to_chat(user, "<span class='notice'>The blade is [round(bcell.percent())]% charged.</span>")
if(!bcell)
to_chat(user, "<span class='warning'>The blade does not have a power source installed.</span>")
. += "<span class='notice'>The blade is [round(bcell.percent())]% charged.</span>"
else
. += "<span class='warning'>The blade does not have a power source installed.</span>"
/obj/item/weapon/melee/energy/attack_self(mob/living/user as mob)
if(use_cell)
@@ -200,8 +198,8 @@
update_icon()
/obj/item/weapon/melee/energy/examine(mob/user)
..()
to_chat(user, "<span class='notice'>Alt-click to recolor it.</span>")
. = ..()
. += "<span class='notice'>Alt-click to recolor it.</span>"
/*
* Energy Axe
+2 -2
View File
@@ -215,8 +215,8 @@
update_icon()
/obj/item/weapon/shield/energy/examine(mob/user)
..()
to_chat(user, "<span class='notice'>Alt-click to recolor it.</span>")
. = ..()
. += "<span class='notice'>Alt-click to recolor it.</span>"
/obj/item/weapon/shield/riot/tele
name = "telescopic shield"
@@ -363,13 +363,12 @@
max_storage_space = ITEMSIZE_COST_NORMAL * 5
/obj/item/weapon/storage/backpack/parachute/examine(mob/user)
var/msg = desc
if(get_dist(src, user) <= 1)
. = ..()
if(Adjacent(user))
if(parachute)
msg += " It seems to be packed."
. += "It seems to be packed."
else
msg += " It seems to be unpacked."
to_chat(user, msg)
. += "It seems to be unpacked."
/obj/item/weapon/storage/backpack/parachute/handleParachute()
parachute = FALSE //If you parachute in, the parachute has probably been used.
@@ -144,32 +144,30 @@
/obj/item/weapon/storage/bag/ore/examine(mob/user)
..()
. = ..()
if(!Adjacent(user)) //Can only check the contents of ore bags if you can physically reach them.
return
return .
if(istype(user, /mob/living))
add_fingerprint(user)
if(!contents.len)
to_chat(user, "It is empty.")
return
. += "It is empty."
if(world.time > last_update + 10)
else if(world.time > last_update + 10)
update_ore_count()
last_update = world.time
to_chat(user, "<span class='notice'>It holds:</span>")
for(var/ore in stored_ore)
to_chat(user, "<span class='notice'>- [stored_ore[ore]] [ore]</span>")
return
. += "<span class='notice'>It holds:</span>"
for(var/ore in stored_ore)
. += "<span class='notice'>- [stored_ore[ore]] [ore]</span>"
/obj/item/weapon/storage/bag/ore/open(mob/user as mob) //No opening it for the weird UI of having shit-tons of ore inside it.
if(world.time > last_update + 10)
update_ore_count()
last_update = world.time
examine(user)
user.examinate(src)
/obj/item/weapon/storage/bag/ore/proc/update_ore_count() //Stolen from ore boxes.
@@ -26,17 +26,15 @@
return
/obj/item/weapon/storage/fancy/examine(mob/user)
if(!..(user, 1))
return
. = ..()
if(contents.len <= 0)
to_chat(user, "There are no [icon_type]s left in the box.")
else if(contents.len == 1)
to_chat(user, "There is one [icon_type] left in the box.")
else
to_chat(user, "There are [contents.len] [icon_type]s in the box.")
return
if(Adjacent(user))
if(!contents.len)
. += "There are no [icon_type]s left in the box."
else if(contents.len == 1)
. += "There is one [icon_type] left in the box."
else
. += "There are [contents.len] [icon_type]s in the box."
/*
* Egg Box
@@ -24,7 +24,7 @@ MRE Stuff
/obj/item/weapon/storage/mre/examine(mob/user)
. = ..()
to_chat(user, meal_desc)
. += meal_desc
/obj/item/weapon/storage/mre/update_icon()
if(opened)
@@ -29,8 +29,9 @@
use_sound = 'sound/items/storage/briefcase.ogg'
examine(mob/user)
if(..(user, 1))
to_chat(user, "The service panel is [src.open ? "open" : "closed"].")
. = ..()
if(Adjacent(user))
. += "The service panel is [src.open ? "open" : "closed"]."
attackby(obj/item/weapon/W as obj, mob/user as mob)
if(locked)
@@ -722,10 +722,10 @@
..()
/obj/item/weapon/storage/trinketbox/examine(mob/user)
..()
. = ..()
if(open && contents.len)
var/display_item = contents[1]
to_chat(user, "<span class='notice'>\The [src] contains \the [display_item]!</span>")
. += "<span class='notice'>\The [src] contains \the [display_item]!</span>"
/obj/item/weapon/storage/AllowDrop()
return TRUE
+6 -6
View File
@@ -101,13 +101,13 @@
set_light(0)
/obj/item/weapon/melee/baton/examine(mob/user)
if(!..(user, 1))
return
. = ..()
if(bcell)
to_chat(user, "<span class='notice'>The baton is [round(bcell.percent())]% charged.</span>")
if(!bcell)
to_chat(user, "<span class='warning'>The baton does not have a power source installed.</span>")
if(Adjacent(user, src))
if(bcell)
. += "<span class='notice'>The baton is [round(bcell.percent())]% charged.</span>"
if(!bcell)
. += "<span class='warning'>The baton does not have a power source installed.</span>"
/obj/item/weapon/melee/baton/attackby(obj/item/weapon/W, mob/user)
if(use_external_power)
@@ -30,7 +30,7 @@
/obj/item/weapon/tank/jetpack/examine(mob/user)
. = ..()
if(air_contents.total_moles < 5)
to_chat(user, "<span class='danger'>The meter on \the [src] indicates you are almost out of gas!</span>")
. += "<span class='danger'>The meter on \the [src] indicates you are almost out of gas!</span>"
playsound(user, 'sound/effects/alert.ogg', 50, 1)
/obj/item/weapon/tank/jetpack/verb/toggle_rockets()
@@ -116,8 +116,8 @@
var/obj/item/weapon/rig/holder
/obj/item/weapon/tank/jetpack/rig/examine()
to_chat(usr, "It's a jetpack. If you can see this, report it on the bug tracker.")
return 0
. = ..()
. += "It's a jetpack. If you can see this, report it on the bug tracker."
/obj/item/weapon/tank/jetpack/rig/allow_thrust(num, mob/living/user as mob)
@@ -22,9 +22,9 @@
return
/obj/item/weapon/tank/oxygen/examine(mob/user)
if(..(user, 0) && air_contents.gas["oxygen"] < 10)
to_chat(user, text("<span class='warning'>The meter on \the [src] indicates you are almost out of oxygen!</span>"))
//playsound(usr, 'sound/effects/alert.ogg', 50, 1)
. = ..()
if(loc == user && (air_contents.gas["oxygen"] < 10))
. += "<span class='warning'>The meter on \the [src] indicates you are almost out of oxygen!</span>"
/obj/item/weapon/tank/oxygen/yellow
desc = "A tank of oxygen, this one is yellow."
@@ -60,8 +60,9 @@
icon_state = "oxygen"
/obj/item/weapon/tank/air/examine(mob/user)
if(..(user, 0) && air_contents.gas["oxygen"] < 1 && loc==user)
to_chat(user, "<span class='danger'>The meter on the [src.name] indicates you are almost out of air!</span>")
. = ..()
if(loc == user && (air_contents.gas["oxygen"] < 1))
. += "<span class='warning'>The meter on \the [src] indicates you are almost out of air!</span>"
user << sound('sound/effects/alert.ogg')
/obj/item/weapon/tank/air/Initialize()
@@ -153,8 +154,9 @@
return
/obj/item/weapon/tank/emergency/oxygen/examine(mob/user)
if(..(user, 0) && air_contents.gas["oxygen"] < 0.2 && loc==user)
to_chat(user, text("<span class='danger'>The meter on the [src.name] indicates you are almost out of air!</span>"))
. = ..()
if(loc == user && (air_contents.gas["oxygen"] < 0.2))
. += "<span class='danger'>The meter on the [src.name] indicates you are almost out of air!</span>"
user << sound('sound/effects/alert.ogg')
/obj/item/weapon/tank/emergency/oxygen/engi
@@ -228,8 +230,9 @@
return
/obj/item/weapon/tank/nitrogen/examine(mob/user)
if(..(user, 0) && air_contents.gas["nitrogen"] < 10)
to_chat(user, text("<span class='danger'>The meter on \the [src] indicates you are almost out of nitrogen!</span>"))
. = ..()
if(loc == user && (air_contents.gas["nitrogen"] < 10))
. += "<span class='danger'>The meter on \the [src] indicates you are almost out of nitrogen!</span>"
//playsound(user, 'sound/effects/alert.ogg', 50, 1)
/obj/item/weapon/tank/stasis/nitro_cryo // Synthmorph bags need to have initial pressure within safe bounds for human atmospheric pressure, but low temperature to stop unwanted degredation.
@@ -82,8 +82,8 @@ var/list/global/tank_gauge_cache = list()
. = ..()
/obj/item/weapon/tank/examine(mob/user)
. = ..(user, 0)
if(.)
. = ..()
if(loc == user)
var/celsius_temperature = air_contents.temperature - T0C
var/descriptive
switch(celsius_temperature)
@@ -101,12 +101,12 @@ var/list/global/tank_gauge_cache = list()
descriptive = "cold"
else
descriptive = "bitterly cold"
to_chat(user, "<span class='notice'>\The [src] feels [descriptive].</span>")
. += "<span class='notice'>\The [src] feels [descriptive].</span>"
if(src.proxyassembly.assembly || wired)
to_chat(user, "<span class='warning'>It seems to have [wired? "some wires ": ""][wired && src.proxyassembly.assembly? "and ":""][src.proxyassembly.assembly ? "some sort of assembly ":""]attached to it.</span>")
. += "<span class='warning'>It seems to have [wired? "some wires ": ""][wired && src.proxyassembly.assembly? "and ":""][src.proxyassembly.assembly ? "some sort of assembly ":""]attached to it.</span>"
if(src.valve_welded)
to_chat(user, "<span class='warning'>\The [src] emergency relief valve has been welded shut!</span>")
. += "<span class='warning'>\The [src] emergency relief valve has been welded shut!</span>"
/obj/item/weapon/tank/attackby(obj/item/weapon/W as obj, mob/user as mob)
@@ -22,12 +22,12 @@
var/list/tools = list()
var/current_tool = 1
/obj/item/weapon/combitool/examine()
..()
if(loc == usr && tools.len)
to_chat(usr, "It has the following fittings:")
/obj/item/weapon/combitool/examine(mob/user)
. = ..()
if(loc == user && tools.len)
. += "It has the following fittings:"
for(var/obj/item/tool in tools)
to_chat(usr, "[bicon(tool)] - [tool.name][tools[current_tool]==tool?" (selected)":""]")
. += "[bicon(tool)] - [tool.name][tools[current_tool]==tool?" (selected)":""]")
/obj/item/weapon/combitool/New()
..()
@@ -56,9 +56,9 @@
return ..()
/obj/item/weapon/weldingtool/examine(mob/user)
if(..(user, 0))
if(max_fuel)
to_chat(user, "[bicon(src)] The [src.name] contains [get_fuel()]/[src.max_fuel] units of fuel!")
. = ..()
if(max_fuel && loc == user)
. += "It contains [get_fuel()]/[src.max_fuel] units of fuel!"
/obj/item/weapon/weldingtool/attack(atom/A, mob/living/user, def_zone)
if(ishuman(A) && user.a_intent == I_HELP)
@@ -562,13 +562,12 @@
return power_supply
/obj/item/weapon/weldingtool/electric/examine(mob/user)
if(get_dist(src, user) > 1)
to_chat(user, desc)
else
. = ..()
if(Adjacent(user))
if(power_supply)
to_chat(user, "[bicon(src)] The [src.name] has [get_fuel()] charge left.")
. += "It [src.name] has [get_fuel()] charge left."
else
to_chat(user, "[bicon(src)] The [src.name] has no power cell!")
. += "It [src.name] has no power cell!"
/obj/item/weapon/weldingtool/electric/get_fuel()
if(use_external_power)
@@ -144,9 +144,8 @@
src.add_fingerprint(usr)
/obj/item/weapon/weldpack/examine(mob/user)
..(user)
to_chat(user, "[bicon(src)] [src.reagents.total_volume] units of fuel left!")
return
. = ..()
. += "It has [src.reagents.total_volume] units of fuel left!"
/obj/item/weapon/weldpack/survival
name = "emergency welding kit"
+5 -5
View File
@@ -14,16 +14,16 @@
. -= "Off"
/obj/structure/sign/double/barsign/examine(mob/user)
..()
. = ..()
switch(icon_state)
if("Off")
to_chat(user, "It appears to be switched off.")
. += "It appears to be switched off."
if("narsiebistro")
to_chat(user, "It shows a picture of a large black and red being. Spooky!")
. += "It shows a picture of a large black and red being. Spooky!"
if("on", "empty")
to_chat(user, "The lights are on, but there's no picture.")
. += "The lights are on, but there's no picture."
else
to_chat(user, "It says '[icon_state]'")
. += "It says '[icon_state]'"
/obj/structure/sign/double/barsign/New()
..()
+6 -8
View File
@@ -170,16 +170,14 @@ LINEN BINS
/obj/structure/bedsheetbin/examine(mob/user)
..(user)
. = ..()
if(amount < 1)
to_chat(user, "There are no bed sheets in the bin.")
return
if(amount == 1)
to_chat(user, "There is one bed sheet in the bin.")
return
to_chat(user, "There are [amount] bed sheets in the bin.")
. += "There are no bed sheets in the bin."
else if(amount == 1)
. += "There is one bed sheet in the bin."
else
. += "There are [amount] bed sheets in the bin."
/obj/structure/bedsheetbin/update_icon()
switch(amount)
@@ -58,24 +58,25 @@
update_icon()
/obj/structure/closet/examine(mob/user)
if(!src.opened && (..(user, 1) || isobserver(user)))
. = ..()
if(Adjacent(user) || isobserver(user))
var/content_size = 0
for(var/obj/item/I in src.contents)
if(!I.anchored)
content_size += CEILING(I.w_class/2, 1)
if(!content_size)
to_chat(user, "It is empty.")
. += "It is empty."
else if(storage_capacity > content_size*4)
to_chat(user, "It is barely filled.")
. += "It is barely filled."
else if(storage_capacity > content_size*2)
to_chat(user, "It is less than half full.")
. += "It is less than half full."
else if(storage_capacity > content_size)
to_chat(user, "There is still some free space.")
. += "There is still some free space."
else
to_chat(user, "It is full.")
. += "It is full."
if(!src.opened && isobserver(user))
to_chat(user, "It contains: [counting_english_list(contents)]")
. += "It contains: [counting_english_list(contents)]"
/obj/structure/closet/CanPass(atom/movable/mover, turf/target)
if(wall_mounted)
@@ -9,9 +9,9 @@
var/paint_color = "#666666"
/obj/structure/vehiclecage/examine(mob/user)
..()
. = ..()
if(my_vehicle)
to_chat(user, "<span class='notice'>It seems to contain \the [my_vehicle].</span>")
. += "<span class='notice'>It seems to contain \the [my_vehicle].</span>"
/obj/structure/vehiclecage/Initialize()
. = ..()
+181
View File
@@ -1,3 +1,4 @@
<<<<<<< HEAD
//Chain link fences
//Sprites ported from /VG/
@@ -176,4 +177,184 @@
#undef NO_HOLE
#undef MEDIUM_HOLE
#undef LARGE_HOLE
=======
//Chain link fences
//Sprites ported from /VG/
#define CUT_TIME 10 SECONDS
#define CLIMB_TIME 5 SECONDS
#define NO_HOLE 0 //section is intact
#define MEDIUM_HOLE 1 //medium hole in the section - can climb through
#define LARGE_HOLE 2 //large hole in the section - can walk through
#define MAX_HOLE_SIZE LARGE_HOLE
/obj/structure/fence
name = "fence"
desc = "A chain link fence. Not as effective as a wall, but generally it keeps people out."
description_info = "Projectiles can freely pass fences."
density = TRUE
anchored = TRUE
icon = 'icons/obj/fence.dmi'
icon_state = "straight"
var/cuttable = TRUE
var/hole_size= NO_HOLE
var/invulnerable = FALSE
/obj/structure/fence/Initialize()
update_cut_status()
return ..()
/obj/structure/fence/examine(mob/user)
. = ..()
switch(hole_size)
if(MEDIUM_HOLE)
. += "There is a large hole in it."
if(LARGE_HOLE)
. += "It has been completely cut through."
/obj/structure/fence/get_description_interaction()
var/list/results = list()
if(cuttable && !invulnerable && hole_size < MAX_HOLE_SIZE)
results += "[desc_panel_image("wirecutters")]to [hole_size > NO_HOLE ? "expand the":"cut a"] hole into the fence, allowing passage."
return results
/obj/structure/fence/end
icon_state = "end"
cuttable = FALSE
/obj/structure/fence/corner
icon_state = "corner"
cuttable = FALSE
/obj/structure/fence/post
icon_state = "post"
cuttable = FALSE
/obj/structure/fence/cut/medium
icon_state = "straight_cut2"
hole_size = MEDIUM_HOLE
/obj/structure/fence/cut/large
icon_state = "straight_cut3"
hole_size = LARGE_HOLE
// Projectiles can pass through fences.
/obj/structure/fence/CanPass(atom/movable/mover, turf/target)
if(istype(mover, /obj/item/projectile))
return TRUE
return ..()
/obj/structure/fence/attackby(obj/item/W, mob/user)
if(W.is_wirecutter())
if(!cuttable)
to_chat(user, span("warning", "This section of the fence can't be cut."))
return
if(invulnerable)
to_chat(user, span("warning", "This fence is too strong to cut through."))
return
var/current_stage = hole_size
if(current_stage >= MAX_HOLE_SIZE)
to_chat(user, span("notice", "This fence has too much cut out of it already."))
return
user.visible_message(span("danger", "\The [user] starts cutting through \the [src] with \the [W]."),\
span("danger", "You start cutting through \the [src] with \the [W]."))
playsound(src, W.usesound, 50, 1)
if(do_after(user, CUT_TIME * W.toolspeed, target = src))
if(current_stage == hole_size)
switch(++hole_size)
if(MEDIUM_HOLE)
visible_message(span("notice", "\The [user] cuts into \the [src] some more."))
to_chat(user, span("notice", "You could probably fit yourself through that hole now. Although climbing through would be much faster if you made it even bigger."))
climbable = TRUE
if(LARGE_HOLE)
visible_message(span("notice", "\The [user] completely cuts through \the [src]."))
to_chat(user, span("notice", "The hole in \the [src] is now big enough to walk through."))
climbable = FALSE
update_cut_status()
return TRUE
/obj/structure/fence/proc/update_cut_status()
if(!cuttable)
return
density = TRUE
switch(hole_size)
if(NO_HOLE)
icon_state = initial(icon_state)
if(MEDIUM_HOLE)
icon_state = "straight_cut2"
if(LARGE_HOLE)
icon_state = "straight_cut3"
density = FALSE
//FENCE DOORS
/obj/structure/fence/door
name = "fence door"
desc = "Not very useful without a real lock."
icon_state = "door_closed"
cuttable = FALSE
var/open = FALSE
var/locked = FALSE
/obj/structure/fence/door/Initialize()
update_door_status()
return ..()
/obj/structure/fence/door/opened
icon_state = "door_opened"
open = TRUE
density = TRUE
/obj/structure/fence/door/locked
desc = "It looks like it has a strong padlock attached."
locked = TRUE
/obj/structure/fence/door/attack_hand(mob/user)
if(can_open(user))
toggle(user)
else
to_chat(user, span("warning", "\The [src] is [!open ? "locked" : "stuck open"]."))
return TRUE
/obj/structure/fence/door/proc/toggle(mob/user)
switch(open)
if(FALSE)
visible_message(span("notice", "\The [user] opens \the [src]."))
open = TRUE
if(TRUE)
visible_message(span("notice", "\The [user] closes \the [src]."))
open = FALSE
update_door_status()
playsound(src, 'sound/machines/click.ogg', 100, 1)
/obj/structure/fence/door/proc/update_door_status()
switch(open)
if(FALSE)
density = TRUE
icon_state = "door_closed"
if(TRUE)
density = FALSE
icon_state = "door_opened"
/obj/structure/fence/door/proc/can_open(mob/user)
if(locked)
return FALSE
return TRUE
#undef CUT_TIME
#undef CLIMB_TIME
#undef NO_HOLE
#undef MEDIUM_HOLE
#undef LARGE_HOLE
>>>>>>> 6c6644f... Rewrite examine() to pass a list around (#7038)
#undef MAX_HOLE_SIZE
+4 -4
View File
@@ -36,9 +36,9 @@
max_harvests = max(0, rand(min_harvests, max_harvests)) // Incase you want to weight it more toward 'not harvestable', set min_harvests to a negative value.
/obj/structure/flora/examine(mob/user)
. = ..(user)
. = ..()
if(harvest_count < max_harvests)
to_chat(user, "<span class='notice'>\The [src] seems to have something hanging from it.</span>")
. += "<span class='notice'>It seems to have something hanging from it.</span>"
/obj/structure/flora/attackby(var/obj/item/weapon/W, var/mob/living/user)
if(can_harvest(W))
@@ -225,9 +225,9 @@
var/obj/item/stored_item
/obj/structure/flora/pottedplant/examine(mob/user)
..()
. = ..()
if(in_range(user, src) && stored_item)
to_chat(user, "<i>You can see something in there...</i>")
. += "<i>You can see something in there...</i>"
/obj/structure/flora/pottedplant/attackby(obj/item/I, mob/user)
if(stored_item)
+5 -7
View File
@@ -30,13 +30,11 @@
color = material.icon_colour
/obj/structure/gravemarker/examine(mob/user)
..()
if(get_dist(src, user) < 4)
if(grave_name)
to_chat(user, "Here Lies [grave_name]")
if(get_dist(src, user) < 2)
if(epitaph)
to_chat(user, epitaph)
. = ..()
if(grave_name && get_dist(src, user) < 4)
. += "Here Lies [grave_name]"
if(epitaph && get_dist(src, user) < 2)
. += epitaph
/obj/structure/gravemarker/CanPass(atom/movable/mover, turf/target)
if(istype(mover) && mover.checkpass(PASSTABLE))
+8 -10
View File
@@ -24,10 +24,9 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart)
/obj/structure/janitorialcart/examine(mob/user)
if(..(user, 1))
to_chat(user, "[src] [bicon(src)] contains [reagents.total_volume] unit\s of liquid!")
//everything else is visible, so doesn't need to be mentioned
. = ..()
if(Adjacent(user))
. += "It contains [reagents.total_volume] unit\s of liquid!"
/obj/structure/janitorialcart/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/weapon/storage/bag/trash) && !mybag)
@@ -186,12 +185,11 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart)
/obj/structure/bed/chair/janicart/examine(mob/user)
if(!..(user, 1))
return
to_chat(user, "[bicon(src)] This [callme] contains [reagents.total_volume] unit\s of water!")
if(mybag)
to_chat(user, "\A [mybag] is hanging on the [callme].")
. = ..()
if(Adjacent(user))
. += "This [callme] contains [reagents.total_volume] unit\s of water!"
if(mybag)
. += "\A [mybag] is hanging on the [callme]."
/obj/structure/bed/chair/janicart/attackby(obj/item/I, mob/user)
+3 -2
View File
@@ -17,8 +17,9 @@ GLOBAL_LIST_BOILERPLATE(all_mopbuckets, /obj/structure/mopbucket)
..()
/obj/structure/mopbucket/examine(mob/user)
if(..(user, 1))
to_chat(user, "[src] [bicon(src)] contains [reagents.total_volume] unit\s of water!")
. = ..()
if(Adjacent(user))
. += "It contains [reagents.total_volume] unit\s of water!"
/obj/structure/mopbucket/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/weapon/mop) || istype(I, /obj/item/weapon/soap) || istype(I, /obj/item/weapon/reagent_containers/glass/rag)) //VOREStation Edit - "Allows soap and rags to be used on mopbuckets"
+3 -6
View File
@@ -51,21 +51,18 @@
return
/obj/structure/noticeboard/attack_hand(var/mob/user)
examine(user)
user.examinate(src)
// Since Topic() never seems to interact with usr on more than a superficial
// level, it should be fine to let anyone mess with the board other than ghosts.
/obj/structure/noticeboard/examine(var/mob/user)
if(!user)
user = usr
if(user.Adjacent(src))
. = ..()
if(Adjacent(user))
var/dat = "<B>Noticeboard</B><BR>"
for(var/obj/item/weapon/paper/P in src)
dat += "<A href='?src=\ref[src];read=\ref[P]'>[P.name]</A> <A href='?src=\ref[src];write=\ref[P]'>Write</A> <A href='?src=\ref[src];remove=\ref[P]'>Remove</A><BR>"
user << browse("<HEAD><TITLE>Notices</TITLE></HEAD>[dat]","window=noticeboard")
onclose(user, "noticeboard")
else
..()
/obj/structure/noticeboard/Topic(href, href_list)
..()
+3 -3
View File
@@ -46,11 +46,11 @@
if(health < maxhealth)
switch(health / maxhealth)
if(0.0 to 0.5)
to_chat(user, "<span class='warning'>It looks severely damaged!</span>")
. += "<span class='warning'>It looks severely damaged!</span>"
if(0.25 to 0.5)
to_chat(user, "<span class='warning'>It looks damaged!</span>")
. += "<span class='warning'>It looks damaged!</span>"
if(0.5 to 1.0)
to_chat(user, "<span class='notice'>It has a few scrapes and dents.</span>")
. += "<span class='notice'>It has a few scrapes and dents.</span>"
/obj/structure/railing/take_damage(amount)
health -= amount
+9 -9
View File
@@ -25,27 +25,27 @@
var/fulltile = FALSE // Set to true on full-tile variants.
/obj/structure/window/examine(mob/user)
. = ..(user)
. = ..()
if(health == maxhealth)
to_chat(user, "<span class='notice'>It looks fully intact.</span>")
. += "<span class='notice'>It looks fully intact.</span>"
else
var/perc = health / maxhealth
if(perc > 0.75)
to_chat(user, "<span class='notice'>It has a few cracks.</span>")
. += "<span class='notice'>It has a few cracks.</span>"
else if(perc > 0.5)
to_chat(user, "<span class='warning'>It looks slightly damaged.</span>")
. += "<span class='warning'>It looks slightly damaged.</span>"
else if(perc > 0.25)
to_chat(user, "<span class='warning'>It looks moderately damaged.</span>")
. += "<span class='warning'>It looks moderately damaged.</span>"
else
to_chat(user, "<span class='danger'>It looks heavily damaged.</span>")
. += "<span class='danger'>It looks heavily damaged.</span>"
if(silicate)
if (silicate < 30)
to_chat(user, "<span class='notice'>It has a thin layer of silicate.</span>")
. += "<span class='notice'>It has a thin layer of silicate.</span>"
else if (silicate < 70)
to_chat(user, "<span class='notice'>It is covered in silicate.</span>")
. += "<span class='notice'>It is covered in silicate.</span>"
else
to_chat(user, "<span class='notice'>There is a thick layer of silicate covering it.</span>")
. += "<span class='notice'>There is a thick layer of silicate covering it.</span>"
/obj/structure/window/take_damage(var/damage = 0, var/sound_effect = 1)
var/initialhealth = health
+6 -6
View File
@@ -120,21 +120,21 @@
//Appearance
/turf/simulated/wall/examine(mob/user)
. = ..(user)
. = ..()
if(!damage)
to_chat(user, "<span class='notice'>It looks fully intact.</span>")
. += "<span class='notice'>It looks fully intact.</span>"
else
var/dam = damage / material.integrity
if(dam <= 0.3)
to_chat(user, "<span class='warning'>It looks slightly damaged.</span>")
. += "<span class='warning'>It looks slightly damaged.</span>"
else if(dam <= 0.6)
to_chat(user, "<span class='warning'>It looks moderately damaged.</span>")
. += "<span class='warning'>It looks moderately damaged.</span>"
else
to_chat(user, "<span class='danger'>It looks heavily damaged.</span>")
. += "<span class='danger'>It looks heavily damaged.</span>"
if(locate(/obj/effect/overlay/wallrot) in src)
to_chat(user, "<span class='warning'>There is fungus growing on [src].</span>")
. += "<span class='warning'>There is fungus growing on [src].</span>"
//Damage
+3 -5
View File
@@ -80,14 +80,12 @@
return PROCESS_KILL
/obj/item/device/assembly/examine(mob/user)
..(user)
. = ..()
if((in_range(src, user) || loc == user))
if(secured)
to_chat(user, "\The [src] is ready!")
. += "\The [src] is ready!"
else
to_chat(user, "\The [src] can be attached!")
return
. += "\The [src] can be attached!"
/obj/item/device/assembly/attack_self(mob/user as mob)
if(!user) return 0
+3 -3
View File
@@ -57,12 +57,12 @@
master.update_icon()
/obj/item/device/assembly_holder/examine(mob/user)
..(user)
. = ..()
if ((in_range(src, user) || src.loc == user))
if (src.secured)
to_chat(user, "\The [src] is ready!")
. += "\The [src] is ready!"
else
to_chat(user, "\The [src] can be attached!")
. += "\The [src] can be attached!"
/obj/item/device/assembly_holder/HasProximity(atom/movable/AM as mob|obj)
if(a_left)
+2 -2
View File
@@ -8,9 +8,9 @@
/obj/item/device/assembly/mousetrap/examine(var/mob/user)
..(user)
. = ..(user)
if(armed)
to_chat(user, "It looks like it's armed.")
. += "It looks like it's armed."
/obj/item/device/assembly/mousetrap/update_icon()
if(armed)

Some files were not shown because too many files have changed in this diff Show More