Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -1184,7 +1184,7 @@ public class Blocks{
|
||||
ambientSoundVolume = 0.12f;
|
||||
|
||||
consumeItems(with(Items.graphite, 1, Items.sand, 4));
|
||||
consumePower(6f);
|
||||
consumePower(5f);
|
||||
}};
|
||||
|
||||
electrolyzer = new GenericCrafter("electrolyzer"){{
|
||||
@@ -1448,7 +1448,7 @@ public class Blocks{
|
||||
|
||||
consumeItem(Items.silicon, 3);
|
||||
consumeLiquid(Liquids.slag, 40f / 60f);
|
||||
consumePower(2f);
|
||||
consumePower(1.5f);
|
||||
}};
|
||||
|
||||
cyanogenSynthesizer = new HeatCrafter("cyanogen-synthesizer"){{
|
||||
@@ -1937,7 +1937,7 @@ public class Blocks{
|
||||
}};
|
||||
|
||||
junction = new Junction("junction"){{
|
||||
requirements(Category.distribution, with(Items.copper, 2));
|
||||
requirements(Category.distribution, with(Items.copper, 3));
|
||||
speed = 26;
|
||||
capacity = 6;
|
||||
health = 30;
|
||||
@@ -1956,6 +1956,7 @@ public class Blocks{
|
||||
phaseConveyor = new ItemBridge("phase-conveyor"){{
|
||||
requirements(Category.distribution, with(Items.phaseFabric, 5, Items.silicon, 7, Items.lead, 10, Items.graphite, 10));
|
||||
range = 12;
|
||||
transportTime = 2f;
|
||||
arrowPeriod = 0.9f;
|
||||
arrowTimeScl = 2.75f;
|
||||
hasPower = true;
|
||||
@@ -2534,8 +2535,8 @@ public class Blocks{
|
||||
}};
|
||||
|
||||
chemicalCombustionChamber = new ConsumeGenerator("chemical-combustion-chamber"){{
|
||||
requirements(Category.power, with(Items.graphite, 40, Items.tungsten, 40, Items.oxide, 40f, Items.silicon, 30));
|
||||
powerProduction = 10f;
|
||||
requirements(Category.power, with(Items.graphite, 40, Items.tungsten, 20, Items.oxide, 40f, Items.silicon, 30));
|
||||
powerProduction = 550f / 60f;
|
||||
researchCost = with(Items.graphite, 2000, Items.tungsten, 1000, Items.oxide, 10, Items.silicon, 1500);
|
||||
consumeLiquids(LiquidStack.with(Liquids.ozone, 2f / 60f, Liquids.arkycite, 40f / 60f));
|
||||
size = 3;
|
||||
@@ -2556,8 +2557,8 @@ public class Blocks{
|
||||
}};
|
||||
|
||||
pyrolysisGenerator = new ConsumeGenerator("pyrolysis-generator"){{
|
||||
requirements(Category.power, with(Items.graphite, 50, Items.carbide, 50, Items.oxide, 60f, Items.silicon, 50));
|
||||
powerProduction = 25f;
|
||||
requirements(Category.power, with(Items.graphite, 100, Items.carbide, 60, Items.oxide, 60f, Items.silicon, 100));
|
||||
powerProduction = 1400f / 60f;
|
||||
|
||||
drawer = new DrawMulti(new DrawRegion("-bottom"), new DrawPistons(){{
|
||||
sinMag = 2.75f;
|
||||
@@ -2586,8 +2587,8 @@ public class Blocks{
|
||||
}};
|
||||
|
||||
fluxReactor = new VariableReactor("flux-reactor"){{
|
||||
requirements(Category.power, with(Items.graphite, 300, Items.carbide, 200, Items.oxide, 100, Items.silicon, 600, Items.surgeAlloy, 300));
|
||||
powerProduction = 240f;
|
||||
requirements(Category.power, with(Items.graphite, 300, Items.carbide, 100, Items.oxide, 100, Items.silicon, 600, Items.surgeAlloy, 200));
|
||||
powerProduction = 265f;
|
||||
maxHeat = 150f;
|
||||
|
||||
consumeLiquid(Liquids.cyanogen, 9f / 60f);
|
||||
@@ -2622,7 +2623,7 @@ public class Blocks{
|
||||
}};
|
||||
|
||||
neoplasiaReactor = new HeaterGenerator("neoplasia-reactor"){{
|
||||
requirements(Category.power, with(Items.tungsten, 1000, Items.carbide, 300, Items.oxide, 150, Items.silicon, 500, Items.phaseFabric, 300, Items.surgeAlloy, 200));
|
||||
requirements(Category.power, with(Items.tungsten, 750, Items.carbide, 300, Items.oxide, 150, Items.silicon, 500, Items.phaseFabric, 150, Items.surgeAlloy, 200));
|
||||
|
||||
size = 5;
|
||||
liquidCapacity = 80f;
|
||||
@@ -4379,7 +4380,7 @@ public class Blocks{
|
||||
outlineColor = Pal.darkOutline;
|
||||
|
||||
liquidCapacity = 50f;
|
||||
liquidConsumed = 10f / 60f;
|
||||
liquidConsumed = 15f / 60f;
|
||||
targetInterval = 5f;
|
||||
newTargetInterval = 30f;
|
||||
targetUnderBlocks = false;
|
||||
@@ -4404,6 +4405,7 @@ public class Blocks{
|
||||
Liquids.cyanogen, new ContinuousFlameBulletType(){{
|
||||
damage = 130f;
|
||||
rangeChange = 70f;
|
||||
ammoMultiplier = 1.5f;
|
||||
length = r + rangeChange;
|
||||
knockback = 2f;
|
||||
pierceCap = 3;
|
||||
@@ -6157,7 +6159,7 @@ public class Blocks{
|
||||
researchCost = with(Items.beryllium, 200, Items.graphite, 80, Items.silicon, 80);
|
||||
regionSuffix = "-dark";
|
||||
fogRadius = 3;
|
||||
consumePower(2f);
|
||||
consumePower(1.5f);
|
||||
}};
|
||||
|
||||
shipFabricator = new UnitFactory("ship-fabricator"){{
|
||||
@@ -6169,18 +6171,18 @@ public class Blocks{
|
||||
regionSuffix = "-dark";
|
||||
fogRadius = 3;
|
||||
researchCostMultiplier = 0.5f;
|
||||
consumePower(2f);
|
||||
consumePower(1.5f);
|
||||
}};
|
||||
|
||||
mechFabricator = new UnitFactory("mech-fabricator"){{
|
||||
requirements(Category.units, with(Items.silicon, 200, Items.graphite, 300, Items.tungsten, 60));
|
||||
requirements(Category.units, with(Items.silicon, 200, Items.beryllium, 250, Items.tungsten, 10));
|
||||
size = 3;
|
||||
configurable = false;
|
||||
plans.add(new UnitPlan(UnitTypes.merui, 60f * 40f, with(Items.beryllium, 50, Items.silicon, 70)));
|
||||
regionSuffix = "-dark";
|
||||
fogRadius = 3;
|
||||
researchCostMultiplier = 0.65f;
|
||||
consumePower(2f);
|
||||
consumePower(1.5f);
|
||||
}};
|
||||
|
||||
tankRefabricator = new Reconstructor("tank-refabricator"){{
|
||||
@@ -6201,7 +6203,7 @@ public class Blocks{
|
||||
}};
|
||||
|
||||
shipRefabricator = new Reconstructor("ship-refabricator"){{
|
||||
requirements(Category.units, with(Items.beryllium, 200, Items.tungsten, 100, Items.silicon, 150, Items.oxide, 40));
|
||||
requirements(Category.units, with(Items.beryllium, 250, Items.tungsten, 120, Items.silicon, 150, Items.oxide, 15));
|
||||
regionSuffix = "-dark";
|
||||
|
||||
size = 3;
|
||||
@@ -6219,7 +6221,7 @@ public class Blocks{
|
||||
}};
|
||||
|
||||
mechRefabricator = new Reconstructor("mech-refabricator"){{
|
||||
requirements(Category.units, with(Items.beryllium, 250, Items.tungsten, 120, Items.silicon, 150));
|
||||
requirements(Category.units, with(Items.beryllium, 250, Items.tungsten, 175, Items.silicon, 150));
|
||||
regionSuffix = "-dark";
|
||||
|
||||
size = 3;
|
||||
@@ -6243,7 +6245,7 @@ public class Blocks{
|
||||
researchCostMultipliers.put(Items.thorium, 0.2f);
|
||||
|
||||
size = 5;
|
||||
consumePower(5f);
|
||||
consumePower(4.5f);
|
||||
consumeLiquid(Liquids.nitrogen, 10f / 60f);
|
||||
consumeItems(with(Items.thorium, 80, Items.silicon, 100));
|
||||
|
||||
|
||||
@@ -2620,7 +2620,7 @@ public class UnitTypes{
|
||||
}};
|
||||
|
||||
precept = new TankUnitType("precept"){{
|
||||
hitSize = 26f;
|
||||
hitSize = 24f;
|
||||
treadPullOffset = 5;
|
||||
speed = 0.64f;
|
||||
rotateSpeed = 1.5f;
|
||||
@@ -2637,7 +2637,7 @@ public class UnitTypes{
|
||||
shootY = 16f;
|
||||
recoil = 3f;
|
||||
rotate = true;
|
||||
rotateSpeed = 1.3f;
|
||||
rotateSpeed = 1.625f;
|
||||
mirror = false;
|
||||
shootCone = 2f;
|
||||
x = 0f;
|
||||
@@ -3001,7 +3001,7 @@ public class UnitTypes{
|
||||
x = 0f;
|
||||
y = 1f;
|
||||
shootY = 4f;
|
||||
reload = 60f;
|
||||
reload = 63f;
|
||||
cooldownTime = 42f;
|
||||
heatColor = Pal.turretHeat;
|
||||
|
||||
@@ -3019,7 +3019,7 @@ public class UnitTypes{
|
||||
frontColor = Color.white;
|
||||
|
||||
knockback = 0.8f;
|
||||
lifetime = 50f;
|
||||
lifetime = 46f;
|
||||
width = height = 9f;
|
||||
splashDamageRadius = 19f;
|
||||
splashDamage = 30f;
|
||||
@@ -3046,7 +3046,7 @@ public class UnitTypes{
|
||||
}};
|
||||
|
||||
cleroi = new ErekirUnitType("cleroi"){{
|
||||
speed = 0.7f;
|
||||
speed = 0.6f;
|
||||
drag = 0.1f;
|
||||
hitSize = 14f;
|
||||
rotateSpeed = 3f;
|
||||
@@ -3088,7 +3088,7 @@ public class UnitTypes{
|
||||
shootSound = Sounds.blaster;
|
||||
x = 14f / 4f;
|
||||
y = 33f / 4f;
|
||||
reload = 30f;
|
||||
reload = 33f;
|
||||
layerOffset = -0.002f;
|
||||
alternate = false;
|
||||
heatColor = Color.red;
|
||||
@@ -3650,7 +3650,7 @@ public class UnitTypes{
|
||||
flying = true;
|
||||
drag = 0.08f;
|
||||
speed = 2f;
|
||||
rotateSpeed = 4f;
|
||||
rotateSpeed = 8f;
|
||||
accel = 0.09f;
|
||||
health = 1100f;
|
||||
armor = 3f;
|
||||
|
||||
@@ -55,7 +55,7 @@ public class Renderer implements ApplicationListener{
|
||||
//currently landing core, null if there are no cores or it has finished landing.
|
||||
private @Nullable LaunchAnimator launchAnimator;
|
||||
private Color clearColor = new Color(0f, 0f, 0f, 1f);
|
||||
private float
|
||||
public float
|
||||
//target camera scale that is lerp-ed to
|
||||
targetscale = Scl.scl(4),
|
||||
//current actual camera scale
|
||||
|
||||
@@ -32,6 +32,7 @@ import mindustry.input.Placement.*;
|
||||
import mindustry.net.Administration.*;
|
||||
import mindustry.net.*;
|
||||
import mindustry.type.*;
|
||||
import mindustry.ui.*;
|
||||
import mindustry.ui.fragments.*;
|
||||
import mindustry.world.*;
|
||||
import mindustry.world.blocks.ConstructBlock.*;
|
||||
@@ -1539,6 +1540,28 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
||||
Lines.rect(result.x, result.y - 1, result.x2 - result.x, result.y2 - result.y);
|
||||
Draw.color(col2);
|
||||
Lines.rect(result.x, result.y, result.x2 - result.x, result.y2 - result.y);
|
||||
|
||||
Font font = Fonts.outline;
|
||||
font.setColor(col2);
|
||||
var ints = font.usesIntegerPositions();
|
||||
font.setUseIntegerPositions(false);
|
||||
var z = Draw.z();
|
||||
Draw.z(Layer.endPixeled);
|
||||
font.getData().setScale(1 / renderer.camerascale);
|
||||
var snapToCursor = Core.settings.getBool("selectionsizeoncursor");
|
||||
var textOffset = Core.settings.getInt("selectionsizeoncursoroffset", 5);
|
||||
int width = (int)((result.x2 - result.x) / 8);
|
||||
int height = (int)((result.y2 - result.y) / 8);
|
||||
int area = width * height;
|
||||
// FINISHME: When not snapping to cursor, perhaps it would be best to choose the corner closest to the cursor that's at least a block away?
|
||||
font.draw(width + "x" + height + " (" + area + ")",
|
||||
snapToCursor ? input.mouseWorldX() + textOffset * (4 / renderer.camerascale) : result.x2,
|
||||
snapToCursor ? input.mouseWorldY() - textOffset * (4 / renderer.camerascale) : result.y
|
||||
);
|
||||
font.setColor(Color.white);
|
||||
font.getData().setScale(1);
|
||||
font.setUseIntegerPositions(ints);
|
||||
Draw.z(z);
|
||||
}
|
||||
|
||||
protected void flushSelectPlans(Seq<BuildPlan> plans){
|
||||
|
||||
@@ -4,12 +4,14 @@ import arc.util.io.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.type.*;
|
||||
import mindustry.world.*;
|
||||
import mindustry.world.meta.*;
|
||||
|
||||
public class BufferedItemBridge extends ItemBridge{
|
||||
public final int timerAccept = timers++;
|
||||
|
||||
public float speed = 40f;
|
||||
public int bufferCapacity = 50;
|
||||
public float displayedSpeed = 11f;
|
||||
|
||||
public BufferedItemBridge(String name){
|
||||
super(name);
|
||||
@@ -17,6 +19,15 @@ public class BufferedItemBridge extends ItemBridge{
|
||||
hasItems = true;
|
||||
canOverdrive = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setStats(){
|
||||
super.setStats();
|
||||
|
||||
//Hard to calculate, fps and overdive reliant. Movement speed taken from testing
|
||||
stats.add(Stat.itemsMoved, displayedSpeed, StatUnit.itemsSecond);
|
||||
}
|
||||
|
||||
|
||||
public class BufferedItemBridgeBuild extends ItemBridgeBuild{
|
||||
ItemBuffer buffer = new ItemBuffer(bufferCapacity);
|
||||
@@ -40,16 +51,18 @@ public class BufferedItemBridge extends ItemBridge{
|
||||
dump();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void write(Writes write){
|
||||
super.write(write);
|
||||
buffer.write(write);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void read(Reads read, byte revision){
|
||||
super.read(read, revision);
|
||||
buffer.read(read);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,8 @@ package mindustry.world.blocks.distribution;
|
||||
|
||||
import mindustry.gen.*;
|
||||
import mindustry.type.*;
|
||||
import mindustry.world.*;
|
||||
import mindustry.world.meta.*;
|
||||
|
||||
public class DuctBridge extends DirectionBridge{
|
||||
public float speed = 5f;
|
||||
@@ -15,6 +17,12 @@ public class DuctBridge extends DirectionBridge{
|
||||
isDuct = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setStats(){
|
||||
super.setStats();
|
||||
stats.add(Stat.itemsMoved, 60f / speed, StatUnit.itemsSecond);
|
||||
}
|
||||
|
||||
public class DuctBridgeBuild extends DirectionBridgeBuild{
|
||||
public float progress = 0f;
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ public class ItemBridge extends Block{
|
||||
public final int timerCheckMoved = timers ++;
|
||||
|
||||
public int range;
|
||||
public float transportTime = 2f;
|
||||
public float transportTime;
|
||||
public @Load("@-end") TextureRegion endRegion;
|
||||
public @Load("@-bridge") TextureRegion bridgeRegion;
|
||||
public @Load("@-arrow") TextureRegion arrowRegion;
|
||||
@@ -65,6 +65,14 @@ public class ItemBridge extends Block{
|
||||
config(Integer.class, (ItemBridgeBuild tile, Integer i) -> tile.link = i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setStats() {
|
||||
super.setStats();
|
||||
if(transportTime != 0f){
|
||||
stats.add(Stat.itemsMoved, 60f / transportTime, StatUnit.itemsSecond);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawPlanConfigTop(BuildPlan plan, Eachable<BuildPlan> list){
|
||||
otherReq = null;
|
||||
@@ -518,4 +526,4 @@ public class ItemBridge extends Block{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,7 @@ import static mindustry.Vars.*;
|
||||
public class Junction extends Block{
|
||||
public float speed = 26; //frames taken to go through this junction
|
||||
public int capacity = 6;
|
||||
public float displayedSpeed = 13f;
|
||||
|
||||
public Junction(String name){
|
||||
super(name);
|
||||
@@ -24,6 +25,15 @@ public class Junction extends Block{
|
||||
noUpdateDisabled = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setStats(){
|
||||
super.setStats();
|
||||
|
||||
//(60f / speed * capacity) returns 13.84 which is not the actual value (non linear, depends on fps)
|
||||
stats.add(Stat.itemsMoved, displayedSpeed, StatUnit.itemsSecond);
|
||||
stats.add(Stat.itemCapacity, capacity, StatUnit.items);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean outputsItems(){
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user