Mapping Bug

Posted by WillFa on Sat 09 Aug 2008 07:40 PM — 4 posts, 11,919 views.

USA #0
The mapper's ReverseBacktracks doesn't check reverses in special exits while following.

If the string is:
s 5w
and you
AddToMapper ("enter" , "west") --or '..., "w"' 

so the string is
s 5w (enter/w)

When you go back, the string becomes
s 5w (enter/w) w

and not the "s 5w" you'd expect.


*******

Just a suggestion: would it be possible to add support for a user-configured table of "standard" special directions with reverses? On the mud I play (3K); (enter/leave), (in/out), (portal/portal) are fairly common. It'd be nice if speedwalks supported, in addition to (special/dirs) and {comments}, these [commondirs].

So a speedwalk would look like:

n 2w s 3w (portal) 12n [leave] 3w d

and EvaluateSpeedwalk and ReverseSpeedwalk, and the mapper would refer to this table.


----

Can AddToMapper check for standard dirs?
AddToMapper("n", "s") --is not elegant, and
AddToMapper("n") --adds "(n/)" to the string.


It'd be preferred if

AddToMapper("n") 
AddToMapper("n") 

resulted in the MappingString being "2n"
--without string.gsub(GetMappingString(),"%(([nsewud])%/%)", "%1")
Amended on Sat 09 Aug 2008 08:05 PM by WillFa
Australia Forum Administrator #1
The bug you reported has been fixed in version 4.36.

Quote:

It'd be preferred if
AddToMapper("n")
AddToMapper("n")

resulted in the MappingString being "2n"


Once a function is declared in COM to take 2 arguments, I can't redefine it to take 1. You will just have to use that extra line of code.
USA #2
Thanks Nick! :)

I was asking about the gsub("(?/)") thing being included in the C++ codebase because A) it's faster, B) without really thinking it all the way through, my first thought was that you'd end up with mapper strings that are "nnn" instead of "3n". After giving it a second thought, I realized that since you can't write to the mapping string directly, you'd only munge the string when saving it and the "3(n/)" that the mapper builds gets converted correctly.

So thanks again for your efforts. It's appreciated :)


(And the second parameter is optional under lua anyway :) Hooray for no binary compatibility requirements)
Amended on Sat 09 Aug 2008 11:29 PM by WillFa
USA #3
Oh, just to add the obvious to the 2nd part of the original post.

"2n 3[ne] 4s" reads a lot easier than "2n 3(ne/sw) 4s"


Effort vs return may be an issue, I just hope you'll consider the idea.