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
+4 -6
View File
@@ -124,15 +124,13 @@
return
examine()
set src in view()
examine(mob/user)
..()
if((in_range(src, usr) || loc == usr))
if((in_range(src, user) || loc == user))
if(secured)
usr << "\The [src] is ready!"
user << "\The [src] is secured and ready to be used."
else
usr << "\The [src] can be attached!"
return
user << "\The [src] can be attached to other things."
attack_self(mob/user as mob)
+2 -2
View File
@@ -11,9 +11,9 @@
var/obj/item/device/assembly_holder/bombassembly = null //The first part of the bomb is an assembly holder, holding an igniter+some device
var/obj/item/weapon/tank/bombtank = null //the second part of the bomb is a plasma tank
/obj/item/device/onetankbomb/examine()
/obj/item/device/onetankbomb/examine(mob/user)
..()
bombtank.examine()
bombtank.examine(user)
/obj/item/device/onetankbomb/update_icon()
if(bombtank)
+5 -7
View File
@@ -57,15 +57,13 @@
master.update_icon()
examine()
set src in view()
examine(mob/user)
..()
if ((in_range(src, usr) || src.loc == usr))
if (src.secured)
usr << "\The [src] is ready!"
if ((in_range(src, user) || src.loc == user))
if(secured)
user << "\The [src] is secured and ready to be used."
else
usr << "\The [src] can be attached!"
return
user << "\The [src] can be attached to other things."
HasProximity(atom/movable/AM as mob|obj)
+2 -2
View File
@@ -7,10 +7,10 @@
var/armed = 0
examine()
examine(mob/user)
..()
if(armed)
usr << "It looks like it's armed."
user << "It looks like it's armed."
activate()
if(..())