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

Make it easier to view "areas" (from area protection mod) #178

Open
dennisjenkins75 opened this issue May 28, 2021 · 2 comments
Open

Make it easier to view "areas" (from area protection mod) #178

dennisjenkins75 opened this issue May 28, 2021 · 2 comments
Labels
enhancement New feature or request mapobject:frontend

Comments

@dennisjenkins75
Copy link
Contributor

The mapserver shows "prot-blocks" when zoomed way in. This is nice. Would be really nice if one could also see an overlay of the "areas" as well. This would make it easier to see unclaimed territory (for yourself, or for helping a new player find a "good spot" for their own use).

The areas are currently exposed via a json API and can be scraped out-of-game:

$ wget -q https://pandorabox.io/api/areas -O - | jq -c '.[] | select(.owner == "1hit")'

I have multiple ideas, and they are not necessarily mutually exclusive:

  1. Enhance the map server to allow viewing of areas. Granted that the map server shows a 2d slice, and areas are 3d and can be quite tall (up to 128, or 512, depending on player's priv)
  2. Create an offline tool (python or lua script) that one can run manually that would grab their areas and convert them into a SVG. However, doing this won't make it super easy to correlate the resulting 3d image with the map server.

(Moved form pandorabox-io/in-game#53)

@ronoaldo
Copy link

I support this idea :) perhaps as an overlay? I'll try to get a stub on that and submit a PR; suggestions on where to start are welcome!

@BuckarooBanzay
Copy link
Member

I support this idea :) perhaps as an overlay? I'll try to get a stub on that and submit a PR; suggestions on where to start are welcome!

There is currently an api endpoint at /api/areas that would expose all areas (https://github.com/minetest-mapserver/mapserver/blob/master/web/areas.go)
... but: the recent change from lua-based to json-based area-store essentially bricked that :P

Feel free to try to whip up a PR if you want.
Also: i'm planning a frontend-rewrite but that should not bother anyone, i think i can copy most of the map-code over...

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

No branches or pull requests

3 participants