From 55f729565b79fe5e27cecbc92812f40f425f73d7 Mon Sep 17 00:00:00 2001 From: Anuken Date: Fri, 6 May 2022 13:45:43 -0400 Subject: [PATCH] Modding API-related tweaks --- ...nstructor-top.png => refabricator-top.png} | Bin ...sic-reconstructor.png => refabricator.png} | Bin core/src/mindustry/content/Blocks.java | 40 ++++++++---------- .../src/mindustry/content/ErekirTechTree.java | 4 +- core/src/mindustry/content/UnitTypes.java | 10 +---- .../mindustry/entities/comp/PayloadComp.java | 40 +++++++++--------- .../entities/pattern/ShootSpread.java | 8 ++++ core/src/mindustry/io/SaveFileReader.java | 3 +- core/src/mindustry/mod/ClassMap.java | 5 ++- core/src/mindustry/world/Block.java | 19 ++++++++- .../world/blocks/defense/BaseShield.java | 2 +- .../defense/DirectionalForceProjector.java | 2 +- .../world/blocks/defense/ForceProjector.java | 2 +- ...loadTurret.java => PayloadAmmoTurret.java} | 4 +- .../defense/turrets/TractorBeamTurret.java | 2 +- .../blocks/distribution/DirectionBridge.java | 2 +- .../world/blocks/distribution/ItemBridge.java | 2 +- .../world/blocks/payloads/BuildPayload.java | 2 +- .../blocks/payloads/PayloadMassDriver.java | 2 +- .../world/blocks/power/BeamNode.java | 2 +- .../world/blocks/production/BeamDrill.java | 2 +- .../world/blocks/units/RepairTurret.java | 2 +- .../world/blocks/units/UnitAssembler.java | 2 +- 23 files changed, 85 insertions(+), 72 deletions(-) rename core/assets-raw/sprites/blocks/units/{basic-reconstructor-top.png => refabricator-top.png} (100%) rename core/assets-raw/sprites/blocks/units/{basic-reconstructor.png => refabricator.png} (100%) rename core/src/mindustry/world/blocks/defense/turrets/{PayloadTurret.java => PayloadAmmoTurret.java} (98%) diff --git a/core/assets-raw/sprites/blocks/units/basic-reconstructor-top.png b/core/assets-raw/sprites/blocks/units/refabricator-top.png similarity index 100% rename from core/assets-raw/sprites/blocks/units/basic-reconstructor-top.png rename to core/assets-raw/sprites/blocks/units/refabricator-top.png diff --git a/core/assets-raw/sprites/blocks/units/basic-reconstructor.png b/core/assets-raw/sprites/blocks/units/refabricator.png similarity index 100% rename from core/assets-raw/sprites/blocks/units/basic-reconstructor.png rename to core/assets-raw/sprites/blocks/units/refabricator.png diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index 7629b67a88..5e9664d86a 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -142,7 +142,7 @@ public class Blocks{ tankFabricator, shipFabricator, mechFabricator, //TODO names - basicReconstructor, + refabricator, advancedReconstructor, tankAssembler, shipAssembler, mechAssembler, @@ -2883,7 +2883,7 @@ public class Blocks{ scaledHealth = 200; shootSound = Sounds.shootSnap; - coolant = consume(new ConsumeCoolant(0.2f)); + coolant = consumeCoolant(0.2f); limitRange(2); }}; @@ -2928,7 +2928,7 @@ public class Blocks{ ammoUseEffect = Fx.none; health = 400; shootSound = Sounds.flame; - coolant = consume(new ConsumeCoolant(0.1f)); + coolant = consumeCoolant(0.1f); }}; hail = new ItemTurret("hail"){{ @@ -2979,7 +2979,7 @@ public class Blocks{ shootCone = 10f; health = 260; shootSound = Sounds.bang; - coolant = consume(new ConsumeCoolant(0.1f)); + coolant = consumeCoolant(0.1f); limitRange(0f); }}; @@ -3033,7 +3033,7 @@ public class Blocks{ moveWhileCharging = false; accurateDelay = false; shootSound = Sounds.laser; - coolant = consume(new ConsumeCoolant(0.2f)); + coolant = consumeCoolant(0.2f); consumePower(6f); @@ -3089,7 +3089,7 @@ public class Blocks{ health = 260; shootSound = Sounds.spark; consumePower(3.3f); - coolant = consume(new ConsumeCoolant(0.1f)); + coolant = consumeCoolant(0.1f); }}; parallax = new TractorBeamTurret("parallax"){{ @@ -3169,7 +3169,7 @@ public class Blocks{ envEnabled |= Env.space; limitRange(5f); - coolant = consume(new ConsumeCoolant(0.3f)); + coolant = consumeCoolant(0.3f); }}; salvo = new ItemTurret("salvo"){{ @@ -3238,7 +3238,7 @@ public class Blocks{ shootSound = Sounds.shootBig; limitRange(); - coolant = consume(new ConsumeCoolant(0.2f)); + coolant = consumeCoolant(0.2f); }}; segment = new PointDefenseTurret("segment"){{ @@ -3326,10 +3326,7 @@ public class Blocks{ range = 90f; recoilAmount = 5f; - shoot = new ShootSpread(){{ - shots = 3; - spread = 20f; - }}; + shoot = new ShootSpread(3, 20f); restitution = 0.1f; shootCone = 30; @@ -3338,7 +3335,7 @@ public class Blocks{ scaledHealth = 220; shootSound = Sounds.shotgun; - coolant = consume(new ConsumeCoolant(0.3f)); + coolant = consumeCoolant(0.3f); float brange = range + 10f; @@ -3452,7 +3449,7 @@ public class Blocks{ shootShake = 2f; range = 290f; minRange = 50f; - coolant = consume(new ConsumeCoolant(0.3f)); + coolant = consumeCoolant(0.3f); scaledHealth = 130; shootSound = Sounds.artillery; @@ -3540,7 +3537,7 @@ public class Blocks{ inaccuracy = 10f; shootCone = 30f; shootSound = Sounds.shootSnap; - coolant = consume(new ConsumeCoolant(0.3f)); + coolant = consumeCoolant(0.3f); scaledHealth = 145; limitRange(); @@ -3584,7 +3581,7 @@ public class Blocks{ coolantMultiplier = 0.4f; scaledHealth = 150; - coolant = consume(new ConsumeCoolant(1f)); + coolant = consumeCoolant(1f); consumePower(10f); }}; @@ -3643,7 +3640,7 @@ public class Blocks{ shootSound = Sounds.shootBig; scaledHealth = 160; - coolant = consume(new ConsumeCoolant(1f)); + coolant = consumeCoolant(1f); limitRange(); }}; @@ -3678,7 +3675,7 @@ public class Blocks{ }}; scaledHealth = 200; - coolant = consume(new ConsumeCoolant(0.5f)); + coolant = consumeCoolant(0.5f); consumePower(17f); }}; @@ -3769,10 +3766,7 @@ public class Blocks{ }} ); - shoot = new ShootSpread(){{ - shots = 15; - spread = 4f; - }}; + shoot = new ShootSpread(15, 4f); coolantMultiplier = 6f; @@ -4226,7 +4220,7 @@ public class Blocks{ consumePower(2f); }}; - basicReconstructor = new Reconstructor("basic-reconstructor"){{ + refabricator = new Reconstructor("refabricator"){{ requirements(Category.units, with(Items.beryllium, 250, Items.tungsten, 120, Items.silicon, 150)); regionSuffix = "-dark"; diff --git a/core/src/mindustry/content/ErekirTechTree.java b/core/src/mindustry/content/ErekirTechTree.java index 8009cc0344..ba9f2818af 100644 --- a/core/src/mindustry/content/ErekirTechTree.java +++ b/core/src/mindustry/content/ErekirTechTree.java @@ -188,7 +188,7 @@ public class ErekirTechTree{ node(cliffCrusher, () -> { node(siliconArcFurnace, () -> { node(electrolyzer, Seq.with(new OnSector(three)), () -> { - node(oxidationChamber, Seq.with(new Research(basicReconstructor), new OnSector(four)), () -> { + node(oxidationChamber, Seq.with(new Research(refabricator), new OnSector(four)), () -> { node(electricHeater, Seq.with(new OnSector(four)), () -> { node(heatRedirector, () -> { @@ -293,7 +293,7 @@ public class ErekirTechTree{ }); - node(basicReconstructor, Seq.with(new OnSector(three)), () -> { + node(refabricator, Seq.with(new OnSector(three)), () -> { node(UnitTypes.cleroi); node(UnitTypes.avert); node(UnitTypes.locus); diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index 4edee1c1d7..9fe4a8da2f 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -887,10 +887,7 @@ public class UnitTypes{ shadow = 12f; recoil = 3f; - shoot = new ShootSpread(){{ - shots = 2; - spread = 17f; - }}; + shoot = new ShootSpread(2, 17f); bullet = new ShrapnelBulletType(){{ length = 90f; @@ -3520,10 +3517,7 @@ public class UnitTypes{ baseRotation = -35f; shootCone = 360f; - shoot = new ShootSpread(){{ - shots = 2; - spread = 11f; - }}; + shoot = new ShootSpread(2, 11f); bullet = new BasicBulletType(5f, 24){{ homingPower = 0.19f; diff --git a/core/src/mindustry/entities/comp/PayloadComp.java b/core/src/mindustry/entities/comp/PayloadComp.java index 7601e0e361..0bb9d11fd5 100644 --- a/core/src/mindustry/entities/comp/PayloadComp.java +++ b/core/src/mindustry/entities/comp/PayloadComp.java @@ -31,33 +31,31 @@ abstract class PayloadComp implements Posc, Rotc, Hitboxc, Unitc{ @Override public void update(){ - if(Vars.state.rules.unitPayloadUpdate){ - if(payloadPower != null){ - payloadPower.clear(); - } + if(payloadPower != null){ + payloadPower.clear(); + } - //update power graph first, resolve everything - for(Payload pay : payloads){ - if(pay instanceof BuildPayload pb && pb.build.power != null){ - if(payloadPower == null) payloadPower = new PowerGraph(); + //update power graph first, resolve everything + for(Payload pay : payloads){ + if(pay instanceof BuildPayload pb && pb.build.power != null){ + if(payloadPower == null) payloadPower = new PowerGraph(); - pb.build.team = team; - pb.build.power.graph = null; - payloadPower.add(pb.build); - } + pb.build.team = team; + pb.build.power.graph = null; + payloadPower.add(pb.build); } + } - if(payloadPower != null){ - payloadPower.update(); - } + if(payloadPower != null){ + payloadPower.update(); + } - for(Payload pay : payloads){ - if(pay instanceof BuildPayload build){ - build.build.team = team; - } - pay.set(x, y, rotation); - pay.update(true); + for(Payload pay : payloads){ + if(pay instanceof BuildPayload build){ + build.build.team = team; } + pay.set(x, y, rotation); + pay.update(true); } } diff --git a/core/src/mindustry/entities/pattern/ShootSpread.java b/core/src/mindustry/entities/pattern/ShootSpread.java index b47ca69d3e..98236c993f 100644 --- a/core/src/mindustry/entities/pattern/ShootSpread.java +++ b/core/src/mindustry/entities/pattern/ShootSpread.java @@ -4,6 +4,14 @@ public class ShootSpread extends ShootPattern{ /** spread between bullets, in degrees. */ public float spread = 5f; + public ShootSpread(int shots, float spread){ + this.shots = shots; + this.spread = spread; + } + + public ShootSpread(){ + } + @Override public void shoot(int totalShots, BulletHandler handler){ for(int i = 0; i < shots; i++){ diff --git a/core/src/mindustry/io/SaveFileReader.java b/core/src/mindustry/io/SaveFileReader.java index d7c16d0931..6c92e31439 100644 --- a/core/src/mindustry/io/SaveFileReader.java +++ b/core/src/mindustry/io/SaveFileReader.java @@ -63,7 +63,8 @@ public abstract class SaveFileReader{ "thermal-pump", "impulse-pump", "alloy-smelter", "surge-smelter", "steam-vent", "rhyolite-vent", - "fabricator", "tank-fabricator" + "fabricator", "tank-fabricator", + "basic-reconstructor", "refabricator" ); public static final ObjectMap modContentNameMap = ObjectMap.of( diff --git a/core/src/mindustry/mod/ClassMap.java b/core/src/mindustry/mod/ClassMap.java index 08c3d3cad2..56a46ba175 100644 --- a/core/src/mindustry/mod/ClassMap.java +++ b/core/src/mindustry/mod/ClassMap.java @@ -1,6 +1,7 @@ package mindustry.mod; import arc.struct.*; +import mindustry.world.blocks.defense.turrets.*; import mindustry.world.blocks.units.*; import mindustry.world.draw.*; @@ -166,8 +167,8 @@ public class ClassMap{ classes.put("LaserTurretBuild", mindustry.world.blocks.defense.turrets.LaserTurret.LaserTurretBuild.class); classes.put("LiquidTurret", mindustry.world.blocks.defense.turrets.LiquidTurret.class); classes.put("LiquidTurretBuild", mindustry.world.blocks.defense.turrets.LiquidTurret.LiquidTurretBuild.class); - classes.put("PayloadTurret", mindustry.world.blocks.defense.turrets.PayloadTurret.class); - classes.put("PayloadTurretBuild", mindustry.world.blocks.defense.turrets.PayloadTurret.PayloadTurretBuild.class); + classes.put("PayloadTurret", PayloadAmmoTurret.class); + classes.put("PayloadTurretBuild", PayloadAmmoTurret.PayloadTurretBuild.class); classes.put("PointDefenseTurret", mindustry.world.blocks.defense.turrets.PointDefenseTurret.class); classes.put("PointDefenseBuild", mindustry.world.blocks.defense.turrets.PointDefenseTurret.PointDefenseBuild.class); classes.put("PowerTurret", mindustry.world.blocks.defense.turrets.PowerTurret.class); diff --git a/core/src/mindustry/world/Block.java b/core/src/mindustry/world/Block.java index 4d8547dad9..247434658b 100644 --- a/core/src/mindustry/world/Block.java +++ b/core/src/mindustry/world/Block.java @@ -142,6 +142,8 @@ public class Block extends UnlockableContent implements Senseable{ public boolean noUpdateDisabled = false; /** if true, this block updates when it's a payload in a unit. */ public boolean updateInUnits = true; + /** if true, this block updates in payloads in units regardless of the experimental game rule */ + public boolean alwaysUpdateInUnits = false; /** Whether to use this block's color in the minimap. Only used for overlays. */ public boolean useColor = true; /** item that drops from this block, used for drills */ @@ -827,6 +829,10 @@ public class Block extends UnlockableContent implements Senseable{ return buildType.get(); } + public void updateClipRadius(float size){ + clipSize = Math.max(clipSize, size * tilesize + size * 2f); + } + public Rect bounds(int x, int y, Rect rect){ return rect.setSize(size * tilesize).setCenter(x * tilesize + offset, y * tilesize + offset); } @@ -890,6 +896,13 @@ public class Block extends UnlockableContent implements Senseable{ return consumers.length == 0 ? (T)consumeBuilder.find(filter) : (T)Structs.find(consumers, filter); } + public void removeConsumer(Consume cons){ + if(consumers.length > 0){ + throw new IllegalStateException("You can only remove consumers before init(). After init(), all consumers have already been initialized."); + } + consumeBuilder.remove(cons); + } + public ConsumeLiquid consumeLiquid(Liquid liquid, float amount){ return consume(new ConsumeLiquid(liquid, amount)); } @@ -937,6 +950,10 @@ public class Block extends UnlockableContent implements Senseable{ return consume(new ConsumeItems(items)); } + public ConsumeCoolant consumeCoolant(float amount){ + return consume(new ConsumeCoolant(amount)); + } + public T consume(T consume){ if(consume instanceof ConsumePower){ //there can only be one power consumer @@ -1244,7 +1261,7 @@ public class Block extends UnlockableContent implements Senseable{ var gen = icons(); if(outlineIcon){ - PixmapRegion region = Core.atlas.getPixmap(gen[outlinedIcon >= 0 ? outlinedIcon : gen.length -1]); + PixmapRegion region = Core.atlas.getPixmap(gen[outlinedIcon >= 0 ? Math.min(outlinedIcon, gen.length - 1) : gen.length -1]); Pixmap out = last = Pixmaps.outline(region, outlineColor, outlineRadius); if(Core.settings.getBool("linear", true)){ Pixmaps.bleed(out); diff --git a/core/src/mindustry/world/blocks/defense/BaseShield.java b/core/src/mindustry/world/blocks/defense/BaseShield.java index 01f9dd4411..32bc077e8f 100644 --- a/core/src/mindustry/world/blocks/defense/BaseShield.java +++ b/core/src/mindustry/world/blocks/defense/BaseShield.java @@ -66,7 +66,7 @@ public class BaseShield extends Block{ public void init(){ super.init(); - clipSize = Math.max(clipSize, radius * 2f + 8f); + updateClipRadius(radius); } @Override diff --git a/core/src/mindustry/world/blocks/defense/DirectionalForceProjector.java b/core/src/mindustry/world/blocks/defense/DirectionalForceProjector.java index edda577709..43548a63bc 100644 --- a/core/src/mindustry/world/blocks/defense/DirectionalForceProjector.java +++ b/core/src/mindustry/world/blocks/defense/DirectionalForceProjector.java @@ -71,7 +71,7 @@ public class DirectionalForceProjector extends Block{ @Override public void init(){ - clipSize = Math.max(clipSize, (width + 3f) * 2f); + updateClipRadius((width + 3f)); super.init(); diff --git a/core/src/mindustry/world/blocks/defense/ForceProjector.java b/core/src/mindustry/world/blocks/defense/ForceProjector.java index f6364ebe04..7c8e7d4bd9 100644 --- a/core/src/mindustry/world/blocks/defense/ForceProjector.java +++ b/core/src/mindustry/world/blocks/defense/ForceProjector.java @@ -71,7 +71,7 @@ public class ForceProjector extends Block{ @Override public void init(){ - clipSize = Math.max(clipSize, (radius + phaseRadiusBoost + 3f) * 2f); + updateClipRadius(radius + phaseRadiusBoost + 3f); super.init(); } diff --git a/core/src/mindustry/world/blocks/defense/turrets/PayloadTurret.java b/core/src/mindustry/world/blocks/defense/turrets/PayloadAmmoTurret.java similarity index 98% rename from core/src/mindustry/world/blocks/defense/turrets/PayloadTurret.java rename to core/src/mindustry/world/blocks/defense/turrets/PayloadAmmoTurret.java index 9a085bde18..151fccd26b 100644 --- a/core/src/mindustry/world/blocks/defense/turrets/PayloadTurret.java +++ b/core/src/mindustry/world/blocks/defense/turrets/PayloadAmmoTurret.java @@ -18,12 +18,12 @@ import mindustry.world.meta.*; import static mindustry.Vars.*; //TODO visuals! -public class PayloadTurret extends Turret{ +public class PayloadAmmoTurret extends Turret{ public ObjectMap ammoTypes = new ObjectMap<>(); protected UnlockableContent[] ammoKeys; - public PayloadTurret(String name){ + public PayloadAmmoTurret(String name){ super(name); maxAmmo = 3; diff --git a/core/src/mindustry/world/blocks/defense/turrets/TractorBeamTurret.java b/core/src/mindustry/world/blocks/defense/turrets/TractorBeamTurret.java index 4b523b37a5..c21332bbb2 100644 --- a/core/src/mindustry/world/blocks/defense/turrets/TractorBeamTurret.java +++ b/core/src/mindustry/world/blocks/defense/turrets/TractorBeamTurret.java @@ -65,7 +65,7 @@ public class TractorBeamTurret extends BaseTurret{ public void init(){ super.init(); - clipSize = Math.max(clipSize, (range + tilesize) * 2); + updateClipRadius(range + tilesize); } public class TractorBeamBuild extends BaseTurretBuild{ diff --git a/core/src/mindustry/world/blocks/distribution/DirectionBridge.java b/core/src/mindustry/world/blocks/distribution/DirectionBridge.java index cd226c5dbc..55c691fd49 100644 --- a/core/src/mindustry/world/blocks/distribution/DirectionBridge.java +++ b/core/src/mindustry/world/blocks/distribution/DirectionBridge.java @@ -45,7 +45,7 @@ public class DirectionBridge extends Block{ @Override public void init(){ - clipSize = Math.max(clipSize, (range + 0.5f) * 2 * tilesize); + updateClipRadius((range + 0.5f) * tilesize); super.init(); } diff --git a/core/src/mindustry/world/blocks/distribution/ItemBridge.java b/core/src/mindustry/world/blocks/distribution/ItemBridge.java index 61abb66bd4..20dc091f86 100644 --- a/core/src/mindustry/world/blocks/distribution/ItemBridge.java +++ b/core/src/mindustry/world/blocks/distribution/ItemBridge.java @@ -160,7 +160,7 @@ public class ItemBridge extends Block{ @Override public void init(){ super.init(); - clipSize = Math.max(clipSize, (range + 0.5f) * tilesize * 2); + updateClipRadius((range + 0.5f) * tilesize); } @Override diff --git a/core/src/mindustry/world/blocks/payloads/BuildPayload.java b/core/src/mindustry/world/blocks/payloads/BuildPayload.java index fc4443b657..13c53953e3 100644 --- a/core/src/mindustry/world/blocks/payloads/BuildPayload.java +++ b/core/src/mindustry/world/blocks/payloads/BuildPayload.java @@ -44,7 +44,7 @@ public class BuildPayload implements Payload{ @Override public void update(boolean inUnit){ - if(inUnit && !build.block.updateInUnits) return; + if(inUnit && (!build.block.updateInUnits || (!state.rules.unitPayloadUpdate && !build.block.alwaysUpdateInUnits))) return; build.tile = emptyTile; build.update(); diff --git a/core/src/mindustry/world/blocks/payloads/PayloadMassDriver.java b/core/src/mindustry/world/blocks/payloads/PayloadMassDriver.java index d804e90805..c97bfa7b45 100644 --- a/core/src/mindustry/world/blocks/payloads/PayloadMassDriver.java +++ b/core/src/mindustry/world/blocks/payloads/PayloadMassDriver.java @@ -71,7 +71,7 @@ public class PayloadMassDriver extends PayloadBlock{ @Override public void init(){ super.init(); - clipSize = Math.max(clipSize, range*2f + tilesize*size); + updateClipRadius(range); } @Override diff --git a/core/src/mindustry/world/blocks/power/BeamNode.java b/core/src/mindustry/world/blocks/power/BeamNode.java index 852d40e0db..2b130fbd79 100644 --- a/core/src/mindustry/world/blocks/power/BeamNode.java +++ b/core/src/mindustry/world/blocks/power/BeamNode.java @@ -52,7 +52,7 @@ public class BeamNode extends PowerBlock{ public void init(){ super.init(); - clipSize = Math.max(clipSize, tilesize*size + (range+1)*tilesize*2); + updateClipRadius((range + 1) * tilesize); } @Override diff --git a/core/src/mindustry/world/blocks/production/BeamDrill.java b/core/src/mindustry/world/blocks/production/BeamDrill.java index d822a6c6c0..2fa1121640 100644 --- a/core/src/mindustry/world/blocks/production/BeamDrill.java +++ b/core/src/mindustry/world/blocks/production/BeamDrill.java @@ -65,7 +65,7 @@ public class BeamDrill extends Block{ @Override public void init(){ - clipSize = Math.max(clipSize, size * tilesize + (range + 2) * tilesize); + updateClipRadius((range + 2) * tilesize); super.init(); } diff --git a/core/src/mindustry/world/blocks/units/RepairTurret.java b/core/src/mindustry/world/blocks/units/RepairTurret.java index 5734e19251..bb00ba768d 100644 --- a/core/src/mindustry/world/blocks/units/RepairTurret.java +++ b/core/src/mindustry/world/blocks/units/RepairTurret.java @@ -82,7 +82,7 @@ public class RepairTurret extends Block{ } consumePowerCond(powerUse, (RepairPointBuild entity) -> entity.target != null); - clipSize = Math.max(clipSize, (repairRadius + tilesize) * 2); + updateClipRadius(repairRadius); super.init(); } diff --git a/core/src/mindustry/world/blocks/units/UnitAssembler.java b/core/src/mindustry/world/blocks/units/UnitAssembler.java index 41a10ff51b..2da1546372 100644 --- a/core/src/mindustry/world/blocks/units/UnitAssembler.java +++ b/core/src/mindustry/world/blocks/units/UnitAssembler.java @@ -119,7 +119,7 @@ public class UnitAssembler extends PayloadBlock{ @Override public void init(){ - clipSize = Math.max(clipSize, (areaSize + size) * tilesize * 2); + updateClipRadius(areaSize * tilesize); consume(consPayload = new ConsumePayloadDynamic((UnitAssemblerBuild build) -> build.plan().requirements)); super.init();