From 6b3dfa60365310b628c99d2dcd62fc0a72c9bd4a Mon Sep 17 00:00:00 2001 From: Anuken Date: Fri, 5 Nov 2021 16:41:08 -0400 Subject: [PATCH] Carbide, surge conveyors --- .../blocks/distribution/ducts/duct-top-0.png | Bin 329 -> 2049 bytes .../distribution/ducts/surge-duct-glow-0.png | Bin 0 -> 2058 bytes .../distribution/ducts/surge-duct-top-0.png | Bin 0 -> 708 bytes .../stack-conveyors/surge-conveyor-0.png | Bin 0 -> 312 bytes .../stack-conveyors/surge-conveyor-1.png | Bin 0 -> 687 bytes .../stack-conveyors/surge-conveyor-2.png | Bin 0 -> 706 bytes .../stack-conveyors/surge-conveyor-edge.png | Bin 0 -> 591 bytes .../stack-conveyors/surge-conveyor-glow.png | Bin 0 -> 2058 bytes .../stack-conveyors/surge-conveyor-stack.png | Bin 0 -> 298 bytes .../stack-conveyors/surge-conveyor.png | Bin 0 -> 668 bytes .../assets-raw/sprites/items/item-carbide.png | Bin 0 -> 457 bytes core/assets/icons/icons.properties | 5 ++ core/assets/logicids.dat | Bin 3013 -> 3056 bytes core/src/mindustry/content/Blocks.java | 40 +++++++++++++-- core/src/mindustry/content/Items.java | 4 +- .../mindustry/entities/comp/BuildingComp.java | 2 +- core/src/mindustry/graphics/Layer.java | 3 ++ core/src/mindustry/world/Block.java | 1 + .../src/mindustry/world/blocks/Autotiler.java | 3 +- .../blocks/distribution/StackConveyor.java | 47 +++++++++++++++--- .../world/blocks/production/BurstDrill.java | 7 ++- 21 files changed, 92 insertions(+), 20 deletions(-) create mode 100644 core/assets-raw/sprites/blocks/distribution/ducts/surge-duct-glow-0.png create mode 100644 core/assets-raw/sprites/blocks/distribution/ducts/surge-duct-top-0.png create mode 100644 core/assets-raw/sprites/blocks/distribution/stack-conveyors/surge-conveyor-0.png create mode 100644 core/assets-raw/sprites/blocks/distribution/stack-conveyors/surge-conveyor-1.png create mode 100644 core/assets-raw/sprites/blocks/distribution/stack-conveyors/surge-conveyor-2.png create mode 100644 core/assets-raw/sprites/blocks/distribution/stack-conveyors/surge-conveyor-edge.png create mode 100644 core/assets-raw/sprites/blocks/distribution/stack-conveyors/surge-conveyor-glow.png create mode 100644 core/assets-raw/sprites/blocks/distribution/stack-conveyors/surge-conveyor-stack.png create mode 100644 core/assets-raw/sprites/blocks/distribution/stack-conveyors/surge-conveyor.png create mode 100644 core/assets-raw/sprites/items/item-carbide.png diff --git a/core/assets-raw/sprites/blocks/distribution/ducts/duct-top-0.png b/core/assets-raw/sprites/blocks/distribution/ducts/duct-top-0.png index 04cd2abceb6eecdd02b35ac78e0f74612565667b..eae68cbeafb92452f6ab5b4805710f58e3e090b3 100644 GIT binary patch delta 2036 zcmVaB^>EX>4U6ba`-PAZ2)IW&i+q+Ray4mLw+( z{O1%t0ul(saaiB;4SakDB$=JHbnP@L^I(WTsR;&h%-xZ*>syZu+Sfgd@)>SR!Omv%4!@-V%#wDu0r1ITC1JfnZrp1|k4?d}Q7urWgAZ3D@Z-Ce`* zePDNG#E%VNG=IKKXTM`K9itz!%RT_nuobnyrZWs23m|u^Tfh_X3hHq^36I)rD=2Ta z+JdK2A_gnNkf%nO2K7}|sz}ju=ZKQIf~aXz7ddft2TyotaCFHvr{J=3H_pM#S1z>1 zO>4YLijf<^l?lNJT|PeMyT;#n%oue-L{=}XkQYx~BY%y_-28?Y2%)iglLhekZ2Ij@ zKaeUIlm)Y5g4vcML=pPZmRmeK_zB8m36Y6y2LMDETaXNvfF~Qs2?er|IT8U!1wk2^ zv-4cQ0EuuzlI)!eY$7YqvC${e@@3(`(~P|dM2HJ6f}7+r$nsvGpXe1D%HqU}NRTLM zBuNe~_QyvoRMn(8adOxLC504|rj&AKlQB?6tPKAQ zOX1>*FH%B@MN2BVLO#`3siDTIHPzg>xrS|`g%+E()N&`&u~T&4rH3B7_SEx$)`lB? z$Ot129cko?wax0w^Bb(uW{nq9(=T4E!D?bWLx0fRPGoWh#@G`WkCOoinkQ#g$$Os6 zP0nm$EDB*HDU%!1Xfg&0eJ7S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ARvO!B(4+3j*pkQYFV9qXQ>jFR+si{&D?&>?wQ-$ z54gE`kL&9z1RjI%Vz>SYY8WHy~L1zFixK8=41#krL3}8nq037(e z^Tr?#ND|HiZvf-~-T}BGi3#7S2)riQkw{keoVr4hMwVbALXis+8Qr~Oc*cA$Q7*SC zCu|=9880icT)HzO;5px&iQE_|ZEz;Pe<7FlsG0+B80Q0kl6K&p^U745-bdc26$XG! zJ5CRE@`}J)aq^t&xgao7-^#K)dGx`g0bO?DBSJRu!0 zN|rOBj8i4c&P%dd_VifeX;MKYlp>T-4R!2Y{X>N2iK_UA@h>|_*ibW)3YhW4Ie<$_ z@+B)F6DQvQSkZow%rg_X(G}3wjG(%qJN<*42vQLAJAfbjz2RP07;LNu#wxof z+-nH1r`uNqU-9okRZ6P|l~6a-bAeO3nz5}#Gx{xDzvll+&ukEEMqN74@H7R9m7aFI zX54o@6%ecftHv$Y3ku=(UBp0g6n(%8?jzu9#YdrHPG*OUWVUZG?Q2FdW|bgQ4j4*< z({b0m;I+o`;AkFuF-g?=Y8R8CS2N%BOan%PACGNs8T#gV+d*LP<#fH?;^FZD$(O~q o*ekaUSTuN9R+!(OkN^Mx07*qoM6N<$f?%k(^Z)<= literal 0 HcmV?d00001 diff --git a/core/assets-raw/sprites/blocks/distribution/ducts/surge-duct-top-0.png b/core/assets-raw/sprites/blocks/distribution/ducts/surge-duct-top-0.png new file mode 100644 index 0000000000000000000000000000000000000000..fa16df4cefea78e2916c44e0f0fd379bd9818a48 GIT binary patch literal 708 zcmV;#0z3VQP)EX>4Tx04R}tkv&MmP!xqvQ;VV%K|6>zWT;LSL`5963Pq?8YK2xEOkVm2O&XFE z7e~Rh;NZ_<)xpJCR|i)?5c~mgb8}L3krMAq3N2#1@OU5R-E(;FK0v6KnPzp21DbA| zsYG1NWLL$`SM(r+egqJZnPtpLQWC!Pbx(a%cQKyj-}h(rsyT}R0g-r?8KzCVK|H-_ z8=UuvBdjQ^#OK6gCS8#Dk?V@bZ=4G*3p_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7V-9A3w zZx^r%-9bvvU%dhm2ReQW3=rbze#!qJFgg-xR%izz2pk3Uh!_qZw1P>-p=tELWaE#+ zAJaHcF#l?t^bn7zxg!E8|J0Bk*d;e{FbMA=rz0;H+O*ms7Rqx_;m}IdK`U|?i$6PX VQQSKMRILC2002ovPDHLkV1fm4FW~?H literal 0 HcmV?d00001 diff --git a/core/assets-raw/sprites/blocks/distribution/stack-conveyors/surge-conveyor-2.png b/core/assets-raw/sprites/blocks/distribution/stack-conveyors/surge-conveyor-2.png new file mode 100644 index 0000000000000000000000000000000000000000..3c1afe07dc1151fc5816f2f2b7e1ff9d7219bde0 GIT binary patch literal 706 zcmV;z0zLhSP)EX>4Tx04R}tkv&MmKpe$iKSYs=gGEYl$WWauh>ALD6^c+H)C#RSm|Xe=O&XFE z7e~Rh;NZt%)xpJCR|i)?5c~jfa&%I3krMxx6k5c1aNLh~_a1le0Dq&xR5LgRsG4P@ zlL;Z4TNS!r5kv%oh+rd-(Wz7w1{t=l&dhO5S9EPavLUx?vG-5KnDd zI_G`jFe^z4@j3CRK^G)`x%ki;UEAVPqQ8p^1^LY!8O6ccIMPk8vFj$b5~Os+B* zITlcb3d!+<|H1EW&BDaEn-od_T`#u%F${F?0?oQ@e;?a+^8^Sy16NwxUu^(0pQP8@ zTI>ku-v%zO+nT%wTw=N#j_W|AT{;HrM0c5p_7fs8&{C@Kg)z>HK0G z5T)}Y2%t!326I52PK^WKwi`e-Y8g;HJquj&>6`6t`tW|c6dGahi^posEQ)b#yFPo^ zc72RviE(4Tx04R}tkv&MmKpe$i)0T=<9n4U~AwzYtAS&XhRVYG*P%E_RU_SZWZ_mlRC`;TOmG7y%-?K&#<6-^Y&AIst;uz?I(d*P6i0C+Urj z7C!<8wt zaB^>EX>4U6ba`-PAZ2)IW&i+q+U=KHmg6W4hTmC5F9Asi#B#WvGdq~&_YZblNvbcE znt6-%mqyrbBrEG$RTq<#r$#PeI+0Ebsu~-;r>DIt_Frm zAmzACIz4~JcPvWs~r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0 zN|rOBj8i4c&P%dd_VifeX;MKYlp>T-4R!2Y{X>N2iK_UA@h>|_*ibW)3YhW4Ie<$_ z@+B)F6DQvQSkZow%rg_X(G}3wjG(%qJN<*42vQLAJAfbjz2RP07;LNu#wxof z+-nH1r`uNqU-9okRZ6P|l~6a-bAeO3nz5}#Gx{xDzvll+&ukEEMqN74@H7R9m7aFI zX54o@6%ecftHv$Y3ku=(UBp0g6n(%8?jzu9#YdrHPG*OUWVUZG?Q2FdW|bgQ4j4*< z({b0m;I+o`;AkFuF-g?=Y8R8CS2N%BOan%PACGNs8T#gV+d*LP<#fH?;^FZD$(O~q o*ekaUSTuN9R+!(OkN^Mx07*qoM6N<$f?%k(^Z)<= literal 0 HcmV?d00001 diff --git a/core/assets-raw/sprites/blocks/distribution/stack-conveyors/surge-conveyor-stack.png b/core/assets-raw/sprites/blocks/distribution/stack-conveyors/surge-conveyor-stack.png new file mode 100644 index 0000000000000000000000000000000000000000..fa549cc0c55c3bf597aa573d5ee201dc87ac5f8d GIT binary patch literal 298 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}Pdr^5Ln2y} z6C_v{Cp0iB@040^lJ@_&`ubq|sT!L*%MN^**&V2}rM9qXfn1V|;}qr#y33a-&p5Gl zPGe)^!woI0j_d+V6|wE-i*ghWzv9d5E|K1NtMxMD4xRmVfA##l)zluB>zla?^e`pq zrY9sMoS5Hj@A-FsO#eftMY0Yjijrg-`64`md{s`&KYe1s%9TAz(`L$bUrkkUWz;>e zg4s>hVR8(E=7a$6qdXas4RI2JvP>^-a_xV5gn81Uh6&0iG`raIQ(e|5b8O|*$m4&Y u<4Tx04R}tkv&MmKpe$iKSYs=gGEYl$WWauh>ALD6^c+H)C#RSm|Xe=O&XFE z7e~Rh;NZt%)xpJCR|i)?5c~jfa&%I3krMxx6k5c1aNLh~_a1le0Dq&xR5LgRsG4P@ zlL;Z4TNS!r5kv%oh+rd-(Wz7w1{t=l&dhO5S9EPavLUx?vG-5KnDd zI_G`jFe^z4@j3CRK^G)`x%ki;UEAVPqQ8p^1^LY!8O6ccIMPk8vFj$b5~Os+B* zITlcb3d!+<|H1EW&BDaEn-od_T`#u%F${F?0?oQ@e;?a+^8^Sy16NwxUu^(0pQP8@ zTI>ku-v%zO+nT%wT!u@%BF3`7%NMxbB-Qt@aR z0y-EYQ>0}WmH{dlfgw@{G&-MIF=eZEdsjFX)`26&88 zNDNRJz_|$E8Q85oo-Rxl+fW7n0qF4cw%`9AzF&79P^loy6;e$=o!(f|iGlW;< zF|=oDFyuK<8Oxhwb@ViVG1vmYTN^CEUP=@ov-0YIJT0NC<944eS^wNX!S8m8+20000Px$gGod|R9J=WmN8btFbszOhC{#xCrHMYEnC;_-8ljbof+T=?A=+}y0snC6VS1z z2$S-RBFVCv4K&4;U5q>VX* zwdUphX#_D`LM{#f`|fOR%;$4}QaM+exV4cqpA#p4Q5o_SSY>DVI9v*00;DP68%q(9 zd|K)Vq5^==uUEAnSP=W}Jo0;+6U`41D1}JpB)=C*?E{k0ozMie-a(djOe#t7)Sjxy zi4&v*mG%QQ>?IJIxa8-}$b1h(AguIAoiO_#iKIg^?UK7*MAt%C73O{uMjq{z06HVa-OS8Jvm&$%#ctnJKBd$wj5fnMpaR41C3Wq#4-nVi~; Z?5Sn>*{KYolTUM9;$VkrnLLME69DNV8d?AV delta 32 ocmew$epH-^Vbw;a8JwH=f@(FGY0KPU0tpET3 diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index 54013dcb68..7348863fb4 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -1,7 +1,6 @@ package mindustry.content; import arc.graphics.*; -import arc.math.*; import arc.struct.*; import mindustry.*; import mindustry.ctype.*; @@ -60,6 +59,7 @@ public class Blocks implements ContentList{ //crafting siliconSmelter, siliconCrucible, siliconArcFurnace, kiln, graphitePress, plastaniumCompressor, multiPress, phaseWeaver, surgeSmelter, pyratiteMixer, blastMixer, cryofluidMixer, melter, separator, disassembler, sporePress, pulverizer, incinerator, coalCentrifuge, + carbideCrucible, cellSynthesisChamber, //sandbox @@ -75,6 +75,7 @@ public class Blocks implements ContentList{ conveyor, titaniumConveyor, plastaniumConveyor, armoredConveyor, distributor, junction, itemBridge, phaseConveyor, sorter, invertedSorter, router, overflowGate, underflowGate, massDriver, duct, ductRouter, ductBridge, + surgeConveyor, //liquid mechanicalPump, rotaryPump, thermalPump, conduit, pulseConduit, platedConduit, liquidRouter, liquidContainer, liquidTank, liquidJunction, bridgeConduit, phaseConduit, @@ -939,6 +940,22 @@ public class Blocks implements ContentList{ consumes.power(0.50f); }}; + carbideCrucible = new GenericCrafter("carbide-crucible"){{ + requirements(Category.crafting, with(Items.tungsten, 60, Items.graphite, 30)); + craftEffect = Fx.smeltsmoke; + outputItem = new ItemStack(Items.carbide, 1); + craftTime = 30f; + size = 2; + hasPower = hasItems = true; + drawer = new DrawSmelter(Color.valueOf("ffc099")); + ambientSound = Sounds.smelter; + ambientSoundVolume = 0.07f; + + //TODO use heat! + consumes.items(with(Items.tungsten, 1, Items.graphite, 2)); + consumes.power(2f); + }}; + cellSynthesisChamber = new LiquidConverter("cell-synthesis-chamber"){{ //TODO booster mechanics? requirements(Category.crafting, with(Items.thorium, 100, Items.phaseFabric, 120, Items.titanium, 150, Items.surgeAlloy, 70)); @@ -1277,20 +1294,35 @@ public class Blocks implements ContentList{ //special transport blocks duct = new Duct("duct"){{ - requirements(Category.distribution, BuildVisibility.debugOnly, with(Items.graphite, 5)); + requirements(Category.distribution, with(Items.graphite, 5)); speed = 4f; }}; ductRouter = new DuctRouter("duct-router"){{ - requirements(Category.distribution, BuildVisibility.debugOnly, with(Items.graphite, 10)); + requirements(Category.distribution, with(Items.graphite, 10)); speed = 4f; }}; ductBridge = new DuctBridge("duct-bridge"){{ - requirements(Category.distribution, BuildVisibility.debugOnly, with(Items.graphite, 20)); + requirements(Category.distribution, with(Items.graphite, 20)); speed = 4f; }}; + surgeConveyor = new StackConveyor("surge-conveyor"){{ + requirements(Category.distribution, with(Items.surgeAlloy, 3, Items.graphite, 5)); + health = 90; + //TODO different base speed/item capacity? + speed = 5f / 60f; + itemCapacity = 10; + + outputRouter = false; + hasPower = true; + consumesPower = true; + conductivePower = true; + baseEfficiency = 1f; + consumes.power(1f / 60f); + }}; + //endregion //region liquid diff --git a/core/src/mindustry/content/Items.java b/core/src/mindustry/content/Items.java index 4e09984dbf..5c3d285f20 100644 --- a/core/src/mindustry/content/Items.java +++ b/core/src/mindustry/content/Items.java @@ -111,9 +111,7 @@ public class Items implements ContentList{ cost = 1.2f; }}; - //TODO carbide impl - - carbide = new Item("carbide", Color.valueOf("768a9a")){{ + carbide = new Item("carbide", Color.valueOf("89769a")){{ cost = 1.3f; }}; } diff --git a/core/src/mindustry/entities/comp/BuildingComp.java b/core/src/mindustry/entities/comp/BuildingComp.java index 99a891ab48..6774862c35 100644 --- a/core/src/mindustry/entities/comp/BuildingComp.java +++ b/core/src/mindustry/entities/comp/BuildingComp.java @@ -845,7 +845,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc, for(Building other : proximity){ if(other != null && other.power != null && other.team == team - && !(block.consumesPower && other.block.consumesPower && !block.outputsPower && !other.block.outputsPower) + && !(block.consumesPower && other.block.consumesPower && !block.outputsPower && !other.block.outputsPower && !block.conductivePower && !other.block.conductivePower) && conductsTo(other) && other.conductsTo(self()) && !power.links.contains(other.pos())){ out.add(other); } diff --git a/core/src/mindustry/graphics/Layer.java b/core/src/mindustry/graphics/Layer.java index cf465dc300..59d4808945 100644 --- a/core/src/mindustry/graphics/Layer.java +++ b/core/src/mindustry/graphics/Layer.java @@ -26,6 +26,9 @@ public class Layer{ //base block layer - most blocks go here block = 30, + //informal layer used for additive blending overlay, grouped together to reduce draw calls + blockAdditive = 31, + //things drawn over blocks (intermediate layer) blockOver = 35, diff --git a/core/src/mindustry/world/Block.java b/core/src/mindustry/world/Block.java index f75d256bef..86cf53f335 100644 --- a/core/src/mindustry/world/Block.java +++ b/core/src/mindustry/world/Block.java @@ -47,6 +47,7 @@ public class Block extends UnlockableContent{ public boolean outputsLiquid = false; public boolean consumesPower = true; public boolean outputsPower = false; + public boolean conductivePower = false; public boolean outputsPayload = false; public boolean acceptsPayload = false; public boolean acceptsItems = false; diff --git a/core/src/mindustry/world/blocks/Autotiler.java b/core/src/mindustry/world/blocks/Autotiler.java index 3c5c1cb503..03e0b7e01a 100644 --- a/core/src/mindustry/world/blocks/Autotiler.java +++ b/core/src/mindustry/world/blocks/Autotiler.java @@ -189,7 +189,8 @@ public interface Autotiler{ default boolean blendsArmored(Tile tile, int rotation, int otherx, int othery, int otherrot, Block otherblock){ return Point2.equals(tile.x + Geometry.d4(rotation).x, tile.y + Geometry.d4(rotation).y, otherx, othery) || ((!otherblock.rotatedOutput(otherx, othery) && Edges.getFacingEdge(otherblock, otherx, othery, tile) != null && - Edges.getFacingEdge(otherblock, otherx, othery, tile).relativeTo(tile) == rotation) || (otherblock.rotatedOutput(otherx, othery) && Point2.equals(otherx + Geometry.d4(otherrot).x, othery + Geometry.d4(otherrot).y, tile.x, tile.y))); + Edges.getFacingEdge(otherblock, otherx, othery, tile).relativeTo(tile) == rotation) || + (otherblock.rotatedOutput(otherx, othery) && Point2.equals(otherx + Geometry.d4(otherrot).x, othery + Geometry.d4(otherrot).y, tile.x, tile.y))); } /** @return whether this other block is *not* looking at this one. */ diff --git a/core/src/mindustry/world/blocks/distribution/StackConveyor.java b/core/src/mindustry/world/blocks/distribution/StackConveyor.java index fa7d2427e3..cce5470752 100644 --- a/core/src/mindustry/world/blocks/distribution/StackConveyor.java +++ b/core/src/mindustry/world/blocks/distribution/StackConveyor.java @@ -1,5 +1,6 @@ package mindustry.world.blocks.distribution; +import arc.graphics.*; import arc.graphics.g2d.*; import arc.math.*; import arc.struct.*; @@ -25,9 +26,15 @@ public class StackConveyor extends Block implements Autotiler{ public @Load(value = "@-#", length = 3) TextureRegion[] regions; public @Load("@-edge") TextureRegion edgeRegion; public @Load("@-stack") TextureRegion stackRegion; + /** requires power to work properly */ + public @Load(value = "@-glow") TextureRegion glowRegion; + public float glowAlpha = 1f; + public Color glowColor = Pal.redLight; + + public float baseEfficiency = 1f; public float speed = 0f; - public boolean splitOut = true; + public boolean outputRouter = true; /** (minimum) amount of loading docks needed to fill a line. */ public float recharge = 2f; public Effect loadEffect = Fx.plasticburn; @@ -61,7 +68,7 @@ public class StackConveyor extends Block implements Autotiler{ int state = b.state; if(state == stateLoad){ //standard conveyor mode return otherblock.outputsItems() && lookingAtEither(tile, rotation, otherx, othery, otherrot, otherblock); - }else if(state == stateUnload){ //router mode + }else if(state == stateUnload && !outputRouter){ //router mode return otherblock.acceptsItems && (!otherblock.noSideBlend || lookingAtEither(tile, rotation, otherx, othery, otherrot, otherblock)) && (notLookingAt(tile, rotation, otherx, othery, otherrot, otherblock) || @@ -105,6 +112,7 @@ public class StackConveyor extends Block implements Autotiler{ public int link = -1; public float cooldown; public Item lastItem; + public float glow; boolean proxUpdating = false; @@ -124,6 +132,17 @@ public class StackConveyor extends Block implements Autotiler{ Tile from = world.tile(link); + //TODO do not draw for certain configurations? + if(glowRegion.found() && glow > 0f){ + Draw.z(Layer.blockAdditive); + Draw.color(glowColor, glowAlpha * glow); + Draw.blend(Blending.additive); + Draw.rect(glowRegion, x, y, rotation * 90); + Draw.blend(); + Draw.color(); + Draw.z(Layer.block - 0.1f); + } + if(link == -1 || from == null || lastItem == null) return; int fromRot = from.build == null ? rotation : from.build.rotation; @@ -139,6 +158,10 @@ public class StackConveyor extends Block implements Autotiler{ if((fromRot%4) == 3 && (rotation%4) == 0) a = -1 * 90; if((fromRot%4) == 0 && (rotation%4) == 3) a = 4 * 90; + if(glowRegion.found()){ + Draw.z(Layer.blockAdditive + 0.01f); + } + //stack Draw.rect(stackRegion, Tmp.v1.x, Tmp.v1.y, Mathf.lerp(a, b, Interp.smooth.apply(1f - Mathf.clamp(cooldown * 2, 0f, 1f)))); @@ -169,13 +192,14 @@ public class StackConveyor extends Block implements Autotiler{ int[] bits = buildBlending(tile, rotation, null, true); if(bits[0] == 0 && blends(tile, rotation, 0) && !blends(tile, rotation, 2)) state = stateLoad; // a 0 that faces into a conveyor with none behind it - if(bits[0] == 0 && !blends(tile, rotation, 0) && blends(tile, rotation, 2)) state = stateUnload; // a 0 that faces into none with a conveyor behind it + if(outputRouter && bits[0] == 0 && !blends(tile, rotation, 0) && blends(tile, rotation, 2)) state = stateUnload; // a 0 that faces into none with a conveyor behind it + if(!outputRouter && !(front() instanceof StackConveyorBuild)) state = stateUnload; // a 0 that faces into none with a conveyor behind it if(!headless){ blendprox = 0; for(int i = 0; i < 4; i++){ - if(blends(tile, rotation, i)){ + if(blends(tile, rotation, i) && (state != stateUnload || outputRouter || i == 0 || nearby(Mathf.mod(rotation - i, 4)) instanceof StackConveyorBuild)){ blendprox |= (1 << i); } } @@ -210,7 +234,7 @@ public class StackConveyor extends Block implements Autotiler{ @Override public float efficiency(){ - return 1f; + return baseEfficiency + (power == null ? 0f : power.status); } @Override @@ -229,12 +253,21 @@ public class StackConveyor extends Block implements Autotiler{ lastItem = items.first(); } + if(power != null) glow = Mathf.lerpDelta(glow, power.status, 0.6f); + //do not continue if disabled, will still allow one to be reeled in to prevent visual stacking if(!enabled) return; if(state == stateUnload){ //unload - while(lastItem != null && (!splitOut ? moveForward(lastItem) : dump(lastItem))){ - if(items.empty()) poofOut(); + while(lastItem != null && (!outputRouter ? moveForward(lastItem) : dump(lastItem))){ + if(!outputRouter){ + items.remove(lastItem, 1); + } + + if(items.empty()){ + poofOut(); + lastItem = null; + } } }else{ //transfer if(state != stateLoad || (items.total() >= getMaximumAccepted(lastItem))){ diff --git a/core/src/mindustry/world/blocks/production/BurstDrill.java b/core/src/mindustry/world/blocks/production/BurstDrill.java index 86c12320bc..1e13ef29df 100644 --- a/core/src/mindustry/world/blocks/production/BurstDrill.java +++ b/core/src/mindustry/world/blocks/production/BurstDrill.java @@ -7,6 +7,7 @@ import arc.util.*; import mindustry.annotations.Annotations.*; import mindustry.content.*; import mindustry.entities.*; +import mindustry.graphics.*; public class BurstDrill extends Drill{ public float shake = 2f; @@ -104,8 +105,6 @@ public class BurstDrill extends Drill{ Draw.color(); } - float z = Draw.z(); - float fract = smoothProgress; int arrows = 3; Draw.color(arrowColor); @@ -116,13 +115,13 @@ public class BurstDrill extends Drill{ Tmp.v1.trns(i * 90 + 45, j * arrowSpacing); //TODO maybe just use arrow alpha and that drawn on the base? - Draw.z(z); + Draw.z(Layer.block); Draw.color(baseArrowColor, arrowColor, a); Draw.rect(arrowRegion, x + Tmp.v1.x, y + Tmp.v1.y, i * 90); Draw.color(arrowColor); - Draw.z(z + 0.001f); + Draw.z(Layer.blockAdditive); Draw.blend(Blending.additive); Draw.alpha(Mathf.pow(a, 10f)); Draw.rect(arrowBlurRegion, x + Tmp.v1.x, y + Tmp.v1.y, i * 90);