fog of war off = enemies visible
This commit is contained in:
parent
58b3345f6a
commit
650de8476a
1 changed files with 12 additions and 3 deletions
|
|
@ -1360,12 +1360,21 @@
|
|||
|
||||
// Draw important events as markers (except transfers - those are drawn as numbered markers separately)
|
||||
const revealAllMarkers = ConfigManager.minimapRevealAll;
|
||||
const fogOfWarEnabled = ConfigManager.minimapFogOfWar;
|
||||
const mapId = $gameMap.mapId();
|
||||
|
||||
for (const event of $gameMap.events()) {
|
||||
if (!event) continue;
|
||||
|
||||
// Only show markers in explored areas (unless revealAll is enabled)
|
||||
if (!revealAllMarkers && !$gameSystem.isTileExplored($gameMap.mapId(), event.x, event.y)) {
|
||||
continue;
|
||||
const isExplored = $gameSystem.isTileExplored(mapId, event.x, event.y);
|
||||
const isEnemy = this.isEnemyEvent(event);
|
||||
|
||||
// Enemies: visible if fog of war is off OR tile is explored
|
||||
// Other markers: visible if revealAll is on OR tile is explored
|
||||
if (isEnemy) {
|
||||
if (fogOfWarEnabled && !isExplored) continue;
|
||||
} else {
|
||||
if (!revealAllMarkers && !isExplored) continue;
|
||||
}
|
||||
|
||||
const ex = event.x * tileWidth + tileWidth / 2;
|
||||
|
|
|
|||
Loading…
Reference in a new issue