Large constructor variant
This commit is contained in:
@@ -394,3 +394,6 @@
|
||||
63339=carbon-stone|block-carbon-stone-ui
|
||||
63338=payload-deconstructor|block-payload-deconstructor-ui
|
||||
63337=cliff-crusher|block-cliff-crusher-ui
|
||||
63336=deconstructor|block-deconstructor-ui
|
||||
63335=constructor|block-constructor-ui
|
||||
63334=large-constructor|block-large-constructor-ui
|
||||
|
||||
Binary file not shown.
@@ -96,7 +96,7 @@ public class Blocks implements ContentList{
|
||||
repairPoint, repairTurret, resupplyPoint,
|
||||
|
||||
//payloads
|
||||
payloadConveyor, payloadRouter, payloadPropulsionTower, deconstructor, constructor, blockLoader, blockUnloader,
|
||||
payloadConveyor, payloadRouter, payloadPropulsionTower, deconstructor, constructor, largeConstructor, blockLoader, blockUnloader,
|
||||
|
||||
//logic
|
||||
message, switchBlock, microProcessor, logicProcessor, hyperProcessor, largeLogicDisplay, logicDisplay, memoryCell, memoryBank,
|
||||
@@ -2240,12 +2240,21 @@ public class Blocks implements ContentList{
|
||||
}};
|
||||
|
||||
constructor = new Constructor("constructor"){{
|
||||
requirements(Category.units, BuildVisibility.debugOnly, with(Items.thorium, 100));
|
||||
requirements(Category.units, with(Items.thorium, 100));
|
||||
hasPower = true;
|
||||
consumes.power(2f);
|
||||
size = 3;
|
||||
}};
|
||||
|
||||
largeConstructor = new Constructor("large-constructor"){{
|
||||
requirements(Category.units, with(Items.thorium, 100));
|
||||
hasPower = true;
|
||||
consumes.power(2f);
|
||||
maxBlockSize = 4;
|
||||
minBlockSize = 3;
|
||||
size = 5;
|
||||
}};
|
||||
|
||||
blockLoader = new BlockLoader("block-loader"){{
|
||||
requirements(Category.units, BuildVisibility.debugOnly, with(Items.thorium, 100));
|
||||
hasPower = true;
|
||||
|
||||
@@ -175,6 +175,7 @@ public class Shaders{
|
||||
public static class BlockBuildShader extends LoadShader{
|
||||
public float progress;
|
||||
public TextureRegion region = new TextureRegion();
|
||||
public float time;
|
||||
|
||||
public BlockBuildShader(){
|
||||
super("blockbuild", "default");
|
||||
@@ -185,7 +186,7 @@ public class Shaders{
|
||||
setUniformf("u_progress", progress);
|
||||
setUniformf("u_uv", region.u, region.v);
|
||||
setUniformf("u_uv2", region.u2, region.v2);
|
||||
setUniformf("u_time", Time.time);
|
||||
setUniformf("u_time", time);
|
||||
setUniformf("u_texsize", region.texture.width, region.texture.height);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,8 @@ public abstract class SaveFileReader{
|
||||
"snowrock", "snow-boulder",
|
||||
"cliffs", "stone-wall",
|
||||
|
||||
"cryofluidmixer", "cryofluid-mixer"
|
||||
"cryofluidmixer", "cryofluid-mixer",
|
||||
"block-forge", "constructor"
|
||||
);
|
||||
|
||||
protected final ReusableByteOutStream byteOutput = new ReusableByteOutStream();
|
||||
|
||||
@@ -223,7 +223,6 @@ public class ClassMap{
|
||||
classes.put("BallisticSilo", mindustry.world.blocks.payloads.BallisticSilo.class);
|
||||
classes.put("BallisticSiloBuild", mindustry.world.blocks.payloads.BallisticSilo.BallisticSiloBuild.class);
|
||||
classes.put("BlockForge", Constructor.class);
|
||||
classes.put("BlockForgeBuild", Constructor.BlockForgeBuild.class);
|
||||
classes.put("BlockLoader", mindustry.world.blocks.payloads.BlockLoader.class);
|
||||
classes.put("BlockLoaderBuild", mindustry.world.blocks.payloads.BlockLoader.BlockLoaderBuild.class);
|
||||
classes.put("BlockProducer", mindustry.world.blocks.payloads.BlockProducer.class);
|
||||
|
||||
@@ -221,6 +221,7 @@ public class ConstructBlock extends Block{
|
||||
|
||||
for(TextureRegion region : current.getGeneratedIcons()){
|
||||
Shaders.blockbuild.region = region;
|
||||
Shaders.blockbuild.time = Time.time;
|
||||
Shaders.blockbuild.progress = progress;
|
||||
|
||||
Draw.rect(region, x, y, current.rotate ? rotdeg() : 0);
|
||||
|
||||
@@ -2,6 +2,7 @@ package mindustry.world.blocks.experimental;
|
||||
|
||||
import mindustry.world.blocks.payloads.*;
|
||||
|
||||
/** @deprecated use Constructor instead. */
|
||||
@Deprecated
|
||||
public class BlockForge extends Constructor{
|
||||
|
||||
@@ -10,7 +11,7 @@ public class BlockForge extends Constructor{
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public class BlockForgeBuild extends Constructor.BlockForgeBuild{
|
||||
public class BlockForgeBuild extends Constructor.ConstructorBuild{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,6 +110,7 @@ public abstract class BlockProducer extends PayloadBlock{
|
||||
|
||||
for(TextureRegion region : recipe.getGeneratedIcons()){
|
||||
Shaders.blockbuild.region = region;
|
||||
Shaders.blockbuild.time = time;
|
||||
Shaders.blockbuild.progress = progress / recipe.buildCost;
|
||||
|
||||
Draw.rect(region, x, y, recipe.rotate ? rotdeg() : 0);
|
||||
|
||||
Reference in New Issue
Block a user