Merge pull request #4516 from MrPerson/examinate_the_doctor

Change examine() from an atom verb to a mob verb
This commit is contained in:
Cheridan
2014-10-05 23:37:34 -05:00
92 changed files with 368 additions and 662 deletions
@@ -6,13 +6,6 @@
layer = 2.1
anchored = 1
/obj/effect/decal/cleanable/crayon/examine()
set src in view(2)
..()
return
/obj/effect/decal/cleanable/crayon/New(location,main = "#FFFFFF", var/type = "rune")
..()
loc = location
+3 -16
View File
@@ -86,9 +86,8 @@
src.loc = T
/obj/item/examine()
set src in view()
/obj/item/examine(mob/user) //This might be spammy. Remove?
..()
var/size
switch(src.w_class)
if(1.0)
@@ -106,25 +105,13 @@
else
//if ((CLUMSY in usr.mutations) && prob(50)) t = "funny-looking"
//This reformat names to get a/an properly working on item descriptions when they are bloody
var/f_name = "\a [src]"
if(src.blood_DNA)
f_name = "a bloody [name]"
var/determiner
var/pronoun
if(src.gender == PLURAL)
determiner = "These are"
pronoun = "They are"
else
determiner = "This is"
pronoun = "It is"
usr << "\icon[src][determiner] [f_name]. [pronoun] a [size] item." //e.g. These are some gloves. They are a small item. or This is a toolbox. It is a bulky item.
if(src.desc)
usr << src.desc
return
user << "[pronoun] a [size] item." //e.g. They are a small item. or It is a bulky item.
/obj/item/attack_hand(mob/user as mob)
if (!user) return
@@ -249,10 +249,6 @@
emp_cur_charges = min(emp_cur_charges+1, emp_max_charges)
return 1
/obj/item/device/flashlight/emp/examine()
..()
return
/obj/item/device/flashlight/emp/attack(mob/living/M as mob, mob/living/user as mob)
if(on && user.zone_sel.selecting == "eyes") // call original attack proc only if aiming at the eyes
..()
@@ -66,10 +66,9 @@
failmsg = "The [name]'s refill light blinks red."
..()
/obj/item/device/lightreplacer/examine()
set src in view(2)
/obj/item/device/lightreplacer/examine(mob/user)
..()
usr << "It has [uses] lights remaining."
user << "It has [uses] light\s remaining."
/obj/item/device/lightreplacer/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/weapon/card/emag) && emagged == 0)
@@ -443,16 +443,12 @@
return get_hearers_in_view(canhear_range, src)
/obj/item/device/radio/examine()
set src in view()
/obj/item/device/radio/examine(mob/user)
..()
if ((in_range(src, usr) || loc == usr))
if (b_stat)
usr.show_message("<span class='notice'>\the [src] can be attached and modified!</span>")
else
usr.show_message("<span class='notice'>\the [src] can not be modified or attached!</span>")
return
if (b_stat)
user << "<span class='notice'>[name] can be attached and modified.</span>"
else
user << "<span class='notice'>[name] can not be modified or attached.</span>"
/obj/item/device/radio/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
@@ -26,10 +26,9 @@
update_icon()
/obj/item/device/taperecorder/examine()
set src in view(1)
/obj/item/device/taperecorder/examine(mob/user)
..()
usr << "The wire panel is [open_panel ? "opened" : "closed"]."
user << "The wire panel is [open_panel ? "opened" : "closed"]."
/obj/item/device/taperecorder/attackby(obj/item/I, mob/user)
+7 -9
View File
@@ -32,25 +32,23 @@
src.loc = null
..()
/obj/item/stack/examine()
set src in view(1)
/obj/item/stack/examine(mob/user)
..()
if (is_cyborg)
if(src.singular_name)
usr << "There is enough energy for [src.get_amount()] [src.singular_name]\s."
user << "There is enough energy for [src.get_amount()] [src.singular_name]\s."
else
usr << "There is enough energy for [src.get_amount()]."
user << "There is enough energy for [src.get_amount()]."
return
if(src.singular_name)
if(src.get_amount()>1)
usr << "There are [src.get_amount()] [src.singular_name]\s in the stack."
user << "There are [src.get_amount()] [src.singular_name]\s in the stack."
else
usr << "There is [src.get_amount()] [src.singular_name] in the stack."
user << "There is [src.get_amount()] [src.singular_name] in the stack."
else if(src.get_amount()>1)
usr << "There are [src.get_amount()] in the stack."
user << "There are [src.get_amount()] in the stack."
else
usr << "There is [src.get_amount()] in the stack."
return
user << "There is [src.get_amount()] in the stack."
/obj/item/stack/proc/get_amount()
if (is_cyborg)
+13 -16
View File
@@ -109,7 +109,7 @@
*/
/obj/item/toy/gun
name = "cap gun"
desc = "There are 0 caps left. Looks almost like the real thing! Ages 8 and up. Please recycle in an autolathe when you're out of caps!"
desc = "Looks almost like the real thing! Ages 8 and up. Please recycle in an autolathe when you're out of caps."
icon = 'icons/obj/gun.dmi'
icon_state = "revolver"
item_state = "gun"
@@ -121,12 +121,9 @@
attack_verb = list("struck", "pistol whipped", "hit", "bashed")
var/bullets = 7.0
/obj/item/toy/gun/examine()
set src in usr
src.desc = text("There are [] cap\s left. Looks almost like the real thing! Ages 8 and up.", src.bullets)
/obj/item/toy/gun/examine(mob/user)
..()
return
user << "There [bullets == 1 ? "is" : "are"] [bullets] cap\s left."
/obj/item/toy/gun/attackby(obj/item/toy/ammo/gun/A as obj, mob/user as mob)
@@ -168,7 +165,7 @@
/obj/item/toy/ammo/gun
name = "ammo-caps"
desc = "There are 7 caps left! Make sure to recyle the box in an autolathe when it gets empty."
desc = "Make sure to recyle the box in an autolathe when it gets empty."
icon = 'icons/obj/ammo.dmi'
icon_state = "357-7"
w_class = 1.0
@@ -178,8 +175,10 @@
/obj/item/toy/ammo/gun/update_icon()
src.icon_state = text("357-[]", src.amount_left)
src.desc = text("There are [] cap\s left! Make sure to recycle the box in an autolathe when it gets empty.", src.amount_left)
return
/obj/item/toy/ammo/gun/examine(mob/user)
..()
user << "There [amount_left == 1 ? "is" : "are"] [amount_left] cap\s left."
/*
* Toy crossbow
@@ -195,11 +194,10 @@
attack_verb = list("attacked", "struck", "hit")
var/bullets = 5
/obj/item/toy/crossbow/examine()
set src in view(2)
/obj/item/toy/crossbow/examine(mob/user)
..()
if (bullets)
usr << "<span class='notice'>It is loaded with [bullets] foam darts!</span>"
user << "<span class='notice'>It is loaded with [bullets] foam dart\s.</span>"
/obj/item/toy/crossbow/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/toy/ammo/crossbow))
@@ -817,10 +815,9 @@ obj/item/toy/cards/singlecard
pixel_x = -5
obj/item/toy/cards/singlecard/examine()
set src in usr.contents
if(ishuman(usr))
var/mob/living/carbon/human/cardUser = usr
obj/item/toy/cards/singlecard/examine(mob/user)
if(ishuman(user))
var/mob/living/carbon/human/cardUser = user
if(cardUser.get_item_by_slot(slot_l_hand) == src || cardUser.get_item_by_slot(slot_r_hand) == src)
cardUser.visible_message("<span class='notice'>[cardUser] checks \his card.</span>", "<span class='notice'>The card reads: [src.cardname]</span>")
else
@@ -42,10 +42,10 @@
else
return 1
/obj/item/weapon/airlock_painter/examine()
/obj/item/weapon/airlock_painter/examine(mob/user)
..()
if(!ink)
usr << "<span class='notice'>It doesn't have a toner cardridge installed.</span>"
user << "<span class='notice'>It doesn't have a toner cardridge installed.</span>"
return
var/ink_level = "high"
if(ink.charges < 1)
@@ -54,7 +54,8 @@
ink_level = "low"
else if((ink.charges/ink.max_charges) > 1) //Over 100% (admin var edit)
ink_level = "dangerously high"
usr << "<span class='notice'>Its ink levels look [ink_level].</span>"
user << "<span class='notice'>Its ink levels look [ink_level].</span>"
/obj/item/weapon/airlock_painter/attackby(obj/item/weapon/W, mob/user)
..()
+2 -2
View File
@@ -79,10 +79,10 @@
src.add_fingerprint(user)
return
/obj/item/weapon/card/id/examine()
/obj/item/weapon/card/id/examine(mob/user)
..()
if(mining_points)
usr << "There's [mining_points] mining equipment redemption points loaded onto this card."
user << "There's [mining_points] mining equipment redemption point\s loaded onto this card."
/obj/item/weapon/card/id/GetAccess()
return access
@@ -36,12 +36,6 @@
create_reagents(max_water)
reagents.add_reagent("water", max_water)
/obj/item/weapon/extinguisher/examine()
set src in usr
..()
usr << "It contains [src.reagents.total_volume] units of water!"
return
/obj/item/weapon/extinguisher/attack_self(mob/user as mob)
safety = !safety
src.icon_state = "[sprite_name][!safety]"
@@ -21,8 +21,7 @@
name = "[initial(name)] casing" // By adding the " casing" part here we can use initial(name) to get the final name, making it nice to say "large grenade" when it is a large grenade.
/obj/item/weapon/grenade/chem_grenade/examine()
set src in usr
/obj/item/weapon/grenade/chem_grenade/examine(mob/user)
display_timer = (stage == READY && !nadeassembly) //show/hide the timer based on assembly state
..()
@@ -97,8 +97,7 @@
explosion(src.loc,-1,-1,-1, flame_range = range) // no explosive damage, only a large fireball.
qdel(src)
/obj/item/weapon/grenade/iedcasing/examine()
set src in usr
/obj/item/weapon/grenade/iedcasing/examine(mob/user)
..()
if(assembled == 3)
usr << "You can't tell when it will explode!"
user << "You can't tell when it will explode!"
@@ -45,14 +45,13 @@
return*/
/obj/item/weapon/grenade/examine()
set src in usr
/obj/item/weapon/grenade/examine(mob/user)
..()
if(display_timer)
if(det_time > 1)
usr << "The timer is set to [det_time/10] seconds."
user << "The timer is set to [det_time/10] second\s."
else
usr << "\The [src] is set for instant detonation."
user << "\The [src] is set for instant detonation."
/obj/item/weapon/grenade/attack_self(mob/user as mob)
@@ -24,19 +24,14 @@
src.icon_state = "[src.icon_type]box[total_contents]"
return
/obj/item/weapon/storage/fancy/examine()
set src in oview(1)
/obj/item/weapon/storage/fancy/examine(mob/user)
..()
if(contents.len <= 0)
usr << "There are no [src.icon_type]s left in the box."
user << "There are no [src.icon_type]s left in the box."
else if(contents.len == 1)
usr << "There is one [src.icon_type] left in the box."
user << "There is one [src.icon_type] left in the box."
else
usr << "There are [src.contents.len] [src.icon_type]s in the box."
return
user << "There are [src.contents.len] [src.icon_type]s in the box."
/*
* Donut Box
@@ -27,10 +27,9 @@
max_w_class = 2
max_combined_w_class = 14
/obj/item/weapon/storage/secure/examine()
set src in oview(1)
/obj/item/weapon/storage/secure/examine(mob/user)
..()
usr << text("The service panel is [src.open ? "open" : "closed"].")
user << text("The service panel is [src.open ? "open" : "closed"].")
/obj/item/weapon/storage/secure/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(locked)
+3 -4
View File
@@ -52,13 +52,12 @@
else
icon_state = "[initial(name)]"
/obj/item/weapon/melee/baton/examine()
set src in view(1)
/obj/item/weapon/melee/baton/examine(mob/user)
..()
if(bcell)
usr <<"<span class='notice'>The baton is [round(bcell.percent())]% charged.</span>"
user <<"<span class='notice'>The baton is [round(bcell.percent())]% charged.</span>"
if(!bcell)
usr <<"<span class='warning'>The baton does not have a power source installed.</span>"
user <<"<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(istype(W, /obj/item/weapon/stock_parts/cell))
@@ -23,14 +23,6 @@
return
/obj/item/weapon/tank/oxygen/examine()
set src in usr
..()
if(air_contents.oxygen < 10)
usr << text("<span class='userdanger'>The meter on the [src.name] indicates you are almost out of air!</span>")
playsound(usr, 'sound/effects/alert.ogg', 50, 1)
/obj/item/weapon/tank/oxygen/yellow
desc = "A tank of oxygen, this one is yellow."
icon_state = "oxygen_f"
@@ -69,13 +61,6 @@
icon_state = "oxygen"
/obj/item/weapon/tank/air/examine()
set src in usr
..()
if(air_contents.oxygen < 1 && loc==usr)
usr << "<span class='userdanger'>The meter on the [src.name] indicates you are almost out of air!</span>"
usr << sound('sound/effects/alert.ogg')
/obj/item/weapon/tank/air/New()
..()
@@ -138,14 +123,6 @@
src.air_contents.oxygen = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/obj/item/weapon/tank/emergency_oxygen/examine()
set src in usr
..()
if(air_contents.oxygen < 0.2 && loc==usr)
usr << text("<span class='userdanger'>The meter on the [src.name] indicates you are almost out of air!</span>")
usr << sound('sound/effects/alert.ogg')
/obj/item/weapon/tank/emergency_oxygen/engi
name = "extended-capacity emergency oxygen tank"
icon_state = "emergency_engi"
@@ -36,13 +36,13 @@
..()
/obj/item/weapon/tank/examine()
/obj/item/weapon/tank/examine(mob/user)
var/obj/icon = src
..()
if (istype(src.loc, /obj/item/assembly))
icon = src.loc
if (!in_range(src, usr))
if (icon == src) usr << "<span class='notice'>If you want any more information you'll need to get closer.</span>"
if (!in_range(src, user))
if (icon == src) user << "<span class='notice'>If you want any more information you'll need to get closer.</span>"
return
var/celsius_temperature = src.air_contents.temperature-T0C
@@ -61,9 +61,7 @@
else
descriptive = "furiously hot"
usr << "<span class='notice'>It feels [descriptive]</span>"
return
user << "<span class='notice'>It feels [descriptive].</span>"
/obj/item/weapon/tank/blob_act()
if(prob(50))
@@ -18,14 +18,6 @@
..()
create_reagents(volume)
noz = make_noz()
return
/obj/item/weapon/watertank/examine()
set src in usr
..()
for(var/datum/reagent/R in reagents.reagent_list)
usr << "[round(R.volume)] units of [R.name] left."
return
/obj/item/weapon/watertank/ui_action_click()
if (usr.get_item_by_slot(slot_back) == src)
+3 -4
View File
@@ -151,10 +151,9 @@
reagents.add_reagent("fuel", max_fuel)
/obj/item/weapon/weldingtool/examine()
set src in usr
/obj/item/weapon/weldingtool/examine(mob/user)
..()
usr << "It contains [get_fuel()]/[max_fuel] units of fuel!"
user << "It contains [get_fuel()] unit\s of fuel out of [max_fuel]."
/obj/item/weapon/weldingtool/attackby(obj/item/I, mob/user)
@@ -445,4 +444,4 @@
throw_speed = 3
throw_range = 3
m_amt = 66
icon_state = "crowbar_large"
icon_state = "crowbar_large"
@@ -20,13 +20,12 @@
if(isnum(amt) && amt > -1)
charges = amt
/obj/item/weapon/vending_refill/examine()
set src in usr
/obj/item/weapon/vending_refill/examine(mob/user)
..()
if(charges)
usr << "It can restock [charges] item(s)."
user << "It can restock [charges] item(s)."
else
usr << "It's empty!"
user << "It's empty!"
//NOTE I decided to go for about 1/3 of a machine's capacity
+6 -7
View File
@@ -163,15 +163,14 @@ LINEN BINS
var/obj/item/hidden = null
/obj/structure/bedsheetbin/examine()
/obj/structure/bedsheetbin/examine(mob/user)
..()
if(amount < 1)
usr << "There are no bed sheets in the bin."
return
if(amount == 1)
usr << "There is one bed sheet in the bin."
return
usr << "There are [amount] bed sheets in the bin."
user << "There are no bed sheets in the bin."
else if(amount == 1)
user << "There is one bed sheet in the bin."
else
user << "There are [amount] bed sheets in the bin."
/obj/structure/bedsheetbin/update_icon()
+2 -10
View File
@@ -20,12 +20,6 @@
create_reagents(100)
/obj/structure/janitorialcart/examine()
set src in usr
..()
usr << "It contains [reagents.total_volume] unit\s of liquid!"
//everything else is visible, so doesn't need to be mentioned
/obj/structure/janitorialcart/proc/wet_mop(obj/item/weapon/mop, mob/user)
if(reagents.total_volume < 1)
user << "[src] is out of water!</span>"
@@ -176,12 +170,10 @@
create_reagents(100)
/obj/structure/stool/bed/chair/janicart/examine()
set src in usr
/obj/structure/stool/bed/chair/janicart/examine(mob/user)
..()
usr << "It contains [reagents.total_volume] unit\s of water!"
if(mybag)
usr << "\A [mybag] is hanging on the [callme]."
user << "\A [mybag] is hanging on \the [callme]."
/obj/structure/stool/bed/chair/janicart/attackby(obj/item/I, mob/user)
@@ -12,12 +12,6 @@
/obj/structure/mopbucket/New()
create_reagents(100)
/obj/structure/mopbucket/examine()
set src in usr
..()
usr << "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))
if(reagents.total_volume < 1)