Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read existing banner #8

Closed
wants to merge 38 commits into from
Closed

Read existing banner #8

wants to merge 38 commits into from

Conversation

SwissalpS
Copy link
Contributor

@SwissalpS SwissalpS commented Nov 29, 2024

expands on #6
adds:

  • ability to edit existing banners
  • cleans existing metadata from old banners
  • preserve player undo-history over joins (are only reset on reboot)
  • other small cleanups and refactors, some catching crashes in rare situations
  • adds chatcommand to fix missing entities or remove leftover ones. See engine entity problems? #7

fixes #7
(by offering a workaround and not crashing when either situation occurs)

- use same whitespace style throughout and fix some indents.
- change from minetest. to core. namespace.
- unused arguments
- shaddowed vars
- var redeclarations
- some whitespace involved in above lines
save some lines and some extra method calls.
...that slipped through the cracks on previous whitespace edit
or use the faster repeat-until-loop
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.
also changed banners.max_transformations to
banners.max_undo_levels and lowered the value substantially.
since it isn't updating everything, only
the preview and the inventory item
to reflect the currently selected colour.
even if only "" it exists and there isn't an error.
not adding "" or texture string, causes a non critical error.
only used once and is easy enough to have inline
player could have timed-out and thus lost their history.
It isn't crucial to remove their history, so let's give
them this feature.
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
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.
@SwissalpS SwissalpS added the enhancement New feature or request label Nov 29, 2024
fixes #7
provides a work-around for the engine problem with entities.
@SwissalpS
Copy link
Contributor Author

closing in favor of #9 which includes all these changes too.

@SwissalpS SwissalpS closed this Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

engine entity problems?
1 participant