From be5eac5335b962c80f65ebc4673d1626990ee039 Mon Sep 17 00:00:00 2001 From: Anuken Date: Tue, 4 Oct 2022 12:06:00 -0400 Subject: [PATCH] Implementation of #7325 --- .../blocks/production/heat-router-glow.png | Bin 0 -> 1756 bytes .../blocks/production/heat-router-heat.png | Bin 0 -> 2632 bytes .../blocks/production/heat-router-top1.png | Bin 0 -> 729 bytes .../blocks/production/heat-router-top2.png | Bin 0 -> 756 bytes .../sprites/blocks/production/heat-router.png | Bin 0 -> 1768 bytes core/assets/bundles/bundle.properties | 2 + core/assets/icons/icons.properties | 1 + core/assets/logicids.dat | Bin 4617 -> 4630 bytes core/src/mindustry/ai/RtsAI.java | 9 ++++- core/src/mindustry/content/Blocks.java | 13 ++++++- .../src/mindustry/content/ErekirTechTree.java | 4 ++ .../mindustry/entities/comp/BuildingComp.java | 36 +++++++++++------- .../world/blocks/heat/HeatConductor.java | 3 +- .../mindustry/world/draw/DrawHeatOutput.java | 21 +++++++--- 14 files changed, 67 insertions(+), 22 deletions(-) create mode 100644 core/assets-raw/sprites/blocks/production/heat-router-glow.png create mode 100644 core/assets-raw/sprites/blocks/production/heat-router-heat.png create mode 100644 core/assets-raw/sprites/blocks/production/heat-router-top1.png create mode 100644 core/assets-raw/sprites/blocks/production/heat-router-top2.png create mode 100644 core/assets-raw/sprites/blocks/production/heat-router.png diff --git a/core/assets-raw/sprites/blocks/production/heat-router-glow.png b/core/assets-raw/sprites/blocks/production/heat-router-glow.png new file mode 100644 index 0000000000000000000000000000000000000000..234616dd677cd2951a9fe4317545b5fb81bf5f39 GIT binary patch literal 1756 zcmeAS@N?(olHy`uVBq!ia0y~yU`POA4mJh`hDS5XEf^RW7>k44ofy`glX=O&z&6d( z#WAE}&f7WJ;nMCrZS#+^3CSq5JiE4~;Mf295dNJPReT#;cK0rqSE)SqI`(!$`Lu++ z&)LW2tZS`HbwS`VM zf)j*qu*SXG%DaZ~I!EIDFHw$j)mjW39$EgX`7XC9%GgPpO=IGI)<0}}SpQw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X`_)W(^QkA_Lzm0z zWO^5c_4u0mFO59K`e^R+J9XKMP8xkWt7xZqcLVdZ6{?o!?aqoGi|z>9zumy_{j)n- zk(xi*58T%Y^e&pGqkcE2&hyUR527ymfV`(JrkxKd-+Lm@5P<*$4;)FlzKZLN>x6} zLe=sphneR*{;f9|B08G p4{rLKIum=90j@`mKR)vRRMPQ6?Jeu(F)%PNc)I$ztaD0e0svg4J`n%_ literal 0 HcmV?d00001 diff --git a/core/assets-raw/sprites/blocks/production/heat-router-heat.png b/core/assets-raw/sprites/blocks/production/heat-router-heat.png new file mode 100644 index 0000000000000000000000000000000000000000..dd574df57dbca192a2f0ad8525312120783a706c GIT binary patch literal 2632 zcmeAS@N?(olHy`uVBq!ia0y~yU`POA4mJh`hDS5XEf^RW7>k44ofy`glX=O&z{TY0 z;uumf=k46;VCit7qxFm11^E*Vj%;*(RIz&7woiZe2Ys8^o694{A<%Kt{+HY?(=!~L zQ+z{L`Cpx)VxqkJ*O|AsxBvb!x9f;o;Pq10FO9khJbPH}82&TVG5+KG!?K6bZLj^y z|3AaqI4W3kn5z%ixgFCpU}AINUookHchS1nat23u?AiJ@2!2?%XP;($y@Dd=4FRcR z_u2O`*B!WX*8k~WL(c=xE++j+KJ!4nq5tVuTQjC_2H&r!b5>Yd_0%){;rX+6&#QO$ z)t@(`4=hW%#OQ%MJ2d9(-*YNwmmcVP13ukvd`YzZ)*B@Qt*RP z$d9}CzxKz{$Umg7a(f-eL$A}zL=X38rPWa5xU$N-p>mSjc2WD}sOK;dY zU+`Jeu^S#Yjw{X0%`yFB@bHy-!|zYCloMp9cy90CJ#TJNkAcywV|6>W?727nG2aa4 z&ngM7EgkNfY_%lG*IE=bJvfm)H_=fM*B8zG?xok%D%;aPH54oKZbL-l-pK0CXhNlyL-(=<6xceW=`Mh`2ib{KoHkOHHTx!)G(Bt5|pPMX(+H{po*lPfK!6Yjum@h2uQ7I@j+euX7WAE2F$r z>$sTRDkGj+CMCypFGSN0==Mx``{BFXyYK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=={;x^y;ajNOiqGKjnkHyp;sw8lF%~E_fOZ##ClDj{$PIOP*vSL=l zF_$?kB?={HHERE`@tdaBl%9Vx{d3lyMP+SE*XkQMP1(`Sk}~~?aK`N&q1rLJo1TY&-?-g%7C9hZ)UEZgD@v3QY%lG=XkL==G=jcaReirV&9j0}(HvZh%Tjm)lvHnOzZ#u|ZR%&s<;aSJNx~zqry~_xjPbZ}LyQ z_dB7UVbiI%@>IH5_K{nAev2qS$hM3(O}g(>y{$n)V#w(J{JmBi42~HC@S_v{2)?@sXI`TM>(S zmPWQ+`F=Y^VwW5jXP~so#;a!c0yPuY$$eVz!ky*C33o|5_JzxT@EN}ny%)KD-OO4W z--RbU`HO=m@t>IVWb*|D$G=I-Z+K*6U+CtqyuiUQsUdyw#aR2JVp)NoFK^2<|Isoh zT717qVp7~!Mt;FsBgyYYHjf$k1ta-yu!P+S+?!n=# RhJk^B!PC{xWt~$(69E6(?vDTf literal 0 HcmV?d00001 diff --git a/core/assets-raw/sprites/blocks/production/heat-router-top1.png b/core/assets-raw/sprites/blocks/production/heat-router-top1.png new file mode 100644 index 0000000000000000000000000000000000000000..b9cba509e57a2fa5a1a9b9d4843625f33fef6396 GIT binary patch literal 729 zcmeAS@N?(olHy`uVBq!ia0y~yU`POA4mJh`hDS5XEf^S>7I?ZihE&XXd)F~f#8AL3 zQ7QEx;{&mn*53#8tatE-KNNe&@P_R#xA(NGded#!>3Q$T7e1mA6q0WwS$gr=SLPs_ zy1lkvKAQfP{wY88Ava@Q7=JuR!Q!$XP7SkTc;h(=n(uvRWjMIzAvYsaZ<{^~$0Nyo z0tyY~Kb#uQrnTv_c(^s3joY_xZ$&-Vmz^ve4>}i|zv#}yvQcRYNJp&eigtaL3Ma`t z>npRq&Jail{CnoweD~&eiU*ojU;lQMgJnj_-rbR%4h^2ycF(ro|DSLFyxtpZ;ew|= z+^?^xuKD-x^QYwvy*J!STfWV#7j5i~U~s*#VZGdHOM_ zjpx|lDSgnmM)81~Y7^LjB8^j1HqBhh!`M`zETAw!or$q&Bfo_V<0L@^Nk*ZU;wFqt zk>1sLm$=h(-|qCxKX_)}^{88$C&dJ`J?k`xy0yLDy`ixzV=;&E^~M&4wtEWYZVC+t zrJk(gV3FwPb6{w{dHt&-OF>tcLqiHEAW~Qg9!)P;wBjK*BiovX_QkO)6dDw(emF5W zzu)_R9Z2*RhjqI?OM!-<4fo88vY&KP#LnLNn{ik1zMWfx!q)}2E50VPa6H)=;@jXd zN4$iANk!Sgh>0axeNIPrVdoBs=^(1=x!V_kgvCZRvhjxlSPeu-m=NYTBUF7SYJ-oelE7Al`)iv1fD?j^tD6gaS%Uqg^% z!_6~BZS^xm8#XKP9f%ZUf3T*5xghKaqnjW{0kfD9dxByygP0Nf1G$aN1^qV|y;|zu Y@G+JDY3%N0U|?YIboFyt=akR{0Nac+%>V!Z literal 0 HcmV?d00001 diff --git a/core/assets-raw/sprites/blocks/production/heat-router-top2.png b/core/assets-raw/sprites/blocks/production/heat-router-top2.png new file mode 100644 index 0000000000000000000000000000000000000000..0d59002b171138c7a4a92164894922ab0eb996f6 GIT binary patch literal 756 zcmeAS@N?(olHy`uVBq!ia0y~yU`POA4mJh`hDS5XEf^S>c6+)whE&XXd)GEk#8IH_ z;npYG1uQ{K>l}Pqc5tVh`w*+6l(f#l;gq1okwfiQf>xUb$6mf{dR6HCWSxp!&a1EI zU!AhNa*yKC@BQ-cs%p;sYyZ=K>O(7o`093jmK_1sHHrsZx3%fB>^N}mLo36ka z+t;_>9{pEgmL#0x`osLs{<`{~CG}r_R(@XH(0jwBw8iL8k~Wj{Mux5hiTSqS?g`3b z9?sj8{`~oP`cDOu&j#^@<~523RB~C)e`sY8p2~6WAvdF1FiY5^lYKg=90EtA8yOmH z1UUqHY7aaDx%?!@1P}WKoB}7JZWT|CGsw<7?_0(E?*6=Y{O{+-{Eo}cJnvQ1&=xOO zEm-CK`&%x{3ys6;|L3_{6v=vUBxJP5@2?GGVUjR;@`8iqMMs|l1H1O2NS1=GE{B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Hq57uh!Wq8`R+eD(GyEIpaX-1*mH5JkV_o8knvU=jpIahMeA@Eu zYulP7axD`tEm}D1hTyHAHT+yn%lM`R$7OjjP7t-;bVoY(noenlLj&`MBYj)?oKlZv zp8j@Z{~mz_3^p4VPh9+>rmMWY?p@IP-Fw&Aou8yC#l++A#5d1Tfqjx&yVuntnNxK+ zChiasVq#%fB&n%=?p%7L!j#UVsw}H@O&2P(Fe=rk>BzJ>X 0){ @@ -182,6 +183,10 @@ public class RtsAI{ if(debug){ Vars.ui.showLabel("Defend, dst = " + (int)(best.dst(ax, ay)), 8f, best.x, best.y); } + + if(best instanceof CoreBuild){ + defendingCore = true; + } } } @@ -241,7 +246,9 @@ public class RtsAI{ } //assign a flag, so it will be "mobilized" more easily later - unit.flag = 1; + if(!defendingCore){ + unit.flag = 1; + } } } } diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index 8e1601dc6d..77bf3237fb 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -73,7 +73,7 @@ public class Blocks{ melter, separator, disassembler, sporePress, pulverizer, incinerator, coalCentrifuge, //crafting - erekir - siliconArcFurnace, electrolyzer, oxidationChamber, atmosphericConcentrator, electricHeater, slagHeater, phaseHeater, heatRedirector, slagIncinerator, + siliconArcFurnace, electrolyzer, oxidationChamber, atmosphericConcentrator, electricHeater, slagHeater, phaseHeater, heatRedirector, heatRouter, slagIncinerator, carbideCrucible, slagCentrifuge, surgeCrucible, cyanogenSynthesizer, phaseSynthesizer, heatReactor, //sandbox @@ -1316,6 +1316,17 @@ public class Blocks{ regionRotated1 = 1; }}; + heatRouter = new HeatConductor("heat-router"){{ + requirements(Category.crafting, with(Items.tungsten, 10, Items.graphite, 10)); + + researchCostMultiplier = 10f; + + size = 3; + drawer = new DrawMulti(new DrawDefault(), new DrawHeatOutput(-1, false), new DrawHeatOutput(), new DrawHeatOutput(1, false), new DrawHeatInput("-heat")); + regionRotated1 = 1; + splitHeat = true; + }}; + slagIncinerator = new ItemIncinerator("slag-incinerator"){{ requirements(Category.crafting, with(Items.tungsten, 15)); size = 1; diff --git a/core/src/mindustry/content/ErekirTechTree.java b/core/src/mindustry/content/ErekirTechTree.java index c257b8ddb7..33537fb4b1 100644 --- a/core/src/mindustry/content/ErekirTechTree.java +++ b/core/src/mindustry/content/ErekirTechTree.java @@ -220,6 +220,10 @@ public class ErekirTechTree{ }); }); }); + + node(heatRouter, () -> { + + }); }); }); }); diff --git a/core/src/mindustry/entities/comp/BuildingComp.java b/core/src/mindustry/entities/comp/BuildingComp.java index 3072313adc..81396d5f7f 100644 --- a/core/src/mindustry/entities/comp/BuildingComp.java +++ b/core/src/mindustry/entities/comp/BuildingComp.java @@ -351,7 +351,6 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc, return calculateHeat(sideHeat, null); } - //TODO can cameFrom be an IntSet? public float calculateHeat(float[] sideHeat, @Nullable IntSet cameFrom){ Arrays.fill(sideHeat, 0f); if(cameFrom != null) cameFrom.clear(); @@ -360,22 +359,31 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc, for(var edge : block.getEdges()){ Building build = nearby(edge.x, edge.y); - if(build != null && build.team == team && build instanceof HeatBlock heater && (!build.block.rotate || (relativeTo(build) + 2) % 4 == build.rotation)){ //TODO hacky + if(build != null && build.team == team && build instanceof HeatBlock heater){ - //if there's a cycle, ignore its heat - if(!(build instanceof HeatConductorBuild hc && hc.cameFrom.contains(id()))){ - //heat is distributed across building size - float add = heater.heat() / build.block.size; + boolean split = build.block instanceof HeatConductor cond && cond.splitHeat; + // non-routers must face us, routers must face away - next to a redirector, they're forced to face away due to cycles anyway + if(!build.block.rotate || (!split && (relativeTo(build) + 2) % 4 == build.rotation) || (split && relativeTo(build) != build.rotation)){ //TODO hacky - sideHeat[Mathf.mod(relativeTo(build), 4)] += add; - heat += add; - } + //if there's a cycle, ignore its heat + if(!(build instanceof HeatConductorBuild hc && hc.cameFrom.contains(id()))){ + //heat is distributed across building size + float add = heater.heat() / build.block.size; + if(split){ + //heat routers split heat across 3 surfaces + add /= 3f; + } - //register traversed cycles - if(cameFrom != null){ - cameFrom.add(build.id); - if(build instanceof HeatConductorBuild hc){ - cameFrom.addAll(hc.cameFrom); + sideHeat[Mathf.mod(relativeTo(build), 4)] += add; + heat += add; + } + + //register traversed cycles + if(cameFrom != null){ + cameFrom.add(build.id); + if(build instanceof HeatConductorBuild hc){ + cameFrom.addAll(hc.cameFrom); + } } } } diff --git a/core/src/mindustry/world/blocks/heat/HeatConductor.java b/core/src/mindustry/world/blocks/heat/HeatConductor.java index a343b05b74..d039beba58 100644 --- a/core/src/mindustry/world/blocks/heat/HeatConductor.java +++ b/core/src/mindustry/world/blocks/heat/HeatConductor.java @@ -14,6 +14,7 @@ import mindustry.world.draw.*; public class HeatConductor extends Block{ public float visualMaxHeat = 15f; public DrawBlock drawer = new DrawDefault(); + public boolean splitHeat = false; public HeatConductor(String name){ super(name); @@ -90,7 +91,7 @@ public class HeatConductor extends Block{ @Override public float heatFrac(){ - return heat / visualMaxHeat; + return (heat / visualMaxHeat) / (splitHeat ? 3f : 1); } } } diff --git a/core/src/mindustry/world/draw/DrawHeatOutput.java b/core/src/mindustry/world/draw/DrawHeatOutput.java index 9f1077c837..031e9d9941 100644 --- a/core/src/mindustry/world/draw/DrawHeatOutput.java +++ b/core/src/mindustry/world/draw/DrawHeatOutput.java @@ -17,17 +17,28 @@ public class DrawHeatOutput extends DrawBlock{ public Color heatColor = new Color(1f, 0.22f, 0.22f, 0.8f); public float heatPulse = 0.3f, heatPulseScl = 10f, glowMult = 1.2f; + public int rotOffset = 0; + public boolean drawGlow = true; + + public DrawHeatOutput(){} + + public DrawHeatOutput(int rotOffset, boolean drawGlow){ + this.rotOffset = rotOffset; + this.drawGlow = drawGlow; + } + @Override public void draw(Building build){ - Draw.rect(build.rotation > 1 ? top2 : top1, build.x, build.y, build.rotdeg()); + float rotdeg = (build.rotation + rotOffset) * 90; + Draw.rect(Mathf.mod((build.rotation + rotOffset), 4) > 1 ? top2 : top1, build.x, build.y, rotdeg); if(build instanceof HeatBlock heater && heater.heat() > 0){ Draw.z(Layer.blockAdditive); Draw.blend(Blending.additive); Draw.color(heatColor, heater.heatFrac() * (heatColor.a * (1f - heatPulse + Mathf.absin(heatPulseScl, heatPulse)))); - if(heat.found()) Draw.rect(heat, build.x, build.y, build.rotdeg()); + if(heat.found()) Draw.rect(heat, build.x, build.y, rotdeg); Draw.color(Draw.getColor().mul(glowMult)); - if(glow.found()) Draw.rect(glow, build.x, build.y); + if(drawGlow && glow.found()) Draw.rect(glow, build.x, build.y); Draw.blend(); Draw.color(); } @@ -35,7 +46,7 @@ public class DrawHeatOutput extends DrawBlock{ @Override public void drawPlan(Block block, BuildPlan plan, Eachable list){ - Draw.rect(plan.rotation > 1 ? top2 : top1, plan.drawx(), plan.drawy(), plan.rotation * 90); + Draw.rect(Mathf.mod((plan.rotation + rotOffset), 4) > 1 ? top2 : top1, plan.drawx(), plan.drawy(), (plan.rotation + rotOffset) * 90); } @Override @@ -48,4 +59,4 @@ public class DrawHeatOutput extends DrawBlock{ //TODO currently no icons due to concerns with rotation -} +} \ No newline at end of file