From ef617b7fd22d5f98b9d6fc82ee08da09da0b488f Mon Sep 17 00:00:00 2001 From: Anuken Date: Tue, 8 Sep 2020 15:46:24 -0400 Subject: [PATCH] New base parts --- core/assets/baseparts/1599594352859.msch | Bin 0 -> 389 bytes core/assets/baseparts/752911659508695080.msch | 2 + core/assets/baseparts/752912199781056583.msch | Bin 0 -> 242 bytes core/assets/baseparts/752912460620496957.msch | Bin 0 -> 194 bytes core/assets/baseparts/752915237476368385.msch | Bin 0 -> 321 bytes core/assets/baseparts/752915746673131550.msch | Bin 0 -> 229 bytes core/assets/baseparts/752918895291007041.msch | Bin 0 -> 177 bytes core/assets/baseparts/752918896331456582.msch | Bin 0 -> 207 bytes core/assets/baseparts/752919619894902997.msch | Bin 0 -> 102 bytes core/assets/baseparts/752921320802746461.msch | Bin 0 -> 401 bytes core/assets/baseparts/752923816967012442.msch | 1 + core/assets/baseparts/752926963076694047.msch | Bin 0 -> 523 bytes core/assets/baseparts/752927009641857205.msch | Bin 0 -> 327 bytes core/assets/baseparts/752930133874049034.msch | Bin 0 -> 150 bytes core/assets/baseparts/752930845685448825.msch | 4 ++ core/assets/baseparts/752932257538506823.msch | Bin 0 -> 227 bytes core/assets/baseparts/752937073991745554.msch | 1 + core/assets/baseparts/752937145978716332.msch | Bin 0 -> 165 bytes core/assets/baseparts/752937230456193185.msch | 1 + core/assets/baseparts/752939992300388483.msch | 1 + core/assets/baseparts/752941306489077823.msch | 1 + core/assets/baseparts/752942460573057196.msch | Bin 0 -> 511 bytes core/assets/baseparts/752944648628076745.msch | 2 + core/assets/baseparts/752955880965799966.msch | Bin 0 -> 1033 bytes core/assets/baseparts/752961534690328648.msch | Bin 0 -> 376 bytes core/assets/baseparts/752961607314702336.msch | Bin 0 -> 472 bytes core/assets/baseparts/752965444419453010.msch | Bin 0 -> 406 bytes core/assets/baseparts/752967201597947924.msch | Bin 0 -> 229 bytes .../maps/generators/BaseGenerator.java | 38 ++++++++++++++---- core/src/mindustry/world/Tile.java | 2 +- 30 files changed, 45 insertions(+), 8 deletions(-) create mode 100644 core/assets/baseparts/1599594352859.msch create mode 100644 core/assets/baseparts/752911659508695080.msch create mode 100644 core/assets/baseparts/752912199781056583.msch create mode 100644 core/assets/baseparts/752912460620496957.msch create mode 100644 core/assets/baseparts/752915237476368385.msch create mode 100644 core/assets/baseparts/752915746673131550.msch create mode 100644 core/assets/baseparts/752918895291007041.msch create mode 100644 core/assets/baseparts/752918896331456582.msch create mode 100644 core/assets/baseparts/752919619894902997.msch create mode 100644 core/assets/baseparts/752921320802746461.msch create mode 100644 core/assets/baseparts/752923816967012442.msch create mode 100644 core/assets/baseparts/752926963076694047.msch create mode 100644 core/assets/baseparts/752927009641857205.msch create mode 100644 core/assets/baseparts/752930133874049034.msch create mode 100644 core/assets/baseparts/752930845685448825.msch create mode 100644 core/assets/baseparts/752932257538506823.msch create mode 100644 core/assets/baseparts/752937073991745554.msch create mode 100644 core/assets/baseparts/752937145978716332.msch create mode 100644 core/assets/baseparts/752937230456193185.msch create mode 100644 core/assets/baseparts/752939992300388483.msch create mode 100644 core/assets/baseparts/752941306489077823.msch create mode 100644 core/assets/baseparts/752942460573057196.msch create mode 100644 core/assets/baseparts/752944648628076745.msch create mode 100644 core/assets/baseparts/752955880965799966.msch create mode 100644 core/assets/baseparts/752961534690328648.msch create mode 100644 core/assets/baseparts/752961607314702336.msch create mode 100644 core/assets/baseparts/752965444419453010.msch create mode 100644 core/assets/baseparts/752967201597947924.msch diff --git a/core/assets/baseparts/1599594352859.msch b/core/assets/baseparts/1599594352859.msch new file mode 100644 index 0000000000000000000000000000000000000000..3b73103fa919529c3ad9b5d9d95ea8791b3f67ca GIT binary patch literal 389 zcmc~TPR?Mgn4>x&F|XNxr!~I8p&@A3TbVyMdCR77Eb8kN5@C9KE-rI!Z|j52YoDhl z?|Hmv!r5=n7F5gMdCpoXF+H`YqC0uZ=N)%<-8;Yg_g6;Wj_dDUrHSV(*|PWc3#aFD zhBxMMpWWoUI{EL0-idSmxG~L`pZo6di}acwcUu*EcE6tXp#ILq)NPfY$`l@^ek?bd z^Y_87lWnV=k9wEB-pBQCC z@^8XK2W3VHNp2JIU?d=69u<_F_vQ7^U)8n~FRhNRx8Z0LTfbwg zQtDAR(c49L8WwfMcm#D<_X_WPy=2*n#E+diL2hannqnOGAMloXD;Js<-b6Rc#gPbN5e$M(y-E9iCaZuvf&Hn`=e=(!1fd0J*oo AZU6uP literal 0 HcmV?d00001 diff --git a/core/assets/baseparts/752911659508695080.msch b/core/assets/baseparts/752911659508695080.msch new file mode 100644 index 0000000000..9f1e10578e --- /dev/null +++ b/core/assets/baseparts/752911659508695080.msch @@ -0,0 +1,2 @@ +mschxE}r@ ŵ|.0%޺Llpא4iz47C[eaZ==iedxN>|Z5N20}N^cm!֬%;Mgq8~0vv`K~K7rq%KW`;}K2e5~H}%p%w^ z{!?6}`$?|b={m;8qW>)v3Yy2+zGF&3pYU_r2ir8m3iq#{@~lAnXLk$34~8Gn7r3P4 z_DJfbMnqj+!2IOd0+a0uXSgPxH7v=!w>YwLPqJZ?b;Q9{?K*C@)5~+b<+FcL zLeJBA>F*C1@-05}+J7BuhOYX-RgxBmH{6&$cfQPRk^R;lmlIL~nYlODXBL}H2LQAg Ba(4g# literal 0 HcmV?d00001 diff --git a/core/assets/baseparts/752912460620496957.msch b/core/assets/baseparts/752912460620496957.msch new file mode 100644 index 0000000000000000000000000000000000000000..755717909692915727284d3ca0be2a8046ebdd26 GIT binary patch literal 194 zcmc~TPR?Mgn4{X~%hzNe&>COQ*x4z~|A28vYqj{i1uK(P8YhVueEfFKp!?bD*)^BL z=MT$ z6Q-mzAju5+gr9(N1`#*qBWewHN>PV?4oAhEx+GZH-%kRzOB6bm(e6dAsYZB C>{`(P literal 0 HcmV?d00001 diff --git a/core/assets/baseparts/752915237476368385.msch b/core/assets/baseparts/752915237476368385.msch new file mode 100644 index 0000000000000000000000000000000000000000..cfff6b7269851653801f80f03bbf174d243a18b8 GIT binary patch literal 321 zcmc~TPR?Mgm}5FIFt6D_z~#D`#j(5s3y-{s|5v$pbgWiVRS@jBa=ZNa<(dV{H>!yeL^&9<*d7ioF z-udmNyY8#{Mpw?6e|le^tINJG!uo6+E-XD;l6supuX&`vr`6H?s^WY6Oor25t5wCc zoGdledEd|4{^~=|ukNi~w=Q_43B6t0pSAwbqJ!DpjH|krceis-xN+T^clN}ir#S`r zY920V7rPvq>}`rbB|f7lq5o!agYe-GoD$SHwQJ96x+y z(wWrjAvcz^Zt{@Hj&POLDq6vjz4G+6kHR)j^;wLmM7(C`E+}=9PE4S&A$d>8LReD;M zW*E&&m*#&V>cg}8K}g!k^?~;;ZGSR-%e?Pv&uH$Ou9GPHVaKU2f{$!kkH&x6qf-#v z6<_2n>3`Y&-FhL__MqK|EvG2`Z2P!*?H9vXmhZ(AujXf-4>r9$Z~Y_hZbqBy?5+D> z-SXeKFkyCv+N@k(7vt9+WhHG(6f-@f(xxq0`r7lGO7$e$&5chk%xQZZcs-_lciEcG oWhGOpP9?C+vEy6uc=@7jRiWuQvDQx3LfZtlN`2(E)v@{s07sK=iU0rr literal 0 HcmV?d00001 diff --git a/core/assets/baseparts/752918895291007041.msch b/core/assets/baseparts/752918895291007041.msch new file mode 100644 index 0000000000000000000000000000000000000000..54f4b360c80879c73b08293afa105bec5175899a GIT binary patch literal 177 zcmc~TPR?Mgn4{|Rmg|rK&z`y*SsuY7*Ixv4{0cuJu3_Bc7_0hvMt{DM@CnuO>CO)6 z51xNfoAcVGMpyg(X}3QW_w-sGrr@Uh0%67I7)gLQlCmbY5$ zt2hWpw|Cydg=dy44>%9~I^tlrq4WE9u literal 0 HcmV?d00001 diff --git a/core/assets/baseparts/752921320802746461.msch b/core/assets/baseparts/752921320802746461.msch new file mode 100644 index 0000000000000000000000000000000000000000..e0333bb5116cd136ca86071c13460141ca5f18ae GIT binary patch literal 401 zcmc~TPR?MgnBzO)Zr&UNf!2P*hvq4pPZs}B(x3QcQFv(lfk+t_775A8zH+vqqE%@t zuOywE|NQ+Ko{WM34|Qv+J4f%ey6HHEUGN}G%k0Zxho>`zS=*E5vgJo-O*_-G?Rk#HoRxw-)%^$K zo~=u(UzYr7t@B-X^I5I4=Vj<&?-`o9q@9t^ueA3jk zc4=w)AN5*!Vo{XPg7ujnFAD55nKb#%hpYwJ%Pwn5Z9Nm|aktTT@}e7cZ=?U)ZgSc7 z_ujs3=ihpZ1^q6VqLsQJTC$GӔqJq៩\KYZך .{~[:d9Sje+Wx DѻhwU-Y-:Gt:)h.28XoDtE6ϚT:A\8`#` \ No newline at end of file diff --git a/core/assets/baseparts/752926963076694047.msch b/core/assets/baseparts/752926963076694047.msch new file mode 100644 index 0000000000000000000000000000000000000000..6e2629672939712dd0206c89a855859549630003 GIT binary patch literal 523 zcmc~TPR?MgnByB5op;+nAm&wKAphyIS!}Ks`{NwaU)cU~Kb`ZyNsKqD?ABy)52h8y zON5Rz?Ad+z=FF!-`#cw`NS{6F_51YfI-|qiH&<`^cRcFV;}rk9M`LUAQ_BmRKi<9B zQ}$wlZPd>vdDrCsd`#QDxqN@Fy`}zF_IWw;&ZN|)|M!{l>}8$7^p(z+4Nm0k`t`SP z%iYDYYt3!$OVt8w<(ZahT|SuaUD;*pH5Un9d9>}Bti&Oa?3MRE z&N?zpiNPzStH5Y2HMk9-~3pj!uBs#<=)Y=tC=FTR=J!=YS4Dn)r@?|7_==kXZLg) mhBIM`+E0wd4{vyMg1>Mf{~Dv8O`Eq&T)$)YivQgT`4a&s{Q{Bz literal 0 HcmV?d00001 diff --git a/core/assets/baseparts/752927009641857205.msch b/core/assets/baseparts/752927009641857205.msch new file mode 100644 index 0000000000000000000000000000000000000000..7943fb1481c7cafd2a8641d09c62af8e14de0de6 GIT binary patch literal 327 zcmc~TPR?MgnByCen|D}&r;Oe^D1-ZMf)tPr!1fILqcWbe+24-}4dvmC&>)ZRS(gi^ab+bkv{nOU>?Hq_fh# zDV+KG&A+KU=jMH#8Z&$G)zfR5B(5cfwWaYafkckLYWKU3l7{mFV}+=3dAD zXW>aJOrm}*_RRma$8+h)@I`LtE;xkzF?R7&n6bLU+u=^vn=9dGYYn$7xR#Zd@4IeV n`pb8dOTVAAn%8r4%LG$>m3v7~rmCEs@?h#$ng7iB-07SEvv6DQ$A|N#5|E&$E_EP+@VDlWBFx&Fzc`b4{PfCEY;ibwjKHxg+(rLOYEBBl*MkYcsxJMnlW9cv+=u5 zw@&ku+TUwGmHl7&{Q2h}7W2ODk-7fXXVV|n>$kUEUwvl#jy1nOhTeWySaov+$HDgNa8FJVO*Kd1g_m0?}~Ky;5&UsL!8u6Yk7=S{r- mBDbO~{fT*%^}NfsKhC+=_xwwlP5-@*Z*R@s!!W^DQ5^s}v~^AZ literal 0 HcmV?d00001 diff --git a/core/assets/baseparts/752937073991745554.msch b/core/assets/baseparts/752937073991745554.msch new file mode 100644 index 0000000000..fe8d7ccc9c --- /dev/null +++ b/core/assets/baseparts/752937073991745554.msch @@ -0,0 +1 @@ +mschx-k )[SPHI$mBw5L70_"=Zc¶g+-1\RhA9Q)R˴oG #Eģ$8AжIhN8 p5\r;K % \ No newline at end of file diff --git a/core/assets/baseparts/752937145978716332.msch b/core/assets/baseparts/752937145978716332.msch new file mode 100644 index 0000000000000000000000000000000000000000..c3b5dbb923f4f6eb83dfbcb9a6287cb3623ab933 GIT binary patch literal 165 zcmc~TPR?Mgn4{Z!k?XJmkL!A~DDUqZp8svu|E*kjh%1-%Hs81J-e*{BPwq7rWZca7 zHdA|ttmWMFOv9x=N;r1DoBwGo@AtJ&%5P1dbL~gg>0L>G+#g2oZTVa@O;_$~)=q|s z53US6$%hnN1x~KYaNV*7aVag2YL;w))QlbC= literal 0 HcmV?d00001 diff --git a/core/assets/baseparts/752937230456193185.msch b/core/assets/baseparts/752937230456193185.msch new file mode 100644 index 0000000000..558a0a3c63 --- /dev/null +++ b/core/assets/baseparts/752937230456193185.msch @@ -0,0 +1 @@ +mschxMI0 "qh,8ϯӃǣYlL˜OX5G<,*1!xi%Wإ9+pMY8}b)avA-S%/7ރo­r m;s &.^' \ No newline at end of file diff --git a/core/assets/baseparts/752939992300388483.msch b/core/assets/baseparts/752939992300388483.msch new file mode 100644 index 0000000000..6d4d56c904 --- /dev/null +++ b/core/assets/baseparts/752939992300388483.msch @@ -0,0 +1 @@ +mschx= n0E} !]UMJn×@_~瑁)K(5jouz?ڭ2f?}+oulQq&O:=>n6WeL]3 Gonq_jv5,+}$>!I*%!#a«xیx͜v"K4%t =Lg\H(1v=CϡKL/W+4+`z zf v\b{==}9H|XF'Fψ+GAxt/t#?1"V9 \ No newline at end of file diff --git a/core/assets/baseparts/752941306489077823.msch b/core/assets/baseparts/752941306489077823.msch new file mode 100644 index 0000000000..d98f3b2a11 --- /dev/null +++ b/core/assets/baseparts/752941306489077823.msch @@ -0,0 +1 @@ +mschx-K0 D'Ю]ElB@D_!cW|$N㺜,c]w63ϋ‘LĂvHao6JBA׆5ЊN[Ua- xۇo]& \ No newline at end of file diff --git a/core/assets/baseparts/752942460573057196.msch b/core/assets/baseparts/752942460573057196.msch new file mode 100644 index 0000000000000000000000000000000000000000..57b5e83b0a99989af5f54cfd28ec80499f24e908 GIT binary patch literal 511 zcmc~TPR?Mgm}5IRJMXapPmAVBe$SHnFKl}q_?DLPY;i~u_q(*{#%l48MHUBcHMond z>|f$?vU?B9%WGw^OYUv+zJ32$ZhT0acl7hr=~uo*#=V#SzOBw?-SW!l{nO^>ikCjW zoE|;Bo9B9}?d;D#mfwAU`k(US+;0=FoPS$=)Bkmunca!yx2tcTH+plM`P-ie{piC{ z6Zb#z=lKyZNyS6maMqU@;*uJRIdW#sYn^x1cahNKNM+T)IYJ(sOIQLDPM2s-(NeTH z@$bPCAHZ|ugBT!S2C-*^}AkekyQUR!>IO*h&jcL*3+1C z?w802^({Z|(k^?ca?ha+T{hK6&a+AXNRJekX8*W$Q_+X%1yS2rCMvt#bT<&S3eyXo z;C{_?(Ykw+iw%v`xO27aQcbH5o!oa&s3-2w)1dDr#i*`4gAr|md{Uc-0u`J$8uq(_V0C@-fR6{m$X}6q=e^c1zUzlBdM%r@GDT}9lsff#sZaSM)wva(>i0T2r*ux?6uDuv O^ulG0{|vpC@}vQkP5ChZ literal 0 HcmV?d00001 diff --git a/core/assets/baseparts/752944648628076745.msch b/core/assets/baseparts/752944648628076745.msch new file mode 100644 index 0000000000..090ffe0155 --- /dev/null +++ b/core/assets/baseparts/752944648628076745.msch @@ -0,0 +1,2 @@ +mschxMan mMtC`{]:& =zh`WiSOa!w)(A/zcyw6͢`^)HE']j!L7{4Q;6xE?ܡ>L{y_̇Ȗ$ʎj7Cn6ѳ!Ot-G+ĉ o.?d ̏kr/8N4@Ϩd41SqÂc% +ɏM \ No newline at end of file diff --git a/core/assets/baseparts/752955880965799966.msch b/core/assets/baseparts/752955880965799966.msch new file mode 100644 index 0000000000000000000000000000000000000000..4cda9322eaa6db33faa362c3e744c82a0be43bf7 GIT binary patch literal 1033 zcmc~TPR?Mgn3EflT|7HXAa)0nqGF4R%IQA2vR`xMTUF;MIxhIMVRrr1`O}weduds2 z`_gB5^MjbO^ZUe4rtd6G2}zwEbL{Ko;JB?n^M&@O#NJ!-Q$BX`++DjSZg@Lezw*{q zeakqx(`(*dDh{5qRA=3krJ=RwE*mj>PSU;_8Tw`Vmyq!DKg%sVUOnH_c(iz4-0WZ3 zd3%3N-{T_lao*;AZ&Y-4{h73_^!}V8&eM;+@3UB5@Wr=jpVsR)JXs}gPn#{jUmRaz zl=(UPT1v^bH(meP=FaUl%f9{RQ^X;Ye;2#zTF{MpLLS0q zK2Ci!+39Z6&7YG3%)??GJ}`9dP?m64@hLQDS?Q#a)^og_@2Q{|mvE!(Qe&Bt38W#*n`>y1@0W!n7DJt^9im-%kA3@!^N7g<9Rm2-RiqRHKf9b24hpl7-mSA>?bN;3W=Qw$TsD#2BV$Y0 ze(9c55)JY_8*TH;>^JD%ke_bd(&nU>+4-%BcSIv^yJmb9$l#N%`q$3?G9Z`XTYwvM^>r7zl5LYsx_ z+I`s@Vr%wWzdk?R-$GIJP}GLn@-N#b+a4Epd~NvNU&z41u2c4U7t^-u2?KRpH7OP0ANK;4APzyXyE0_TPUx zEpO?cI`>WVyS3JxOtI>-N$Vrun0D_yd&oTGe28qPCBuZHf*VA>%Qe(_))}{)kxT8(lxy*Wc1l1_1wJ B?#loG literal 0 HcmV?d00001 diff --git a/core/assets/baseparts/752961534690328648.msch b/core/assets/baseparts/752961534690328648.msch new file mode 100644 index 0000000000000000000000000000000000000000..15dbc9618c0cdd72e3f5a1a09ea4bdd22a538f6e GIT binary patch literal 376 zcmc~TPR?MgnBzM!JFnS5pk?~@%GPIWdl|mJj8`v=)-pIDpnClM8uh7NBJ~G%8~=9j z`!vnt-P=b??q548|K9xj%Rld=UiQ5=_4%G!bE9%v(YAlDn&yZ-&wng-O}^arn!@43 za(X@QDp{oU&!jQ4eA9gXSWa(p`Qz!I^&)uZeJ|aXcxO%d=Z^Y#zgwqsz9;W#Uvf4G*7cZ&tN(m740{bwHK5 z$Ww%O(E;tv>V925%2C`xZ#PbHNmL2k->0eWGEroH3@ht|>@>gEfAmuytSP({v|ek$ zq$3Z6(z@n#T;=BSvfWaavpvK=^lK0Aof!hm;^O=zE3dgNH!rlzIJv?2@Hrk<)2CbG zR2}AQd$wikuO}c{!?g6GGILTo?|tcITcTno3ayyOw6t#HwE3%A(|f+Mltif=ZR2XO kUbp{oko6knMT${MR$qF)-rBfGi6>C_!e6GV7wzr=0A~udEC2ui literal 0 HcmV?d00001 diff --git a/core/assets/baseparts/752961607314702336.msch b/core/assets/baseparts/752961607314702336.msch new file mode 100644 index 0000000000000000000000000000000000000000..f7ea7664dbeee317cafeb691371ad0aaac99e82a GIT binary patch literal 472 zcmc~TPR?MgnBy84J!!UqfQ-Pj%8Ejv=O1TtPq03zuzQM7htQ$8=N>;#f8DfO&Gyh# z)+chkQMR_pw=U`}%n8`LEGuiT)c*c=tNxnbiVwZ8@8bD`tIaI@OJC=|OG&@{^;u-K zmhwi)nB^-o?g~tioKROJ{?`9m>}+F}jQTIjtY5RWbnkOqHsi~RJxNDvV>9d z{4DdizDz!F)5j{^nuMe0W_Rbgy{~&UR%|odEzpk zK|$Uk&8WQfw`Kn;V}@t@8MG4g_+q*vpIW8odDXC{s9X>@xhLY?Y3bbuyedCbyswD2 jIP~xRCnu*5zFVRhx#oFxiU$AJt=;)M^Z zCUc(pJS>l&lD=(hWys`Z0%?shSzGgR92OeCI z=aYETYRzK)nEl_c{k>k1{(R#7wLc9aN?5Niu{--aL(l5?tMmUl_9X`CmcL&A)%VSY zd~GF7t~XUmjf@*v473*{p7*;Fa$%ke^Og_H>^qNpy|xzOTB91#WO_Zl^l$HH>GX?& zLK}|f9%x+AEZfL@VN=AW8;4t>tykTMW%g}TDP);opm3>pV;37+|DzUGSy6}CM|H0i z_%QW~yzZ*I_LaX})q=&I`Pk)eQU_H({IXtfq`$*=#ioGppWHicsCjT$vfAEduDHfr Sa3X1b;TZ{!8ip&zoz?&gF3L&( literal 0 HcmV?d00001 diff --git a/core/assets/baseparts/752967201597947924.msch b/core/assets/baseparts/752967201597947924.msch new file mode 100644 index 0000000000000000000000000000000000000000..76607f758f2e94b4518943ac82345cf88172a25f GIT binary patch literal 229 zcmc~TPR?Mgm}A=4o7Ze0&^*_k>7?0L*9-GFFM2pL2Q5v#dao{h9kc5EGjnr4H0C_` zo~bP{FZGw)diTBMJ91M0&H9!)@7l*((@I_Ap$`JZcS>c3w^*~%?d zJpZ*!JGaI!iNWrv0+ZW4y$3ZsY=;&-PQ57H*O2hw>Cxo959Y8QI$g#8nuR$hK_h+Q z<`4PrRPS6$O ores = new ObjectMap<>(); + private ObjectMap oreFloors = new ObjectMap<>(); private Seq cores; public void generate(Tiles tiles, Seq cores, Tile spawn, Team team, Sector sector){ @@ -41,6 +42,8 @@ public class BaseGenerator{ for(Block block : content.blocks()){ if(block instanceof OreBlock && block.asFloor().itemDrop != null){ ores.put(block.asFloor().itemDrop, (OreBlock)block); + }else if(block.isFloor() && block.asFloor().itemDrop != null && !oreFloors.containsKey(block.asFloor().itemDrop)){ + oreFloors.put(block.asFloor().itemDrop, block.asFloor()); } } @@ -73,7 +76,8 @@ public class BaseGenerator{ pass(tile -> { if(!tile.block().alwaysReplace) return; - if((tile.drop() != null || (tile.floor().liquidDrop != null && Mathf.chance(nonResourceChance * 2))) && Mathf.chance(resourceChance)){ + if(((tile.overlay().asFloor().itemDrop != null || (tile.drop() != null && Mathf.chance(nonResourceChance))) + || (tile.floor().liquidDrop != null && Mathf.chance(nonResourceChance * 2))) && Mathf.chance(resourceChance)){ Seq parts = bases.forResource(tile.drop() != null ? tile.drop() : tile.floor().liquidDrop); if(!parts.isEmpty()){ tryPlace(parts.random(), tile.x, tile.y); @@ -94,10 +98,6 @@ public class BaseGenerator{ //small walls pass(tile -> { - //no walls around cores - if(cores.contains(t -> t.within(tile, (3 + 4) * tilesize))){ - return; - } if(tile.block().alwaysReplace){ boolean any = false; @@ -175,19 +175,20 @@ public class BaseGenerator{ } if(part.required instanceof Item){ + Item item = (Item)part.required; for(Stile tile : result.tiles){ if(tile.block instanceof Drill){ tile.block.iterateTaken(tile.x + cx, tile.y + cy, (ex, ey) -> { if(!tiles.getn(ex, ey).floor().isLiquid){ - tiles.getn(ex, ey).setOverlay(ores.get((Item)part.required)); + set(tiles.getn(ex, ey), item); } Tile rand = tiles.getc(ex + Mathf.range(1), ey + Mathf.range(1)); if(!rand.floor().isLiquid){ //random ores nearby to make it look more natural - rand.setOverlay(ores.get((Item)part.required)); + set(rand, item); } }); } @@ -196,9 +197,32 @@ public class BaseGenerator{ Schematics.place(result, cx + result.width/2, cy + result.height/2, team); + //fill drills with items after placing + if(part.required instanceof Item){ + Item item = (Item)part.required; + for(Stile tile : result.tiles){ + if(tile.block instanceof Drill){ + + Building build = world.tile(tile.x + cx, tile.y + cy).build; + + if(build != null){ + build.items.add(item, build.block.itemCapacity); + } + } + } + } + return true; } + void set(Tile tile, Item item){ + if(ores.containsKey(item)){ + tile.setOverlay(ores.get(item)); + }else if(oreFloors.containsKey(item)){ + tile.setFloor(oreFloors.get(item)); + } + } + boolean isTaken(Block block, int x, int y){ int offsetx = -(block.size - 1) / 2; int offsety = -(block.size - 1) / 2; diff --git a/core/src/mindustry/world/Tile.java b/core/src/mindustry/world/Tile.java index 482724699a..268888a45e 100644 --- a/core/src/mindustry/world/Tile.java +++ b/core/src/mindustry/world/Tile.java @@ -326,7 +326,7 @@ public class Tile implements Position, QuadTreeObject, Displayable{ setOverlay(content.block(ore)); } - public void setOverlay(Block block){ + public void setOverlay(@NonNull Block block){ this.overlay = (Floor)block; recache();