All user data for FoundryVTT. Includes worlds, systems, modules, and any asset in the "foundryuserdata" directory. Does NOT include the FoundryVTT installation itself.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

23 lines
894 B

export class TokenHandler{
static _drawTooltip(wrapped,...args) {
const hideElevation = CONFIG.Levels.settings.get("hideElevation");
if(hideElevation == 0) return wrapped(...args);
if(hideElevation == 1 && game.user.isGM) return wrapped(...args);
return new PIXI.Sprite()
}
static setScale(token){
if(!CONFIG.Levels.settings.get("tokenElevScale") || !CONFIG.Levels.currentToken || token == CONFIG.Levels.currentToken) return;
const scaleMultiplier = CONFIG.Levels.settings.get("tokenElevScaleMultiSett");
const elevationDiff = Math.abs(token.document.elevation - CONFIG.Levels.currentToken.document.elevation) / 8;
if(elevationDiff === 0) return;
const scaleFactor = Math.min(scaleMultiplier / elevationDiff, 1);
token.mesh.scale.x*=scaleFactor;
token.mesh.scale.y*=scaleFactor;
}
}