Ephreaym / Bot-Script

Bot Script enables bots for OpenNox.
5 stars 1 forks source link

Use per-bot cursosrs instead of global ones #16

Closed dennwc closed 1 year ago

dennwc commented 1 year ago

Using global variables is discouraged in the new script. If possible, state should be store in objects. In this case, cursors can be store in Bot object itself, there's no need to keep global variable for each bot type. It should also avoid potential bugs (when War bot uses cursor set by another War bot, for example).

The actual change is can be seen here.

There's a second automated change to file formatting. See this page for details why it's needed.