Esempio n. 1
0
        void OnServerInitialized()
        {
            int iWorldHalfSize = Convert.ToInt32(World.Size / 2);

            MinX = -iWorldHalfSize + 300;
            MaxX = iWorldHalfSize - 300;
            MinZ = -iWorldHalfSize + 300;
            MaxZ = iWorldHalfSize - 300;
            MinY = 250;
            MaxY = 400;
            //Puts(" X:" + MinX + " " + MaxX + " Y:" + MinY + " " + MaxY + " Z:" + MinZ + " " + MaxZ);
            blueprintDefinitions = ItemManager.bpList;
            foreach (var bp in blueprintDefinitions)
            {
                Blueprints.Add(bp.targetItem.shortname, bp.time);
            }

            itemDefinitions = ItemManager.itemList;
            Puts(itemDefinitions.Count.ToString());
            foreach (var itemdef in itemDefinitions)
            {
                Items.Add(itemdef.displayName.english);
            }

            CraftingRate = 100;
            GatherRate   = 100;
            FWEnabled    = true;
            UpdateCraftingRate();
            LoadConfigVariables();
            SaveConfig();
            StartBuildPhase();
        }
Esempio n. 2
0
        /// <summary>
        /// Creates a new factory for turning <see cref="ActionBlueprint"/> into <see cref="IAction"/> instances
        /// </summary>
        public ActionFactory()
        {
            _types = Compiler.Instance.TypeFactory.Create <IAction>();

            //add the basic Type blueprints
            foreach (var type in _types)
            {
                Blueprints.Add(new ActionBlueprint()
                {
                    Name = type.Name.Replace("Action", ""),
                    Type = type.Name
                });
            }
        }
Esempio n. 3
0
        private void OnServerInitialized()
        {
            blueprintDefinitions = ItemManager.bpList;
            foreach (var bp in blueprintDefinitions)
            {
                Blueprints.Add(bp.targetItem.shortname, bp.time);
            }

            itemDefinitions = ItemManager.itemList;
            foreach (var itemdef in itemDefinitions)
            {
                Items.Add(itemdef.displayName.english);
            }

            UpdateCraftingRate();
        }