Inheritance: Dwarrowdelf.Server.ItemObject
Example #1
0
        public static void FinalizeEnv(EnvironmentObject env)
        {
            // Add gems to random locs
            for (int i = 0; i < 6; ++i)
            {
                CreateItem(env, ItemID.Gem, GetRandomMaterial(MaterialCategory.Gem), env.GetRandomEnterableSurfaceLocation());
            }

            // Add rocks to random locs
            for (int i = 0; i < 6; ++i)
            {
                CreateItem(env, ItemID.Rock, GetRandomMaterial(MaterialCategory.Rock), env.GetRandomEnterableSurfaceLocation());
            }

            CreateWorkbenches(env);

            CreateStartItems(env);
            CreateDebugItems(env);

            {
                var gen = FoodGenerator.Create(env.World);
                gen.MoveToMustSucceed(env, env.GetSurfaceLocation(env.Width / 2 - 2, env.Height / 2 - 2));
            }

            AddMonsters(env);
        }
Example #2
0
        public static FoodGenerator Create(World world)
        {
            var builder = new ItemObjectBuilder(ItemID.Contraption, MaterialID.Diamond)
            {
                Name = "Food Generator",
                Color = GameColor.Gold,
            };

            var item = new FoodGenerator(builder);
            item.Initialize(world);
            return item;
        }
Example #3
0
        public static FoodGenerator Create(World world)
        {
            var builder = new ItemObjectBuilder(ItemID.Contraption, MaterialID.Diamond)
            {
                Name  = "Food Generator",
                Color = GameColor.Gold,
            };

            var item = new FoodGenerator(builder);

            item.Initialize(world);
            return(item);
        }