This commit adds the full Lua scripting API and integrates the Script Manager into the application.
It builds on top of the scripting engine introduced in #158, exposing all the API modules that Lua scripts can use and making everything accessible from the UI.
Changes:
- Added all Lua API modules: map, tile, item, brush, image, position, selection, creature, color, app, dialog, noise, algo, geo, json, http.
- Added map overlay system for scripts to draw on the map view.
- Added event system, context menu registration, persistent storage, and transaction support with undo/redo.
- Added support for package scripts (directory with manifest.lua) and script metadata tags.
- Added Scripts menu to the menubar with per-script execution and reload.
- Connected the Script Manager window to the UI.
- Added missing build dependencies and fixed MSVC compilation errors.
Notes:
- Build dependencies were added for HTTP and noise generation support.
- Some code was adjusted to compile correctly on MSVC.
* Show indicators for pickupable and moveable items
* Fix: drawing always refreshing ui
* Fix crash on invalid friend for wallbrush
* Option to remove empty spawns
* Draws position indicator, some code cleanup
* Teleport copy/paste improvements
* Fix flood fill
* Add function to get minimap/8bit color
* Small code cleanup
* Cleanup Position
* Code cleanup and small optimizations
* Code cleanup
* Code cleanup and small optimizations (#406)
* Cleanup and cast functions.
* Avoid adding a new Unique ID if it already exists
* Code cleanup and small optimizations
* More changes and cleanup
* Changes and cleanup
* Some changes
* Fix copy position.
* Only show uid/aid alert if it really changed
* Add actions history panel
* Does not draw tooltips on minimap mode
* Use constexpr
* Replace items fix (#408)
* Draw grid small optimization
* Small change in selection box and Fix#409
* Fix some xpm
* Ingame box improvements, add lights support.
* Fix go to previous position (#410)
* Fix depot crash (#411)
* Fix XPMs
* Export minimap as .otmm (otclient format) or .png (#413)
* Fix glitch after drawing secondary map
* fix
* Update about_window.cpp
* sonar
* fix Minimap and progress bar
* fix erro load items.xml
* fix
* fix doodad brush
* fix: slightly more accurate house size estimation
* feat: update items.otb and items.xml
* fix: bad merge
* Revert "feat: update items.otb and items.xml"
This reverts commit 40f1edc70f.
---------
Co-authored-by: Nailson <Mignari@users.noreply.github.com>
Co-authored-by: wtver <51377408+maattch@users.noreply.github.com>
Co-authored-by: Majesty <32709570+majestyotbr@users.noreply.github.com>
Co-authored-by: Luan Santos <github@luan.sh>
Removed boosts (replaced with equivalent on std 14/17/20)
Removed manual json library implementation using boost and added nlohmann-json
So two additional libraries will be needed to compile:
asio, nlohmann-json (see wiki)
Also removed OTGZ support by default and disabled it, making it optional (needs to be enabled). Anyone who wants to use it will need to activate this, I think it's ideal since few should use it, so a majority don't use it, which is fairer that those who need to activate it to use it than those who don't need to have this in their program.
Added GitHub Actions workflow for Windows (vs 2022) and Ubuntu 22.04
Created the complete organization of npcs, that way, it is possible to create own files for npcs, no longer depending on being together with the monsters
this pull request was made to be worked together with the canary project: https://github.com/opentibiabr/canary
The spawns npcs is "yellow" and spawns monsters is "red" (the old)
With this change, the map will automatically create an "npc.xml" the first time it is saved.
It is possible to edit only the xml, it is not necessary to add or modify the npc by opening the editor map
Thus, there is a script for npcs, similar to how it works with old spawns
Removed libxml2 to use pugixml.
Fixed a bug with the progress bar.
Changed some things in most xml files that pugixml did not like.
Updated the Visual Studio project.
Any NULL symbol has been changed to nullptr.
This most probably broke the CMake that was recently added.
And probably some other things.
Clean git repository since the old svn / git mess was pretty much
unrecoverable unfortunetly. I would have liked to keep the history
for posterity, but that proved to be a futile quest.