|
| 1 | +/******************************************************************************* |
| 2 | + * Copyright 2017 Maximilian Stark | Dakror <mail@dakror.de> |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + ******************************************************************************/ |
| 16 | + |
| 17 | +package de.dakror.quarry.structure.producer; |
| 18 | + |
| 19 | +import de.dakror.quarry.Const; |
| 20 | +import de.dakror.quarry.game.Item.ItemType; |
| 21 | +import de.dakror.quarry.game.Item.Items; |
| 22 | +import de.dakror.quarry.game.Item.Items.Amount; |
| 23 | +import de.dakror.quarry.game.Science.ScienceType; |
| 24 | +import de.dakror.quarry.structure.base.Direction; |
| 25 | +import de.dakror.quarry.structure.base.Dock; |
| 26 | +import de.dakror.quarry.structure.base.Dock.DockFilter; |
| 27 | +import de.dakror.quarry.structure.base.Dock.DockType; |
| 28 | +import de.dakror.quarry.structure.base.ProducerStructure; |
| 29 | +import de.dakror.quarry.structure.base.RecipeList; |
| 30 | +import de.dakror.quarry.structure.base.Schema.Flags; |
| 31 | +import de.dakror.quarry.structure.base.StructureType; |
| 32 | +import de.dakror.quarry.util.Sfx; |
| 33 | + |
| 34 | +/** |
| 35 | + * Dedicated assembler schema for the advanced servo chain. |
| 36 | + */ |
| 37 | +public class AdvancedServoAssembler extends ProducerStructure { |
| 38 | + public static final ProducerSchema classSchema = new ProducerSchema(0, StructureType.AdvancedServoAssembler, 6, 6, |
| 39 | + "advanced_servo_assembler", new Items(ItemType.StoneBrick, 45, ItemType.SteelIngot, 70, ItemType.WoodPlank, 85, ItemType.Scaffolding, 60, ItemType.CopperIngot, 80), |
| 40 | + new RecipeList() { |
| 41 | + @Override |
| 42 | + protected void init() { |
| 43 | + add(new Recipe(70f, "advanced_servo", 2600) |
| 44 | + .input( |
| 45 | + new Amount(ItemType.Lubricant, 12_500), |
| 46 | + new Amount(ItemType.SulfurDust, 90), |
| 47 | + new Amount(ItemType.PlasticCasing, 3), |
| 48 | + new Amount(ItemType.SteelTube, 16), |
| 49 | + new Amount(ItemType.Chip, 2)) |
| 50 | + .output(new Amount(ItemType.AdvancedServo, 1)) |
| 51 | + .science(ScienceType.OilProcessing, ScienceType.Blueprints, ScienceType.AdvancedTransport)); |
| 52 | + } |
| 53 | + }, new Sfx("assembler" + Const.SFX_FORMAT), |
| 54 | + false, |
| 55 | + new Dock(5, 0, Direction.South, DockType.ItemOut), |
| 56 | + new Dock(0, 5, Direction.West, DockType.ItemIn, new DockFilter(ItemType.CopperWire, ItemType.BronzePlate, ItemType.Rotor, ItemType.Paper, ItemType.WoodPlank)), |
| 57 | + new Dock(5, 5, Direction.East, DockType.ItemIn, new DockFilter(ItemType.Magnet, ItemType.IronPlate, ItemType.Dynamo, ItemType.IronPlate, ItemType.Gunpowder, ItemType.SteelWire, ItemType.Chip)), |
| 58 | + new Dock(5, 3, Direction.East, DockType.ItemIn, new DockFilter(ItemType.SteelIngot, ItemType.SulfurDust, ItemType.SteelTube, ItemType.Sand)), |
| 59 | + new Dock(0, 3, Direction.West, DockType.ItemIn, new DockFilter(ItemType.CarbonBlock, ItemType.PlasticCasing, ItemType.SteelPlate, ItemType.Clay)), |
| 60 | + new Dock(1, 5, Direction.North, DockType.Power), new Dock(4, 5, Direction.North, DockType.FluidIn, new DockFilter(ItemType.Lubricant))) |
| 61 | + .sciences(ScienceType.Electricity) |
| 62 | + .flags(Flags.TextureAlwaysUpright); |
| 63 | + |
| 64 | + public AdvancedServoAssembler(int x, int y) { |
| 65 | + super(x, y, classSchema); |
| 66 | + } |
| 67 | +} |
0 commit comments