js/sightLayerUpdate.js
/*
  * Extends canvas.sight.update() to set visibility for placeables based on simplefog
  */
Extends canvas.sight.update() to set visibility for placeables based on simplefog
Extends canvas . sight . update () to set visibility for placeables based on simplefog
function sightLayerUpdate() {
  if (!canvas.simplefog.visible) return;
  if (!canvas.scene.getFlag('simplefog', 'autoVisibility')) return;
  if (game.user.isGM && !canvas.scene.getFlag('simplefog', 'autoVisGM')) return;
  canvas.tokens.placeables.forEach((placeable) => {
    _setPlaceableVisibility(placeable);
  });
  canvas.notes.placeables.forEach((placeable) => {
    _setPlaceableVisibility(placeable);
  });
  canvas.walls.placeables.forEach((placeable) => {
    if (placeable.data.door) {
      _setPlaceableVisibility(placeable);
    }
  });
}
function sightLayerUpdate ( ) { if ( ! canvas . simplefog . visible ) return ; if ( ! canvas . scene . getFlag ( 'simplefog' , 'autoVisibility' ) ) return ; if ( game . user . isGM && ! canvas . scene . getFlag ( 'simplefog' , 'autoVisGM' ) ) return ; canvas . tokens . placeables . forEach ( ( placeable ) => { _setPlaceableVisibility ( placeable ) ; } ) ; canvas . notes . placeables . forEach ( ( placeable ) => { _setPlaceableVisibility ( placeable ) ; } ) ; canvas . walls . placeables . forEach ( ( placeable ) => { if ( placeable . data . door ) { _setPlaceableVisibility ( placeable ) ; } } ) ; }
Extends canvas.sight.update() to set visibility for placeables based on simplefog
Extends canvas . sight . update () to set visibility for placeables based on simplefog
// Skip checking placeables if simplefog not visible anyway // Skip if autoVisibility not enabled for this scene // Skip if user is GM and autoVisGM Disabled // loop through placeables