ID:134819
 
I was just thinking about this when I was talking to Developous about debug verbs. The ability to overload an operator would be nice. You could just create a debug mob and overload it's "<<" operator to redirect whatever is sent IN to another mob. Say, for instance, text. That way, you could create a debug mob to test text functions, like Say, Whisper, etc.
I believe there is already a way to check any output given to a mob, and so you could create this yourself. I am not sure though. If not, a way to check output given to a mob in the form of text or browser pages and whatnot would be quite handy ,and then we could do the redirecting manually :)
In response to AJX (#1)
I would love the ability to define operators.

This would be useful for let's say for this or any other system.

When you use += on a /guild, it would call Add_Member() or whatever the proc is, with the right-hand argument of the +=.

So make a guild and add memebers would be so much easier.
var/guild/G=new
G += src


Voila!

Or try a custom stats variable.
<dm>
stat
PlusEqual(right_hand_value)//Funny way of operator overload.
if(!(isnum(right_hand_value))) return .
Add(right_hand_value)
var
value = 0
max_value = 0
New(_value , _max_value)
if(_value)
if(_max_value < _value) _max_value = _value
max_value = round( (_max_value)?_max_value : _value )
value = min( max(_value,0) , max_value )
proc/Add(n)
value = min(max(value + n, 0), max_value)
mob
var/stat/health
New()
..()
health = new(rand(50,100),100)
verb/Heal()
health += max(round(health.max_value / 5, 1), 1)
src << "You restore 20% health."