From 54d90633e71a53c782ae3b1a9abc4e6099c7bd37 Mon Sep 17 00:00:00 2001 From: Anuken Date: Mon, 11 Apr 2022 09:42:16 -0400 Subject: [PATCH] Armored duct + Balancing --- .../distribution/ducts/armored-duct-top-0.png | Bin 0 -> 751 bytes .../distribution/ducts/armored-duct-top-1.png | Bin 0 -> 449 bytes .../distribution/ducts/armored-duct-top-2.png | Bin 0 -> 468 bytes .../distribution/ducts/armored-duct-top-3.png | Bin 0 -> 633 bytes .../distribution/ducts/armored-duct-top-4.png | Bin 0 -> 426 bytes core/assets/icons/icons.properties | 1 + core/assets/logicids.dat | Bin 4278 -> 4292 bytes core/src/mindustry/content/Blocks.java | 38 +++++++++++++++--- .../src/mindustry/content/ErekirTechTree.java | 6 ++- core/src/mindustry/entities/Damage.java | 2 +- .../mindustry/world/blocks/defense/Radar.java | 2 +- .../world/blocks/distribution/Duct.java | 15 ++++++- 12 files changed, 53 insertions(+), 11 deletions(-) create mode 100644 core/assets-raw/sprites/blocks/distribution/ducts/armored-duct-top-0.png create mode 100644 core/assets-raw/sprites/blocks/distribution/ducts/armored-duct-top-1.png create mode 100644 core/assets-raw/sprites/blocks/distribution/ducts/armored-duct-top-2.png create mode 100644 core/assets-raw/sprites/blocks/distribution/ducts/armored-duct-top-3.png create mode 100644 core/assets-raw/sprites/blocks/distribution/ducts/armored-duct-top-4.png diff --git a/core/assets-raw/sprites/blocks/distribution/ducts/armored-duct-top-0.png b/core/assets-raw/sprites/blocks/distribution/ducts/armored-duct-top-0.png new file mode 100644 index 0000000000000000000000000000000000000000..2de29f2ee5aa1380693f7f1e0d42538b535e8cad GIT binary patch literal 751 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANNft(nfw0iMpz3I#>^X_+~x z3=A3*YbV-z91aj^^$+e|B%Y64Z+U(7g zp7Xs^d5y;EBhQZ{tHni_+tJ!Zd) zUTci1L6Ob^Cf-f2+5b1+-@NtHWZ}3V3%-^(ndiwYFYd5PnI8XXS2pJur$7zcx-ZlA z2eGHwd9L5O<%Qsd?YuED+f7pWcidrQo6mD|O01@b_lf6?-;IAQ(=jOEE?Hk$oIUUH z7eOFRqY=vA3b82;=t5cuO0AdB1_yN zv)gmo`mg<7oj+sA@xLB%yC>W@BFZkux`I`ZWd-9xzvtcN>@l)!ijq&v`d-9bVV>ff z#C32oqnG0b1}}#d=db%Uu44`GIxCj7_F_!nK6wG#_-|$@{4G5#50a8v7qGBcvoBGc zwQei>GIL%g<7Hc~DW0gytdEvkAYrb!!Lm>NhT?>_42BBz?~Y5_m>CwFG@Peo{(O@Y z!-W41sf-?b`c5(g`4gL()TPwSZ(CvcU#r3w=7e6?OZ10 zCB9szL1?O>UD_Q63!}j%S7i{5bVPIfj@O1Ta JS?83{1ON->NUZ<> literal 0 HcmV?d00001 diff --git a/core/assets-raw/sprites/blocks/distribution/ducts/armored-duct-top-1.png b/core/assets-raw/sprites/blocks/distribution/ducts/armored-duct-top-1.png new file mode 100644 index 0000000000000000000000000000000000000000..24700e6f14450d17becbcf69aa77a5786435a0fa GIT binary patch literal 449 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}jKx9jP7LeL$-HD>V666Z zaSVxQeLLOOkJ(V5b$+-d3wwi6I)m#XPFB{583MejK~tLAvdl$!gBUs|v0YRM3$hhESBUU@9;?5d9kC$=qpJ9pvTBX@llzu9(e?Zbdo zSKnq>Wk(6`v$K!-JGIZh}ceizT}t?}8~w^Cx6*X|{+zShFtq=Ojfd#-cN( zlh@yNJ?pfALCE^Kg4<(T_Ct&lxUAU=ckF-d!1LzVi!X6!?z9DD-&}9r>&xObDC>_4~{Xmdpl-t zW{`35yLf2sT7?GQz)N?y8P?>xdwy1M&~jO0$?%6ESFPpz$9>ahFfcGMc)I$ztaD0e F0sz_4x(omS literal 0 HcmV?d00001 diff --git a/core/assets-raw/sprites/blocks/distribution/ducts/armored-duct-top-2.png b/core/assets-raw/sprites/blocks/distribution/ducts/armored-duct-top-2.png new file mode 100644 index 0000000000000000000000000000000000000000..a28ab6d617ffbe6b56fb8c9b09bf62b83c5967e4 GIT binary patch literal 468 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}jKx9jP7LeL$-HD>VC?gB zaSVxQJvz-^~=t3yhrm;?m1NM!~t$(^P&@kOS_#0Fc(6N(y{I~t{>mSpU7 zXc6J;TGHUG;1#@J!Ji75+pk-$t0tfSZDYLgP+0nNCZSgG@0+eioswI><@&i8m6xYj z=CRD+a^f^#W!b%N@8ok1;nO{nct1^8mXfo9$;z{BNz-*U3GPE22|OI%zTTB%tmiX0 zR>j>a@MMj_O*W@|`L`ywL<457c+i$|rO8mCC;fnF%k%TM_3zn#RnRb2Yzc6D_kQdA zXweIX`Az|blf5LiA24lUpD{OvE%7!V!-ao!p__IpztWA~df?igm1`Md?(|(_Shp@s zn<4z!oZ>fsrdJBEFz{$UIJHMJx54mC<2n1p9agCqiyZZy&EZ$;S(H(bzpe7`=P$Fm zH!bgFxX^sTFs#$)J>wODi$#jMnKH-Sj@?~XdX_PXE$`aO2j}$}Wai$xKXn#!L-~dp13uyy4u{;83ysqAN~0&1$%np)}RJOcv*gQu&X%Q~loCIC-k#{vKV literal 0 HcmV?d00001 diff --git a/core/assets-raw/sprites/blocks/distribution/ducts/armored-duct-top-3.png b/core/assets-raw/sprites/blocks/distribution/ducts/armored-duct-top-3.png new file mode 100644 index 0000000000000000000000000000000000000000..52f1b8b392f3d784befb8157fa0a61dc8725020e GIT binary patch literal 633 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}jKx9jP7LeL$-HD>U^4b} zaSVxQJsNK9&*UgD&vvB_&(^t}Q$!@*`k0hCFm{$)xF~GpRQ&v+M19NL60w|xB`jIJ zhPPI7&Nbb*phTz7HckF}6Z8HjlWyNU{{8KlxA%Cor|JuG@D*3yYI$={U->nVoQZTUxeWOR2Q!{j`-&N)l!*$PUu; zHod?pzV!2tXubpgHXino7Mdez`i$xFa?a+TK3&!8uXn4+@UR8#4r1K#l39BiFjpOVVo_rkh9}c+ASp=7nYAlTxTh%@c(J=aJhd#&BcRh(x11Ngf@OVuh!)ux`HoO zo5k~_Z-lpl)b_`xm@e&_6)rSE%<_56InM2_e#KpLb0>>)v94U(s?edVyFI(u)r;+c z>V&yfUsPT>b!|v#Jtx^4U+Z_0`KZwY-+I$e8|<>|EmnKX`@-6>U`+9J zaSVxQJv!aC?~s8&>-@#GTvO&WhN?(yTd-jH!WhoCybaO{DyMQS7)4oKr&tFZicRBw z^5(`z`NB6goSg~$?@#m0Jec%vtBOJIG2yz-$BF7cOeb!Vb<#Mkn_E}rb>MSh_%-hI z5~i2tGh`jwE2JBi-pZu{*u0>|to2p_uDQRHZ0oyga*BJu*e%NK*L)(_hri9CwADEZ>nf-1%i)9*}w z-hKBxJD0)oOsl{%`NXW^eQT#S%9Nj5%CJP@xXYD2C9!#5>p5ed*-aMsSWp?ZV%=A5 zX1mW3GtVsTQasz(;CAI{ecQ@sYQ+i(Vl7kRX5Bo;Yxep1<9nxd4EFIGva?x9e-bVV iYB;^NY!>qYdBgmzobNT;=Q1!bFnGH9xvX Math.max(Mathf.slope(v), 0.8f); shrinkX = 0.2f; shrinkY = 0.1f; + buildingDamageMultiplier = 0.25f; }} ); diff --git a/core/src/mindustry/content/ErekirTechTree.java b/core/src/mindustry/content/ErekirTechTree.java index 2d05ba32a0..4d76f7bdb8 100644 --- a/core/src/mindustry/content/ErekirTechTree.java +++ b/core/src/mindustry/content/ErekirTechTree.java @@ -73,8 +73,10 @@ public class ErekirTechTree{ node(duct, erekirSector, () -> { node(ductRouter, () -> { node(ductBridge, () -> { - node(surgeConveyor, () -> { - node(surgeRouter); + node(armoredDuct, () -> { + node(surgeConveyor, () -> { + node(surgeRouter); + }); }); node(unitCargoLoader, () -> { diff --git a/core/src/mindustry/entities/Damage.java b/core/src/mindustry/entities/Damage.java index 7ee218222f..c2ca7c1b15 100644 --- a/core/src/mindustry/entities/Damage.java +++ b/core/src/mindustry/entities/Damage.java @@ -462,7 +462,7 @@ public class Damage{ if(ground){ if(!complete){ - tileDamage(team, World.toTile(x), World.toTile(y), radius / tilesize, damage, source); + tileDamage(team, World.toTile(x), World.toTile(y), radius / tilesize, damage * (source == null ? 1f : source.type.buildingDamageMultiplier), source); }else{ completeDamage(team, x, y, radius, damage); } diff --git a/core/src/mindustry/world/blocks/defense/Radar.java b/core/src/mindustry/world/blocks/defense/Radar.java index ed92b8a057..624b93053f 100644 --- a/core/src/mindustry/world/blocks/defense/Radar.java +++ b/core/src/mindustry/world/blocks/defense/Radar.java @@ -15,7 +15,7 @@ import mindustry.world.meta.*; import static mindustry.Vars.*; public class Radar extends Block{ - public float discoveryTime = 60f * 7f; + public float discoveryTime = 60f * 10f; public float rotateSpeed = 2f; public @Load("@-base") TextureRegion baseRegion; diff --git a/core/src/mindustry/world/blocks/distribution/Duct.java b/core/src/mindustry/world/blocks/distribution/Duct.java index 73272b78c2..d84340de68 100644 --- a/core/src/mindustry/world/blocks/distribution/Duct.java +++ b/core/src/mindustry/world/blocks/distribution/Duct.java @@ -22,6 +22,7 @@ import static mindustry.Vars.*; public class Duct extends Block implements Autotiler{ public float speed = 5f; + public boolean armored = false; public @Load(value = "@-top-#", length = 5) TextureRegion[] topRegions; public @Load(value = "@-bottom-#", length = 5, fallback = "duct-bottom-#") TextureRegion[] botRegions; @@ -74,7 +75,12 @@ public class Duct extends Block implements Autotiler{ @Override public boolean blends(Tile tile, int rotation, int otherx, int othery, int otherrot, Block otherblock){ - return (otherblock.outputsItems() && blendsArmored(tile, rotation, otherx, othery, otherrot, otherblock)) || (lookingAt(tile, rotation, otherx, othery, otherblock) && otherblock.hasItems); + if(!armored){ + return (otherblock.outputsItems() || (lookingAt(tile, rotation, otherx, othery, otherblock) && otherblock.hasItems)) + && lookingAtEither(tile, rotation, otherx, othery, otherrot, otherblock); + }else{ + return (otherblock.outputsItems() && blendsArmored(tile, rotation, otherx, othery, otherrot, otherblock)) || (lookingAt(tile, rotation, otherx, othery, otherblock) && otherblock.hasItems); + } } @Override @@ -162,7 +168,12 @@ public class Duct extends Block implements Autotiler{ @Override public boolean acceptItem(Building source, Item item){ return current == null && items.total() == 0 && - ((source.block.rotate && source.front() == this && source.block.hasItems) || Edges.getFacingEdge(source.tile(), tile).relativeTo(tile) == rotation); + (armored ? + //armored acceptance + ((source.block.rotate && source.front() == this && source.block.hasItems) || Edges.getFacingEdge(source.tile(), tile).relativeTo(tile) == rotation) : + //standard acceptance - do not accept from front + !(source.block.rotate && next == source) && Math.abs(Edges.getFacingEdge(source.tile, tile).relativeTo(tile.x, tile.y) - rotation) != 2 + ); } @Override