Procs called by things like regex.Replace() lack a usr, making it a pain in the butt to actually know where the call is coming from.
Numbered Steps to Reproduce Problem:
1) Code below.
Code Snippet (if applicable) to Reproduce Problem:
var/regex/my_regex // Doesn't need valid regex to test.
proc/regexTest(match,group1,group2)
world << "USR: [usr]" // "USR: "
mob/proc/Test(string)
return my_regex.Replace(string, /proc/regexTest)
Expected Results:
usr to exist within the proc like it does in every other case, so we can know where the call is coming from at the very least, or close to it.
Actual Results:
None of the regex callback procs have a usr set.
Does the problem occur:
Every time? Or how often?
In other games?
In other user accounts?
On other computers?
When does the problem NOT occur?
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Workarounds:
Use a global variable that you set just before you call the proc and hope that nothing manages to set it to something else in the meantime.