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

Multiple POI types #49

Closed
Sheridan opened this issue Mar 16, 2024 · 4 comments
Closed

Multiple POI types #49

Sheridan opened this issue Mar 16, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@Sheridan
Copy link

Sheridan commented Mar 16, 2024

Please add the ability to create different labels. I want different icons to be displayed for different types of POIs. I think the easiest way would be to give an example of the configuration as I see it:

{
  "marker_types":
  [
    {
      "poiPrefix": "[poi]",
      "icon": "default.png"
    },
    {
      "poiPrefix": "[gate]",
     "icon": "gate.png"
    },
    {
      "poiPrefix": "[spawner]",
      "icon": "spawner.png"
    }
  ],
}
@tpwalke2
Copy link
Owner

This is a good idea. Thank you!

@tpwalke2 tpwalke2 added the enhancement New feature or request label Mar 19, 2024
@tpwalke2 tpwalke2 self-assigned this Mar 19, 2024
@tpwalke2
Copy link
Owner

@Sheridan, current progress in my dev environment is that it can load the configurations and put the markers in different groups on the map. I'm now working on making sure that existing sign configurations correctly load with the new configuration format.

@Sheridan
Copy link
Author

Sheridan commented Apr 2, 2024

It might be worth doing so (pseudocode):

void loadOldConf() { ... }
void loadNewConf() { ... }
void loadConf()
{
  if(json.exists("marker_types"))
  {
    loadNewConf();
  }
  else
  {
    loadOldConf();
  }
}

tpwalke2 added a commit that referenced this issue Apr 22, 2024
tpwalke2 added a commit that referenced this issue Apr 22, 2024
tpwalke2 added a commit that referenced this issue Apr 22, 2024
tpwalke2 added a commit that referenced this issue Apr 22, 2024
tpwalke2 added a commit that referenced this issue Apr 22, 2024
tpwalke2 added a commit that referenced this issue Apr 22, 2024
tpwalke2 added a commit that referenced this issue Apr 23, 2024
tpwalke2 added a commit that referenced this issue Apr 23, 2024
@tpwalke2
Copy link
Owner

@Sheridan, I have released a new version that supports multiple POI types. The solution differs slightly from your example, but that's because I wanted to make sure I left it open for some of the features I want to add in the future. A sample configuration is available in the readme.

The mod will automatically update your configuration files to the new format on the first run.

You can download the release here: https://modrinth.com/mod/bluemap-sign-markers/version/1.20.1-0.2.0.15

This is a useful feature. Thank you for sharing the idea!

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

No branches or pull requests

2 participants