Skip to content

feat: add readonly map option#4007

Merged
mikeprimm merged 2 commits into
webbukkit:v3.0from
Jameskmonger:read-only-map-option
Aug 30, 2023
Merged

feat: add readonly map option#4007
mikeprimm merged 2 commits into
webbukkit:v3.0from
Jameskmonger:read-only-map-option

Conversation

@Jameskmonger
Copy link
Copy Markdown
Contributor

This option will prevent the map from being updated by the renderer. It can be used if you want a "natural" map, i.e. you want to generate a map and preserve it without being updated with users buildings.

  • I'm not sure if these changes are all needed, or all in the right place. It works appropriately in my testing, but as discussed on Discord the only way to find related code is by manually searching. Possibly this change would be better suited elsewhere
  • I have updated the template worlds.txt file to include the changes.
  • This also affects /fullrender and /radiusrender, i.e. they have no effect on a readonly map.

This option will prevent the map from being updated by the renderer. It can be used if you want a "natural" map, i.e. you want to generate a map and preserve it without being updated with users buildings.
@mikeprimm
Copy link
Copy Markdown
Member

Not sure I understand the use case: you can already removed all the rendertriggers (preventing automatic render), and just prevent non-admin users from being able to run the /dynmap *render commands...

@Jameskmonger
Copy link
Copy Markdown
Contributor Author

My use case is:

  • I want to prevent re-renders of world:natural but keep world:live and world:inhabited (both protected maps) rendering as usual

@Jameskmonger
Copy link
Copy Markdown
Contributor Author

I attempted the following:

  • Remove write permissions on the tile folder with chmod - this led to too much log spam
  • Adding tileupdatedelay, of varying high values (ranging from 1 week to 60 years), to the map definitions - this didn't seem to have any effect as the maps still updated.

@mikeprimm
Copy link
Copy Markdown
Member

Gotcha - the world-specific requirement is good, so let's go forward here :)

@mikeprimm mikeprimm merged commit b8b1e8b into webbukkit:v3.0 Aug 30, 2023
@Jameskmonger Jameskmonger deleted the read-only-map-option branch August 30, 2023 17:40
@Jameskmonger
Copy link
Copy Markdown
Contributor Author

ty for the merge :)

@mikeprimm
Copy link
Copy Markdown
Member

All good - I've added a couple of fixes and improvements (the new field was not added to the 'save' method for HDMap, so any use of the /dmap commands would lose the setting; and I added readonly to the dmap commands, so no need to manually edit the worlds.txt files to modify the setting).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants