Whilst doing a major re-factoring of the TRoom class I discovered that the current implementation of setExitWeight(...) and addCustomLine(...) are both broken in handling numeric (1 to 12) exit direction specifiers - the TLuaInterpreter::dirToString(...) function returns the WRONG key value to use to store the entered data into the TRoom members. The values used do not match the internal QString values that are uses i.e. comparing the dirToString(...) function return values and the values used for normal exitWeights and customLines are respectively: 1 - "north" "n" "N" 2 - "northeast" "ne" "NE" 3 - "northwest" "nw" "NW" 4 - "east" "e" "E" 5 - "west" "w" "W" 6 - "south" "s" "S" 7 - "southeast" "se" "SE" 8 - "southeast" "se" "SE" 9 - "up" "up" "UP" 10 - "down" "down" "DOWN" 11 - "in" "in" "IN" 12 - "out" "ou" "OUT"
The T2DMap class will not correctly parse the first set of values as custom exit lines and the TMap route finding code will not associate them as exit weights either! Currently a work around is to use the indicated strings for those specific function. At the time of writing I am deep inside the TRoom class and hope to have a solution that merges all the various exit specific attributes (locks, stubs, weights, doors) into a common exit direction identifier scheme that is language independent for normal exits (uses a QFlag enum not strings to identify the direction) and can be use for special exits (uses a QString that is empty for normal strings and holds the name for special) as a QPair<T1,T2> which can be use as a unique key for ANY exit... it is going together well but it touches a lot of the map stuff! -- You received this bug notification because you are a member of Mudlet Makers, which is subscribed to Mudlet. https://bugs.launchpad.net/bugs/1097543 Title: setExitWeight() works on non-existent exits Status in Mudlet: New Bug description: setExitWeight() works on non-existent exits and remembers them - perhaps it shouldn't? To manage notifications about this bug go to: https://bugs.launchpad.net/mudlet/+bug/1097543/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~mudlet-makers Post to : [email protected] Unsubscribe : https://launchpad.net/~mudlet-makers More help : https://help.launchpad.net/ListHelp

