跳到主要内容

Ghost Visibility Fact

Ghost Visibility

Whether a player wants to see ghosts of players on other servers. Value: 1 (or absent) = ghosts visible, 0 = ghosts hidden. This entry is the source of truth. It is persisted by the engine's FactDatabase, so the choice survives restarts and follows the player across servers. [btc.renaud.ghost.manager.GhostPlayerManager] mirrors it in memory for the packet hot path and writes back here on every toggle. Previously this read straight back from the manager's in-memory set, which made it circular: nothing was ever persisted and every restart reset players to "visible", despite the entry claiming otherwise. Can also be used as a condition in other entries to gate ghost-related behaviour.

字段

字段类型默认值描述
groupRef<GroupEntry>——
TypeWriter 通用字段(comment)
字段类型默认值描述
commentStringWhether this player wants to see cross-server ghosts.Description of what this fact tracks多行

How to use it​

Create this fact once and keep its default id, ghost_visibility_fact: the extension reads and writes it under this fixed id. The value is 1 when the player sees ghosts and 0 when they hid them. A player with no stored value sees ghosts.

The fact is persisted by TypeWriter's fact storage, so with the MySQL bridge the choice follows the player on every server of the network. You can read it in a criteria, for example to show an "on" or "off" icon in a menu.