Added new recipes, fixed conveyor bug
This commit is contained in:
@@ -20,6 +20,12 @@ public class Recipes implements ContentList{
|
||||
new Recipe(defense, DefenseBlocks.carbideWall, new ItemStack(Items.carbide, 12));
|
||||
new Recipe(defense, DefenseBlocks.carbideWallLarge, new ItemStack(Items.carbide, 12*4));
|
||||
|
||||
new Recipe(defense, DefenseBlocks.thoriumWall, new ItemStack(Items.thorium, 12));
|
||||
new Recipe(defense, DefenseBlocks.thoriumWallLarge, new ItemStack(Items.thorium, 12*4));
|
||||
|
||||
new Recipe(defense, DefenseBlocks.door, new ItemStack(Items.carbide, 12), new ItemStack(Items.silicon, 8));
|
||||
new Recipe(defense, DefenseBlocks.doorLarge, new ItemStack(Items.carbide, 12*4), new ItemStack(Items.silicon, 8*4));
|
||||
|
||||
//TURRETS
|
||||
new Recipe(weapon, TurretBlocks.duo, new ItemStack(Items.tungsten, 20));
|
||||
new Recipe(weapon, TurretBlocks.scorch, new ItemStack(Items.tungsten, 25), new ItemStack(Items.carbide, 20));
|
||||
@@ -52,6 +58,14 @@ public class Recipes implements ContentList{
|
||||
new Recipe(crafting, CraftingBlocks.arcsmelter, new ItemStack(Items.tungsten, 90), new ItemStack(Items.carbide, 60), new ItemStack(Items.lead, 50));
|
||||
new Recipe(crafting, CraftingBlocks.siliconsmelter, new ItemStack(Items.tungsten, 60), new ItemStack(Items.lead, 50));
|
||||
|
||||
//other crafting
|
||||
//TODO phaseweaver sprites
|
||||
new Recipe(crafting, CraftingBlocks.phaseweaver, new ItemStack(Items.silicon, 160), new ItemStack(Items.lead, 160), new ItemStack(Items.thorium, 150));
|
||||
//TODO implement alloy smelter
|
||||
// new Recipe(crafting, CraftingBlocks.alloySmelter, new ItemStack(Items.silicon, 160), new ItemStack(Items.lead, 160), new ItemStack(Items.thorium, 140));
|
||||
|
||||
new Recipe(crafting, CraftingBlocks.plasteelcompressor, new ItemStack(Items.silicon, 60), new ItemStack(Items.lead, 170), new ItemStack(Items.titanium, 170));
|
||||
|
||||
//misc
|
||||
new Recipe(crafting, CraftingBlocks.pulverizer, new ItemStack(Items.tungsten, 60), new ItemStack(Items.lead, 50));
|
||||
new Recipe(crafting, CraftingBlocks.thermiteMixer, new ItemStack(Items.tungsten, 100), new ItemStack(Items.lead, 50));
|
||||
@@ -81,7 +95,7 @@ public class Recipes implements ContentList{
|
||||
//DRILLS, PRODUCERS
|
||||
new Recipe(production, ProductionBlocks.tungstenDrill, new ItemStack(Items.tungsten, 30));
|
||||
new Recipe(production, ProductionBlocks.carbideDrill, new ItemStack(Items.tungsten, 60), new ItemStack(Items.carbide, 60));
|
||||
new Recipe(production, ProductionBlocks.laserdrill, new ItemStack(Items.tungsten, 80), new ItemStack(Items.carbide, 90), new ItemStack(Items.silicon, 60), new ItemStack(Items.titanium, 80));
|
||||
new Recipe(production, ProductionBlocks.laserdrill, new ItemStack(Items.tungsten, 90), new ItemStack(Items.carbide, 110), new ItemStack(Items.silicon, 70), new ItemStack(Items.titanium, 80));
|
||||
|
||||
new Recipe(production, ProductionBlocks.waterextractor, new ItemStack(Items.tungsten, 50), new ItemStack(Items.carbide, 50), new ItemStack(Items.lead, 40));
|
||||
new Recipe(production, ProductionBlocks.cultivator, new ItemStack(Items.tungsten, 20), new ItemStack(Items.lead, 50), new ItemStack(Items.silicon, 20));
|
||||
@@ -99,6 +113,7 @@ public class Recipes implements ContentList{
|
||||
//actual unit related stuff
|
||||
new Recipe(units, UnitBlocks.droneFactory, new ItemStack(Items.tungsten, 30), new ItemStack(Items.lead, 50), new ItemStack(Items.silicon, 80));
|
||||
new Recipe(units, UnitBlocks.repairPoint, new ItemStack(Items.lead, 30), new ItemStack(Items.tungsten, 30), new ItemStack(Items.silicon, 30));
|
||||
new Recipe(units, UnitBlocks.resupplyPoint, new ItemStack(Items.lead, 30), new ItemStack(Items.tungsten, 30), new ItemStack(Items.silicon, 30));
|
||||
|
||||
//LIQUIDS
|
||||
new Recipe(liquid, LiquidBlocks.conduit, new ItemStack(Items.lead, 1));
|
||||
|
||||
@@ -9,7 +9,7 @@ import io.anuke.mindustry.world.blocks.defense.Door;
|
||||
import io.anuke.mindustry.world.blocks.defense.PhaseWall;
|
||||
|
||||
public class DefenseBlocks extends BlockList implements ContentList {
|
||||
public static Block tungstenWall, tungstenWallLarge, carbideWall, carbideWallLarge, thoriumWall, thoriumWallLarge, door, largedoor, deflectorwall, deflectorwalllarge,
|
||||
public static Block tungstenWall, tungstenWallLarge, carbideWall, carbideWallLarge, thoriumWall, thoriumWallLarge, door, doorLarge, deflectorwall, deflectorwalllarge,
|
||||
phasewall, phasewalllarge;
|
||||
|
||||
@Override
|
||||
@@ -63,13 +63,13 @@ public class DefenseBlocks extends BlockList implements ContentList {
|
||||
}};
|
||||
|
||||
door = new Door("door") {{
|
||||
health = 90 * wallHealthMultiplier;
|
||||
health = 100 * wallHealthMultiplier;
|
||||
}};
|
||||
|
||||
largedoor = new Door("door-large") {{
|
||||
doorLarge = new Door("door-large") {{
|
||||
openfx = BlockFx.dooropenlarge;
|
||||
closefx = BlockFx.doorcloselarge;
|
||||
health = 90 * 4 * wallHealthMultiplier;
|
||||
health = 100 * 4 * wallHealthMultiplier;
|
||||
size = 2;
|
||||
}};
|
||||
}
|
||||
|
||||
@@ -90,6 +90,10 @@ public class TileEntity extends BaseEntity implements TargetTrait {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isSleeping(){
|
||||
return sleeping;
|
||||
}
|
||||
|
||||
public boolean isDead() {
|
||||
return dead;
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import io.anuke.mindustry.game.Content;
|
||||
import io.anuke.mindustry.game.UnlockableContent;
|
||||
import io.anuke.mindustry.world.Block;
|
||||
|
||||
import static io.anuke.mindustry.Vars.debug;
|
||||
import static io.anuke.mindustry.Vars.headless;
|
||||
|
||||
public class Recipe implements UnlockableContent{
|
||||
@@ -73,7 +74,7 @@ public class Recipe implements UnlockableContent{
|
||||
|
||||
r.clear();
|
||||
for(Recipe recipe : allRecipes){
|
||||
if(recipe.category == category && Vars.control.database().isUnlocked(recipe)) {
|
||||
if(recipe.category == category && (Vars.control.database().isUnlocked(recipe) || (debug && recipe.debugOnly))) {
|
||||
r.add(recipe);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ import io.anuke.ucore.graphics.Draw;
|
||||
import io.anuke.ucore.util.Geometry;
|
||||
import io.anuke.ucore.util.Mathf;
|
||||
|
||||
import static io.anuke.mindustry.Vars.headless;
|
||||
import static io.anuke.mindustry.Vars.world;
|
||||
|
||||
public class Floor extends Block{
|
||||
|
||||
@@ -2,6 +2,7 @@ package io.anuke.mindustry.world.blocks.distribution;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
||||
import com.badlogic.gdx.math.GridPoint2;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import com.badlogic.gdx.utils.LongArray;
|
||||
import io.anuke.mindustry.entities.TileEntity;
|
||||
import io.anuke.mindustry.entities.Unit;
|
||||
@@ -122,6 +123,8 @@ public class Conveyor extends Block{
|
||||
public void unitOn(Tile tile, Unit unit) {
|
||||
ConveyorEntity entity = tile.entity();
|
||||
|
||||
entity.wakeUp();
|
||||
|
||||
float speed = this.speed * tilesize / 2.3f;
|
||||
float tx = Geometry.d4[tile.getRotation()].x, ty = Geometry.d4[tile.getRotation()].y;
|
||||
|
||||
@@ -206,7 +209,6 @@ public class Conveyor extends Block{
|
||||
}
|
||||
|
||||
if (minremove != Integer.MAX_VALUE) entity.convey.truncate(minremove);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -295,6 +297,20 @@ public class Conveyor extends Block{
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Array<Object> getDebugInfo(Tile tile) {
|
||||
ConveyorEntity entity = tile.entity();
|
||||
Array<Object> arr = super.getDebugInfo(tile);
|
||||
arr.addAll(Array.with(
|
||||
"mincarry", entity.minCarry,
|
||||
"minitem", entity.minCarry,
|
||||
"carrying", entity.carrying,
|
||||
"clogHeat", entity.clogHeat,
|
||||
"sleeping", entity.isSleeping()
|
||||
));
|
||||
return arr;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity getEntity(){
|
||||
return new ConveyorEntity();
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package io.anuke.mindustry.world.blocks.units;
|
||||
|
||||
import com.badlogic.gdx.graphics.Color;
|
||||
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
||||
import com.badlogic.gdx.math.Rectangle;
|
||||
import io.anuke.mindustry.entities.TileEntity;
|
||||
import io.anuke.mindustry.entities.Unit;
|
||||
@@ -27,6 +28,8 @@ public class RepairPoint extends Block{
|
||||
protected float repairSpeed = 0.3f;
|
||||
protected float powerUsage = 0.2f;
|
||||
|
||||
protected TextureRegion topRegion;
|
||||
|
||||
public RepairPoint(String name) {
|
||||
super(name);
|
||||
update = true;
|
||||
@@ -38,6 +41,13 @@ public class RepairPoint extends Block{
|
||||
powerCapacity = 20f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void load() {
|
||||
super.load();
|
||||
|
||||
topRegion = Draw.region(name + "-turret");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawSelect(Tile tile){
|
||||
Draw.color(Palette.accent);
|
||||
@@ -49,7 +59,7 @@ public class RepairPoint extends Block{
|
||||
public void drawLayer(Tile tile) {
|
||||
RepairPointEntity entity = tile.entity();
|
||||
|
||||
Draw.rect(name + "-turret", tile.drawx(), tile.drawy(), entity.rotation - 90);
|
||||
Draw.rect(topRegion, tile.drawx(), tile.drawy(), entity.rotation - 90);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user