예제 #1
0
        internal void SpawnBaitItems()
        {
            for (int i = 0; i < Config.BaitItems.Count; i++)
            {
                var baitItem = Config.BaitItems[i].First();

                ItemType item = baitItem.Key;

                float durability = 0;

                if (Config.LoadedBaitWeapons)
                {
                    durability = item.GetDefaultDurability();
                }

                int chance = baitItem.Value;

                if (Random.Range(0, 101) < chance)
                {
                    Item.Spawn(item, durability, new Vector3(baitItemSpawnPos.x + Random.Range(-6.0f, 6.0f), baitItemSpawnPos.y, baitItemSpawnPos.z + Random.Range(-6.0f, 6f)), Random.rotation);

                    Log.Debug($"{item} bait item has been spawned inside of SCP-012 chamber!", Config.Debug);
                }
            }
        }