private void Awake() | Sets Instance, or destroys this copy if one already exists. |
private void DestroyActionItem(int index, IPlayer player) | Destroy callback for handlers. Server destroys and tells clients; a client disposes its handler and sends a toggle request. |
private void DestroyPlayersActionItem(IPlayer player, int itemIndex) | Server: disposes the player's handler for that item and tells clients it went. |
private void FadeActionItemOnRemotePlayer(ActionItemsManager.SpawnedItemInfo arguments) | Client: waits for the item to spawn and fades it in or out (skipped when headless). |
private static ValueTuple<Vector3, Quaternion> GetTargetPositionAndRotation(IPlayer player, ActionItemData data) | Spot in front of the player's head at the item's distance, facing the head's flat forward. |
private static void PlayItemEffects(ActionItemsManager.SpawnedItemInfo arguments, ActionItemData actionItemData) | Plays the spawn or disappear effects at the item's position, but only when headless, which looks inverted. |
private void ProcessSpawnDestroyArgumentsForLocalPlayer(ActionItemsManager.SpawnedItemInfo arguments, IPlayer owner) | Client: hooks the spawned item into the local handler, or disposes it on removal. |
private void SpawnActionItemForPlayer(IPlayer player, int dataIndex) | Server: spawns the item unsaved in front of the player, sets its owner, puts it in the player's chunk and tells clients. |
private void SyncSpawnedItemInfoToClient(IPlayer player, Stream stream, ActionItemsManager.SpawnedItemInfo arguments) | Message handler (EffectRequest) telling clients an item spawned or went; sets up or fades it and plays effects. |
private void SyncSpawnRequestToServer(IPlayer player, Stream stream, int index) | Message handler for a client's toggle request (SyncA); the server toggles that item. |
private bool TryGetActionIndex(SummonActionItemQuickAccess summonAction, out int index) | Finds the index of a summon action in actionItems; logs an error if missing. |
private void UpdateActionItemStatusForPlayerOnServer(IPlayer player, int index) | Server: destroys the player's item if spawned, otherwise spawns it. |