Use large player image on Pl3xmap when both health/armor are enabled
This commit is contained in:
parent
5ce922505b
commit
58199aaed0
@ -93,15 +93,18 @@ export default class Pl3xmapMapProvider extends MapProvider {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if(worldResponse.player_tracker?.enabled) {
|
if(worldResponse.player_tracker?.enabled) {
|
||||||
|
const health = !!worldResponse.player_tracker?.nameplates?.show_health,
|
||||||
|
armor = !!worldResponse.player_tracker?.nameplates?.show_armor;
|
||||||
|
|
||||||
worldConfig.components.playerMarkers = {
|
worldConfig.components.playerMarkers = {
|
||||||
grayHiddenPlayers: true,
|
grayHiddenPlayers: true,
|
||||||
hideByDefault: !!worldResponse.player_tracker?.default_hidden,
|
hideByDefault: !!worldResponse.player_tracker?.default_hidden,
|
||||||
layerName: worldResponse.player_tracker?.label || '',
|
layerName: worldResponse.player_tracker?.label || '',
|
||||||
layerPriority: worldResponse.player_tracker?.priority,
|
layerPriority: worldResponse.player_tracker?.priority,
|
||||||
imageSize: 'small',
|
imageSize: health && armor ? 'large' : 'small',
|
||||||
showSkins: true,
|
showSkins: true,
|
||||||
showHealth: !!worldResponse.player_tracker?.nameplates?.show_health,
|
showHealth: health,
|
||||||
showArmor: !!worldResponse.player_tracker?.nameplates?.show_armor,
|
showArmor: armor,
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
worldConfig.components.playerMarkers = undefined;
|
worldConfig.components.playerMarkers = undefined;
|
||||||
|
Loading…
Reference in New Issue
Block a user