From bc0b9e9eb3b6caa60ec34e82c301128e4ef041f6 Mon Sep 17 00:00:00 2001 From: Anuken Date: Mon, 25 Oct 2021 20:51:45 -0400 Subject: [PATCH] plasma bore --- .../sprites/blocks/drills/beam-drill-top.png | Bin 451 -> 0 bytes .../sprites/blocks/drills/beam-drill.png | Bin 687 -> 0 bytes .../sprites/blocks/drills/plasma-bore-top.png | Bin 0 -> 450 bytes .../sprites/blocks/drills/plasma-bore.png | Bin 0 -> 1153 bytes core/assets/icons/icons.properties | 1 + core/assets/logicids.dat | Bin 2926 -> 2927 bytes core/src/mindustry/content/Blocks.java | 8 ++++---- .../world/blocks/production/BeamDrill.java | 16 +++++++++++----- 8 files changed, 16 insertions(+), 9 deletions(-) delete mode 100644 core/assets-raw/sprites/blocks/drills/beam-drill-top.png delete mode 100644 core/assets-raw/sprites/blocks/drills/beam-drill.png create mode 100644 core/assets-raw/sprites/blocks/drills/plasma-bore-top.png create mode 100644 core/assets-raw/sprites/blocks/drills/plasma-bore.png diff --git a/core/assets-raw/sprites/blocks/drills/beam-drill-top.png b/core/assets-raw/sprites/blocks/drills/beam-drill-top.png deleted file mode 100644 index fcc4ecbced8cb4da8a8693ca1de1c418f5bbaac1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 451 zcmV;!0X+VRP)Px$eMv+?RCt{2n#&EsFbsxM#1ag_4shWL8zDA=D;L;-AsC~aB2`uroTh%%@pnWh zvj5mg>^cO;aU91n!}z(5HUA%|43S{!{II{Fd^00JYUeQ`m=K^8_WwlKEN>1kwK)%2 zy#OV;PJyluL9FxUXgv=c>!c#Y^er$YmmXaRP&ymT3-Iq?G%Wz;Rxm99hVBK}QZ9af zzF8h7m(yYP%a1GqxSVf=L;$VMr)q@7QvmDydG|uE`S>1Z+Y`wZNNk57bhyT;8nIH8 zszVk5q5~2lh_}R`;hZ91`U0c^q40Mp=R;tK z0BA6$^J>cBXt>1At7(WxhJEqdVbjVPxQn4&ISd_7J&Z^qprt;igtaZMRRjoWM`#Tq zsCfuU;Q~k-K#6!ctO4~lau$kPLJ0xX7fUd{nTE=8UFn$fH=?GEM tddIIm1tMLK%SU`%Hu!7LaU92~;Rnk2vNVTJrZ4~i002ovPDHLkV1kw!zaRhr diff --git a/core/assets-raw/sprites/blocks/drills/beam-drill.png b/core/assets-raw/sprites/blocks/drills/beam-drill.png deleted file mode 100644 index 040474476fd9c9be06336ae2ca2fb9bdb96305ae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 687 zcmV;g0#N;lP)8R1vg`UdbIWQJc^^9R6!up|7c+7|#?gpd2X?x5F; z9#ZWPfDuCbTN^tNq?)j<5P%*66xo5G3GYGZ0#F26Boo0B-ijas0K#ajMDT>SAcO$S zHdCGvwXWe;Kr^zoKp0Rj0zte9TEg$@17;Dr+n^`>u1;_U;R4|8`bu?kk;3ozEuckc z+34C193B8h2rw@TVN^$h0J-Se4jdi>^bqLWzXZ@jz?ta!4jhOAPy{+xLePFMXYV(o z+B6THI|Kj(E_@FmI=mNw%i;o{UlR#oRd_2x`*?=}Xb@J1*CN2Z!wk?uaxbJ?<<9UU z1bp-4a?qRVfy2WD`eNEB?GE2Vpt}c`f$l5^4v#0`3vk`y?(h_W+djGV)9v+FE6iOa z;s?{JA@vX3+Qn9wo6yF81>n|O00mG01yBG5Pyhu`00mG01yBG5PyqEnq#lXYL(zIH zUI!x~M`KwCmZSMF04Tg0!E!X;=7#|E7LbjgIhA%DkJFELFT4jq>K`mas-ZcW?*Uvi zLKMLIZtMcU2-2D<0NV+|#k?QM72zXyAOH|sVM}|P6+Ws5;kw1?f0WD$-$R%QF9LWF zR)?nuv*CvT7KE(u)^$nYRREe|T*Colw1Cl&uAK%TA*>8PgMil^0>B|;g!dqD>ka|H z2$|t62-3Pk0NU6QUW1@{^FjbJJHY7L6u||s3n8i|MsNdUBShB%geib5gjF>f!WV8G V#eC(iPl*5k002ovPDHLkV1kxAB*Fjy diff --git a/core/assets-raw/sprites/blocks/drills/plasma-bore-top.png b/core/assets-raw/sprites/blocks/drills/plasma-bore-top.png new file mode 100644 index 0000000000000000000000000000000000000000..c0bd11535689ac8b5822f744096c4a37f476db42 GIT binary patch literal 450 zcmV;z0X_bSP)Px$d`Uz>RCt{2n#&EsFbsx6#S+|EhYdJajL|Vr&uqXt+}Q#+MM74RI!*nkPx(J4r-ARCt{2o4slqK@^3LH;$Wa`DO0Y>Eua3N$HT&9qYnQvZ>$;jFhz4EsdQq+yyD)F6MfJc@004O)xH8YFSp-5L{;+}I z+B~OrUI?r5KhdBI05Dw>&dx{LeYK14xfg^&O+4d?8uH#Kn;5U8452&eH? zrp^MuG<+yRUDW}gJ?fB8gFv|uIJHa=WKVLv07#lwy&$oD)cN;EYixwzS~>_SF9O2K ztB>!K&jBx=CjOQ0wF~p9@t@vqW;RD($s3HdxQBUq?zH)Iuf{G#0i}6Bc_fr=-nOQI zWjd7s1_0pUQ=(Q9geuH0`mm_Y{g#Veu@)PKw#Jp37vjue^PNPZS}hK66dq^?QxF=P z`|L@Jih@9yuU*_`_Ae^Q=4>IjG%uurU^1^77XWHgTnIkQ3&{|;=F{T?>aaFJFkTlN zXzg;>+PwT)qXP=U|1QpV5&qvo&sqZT-GFZ`0r+mfx0V2WH{e@K0KOaWtt9~84fxg) zfbRx;YYD)21HNSha2j8^=%W&GV!l9?3JFo>r{P?gD7n_G*(akj3c{?}*GFR}^FrFd z#DTccyb6LCuM9`I=7oGfu#M(r2$^tnF({l{n-_8kA#XH4JzUqv<0f&=cNY-Kj^6vG_Ufqh{nW*MBZmObT|;ojLpi3=4DTr za8#a%yR?;pP(@}~Ml^pE9_Zt7S;iG1#KctwrbVK8-HH)%wKzv|11{3yJkdP0T!!q} z27=3|ycP$gm$*qtHm+Isd6NpS5~G%)m9e&fszJ>i z4Z5r!g0YWV6@;qIb84x2kb5;jusU(&!miA7YRbK+-Y5#fqn+Ko6PrdRlNm!@Q6Tq0q0!sE^Xqa9;h#VdQ`M6sN;qRNydq TEpAv)00000NkvXXu0mjf4lyWB literal 0 HcmV?d00001 diff --git a/core/assets/icons/icons.properties b/core/assets/icons/icons.properties index bec00ed84d..ffe341fdc9 100755 --- a/core/assets/icons/icons.properties +++ b/core/assets/icons/icons.properties @@ -408,3 +408,4 @@ 63300=scuttler|unit-scuttler-ui 63299=breach|block-breach-ui 63298=core-bastion|block-core-bastion-ui +63297=plasma-bore|block-plasma-bore-ui diff --git a/core/assets/logicids.dat b/core/assets/logicids.dat index 0a7a8904db7860cdf4d65ca69352fdeebf39491b..adb153965d62d6bf558091fdb25e28914a6b4f4b 100644 GIT binary patch delta 25 gcmaDS_FinmKMo%5f}F(S+(g}^{G!y&oSdml0EwvyRsaA1 delta 24 fcmaDa_D*cWKMroLq}0S*-ISutoSe;EoT*FzeYptR diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index 5843eeaaad..225d96c73b 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -81,7 +81,7 @@ public class Blocks implements ContentList{ //production mechanicalDrill, pneumaticDrill, laserDrill, blastDrill, waterExtractor, oilExtractor, cultivator, - cliffCrusher, beamDrill, + cliffCrusher, plasmaBore, //storage coreShard, coreFoundation, coreNucleus, vault, container, unloader, @@ -1603,12 +1603,12 @@ public class Blocks implements ContentList{ output = Items.sand; }}; - beamDrill = new BeamDrill("beam-drill"){{ - requirements(Category.production, with(Items.copper, 10)); + plasmaBore = new BeamDrill("plasma-bore"){{ + requirements(Category.production, with(Items.graphite, 20, Items.beryllium, 10, Items.lead, 20)); consumes.power(0.2f); tier = 4; size = 2; - range = 4; + range = 2; }}; //endregion diff --git a/core/src/mindustry/world/blocks/production/BeamDrill.java b/core/src/mindustry/world/blocks/production/BeamDrill.java index 238028e8ed..73af805a08 100644 --- a/core/src/mindustry/world/blocks/production/BeamDrill.java +++ b/core/src/mindustry/world/blocks/production/BeamDrill.java @@ -23,6 +23,7 @@ public class BeamDrill extends Block{ public @Load("drill-laser") TextureRegion laser; public @Load("drill-laser-end") TextureRegion laserEnd; + public @Load("drill-laser-center") TextureRegion laserCenter; public @Load("@-top") TextureRegion topRegion; public float drillTime = 200f; @@ -33,7 +34,7 @@ public class BeamDrill extends Block{ public Color sparkColor = Color.valueOf("fd9e81"), glowColor = Color.white; public float glowIntensity = 0.2f, pulseIntensity = 0.07f; public float glowScl = 3f; - public int sparks = 11; + public int sparks = 8; public float sparkRange = 10f, sparkLife = 27f, sparkRecurrence = 4f, sparkSpread = 45f, sparkSize = 3.5f; public BeamDrill(String name){ @@ -189,12 +190,11 @@ public class BeamDrill extends Block{ super.updateTile(); if(lasers[0] == null) updateLasers(); - boolean cons = shouldConsume(); warmup = Mathf.approachDelta(warmup, Mathf.num(consValid()), 1f / 60f); lastItem = null; boolean multiple = false; - int dx = Geometry.d4x(rotation), dy = Geometry.d4y(rotation), ddx = Geometry.d4x(rotation + 1), ddy = Geometry.d4y(rotation + 1); + int dx = Geometry.d4x(rotation), dy = Geometry.d4y(rotation); //update facing tiles for(int p = 0; p < size; p++){ @@ -262,13 +262,19 @@ public class BeamDrill extends Block{ Point2 p = lasers[i]; float lx = face.worldx() - (dir.x/2f)*tilesize, ly = face.worldy() - (dir.y/2f)*tilesize; + float width = (laserWidth + Mathf.absin(Time.time + i*5 + id*9, glowScl, pulseIntensity)) * warmup; + Draw.z(Layer.power - 1); Draw.mixcol(glowColor, Mathf.absin(Time.time + i*5 + id*9, glowScl, glowIntensity)); - Drawf.laser(team, laser, laserEnd, + if(Math.abs(p.x - face.x) + Math.abs(p.y - face.y) == 0){ + Draw.rect(laserCenter, lx, ly, width * laserCenter.width * Draw.scl, width * laserCenter.height * Draw.scl); + }else{ + Drawf.laser(team, laser, laserEnd, (p.x - dir.x/2f) * tilesize, (p.y - dir.y/2f) * tilesize, lx, ly, - (laserWidth + Mathf.absin(Time.time + i*5 + id*9, glowScl, pulseIntensity)) * warmup); + width); + } Draw.mixcol(); Draw.z(Layer.effect);