Add squaremap server definition (alias for pl3xmap)

This commit is contained in:
James Lyne 2022-01-12 01:06:18 +00:00
parent 51ec91be22
commit ac7c269fe1
3 changed files with 12 additions and 1 deletions

View File

@ -27,9 +27,14 @@
<script>
window.liveAtlasConfig = {
// By default LiveAtlas looks for a dynmap standalone/config.js file
// This configuration can be used instead to support Pl3xmap installations multiple servers
// This configuration can be used instead to support Pl3xmap and Squaremap installations as well as multiple servers (external webserver required)
// To configure multiple servers, see https://github.com/JLyne/LiveAtlas/wiki/Configuring-Multiple-Servers.
// servers: {
// Squaremap internal webserver configuration
// squaremap: {
// squaremap: window.location.pathname
// },
// Pl3xmap internal webserver configuration
// pl3xmap: {
// pl3xmap: window.location.pathname

1
src/index.d.ts vendored
View File

@ -76,6 +76,7 @@ interface LiveAtlasServerDefinition {
type: 'dynmap' | 'pl3xmap';
dynmap?: DynmapUrlConfig;
pl3xmap?: string;
squaremap?: string;
}
// Messages defined directly in LiveAtlas and used for all servers

View File

@ -42,6 +42,11 @@ const validateLiveAtlasConfiguration = (config: any): Map<string, LiveAtlasServe
serverConfig.id = server;
//Squaremap and Pl3xmap are currently interchangeable
if(typeof serverConfig.squaremap !== 'undefined') {
serverConfig.pl3xmap = serverConfig.squaremap;
}
if(typeof serverConfig.pl3xmap !== 'undefined') {
serverConfig.type = 'pl3xmap';