[Patch] Bugs and suggestions
Posted: Thu Jun 18, 2009 6:30 pm
1. Forcing waypoints/wandering via commandline
the svn implementation is okay. you didn't copy my code. went your own way. thats okay but generated some bugs. i fixed them.
new in my patch: if you force the bots path but did not force the return path, my script will now look for a designated returnpath xml. this has to have some prefix like "ret_". you can set the prefix by a new option in the settings.xml called RETURNPATH_PREFIX. and yes this even works for wandering. so if you enter path:wander it will look for "ret_wander.xml". this way you can even specify a retpath for your wanderspot.
i found this real handy if you bot around with like 10 different waypoints a day. easy switchable.
problem: i don't know if there is a more perfomant way to do the filesystem check. i found io.open, it works, but there may be a more elegant way to solve this. feel free to change.
2. to be continued...
changes where made to the svn by elverion. just grab the newest svn and you are set
Code: Select all
# rom/bot.lua path:foo retpath:retfoo
new in my patch: if you force the bots path but did not force the return path, my script will now look for a designated returnpath xml. this has to have some prefix like "ret_". you can set the prefix by a new option in the settings.xml called RETURNPATH_PREFIX. and yes this even works for wandering. so if you enter path:wander it will look for "ret_wander.xml". this way you can even specify a retpath for your wanderspot.
i found this real handy if you bot around with like 10 different waypoints a day. easy switchable.
Code: Select all
example:
# rom/bot.lua path:bears
-> retpath not forced -> will look for ret_bears.xml in waypoint directory
Code: Select all
@bot.lua:164
elseif( forcedPath and io.open(getExecutionPath() .. "/waypoints/" .. settings.options.RETURNPATH_PREFIX .. forcedPath .. ".xml", "r") ) then
-- If our Path was forced and the designated returnpath xml is in place use it
__RPL:load(getExecutionPath() .. "/waypoints/" .. settings.options.RETURNPATH_PREFIX .. forcedPath .. ".xml");
changes where made to the svn by elverion. just grab the newest svn and you are set