示例#1
0
        private void PossiblyPickSomethingUp()
        {
            List <BaseObject> NonClueNonCorpseItems = CurrentRoom.GetNonClueNonCorpseItems();

            if (NonClueNonCorpseItems.Count > 0)
            {
                if (Chance.Percentage(PickUpChance))
                {
                    PickUpObject(Chance.RandomElement(NonClueNonCorpseItems));
                }
            }
            if (Inventory.Count >= 3)
            {
                var item = Chance.RandomElement(Inventory);
                CurrentRoom.ObjectsInRoom.Add(item);
                Inventory.Remove(item);
            }
        }