mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-27 06:00:23 +01:00
Rewrite examine() to pass a list around
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user