Пример #1
0
        public Crusher()
        {
            timer = new BaseLibrary.Timer(60, Callback);

            Handler = new ItemHandler(5)
            {
                Modes =
                {
                    [1] = SlotMode.Input,
                    [2] = SlotMode.Input,
                    [3] = SlotMode.Output,
                    [4] = SlotMode.Output
                }
            };

            Handler.IsItemValid += (slot, item) =>
            {
                switch (slot)
                {
                case 0:
                    return(item.modItem is BaseContainmentUnit);

                case 1:
                case 2:
                    return(Recipes.ContainsKey(item.type));

                default:
                    return(false);
                }
            };

            EnergyHandler = new EnergyHandler(10000, 1000);
        }
Пример #2
0
        public GlacialConcentrator()
        {
            timer = new BaseLibrary.Timer(15, Callback);

            Handler              = new ItemHandler();
            Handler.IsItemValid += (slot, item) => item.modItem is BaseContainmentUnit;

            EnergyHandler = new EnergyHandler(10000, 1000);
        }
Пример #3
0
		public AutoExtractinator()
		{
			timer = new BaseLibrary.Timer(60, Callback);

			Handler = new ItemHandler(11)
			{
				Modes =
				{
					[1] = SlotMode.Input,
					[2] = SlotMode.Output,
					[3] = SlotMode.Output,
					[4] = SlotMode.Output,
					[5] = SlotMode.Output,
					[6] = SlotMode.Output,
					[7] = SlotMode.Output,
					[8] = SlotMode.Output,
					[9] = SlotMode.Output,
					[10] = SlotMode.Output
				}
			};

			Handler.IsItemValid += (slot, item) =>
			{
				switch (slot)
				{
					case 0:
						return item.modItem is BaseContainmentUnit;
					case 1:
						return ValidItems.Contains(item.type);
					default:
						return false;
				}
			};

			EnergyHandler = new EnergyHandler(10000, 1000);
		}
Пример #4
0
        public EnergyRelay()
        {
            EnergyHandler = new EnergyHandler(1000, 1000);

            timer = new BaseLibrary.Timer(5, Callback);
        }