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

On move support aka jumpdrive compat #9

Merged
merged 41 commits into from
Dec 9, 2024
Merged

On move support aka jumpdrive compat #9

merged 41 commits into from
Dec 9, 2024

Conversation

SwissalpS
Copy link
Contributor

closes mt-mods/jumpdrive#90

expands on #8, so closing that in favor of this PR.
PR-text of #8:
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 mentioned this pull request Nov 30, 2024
@SwissalpS SwissalpS added bug Something isn't working enhancement New feature or request labels Nov 30, 2024
just for completeness sake
@SwissalpS SwissalpS merged commit ea0a0fe into master Dec 9, 2024
2 checks passed
@SwissalpS SwissalpS deleted the onMoveSupport branch December 9, 2024 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

engine entity problems? Add compat for banners
1 participant