private void UpdateMenu()
        {
            if (_strippingMenu == null)
            {
                return;
            }

            _strippingMenu.ClearButtons();

            if (Inventory != null)
            {
                foreach (var(slot, name) in Inventory)
                {
                    _strippingMenu.AddButton(EquipmentSlotDefines.SlotNames[slot], name, (ev) =>
                    {
                        SendMessage(new StrippingInventoryButtonPressed(slot));
                    });
                }
            }

            if (Hands != null)
            {
                foreach (var(hand, name) in Hands)
                {
                    _strippingMenu.AddButton(hand, name, (ev) =>
                    {
                        SendMessage(new StrippingHandButtonPressed(hand));
                    });
                }
            }
        }
Beispiel #2
0
        private void UpdateMenu()
        {
            if (_strippingMenu == null)
            {
                return;
            }

            _strippingMenu.ClearButtons();

            if (Inventory != null)
            {
                foreach (var(slot, name) in Inventory)
                {
                    _strippingMenu.AddButton(SlotNames[slot], name, (ev) =>
                    {
                        SendMessage(new StrippingInventoryButtonPressed(slot));
                    });
                }
            }

            if (Hands != null)
            {
                foreach (var(hand, name) in Hands)
                {
                    _strippingMenu.AddButton(hand, name, (ev) =>
                    {
                        SendMessage(new StrippingHandButtonPressed(hand));
                    });
                }
            }

            if (Handcuffs != null)
            {
                foreach (var(id, name) in Handcuffs)
                {
                    _strippingMenu.AddButton(Loc.GetString("Restraints"), name, (ev) =>
                    {
                        SendMessage(new StrippingHandcuffButtonPressed(id));
                    });
                }
            }
        }