Module necro.game.character.Focus
Functions
check (entity, flag) | |
getAll (flag) | |
getFirst (flag) | |
getNearest (x, y, flag) | |
getNearestWithDistance (x, y, flag) | |
update () |
Tables
Flag | |
Type |
Functions
- check (entity, flag)
-
Parameters:
- entity
- flag
- getAll (flag)
-
Parameters:
- flag
- getFirst (flag)
-
Parameters:
- flag
- getNearest (x, y, flag)
-
Parameters:
- x
- y
- flag
- getNearestWithDistance (x, y, flag)
-
Parameters:
- x
- y
- flag
- update ()
Tables
- Flag
-
Fields:
- DEFAULT
1
- Assigned to local players and spectator targets as a catch-all for unspecified modded player focus states. Represents all uses of the legacy functionsplayer.getFocusedEntities()
/player.isFocusedEntity()
. Otherwise, this flag is never checked by Synchrony's own code. - CAMERA
2
- Causes the camera to follow this entity in "Track local players" mode. - SEGMENT_VISIBILITY
4
- Possibly marks the segment this entity is currently within as visible, rendering it and playing sounds within it. Note that the effective segment visibility may vary depending on the segment visibility mode. Effective segment visibility should always be checked using theSegmentVisibility
module. - HUD
8
- Displays the HUD for this entity. - OVERLAY
16
- Displays screen flashes for this entity. - FLYAWAY
32
- Displays local flyaway texts, such as "exit stairs unlocked". - TEXT_LABEL
64
- Considers the entity as a possible "nearest player" for perspective-dependent text labels (price tags). - LOCALLY_KNOWN_PLAYER_NAME
128
- Skips displaying this entity's player name, as it is considered well-known and does not need to be displayed. In other words, setting this flag hides the player name. This flag is inverted mostly for performance reasons, avoiding the need to assign non-zero focus flags to all non-local player entities. - OBJECT_VISIBILITY
256
- Displays entity-specific in-world graphics and indicators, such as the "No Return" tile. - DISCO_FLOOR
512
- Uses this entity's groove chain and beatmap parity to render the Disco Floor. If multiple entities are specified, the entity with the highest groove chain or lowest ID is used. - PERSPECTIVE
1024
- Includes this entity's components and items for perspective calculations. - SOUND_PLAYBACK
2048
- Plays local sound effects and voices, such as the item pickup sound and exit stair unlock cheer. This also affects audio filters and loops. - SOUND_LISTENER
4096
- Uses this entity to determine the relative listener position for spatialized sound effects. If multiple entities are specified, the average direction is used for orientation, while sound attenuation is based on distance to the closest listener. - MUSIC_LAYER
8192
- Scans these entities' surrounding tiles to adjust music layer volumes (Zone 3 hot/cold). If multiple entities are specified, their layer volume weights are averaged. - BEAT_BARS
16384
- Uses this entity's beatmap for displaying the beat bars. If multiple entities are specified, the entity with the fastest beatmap and highest number of skipped beats is used, with non-rhythm entities counted as infinitely slow. - BEAT_VISUALS
32768
- Uses this entity's beatmap for timing in-world visuals (animation speed, singing, etc.). Uses the same multi-entity rules as BEAT_BARS. - NOISE_CONTROL_BYPASS
65536
- Allows sound effects associated with these entities to bypass the noise control system. - HIDE_HEALTH_BAR
131072
- Hides this entity's health bar. Rationale for this flag's inversion is similar to LOCALLYKNOWNPLAYER_NAME.
- DEFAULT
- Type
-
Fields:
- NONE
0
- Represents no focus flags - LOCAL
-1
- Represents all flags for locally controlled entities (currently contains all flags) - SPECTATE_SINGLE
-131201
- Represents all flags for single-target spectating (all regular focus flags, but player names are displayed) - SPECTATE_MULTIPLE
-196753
- Represents all flags for multi-target spectating (reduces visual and auditory noise) - INTANGIBLE
8
- Represents all flags for intangible entities in local co-op (only their HUD remains visible) - ALL
-1
- Represents all focus flags
- NONE