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

Sharetool: Allow node/area ownership transfer to specific account #70

Open
6 of 15 tasks
S-S-X opened this issue Nov 26, 2020 · 2 comments
Open
6 of 15 tasks

Sharetool: Allow node/area ownership transfer to specific account #70

S-S-X opened this issue Nov 26, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request Tool Tool issues

Comments

@S-S-X
Copy link
Owner

S-S-X commented Nov 26, 2020

Allow using sharetool to change node and area ownership to selected account instead of default shared account.

How to implement:

  • Add formspec through info function for extra functions
  • Formspec should have input for new owner
    • Possibly with drop down menu that contains logged in players
  • Check if new owner actually exists
  • Targeting air should check if there is protected area and transfer everything in that area to selected player account, also area ownership
    • Either disallow updating large areas because that can cause server freeze
    • or handle large areas asynchronously, requires async worker and would be good to lock area until transfer is completed
      • Handle cases where server is restarted during operation, requires persistent storage with information about area, progress, new owner.
  • Targeting node not registered for sharetool should do things stated above, same behavior as air nodes
  • Update node infotext after owner is updated
    • Technic chests
    • Protector block/badge
    • Locked chest
    • Locked steel door
    • Locked steel trapdoor
    • Travelnet / travelnet elevator
@S-S-X S-S-X added enhancement New feature or request Tool Tool issues labels Nov 26, 2020
@S-S-X S-S-X self-assigned this Nov 26, 2020
@S-S-X
Copy link
Owner Author

S-S-X commented Nov 27, 2020

First version operating inside static radius 5 cube, checks protections on all corners and middle, corners should already be enough to handle protector blocks.
Formspec receive handler will check everything again just before starting ownership updates and therefore should be safe.

Also updated formspec API to be nicer, hating formspecs a lot less now 😄
New formspec API is still buggy and requires tests but it is usable even while box sizes are not exactly accurate, there's no real grouping for elements and only supports size/button/table/field.

S-S-X pushed a commit that referenced this issue Nov 27, 2020
S-S-X pushed a commit that referenced this issue Nov 27, 2020
S-S-X added a commit that referenced this issue Nov 27, 2020
* (#70) Transfer ownership

* (#70) Update technic chests infotext

Co-authored-by: SX <sx@minetest>
@S-S-X S-S-X changed the title Allow node/area ownership transfer to specific account Sharetool: Allow node/area ownership transfer to specific account Nov 28, 2020
S-S-X added a commit that referenced this issue Dec 2, 2020
* (#70) Transfer ownership

* (#70) Update technic chests infotext

* (#70) Use sharetool set_travelnet_owner to update travelnets

* Use shared_account as default for ownership transfer

* Update formspec API, Travelnet db repair, Move functions to util.lua

Co-authored-by: SX <sx@minetest>
@S-S-X S-S-X mentioned this issue Dec 4, 2020
12 tasks
@S-S-X
Copy link
Owner Author

S-S-X commented Feb 24, 2021

Last change introduced bug #94 which can freeze server if tool is used without care.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Tool Tool issues
Projects
None yet
Development

No branches or pull requests

1 participant