Change examine() from an atom verb to a mob verb

Just in time for the feature freeze, a big change that will introduce bugs! Yay!
Mob verb is called verb/examinate(target), which just calls target.examine(user) and face_atom(target)
For explanation why, see http://www.byond.com/forum/?post=1326139&page=2#comment8198716
Long story short, mob verbs are much faster than object verbs. The goal is to make right-click menus populate faster.

Also changes a bunch of examine() procs to always, ALWAYS call the parent. Except mobs, but you have 1 guess why I'm not touching them. Mostly this affects obj/item/examine().
And also remove a whole shitload of pointless set src in view(2) kind of crap. Also span classes.
This commit is contained in:
MrPerson
2014-05-01 09:56:39 -07:00
parent dd668bf39b
commit 9d9a657acf
90 changed files with 335 additions and 573 deletions

View File

@@ -17,10 +17,9 @@
max_charges = Ceiling(max_charges / 2)
..()
/obj/item/weapon/gun/magic/wand/examine()
/obj/item/weapon/gun/magic/wand/examine(mob/user)
..()
usr << "Has [charges] charge\s remaining."
return
user << "Has [charges] charge\s remaining."
/obj/item/weapon/gun/magic/wand/update_icon()
icon_state = "[initial(icon_state)][charges ? "" : "-drained"]"

View File

@@ -67,10 +67,9 @@
return
/obj/item/weapon/gun/projectile/examine()
/obj/item/weapon/gun/projectile/examine(mob/user)
..()
usr << "Has [get_ammo()] round\s remaining."
return
user << "Has [get_ammo()] round\s remaining."
/obj/item/weapon/gun/projectile/proc/get_ammo(var/countchambered = 1)
var/boolets = 0 //mature var names for mature people

View File

@@ -44,9 +44,9 @@
boolets += magazine.ammo_count(countempties)
return boolets
/obj/item/weapon/gun/projectile/revolver/examine()
/obj/item/weapon/gun/projectile/revolver/examine(mob/user)
..()
usr << "[get_ammo(0,0)] of those are live rounds."
user << "[get_ammo(0,0)] of those are live rounds."
/obj/item/weapon/gun/projectile/revolver/detective
desc = "A cheap Martian knock-off of a Smith & Wesson Model 10. Uses .38-Special rounds."

View File

@@ -46,10 +46,10 @@
update_icon() //I.E. fix the desc
return 1
/obj/item/weapon/gun/projectile/shotgun/examine()
/obj/item/weapon/gun/projectile/shotgun/examine(mob/user)
..()
if (chambered)
usr << "A [chambered.BB ? "live" : "spent"] one is in the chamber."
user << "A [chambered.BB ? "live" : "spent"] one is in the chamber."
/obj/item/weapon/gun/projectile/shotgun/combat
name = "combat shotgun"