From 58199aaed0fcdd325a132ef4fca5ebaa232e6382 Mon Sep 17 00:00:00 2001 From: James Lyne Date: Wed, 29 Sep 2021 14:56:13 +0100 Subject: [PATCH] Use large player image on Pl3xmap when both health/armor are enabled --- src/providers/Pl3xmapMapProvider.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/providers/Pl3xmapMapProvider.ts b/src/providers/Pl3xmapMapProvider.ts index 363679e..783545a 100644 --- a/src/providers/Pl3xmapMapProvider.ts +++ b/src/providers/Pl3xmapMapProvider.ts @@ -93,15 +93,18 @@ export default class Pl3xmapMapProvider extends MapProvider { }; if(worldResponse.player_tracker?.enabled) { + const health = !!worldResponse.player_tracker?.nameplates?.show_health, + armor = !!worldResponse.player_tracker?.nameplates?.show_armor; + worldConfig.components.playerMarkers = { grayHiddenPlayers: true, hideByDefault: !!worldResponse.player_tracker?.default_hidden, layerName: worldResponse.player_tracker?.label || '', layerPriority: worldResponse.player_tracker?.priority, - imageSize: 'small', + imageSize: health && armor ? 'large' : 'small', showSkins: true, - showHealth: !!worldResponse.player_tracker?.nameplates?.show_health, - showArmor: !!worldResponse.player_tracker?.nameplates?.show_armor, + showHealth: health, + showArmor: armor, } } else { worldConfig.components.playerMarkers = undefined;