Esempio n. 1
0
        /// <summary>
        /// update the game item category lists
        /// </summary>
        public void UpdateInventoryCategories()
        {
            Potions.Clear();
            Weapons.Clear();
            Treasure.Clear();
            Loots.Clear();

            foreach (var gameItemQuantity in _inventory)
            {
                if (gameItemQuantity.GameItem is Potion)
                {
                    Potions.Add(gameItemQuantity);
                }
                if (gameItemQuantity.GameItem is Weapon)
                {
                    Weapons.Add(gameItemQuantity);
                }
                if (gameItemQuantity.GameItem is Treasure)
                {
                    Treasure.Add(gameItemQuantity);
                }
                if (gameItemQuantity.GameItem is Loot)
                {
                    Loots.Add(gameItemQuantity);
                }
            }
        }
Esempio n. 2
0
    /*
     * 0 - Swordsman
     * 1 - revolver
     *
     */


    private void Awake()
    {
        player       = GameObject.FindGameObjectWithTag("Player").transform;
        playerCenter = GameObject.Find("Player center").transform;
        agent        = GetComponent <NavMeshAgent>();
        animator     = GetComponent <Animator>();

        eqManager = GameObject.FindGameObjectWithTag("Player").GetComponent <EQManager>();

        loot = GameObject.Find("Loots").GetComponent <Loots>();
    }
Esempio n. 3
0
        public void IncrementCargo(string name, int change)
        {
            if (change <= 0)
            {
                return;
            }

            if (!Loots.ContainsKey(name))
            {
                Loots[name] = new Dictionary <string, int>();
            }

            if (!Loots[name].ContainsKey(System))
            {
                Loots[name][System] = change;
            }
            else
            {
                Loots[name][System] += change;
            }
        }
Esempio n. 4
0
        public void AddLoot(string itemName, int stackSize, bool precious)
        {
            ItemsCollected++;
            if (precious)
            {
                PreciousItemsLooted++;
            }
            if (Loots.Count > 10)
            {
                Loots.RemoveAt(0);
            }

            if (stackSize > 1)
            {
                Loots.Add(string.Format("{0} ({1})", itemName, stackSize));
            }
            else
            {
                Loots.Add(itemName);
            }
        }
Esempio n. 5
0
            public CornuConfig()
            {
                // Animals
                Animals.Add(new CornuConfigItem {
                    Prefab = "assets/bundled/prefabs/autospawn/animals/chicken.prefab", Min = -1, Max = -1, IgnoreIrridiated = true
                });
                Animals.Add(new CornuConfigItem {
                    Prefab = "assets/bundled/prefabs/autospawn/animals/horse.prefab", Min = -1, Max = -1, IgnoreIrridiated = true
                });
                Animals.Add(new CornuConfigItem {
                    Prefab = "assets/bundled/prefabs/autospawn/animals/boar.prefab", Min = -1, Max = -1, IgnoreIrridiated = true
                });
                Animals.Add(new CornuConfigItem {
                    Prefab = "assets/bundled/prefabs/autospawn/animals/stag.prefab", Min = -1, Max = -1, IgnoreIrridiated = true
                });
                Animals.Add(new CornuConfigItem {
                    Prefab = "assets/bundled/prefabs/autospawn/animals/wolf.prefab", Min = -1, Max = -1, IgnoreIrridiated = true
                });
                Animals.Add(new CornuConfigItem {
                    Prefab = "assets/bundled/prefabs/autospawn/animals/bear.prefab", Min = -1, Max = -1, IgnoreIrridiated = true
                });

                // Ore nodes
                Ores.Add(new CornuConfigItem {
                    Prefab = "assets/bundled/prefabs/autospawn/resource/ores/stone-ore.prefab", Min = -1, Max = -1, IgnoreIrridiated = true
                });
                Ores.Add(new CornuConfigItem {
                    Prefab = "assets/bundled/prefabs/autospawn/resource/ores/metal-ore.prefab", Min = -1, Max = -1, IgnoreIrridiated = true
                });
                Ores.Add(new CornuConfigItem {
                    Prefab = "assets/bundled/prefabs/autospawn/resource/ores/sulfur-ore.prefab", Min = -1, Max = -1, IgnoreIrridiated = true
                });

                // Silver barrels
                Loots.Add(new CornuConfigItem {
                    Prefab = "assets/bundled/prefabs/radtown/loot_barrel_1.prefab", Min = -1, Max = -1, IgnoreIrridiated = true, DeleteEmtpy = false
                });

                // Brown barrels
                Loots.Add(new CornuConfigItem {
                    Prefab = "assets/bundled/prefabs/radtown/loot_barrel_2.prefab", Min = -1, Max = -1, IgnoreIrridiated = true, DeleteEmtpy = false
                });

                // Oil Drums
                Loots.Add(new CornuConfigItem {
                    Prefab = "assets/bundled/prefabs/radtown/oil_barrel.prefab", Min = -1, Max = -1, IgnoreIrridiated = true, DeleteEmtpy = false
                });

                // Trashcans
                Loots.Add(new CornuConfigItem {
                    Prefab = "assets/bundled/prefabs/radtown/loot_trash.prefab", Min = -1, Max = -1, IgnoreIrridiated = true, DeleteEmtpy = false
                });

                // Trash piles (food)
                Loots.Add(new CornuConfigItem {
                    Prefab = "assets/bundled/prefabs/autospawn/resource/loot/trash-pile-1.prefab", Min = -1, Max = -1, IgnoreIrridiated = true, DeleteEmtpy = false
                });

                // Weapon crates
                Loots.Add(new CornuConfigItem {
                    Prefab = "assets/bundled/prefabs/radtown/crate_normal.prefab", Min = -1, Max = -1, IgnoreIrridiated = true, DeleteEmtpy = false
                });

                // Box crates
                Loots.Add(new CornuConfigItem {
                    Prefab = "assets/bundled/prefabs/radtown/crate_normal_2.prefab", Min = -1, Max = -1, IgnoreIrridiated = true, DeleteEmtpy = false
                });
            }