* whitespace and minetest. -> core.
- use same whitespace style throughout and fix some indents.
- change from minetest. to core. namespace.
* Update Readme: Minetest -> Luanti
* add luacheck
* update optional depends
* luacheck cleanups
- unused arguments
- shaddowed vars
- var redeclarations
- some whitespace involved in above lines
* clean close of file after reading
* avoid duplicate code
save some lines and some extra method calls.
* avoid error: "unknown global"
* stray whitespace fixups
* whitespace: switch all files to same indent character
tabs -> spaces
* refactor weird declaration
* whitespace: two stray spaces
...that slipped through the cracks on previous whitespace edit
* fix shaddowing global table
* reduce amount of times transformation string is calculated
* use ipairs feature
or use the faster repeat-until-loop
* cap max amount of layers
fixes #5
* fix #5 make transform history non-global
fixes #5
transformation history was shared by all users and kept growing as it
was never truely reset. Every time a user
used a banner a white background was dumped on top of the
stack making it possible to crash the server through an
overflow to core.serialize() function.
* minimize metadata size
also changed banners.max_transformations to
banners.max_undo_levels and lowered the value substantially.
* add versioning
* add recoverable per player history with saved colour
* rename update_all -> update_preview_inv
since it isn't updating everything, only
the preview and the inventory item
* dynamically update masks
to reflect the currently selected colour.
allows us to add more features such as:
- clean existing banners to slim down data
- read transforms from items in inventory -> allow players
to change existing patterns without having to start from
scratch.
unfortunately the git diff is a bit messy on this one.
Nothing changed with:
- banners.Banner
- banners.Banner:new
- banners.Banner:push_transform
- banners.Banner:pop_transform
content of banners.Banner:get_transform_string was moved
to banners.transform_table_to_string with very few changes
fixes #5
transformation history was shared by all users and kept growing as it
was never truely reset. Every time a user
used a banner a white background was dumped on top of the
stack making it possible to crash the server through an
overflow to core.serialize() function.