using System; using System.Collections.Generic; using System.Linq; using RoR2.CharacterAI; using RoR2.UI; using UnityEngine; using UnityEngine.Events; using UnityEngine.Networking; namespace RoR2; [RequireComponent(typeof(NetworkUIPromptController))] public class PickupPickerController : NetworkBehaviour, IInteractable, IInspectable { public struct Option { public PickupIndex pickupIndex; public bool available; } [Serializable] public class PickupIndexUnityEvent : UnityEvent { } public GameObject panelPrefab; public PickupIndexUnityEvent onPickupSelected; public GenericInteraction.InteractorUnityEvent onServerInteractionBegin; public float cutoffDistance; private bool available = true; public string contextString = ""; public bool shouldProximityHighlight = true; public bool synchronizeItemSelectionAcrossNetwork; public bool isDelusionChoice; public bool isRebirthChoice; private Inventory delusionInventory; private bool delusionOptionsSet; private int delusionChoicePickupIndex; private NetworkUIPromptController networkUIPromptController; private const byte msgSubmit = 0; private const byte msgCancel = 1; private GameObject panelInstance; private PickupPickerPanel panelInstanceController; public ChestBehavior chestGeneratedFrom; private Option[] options = Array.Empty