Better stell cell

This commit is contained in:
Anuken
2022-02-17 13:42:17 -05:00
parent f9eabecd88
commit ba475b681c
7 changed files with 27 additions and 8 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 303 B

After

Width:  |  Height:  |  Size: 404 B

Binary file not shown.

View File

@@ -266,6 +266,8 @@ public class ControlPathfinder{
private void start(){ private void start(){
stop(); stop();
if(net.client()) return;
//TODO currently capped at 6 threads, might be a good idea to make it more? //TODO currently capped at 6 threads, might be a good idea to make it more?
threads = new PathfindThread[Mathf.clamp(Runtime.getRuntime().availableProcessors() - 2, 1, 6)]; threads = new PathfindThread[Mathf.clamp(Runtime.getRuntime().availableProcessors() - 2, 1, 6)];
for(int i = 0; i < threads.length; i ++){ for(int i = 0; i < threads.length; i ++){

View File

@@ -149,6 +149,8 @@ public class Pathfinder implements Runnable{
/** Starts or restarts the pathfinding thread. */ /** Starts or restarts the pathfinding thread. */
private void start(){ private void start(){
stop(); stop();
if(net.client()) return;
thread = Threads.daemon("Pathfinder", this); thread = Threads.daemon("Pathfinder", this);
} }

View File

@@ -146,8 +146,7 @@ public class Blocks{
//payloads //payloads
payloadConveyor, payloadRouter, reinforcedPayloadConveyor, reinforcedPayloadRouter, payloadMassDriver, payloadPropulsionTower, smallDeconstructor, deconstructor, constructor, largeConstructor, payloadLoader, payloadUnloader, payloadConveyor, payloadRouter, reinforcedPayloadConveyor, reinforcedPayloadRouter, payloadMassDriver, payloadPropulsionTower, smallDeconstructor, deconstructor, constructor, largeConstructor, payloadLoader, payloadUnloader,
//logic //logic
message, switchBlock, microProcessor, logicProcessor, hyperProcessor, largeLogicDisplay, logicDisplay, memoryCell, memoryBank, message, switchBlock, microProcessor, logicProcessor, hyperProcessor, largeLogicDisplay, logicDisplay, memoryCell, memoryBank,
worldProcessor, worldCell, worldProcessor, worldCell,
@@ -1238,6 +1237,7 @@ public class Blocks{
drawer.iconOverride = new String[]{""}; drawer.iconOverride = new String[]{""};
size = 2; size = 2;
heatOutput = 3f; heatOutput = 3f;
regionRotated1 = 1;
consumePower(50f / 60f); consumePower(50f / 60f);
}}; }};
@@ -1260,6 +1260,7 @@ public class Blocks{
size = 3; size = 3;
drawer = new DrawMulti(new DrawHeatOutput(true), new DrawHeatInput("-heat")); drawer = new DrawMulti(new DrawHeatOutput(true), new DrawHeatInput("-heat"));
regionRotated1 = 1;
}}; }};
slagIncinerator = new ItemIncinerator("slag-incinerator"){{ slagIncinerator = new ItemIncinerator("slag-incinerator"){{
@@ -1869,32 +1870,37 @@ public class Blocks{
requirements(Category.distribution, with(Items.graphite, 1)); requirements(Category.distribution, with(Items.graphite, 1));
//TODO bad idea? should this just require 1 beryllium? //TODO bad idea? should this just require 1 beryllium?
buildVisibility = BuildVisibility.berylliumOnly; buildVisibility = BuildVisibility.berylliumOnly;
health = 90;
speed = 4f; speed = 4f;
}}; }};
ductRouter = new DuctRouter("duct-router"){{ ductRouter = new DuctRouter("duct-router"){{
requirements(Category.distribution, with(Items.graphite, 8, Items.beryllium, 4)); requirements(Category.distribution, with(Items.graphite, 8, Items.beryllium, 4));
health = 90;
speed = 4f; speed = 4f;
}}; }};
overflowDuct = new OverflowDuct("overflow-duct"){{ overflowDuct = new OverflowDuct("overflow-duct"){{
requirements(Category.distribution, with(Items.graphite, 8, Items.beryllium, 8)); requirements(Category.distribution, with(Items.graphite, 8, Items.beryllium, 8));
health = 90;
speed = 4f; speed = 4f;
}}; }};
ductBridge = new DuctBridge("duct-bridge"){{ ductBridge = new DuctBridge("duct-bridge"){{
requirements(Category.distribution, with(Items.graphite, 15, Items.beryllium, 10)); requirements(Category.distribution, with(Items.graphite, 15, Items.beryllium, 10));
health = 90;
speed = 4f; speed = 4f;
}}; }};
ductUnloader = new DirectionalUnloader("duct-unloader"){{ ductUnloader = new DirectionalUnloader("duct-unloader"){{
requirements(Category.distribution, with(Items.graphite, 20, Items.silicon, 20, Items.tungsten, 10)); requirements(Category.distribution, with(Items.graphite, 20, Items.silicon, 20, Items.tungsten, 10));
health = 90;
speed = 4f; speed = 4f;
}}; }};
surgeConveyor = new StackConveyor("surge-conveyor"){{ surgeConveyor = new StackConveyor("surge-conveyor"){{
requirements(Category.distribution, with(Items.surgeAlloy, 3, Items.oxide, 5)); requirements(Category.distribution, with(Items.surgeAlloy, 3, Items.oxide, 5));
health = 90; health = 130;
//TODO different base speed/item capacity? //TODO different base speed/item capacity?
speed = 5f / 60f; speed = 5f / 60f;
itemCapacity = 10; itemCapacity = 10;
@@ -1909,6 +1915,7 @@ public class Blocks{
surgeRouter = new StackRouter("surge-router"){{ surgeRouter = new StackRouter("surge-router"){{
requirements(Category.distribution, with(Items.oxide, 10, Items.surgeAlloy, 10)); requirements(Category.distribution, with(Items.oxide, 10, Items.surgeAlloy, 10));
health = 130;
speed = 6f; speed = 6f;
@@ -2138,6 +2145,7 @@ public class Blocks{
beamNode = new BeamNode("beam-node"){{ beamNode = new BeamNode("beam-node"){{
requirements(Category.power, with(Items.graphite, 5, Items.beryllium, 3)); requirements(Category.power, with(Items.graphite, 5, Items.beryllium, 3));
consumesPower = outputsPower = true; consumesPower = outputsPower = true;
health = 90;
consumePowerBuffered(1000f); consumePowerBuffered(1000f);
range = 10; range = 10;
researchCostMultiplier = 0.8f; researchCostMultiplier = 0.8f;
@@ -2150,6 +2158,7 @@ public class Blocks{
consumesPower = outputsPower = true; consumesPower = outputsPower = true;
consumePowerBuffered(40000f); consumePowerBuffered(40000f);
range = 23; range = 23;
scaledHealth = 90;
}}; }};
beamLink = new LongPowerNode("beam-link"){{ beamLink = new LongPowerNode("beam-link"){{
@@ -2160,6 +2169,7 @@ public class Blocks{
autolink = false; autolink = false;
laserColor2 = Color.valueOf("ffd9c2"); laserColor2 = Color.valueOf("ffd9c2");
laserScale = 0.8f; laserScale = 0.8f;
scaledHealth = 130;
}}; }};
combustionGenerator = new BurnerGenerator("combustion-generator"){{ combustionGenerator = new BurnerGenerator("combustion-generator"){{
@@ -2602,7 +2612,7 @@ public class Blocks{
//TODO should this be higher? //TODO should this be higher?
buildCostMultiplier = 0.75f; buildCostMultiplier = 0.75f;
unitCapModifier = 5; unitCapModifier = 30;
researchCostMultiplier = 0.07f; researchCostMultiplier = 0.07f;
}}; }};
@@ -2616,7 +2626,7 @@ public class Blocks{
thrusterLength = 40/4f; thrusterLength = 40/4f;
armor = 10f; armor = 10f;
unitCapModifier = 10; unitCapModifier = 30;
researchCostMultipliers.put(Items.silicon, 0.4f); researchCostMultipliers.put(Items.silicon, 0.4f);
researchCostMultiplier = 0.14f; researchCostMultiplier = 0.14f;
}}; }};
@@ -2632,7 +2642,7 @@ public class Blocks{
thrusterLength = 48/4f; thrusterLength = 48/4f;
armor = 15f; armor = 15f;
unitCapModifier = 15; unitCapModifier = 30;
researchCostMultipliers.put(Items.silicon, 0.3f); researchCostMultipliers.put(Items.silicon, 0.3f);
researchCostMultiplier = 0.2f; researchCostMultiplier = 0.2f;
}}; }};
@@ -3696,7 +3706,7 @@ public class Blocks{
//TODO 500 or 400? does it need to be better than the standard mass driver? //TODO 500 or 400? does it need to be better than the standard mass driver?
range = 450f; range = 450f;
maxPayloadSize = 2.5f; maxPayloadSize = 2.5f;
consumePower(2f); consumePower(0.5f);
}}; }};
payloadPropulsionTower = new PayloadMassDriver("payload-propulsion-tower"){{ payloadPropulsionTower = new PayloadMassDriver("payload-propulsion-tower"){{

View File

@@ -3369,7 +3369,7 @@ public class UnitTypes{
speed = 2f; speed = 2f;
rotateSpeed = 9f; rotateSpeed = 9f;
accel = 0.1f; accel = 0.1f;
itemCapacity = 60; itemCapacity = 50;
health = 200f; health = 200f;
hitSize = 11f; hitSize = 11f;
engineSize = 2.3f; engineSize = 2.3f;

View File

@@ -79,6 +79,11 @@ public abstract class BlockProducer extends PayloadBlock{
return false; return false;
} }
@Override
public boolean shouldConsume(){
return super.shouldConsume() && recipe() != null;
}
@Override @Override
public void updateTile(){ public void updateTile(){
super.updateTile(); super.updateTile();