Buildable beam link block
This commit is contained in:
@@ -2345,6 +2345,7 @@ block.unit-cargo-loader.description = Constructs cargo drones. Drones automatica
|
|||||||
block.unit-cargo-unload-point.description = Acts as an unloading point for cargo drones. Accepts items that match the selected filter.
|
block.unit-cargo-unload-point.description = Acts as an unloading point for cargo drones. Accepts items that match the selected filter.
|
||||||
block.beam-node.description = Transmits power to other blocks orthogonally. Stores a small amount of power.
|
block.beam-node.description = Transmits power to other blocks orthogonally. Stores a small amount of power.
|
||||||
block.beam-tower.description = Transmits power to other blocks orthogonally. Stores a large amount of power. Long-range.
|
block.beam-tower.description = Transmits power to other blocks orthogonally. Stores a large amount of power. Long-range.
|
||||||
|
block.beam-link.description = Transmits power over vast distances.\nOnly capable of connecting to adjacent structures or other beam links.
|
||||||
block.turbine-condenser.description = Generates power when placed on vents. Produces a small amount of water.
|
block.turbine-condenser.description = Generates power when placed on vents. Produces a small amount of water.
|
||||||
block.chemical-combustion-chamber.description = Generates power from arkycite and ozone.
|
block.chemical-combustion-chamber.description = Generates power from arkycite and ozone.
|
||||||
block.pyrolysis-generator.description = Generates large amounts of power from arkycite and slag. Produces water as a byproduct.
|
block.pyrolysis-generator.description = Generates large amounts of power from arkycite and slag. Produces water as a byproduct.
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -2487,11 +2487,12 @@ public class Blocks{
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
beamLink = new LongPowerNode("beam-link"){{
|
beamLink = new LongPowerNode("beam-link"){{
|
||||||
requirements(Category.power, BuildVisibility.editorOnly, with());
|
requirements(Category.power, with(Items.beryllium, 250, Items.silicon, 250, Items.oxide, 150, Items.carbide, 75, Items.surgeAlloy, 75, Items.phaseFabric, 75));
|
||||||
size = 3;
|
size = 3;
|
||||||
maxNodes = 1;
|
maxNodes = 1;
|
||||||
laserRange = 1000f;
|
laserRange = 500f;
|
||||||
autolink = false;
|
autolink = false;
|
||||||
|
sameBlockConnection = true;
|
||||||
laserColor2 = Color.valueOf("ffd9c2");
|
laserColor2 = Color.valueOf("ffd9c2");
|
||||||
laserScale = 0.8f;
|
laserScale = 0.8f;
|
||||||
scaledHealth = 130;
|
scaledHealth = 130;
|
||||||
|
|||||||
@@ -160,7 +160,9 @@ public class ErekirTechTree{
|
|||||||
});
|
});
|
||||||
|
|
||||||
node(beamTower, Seq.with(new OnSector(peaks)), () -> {
|
node(beamTower, Seq.with(new OnSector(peaks)), () -> {
|
||||||
|
node(beamLink, Seq.with(new OnSector(crossroads)), () -> {
|
||||||
|
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -485,6 +485,7 @@ public class SerpuloTechTree{
|
|||||||
node(mycelialBastion, Seq.with(
|
node(mycelialBastion, Seq.with(
|
||||||
new Research(atrax),
|
new Research(atrax),
|
||||||
new Research(spiroct),
|
new Research(spiroct),
|
||||||
|
new Research(arkyid),
|
||||||
new Research(multiplicativeReconstructor),
|
new Research(multiplicativeReconstructor),
|
||||||
new Research(exponentialReconstructor)
|
new Research(exponentialReconstructor)
|
||||||
), () -> {
|
), () -> {
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public class PowerNode extends PowerBlock{
|
|||||||
public @Load(value = "@-laser-end", fallback = "laser-end") TextureRegion laserEnd;
|
public @Load(value = "@-laser-end", fallback = "laser-end") TextureRegion laserEnd;
|
||||||
public float laserRange = 6;
|
public float laserRange = 6;
|
||||||
public int maxNodes = 3;
|
public int maxNodes = 3;
|
||||||
public boolean autolink = true, drawRange = true;
|
public boolean autolink = true, drawRange = true, sameBlockConnection = false;
|
||||||
public float laserScale = 0.25f;
|
public float laserScale = 0.25f;
|
||||||
public Color laserColor1 = Color.white;
|
public Color laserColor1 = Color.white;
|
||||||
public Color laserColor2 = Pal.powerLight;
|
public Color laserColor2 = Pal.powerLight;
|
||||||
@@ -341,7 +341,7 @@ public class PowerNode extends PowerBlock{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean linkValid(Building tile, Building link, boolean checkMaxNodes){
|
public boolean linkValid(Building tile, Building link, boolean checkMaxNodes){
|
||||||
if(tile == link || link == null || !link.block.hasPower || !link.block.connectedPower || tile.team != link.team) return false;
|
if(tile == link || link == null || !link.block.hasPower || !link.block.connectedPower || tile.team != link.team || (sameBlockConnection && tile.block != link.block)) return false;
|
||||||
|
|
||||||
if(overlaps(tile, link, laserRange * tilesize) || (link.block instanceof PowerNode node && overlaps(link, tile, node.laserRange * tilesize))){
|
if(overlaps(tile, link, laserRange * tilesize) || (link.block instanceof PowerNode node && overlaps(link, tile, node.laserRange * tilesize))){
|
||||||
if(checkMaxNodes && link.block instanceof PowerNode node){
|
if(checkMaxNodes && link.block instanceof PowerNode node){
|
||||||
|
|||||||
Reference in New Issue
Block a user