From ab56c35cc43971eeb71589e16acc5fbadf3e7fd5 Mon Sep 17 00:00:00 2001 From: sk7725 <58885089+sk7725@users.noreply.github.com> Date: Sun, 17 Jan 2021 16:56:41 +0900 Subject: [PATCH] piston unit behavior --- assets/bundles/bundle.properties | 4 +- assets/bundles/bundle_ko.properties | 4 +- assets/bundles/bundle_ro.properties | 84 +++++++-------- assets/bundles/bundle_ru.properties | 102 +++++++++--------- src/betamindy/util/XeloUtil.java | 46 +++++++- .../world/blocks/distribution/Piston.java | 53 +++++++-- .../world/blocks/power/AccelBlock.java | 2 +- 7 files changed, 185 insertions(+), 110 deletions(-) diff --git a/assets/bundles/bundle.properties b/assets/bundles/bundle.properties index 869f565f..d7fc079b 100644 --- a/assets/bundles/bundle.properties +++ b/assets/bundles/bundle.properties @@ -3,9 +3,9 @@ mod.betamindy.short = [#b59e72]Demo of Chaos Itself[] mod.betamindy.description = My first [accent]Java[] mod, has the same amount of chaotic energy of [cyan]sk7725/Commandblocks[].\n\n[green]Contributors[]: GlennFolker, EyeofDarkness, younggam, Voz-Duh, Rayforce # Pistons -block.betamindy-piston.name = Piston [scarlet](WIP)[] +block.betamindy-piston.name = Piston block.betamindy-piston.description = Can push up to 16 blocks. Cannot push thorium walls. -block.betamindy-piston-sticky.name = Sticky Piston [scarlet](WIP)[] +block.betamindy-piston-sticky.name = Sticky Piston block.betamindy-piston-sticky.description = Can push or pull up to 16 blocks. Cannot push thorium walls. block.betamindy-spore-slime.name = Spore Slime diff --git a/assets/bundles/bundle_ko.properties b/assets/bundles/bundle_ko.properties index 832f108b..9bf3748f 100644 --- a/assets/bundles/bundle_ko.properties +++ b/assets/bundles/bundle_ko.properties @@ -3,9 +3,9 @@ mod.betamindy.short = [#b59e72]\uD63C\uB3C8\uC758 \uB370\uBAA8[] mod.betamindy.description = \uCCAB [accent]Java[] \uBAA8\uB4DC \uC2E0\uC791! [cyan]sk7725/Commandblocks[]\uACFC \uBE44\uACAC\uB420 \uB9CC\uD55C \uD63C\uB3C8!\n\n[green]\uAE30\uC5EC\uC790[]: \uC601\uAC10, \uB808\uC774\uD3EC\uC2A4, GlennFolker, EyeofDarkness, Voz-Duh # Pistons -block.betamindy-piston.name = \uD53C\uC2A4\uD1A4 [scarlet](\uBBF8\uC644\uC131)[] +block.betamindy-piston.name = \uD53C\uC2A4\uD1A4 block.betamindy-piston.description = \uCD5C\uB300 16\uAC1C\uC758 \uBE14\uB85D\uC744 \uBC00 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uD1A0\uB968 \uBCBD\uC740 \uBC00\uC9C0 \uBABB\uD569\uB2C8\uB2E4. -block.betamindy-piston-sticky.name = \uB048\uB048\uC774 \uD53C\uC2A4\uD1A4 [scarlet](\uBBF8\uC644\uC131)[] +block.betamindy-piston-sticky.name = \uB048\uB048\uC774 \uD53C\uC2A4\uD1A4 block.betamindy-piston-sticky.description = \uCD5C\uB300 16\uAC1C\uC758 \uBE14\uB85D\uC744 \uBC00\uAC70\uB098 \uB2F9\uAE38 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uD1A0\uB968 \uBCBD\uC740 \uBC00\uC9C0 \uBABB\uD569\uB2C8\uB2E4. block.betamindy-spore-slime.name = \uD3EC\uC790 \uC2AC\uB77C\uC784 diff --git a/assets/bundles/bundle_ro.properties b/assets/bundles/bundle_ro.properties index 1466e80a..dbfca452 100644 --- a/assets/bundles/bundle_ro.properties +++ b/assets/bundles/bundle_ro.properties @@ -1,67 +1,67 @@ mod.betamindy.name = [accent]Beta[][white]Mindy[] -mod.betamindy.short = [#b59e72]Demo-ul Haosului în Sine[] -mod.betamindy.description = Prima mea modificare în [accent]Java[], are aceeași cantitate de energie haotică ca [cyan]sk7725/Commandblocks[].\n\n[green]Contribuitori[]: GlennFolker, EyeofDarkness, younggam, Voz-Duh, Rayforce +mod.betamindy.short = [#b59e72]Demo-ul Haosului \u00EEn Sine[] +mod.betamindy.description = Prima mea modificare \u00EEn [accent]Java[], are aceea\u0219i cantitate de energie haotic\u0103 ca [cyan]sk7725/Commandblocks[].\n\n[green]Contribuitori[]: GlennFolker, EyeofDarkness, younggam, Voz-Duh, Rayforce # Pistons -block.betamindy-piston.name = Piston [scarlet](WIP)[] -block.betamindy-piston.description = Poate să împingă până la 16 blocuri. Nu poate să împingă ziduri de toriu. -block.betamindy-piston-sticky.name = Piston Lipicios [scarlet](WIP)[] -block.betamindy-piston-sticky.description = Poate să împingă până la 16 blocuri. Nu poate să împingă ziduri de toriu. +block.betamindy-piston.name = Piston +block.betamindy-piston.description = Poate s\u0103 \u00EEmping\u0103 p\u00E2n\u0103 la 16 blocuri. Nu poate s\u0103 \u00EEmping\u0103 ziduri de toriu. +block.betamindy-piston-sticky.name = Piston Lipicios +block.betamindy-piston-sticky.description = Poate s\u0103 \u00EEmping\u0103 p\u00E2n\u0103 la 16 blocuri. Nu poate s\u0103 \u00EEmping\u0103 ziduri de toriu. -block.betamindy-spore-slime.name = Mâzgă de Spori -block.betamindy-spore-slime.description = Se lipește de blocuri adiacente. Nu se lipește de straturi de phază. -block.betamindy-spore-slime.details = Are o aromă de struguri, și este foarte mestecat. -block.betamindy-spore-slime-sided.name = Mâzgă de Spori lateral -block.betamindy-spore-slime-sided.description = Doar o față la ea este lipicioasă. Se lipește de blocuri adiacente. Nu se lipește de straturi de phază. +block.betamindy-spore-slime.name = M\u00E2zg\u0103 de Spori +block.betamindy-spore-slime.description = Se lipe\u0219te de blocuri adiacente. Nu se lipe\u0219te de straturi de phaz\u0103. +block.betamindy-spore-slime.details = Are o arom\u0103 de struguri, \u0219i este foarte mestecat. +block.betamindy-spore-slime-sided.name = M\u00E2zg\u0103 de Spori lateral +block.betamindy-spore-slime-sided.description = Doar o fa\u021B\u0103 la ea este lipicioas\u0103. Se lipe\u0219te de blocuri adiacente. Nu se lipe\u0219te de straturi de phaz\u0103. block.betamindy-accel.name = Accelerator -block.betamindy-accel.description = Generează putere când este mișcat, de obicei de pistoane. +block.betamindy-accel.description = Genereaz\u0103 putere c\u00E2nd este mi\u0219cat, de obicei de pistoane. # Payloads -block.betamindy-payload-cannon.name = Tun de Încărcătură -block.betamindy-payload-cannon.description = Poate să arunce încărcături. Cu cât viața încărcăturii este mai mare, cu atât mai multe blocuri ea traversează, mai multe daune ea face, prin urmare, mai multe daune încărcătura ia. Încărcătura poate fi lansată cu siguranță fără daune în [#98ffa9]raza interioară[]. -block.betamindy-payload-catapult.name = Catapultă de Încărcături -block.betamindy-payload-catapult.description = Poate lansa încărcături mai mari în viteze mai mari. Vești devastatoare pentru inamic. +block.betamindy-payload-cannon.name = Tun de \u00CEnc\u0103rc\u0103tur\u0103 +block.betamindy-payload-cannon.description = Poate s\u0103 arunce \u00EEnc\u0103rc\u0103turi. Cu c\u00E2t via\u021Ba \u00EEnc\u0103rc\u0103turii este mai mare, cu at\u00E2t mai multe blocuri ea traverseaz\u0103, mai multe daune ea face, prin urmare, mai multe daune \u00EEnc\u0103rc\u0103tura ia. \u00CEnc\u0103rc\u0103tura poate fi lansat\u0103 cu siguran\u021B\u0103 f\u0103r\u0103 daune \u00EEn [#98ffa9]raza interioar\u0103[]. +block.betamindy-payload-catapult.name = Catapult\u0103 de \u00CEnc\u0103rc\u0103turi +block.betamindy-payload-catapult.description = Poate lansa \u00EEnc\u0103rc\u0103turi mai mari \u00EEn viteze mai mari. Ve\u0219ti devastatoare pentru inamic. block.betamindy-block-workshop.name = Atelier de Blocuri -block.block-forge.description = Forjează încărcături de blocuri. Folosește cu tunul de încărcătură pentru a plasa de departe blocuri. +block.block-forge.description = Forjeaz\u0103 \u00EEnc\u0103rc\u0103turi de blocuri. Folose\u0219te cu tunul de \u00EEnc\u0103rc\u0103tur\u0103 pentru a plasa de departe blocuri. block.block-forge.details = Blocul interzis, descoperit de BetaMindy(tm). -block.betamindy-block-workshop.description = Forjează blocuri mai mari. Are nevoie de apă pentru a procesa blocuri. -block.betamindy-block-factory.name = Fabrică de Blocuri -block.betamindy-block-factory.description = Forjează blocuri mai mari. Poate fi configurat să forjeze blocuri mai mici de asemenea, spre deosebire de atelierul de blocuri. Are nevoie de răcire pentru a forja blocuri. +block.betamindy-block-workshop.description = Forjeaz\u0103 blocuri mai mari. Are nevoie de ap\u0103 pentru a procesa blocuri. +block.betamindy-block-factory.name = Fabric\u0103 de Blocuri +block.betamindy-block-factory.description = Forjeaz\u0103 blocuri mai mari. Poate fi configurat s\u0103 forjeze blocuri mai mici de asemenea, spre deosebire de atelierul de blocuri. Are nevoie de r\u0103cire pentru a forja blocuri. block.betamindy-block-packer.name = Ambalator de Blocuri -block.block-loader.description = Încarcă inventarurile blocurile-încărcături. -block.betamindy-block-packer.description = O versiune mai mare a încărcătorului de blocuri. Încarcă inventaruriile blocurilor mai mari. +block.block-loader.description = \u00CEncarc\u0103 inventarurile blocurile-\u00EEnc\u0103rc\u0103turi. +block.betamindy-block-packer.description = O versiune mai mare a \u00EEnc\u0103rc\u0103torului de blocuri. \u00CEncarc\u0103 inventaruriile blocurilor mai mari. block.betamindy-block-unpacker.name = Dezpacator de Blocuri -block.block-unloader.description = Descarcă inventarurile blocurilor-încărcături. -block.betamindy-block-unpacker.description = O versiune mai mare a descărcătorului de blocuri. Descarcă inventarurile blocurilor mai mari. +block.block-unloader.description = Descarc\u0103 inventarurile blocurilor-\u00EEnc\u0103rc\u0103turi. +block.betamindy-block-unpacker.description = O versiune mai mare a desc\u0103rc\u0103torului de blocuri. Descarc\u0103 inventarurile blocurilor mai mari. block.betamindy-payload-deconstructor.name = Dezasamblator de Blocuri -block.betamindy-payload-deconstructor.description = Dezsamblează și rambursează o porțiune din resursele clădite. Mai eficient decât să deconstruiești blocul tu. -block.betamindy-payload-destroyer.name = Blender de Încărcătură -block.betamindy-payload-destroyer.description = O versiune mai mare a dezasamblatorului de blocuri. Dezasamblează încărcături mai mari și rambursează o porțiune din resursele clădite. Mai eficient decât să deconstruiești blocul tu. -block.betamindy-payload-eradicator.name = Eradicator de Încărcătură -block.betamindy-payload-eradicator.description = O versiune și mai mare a dezasamblatorului de blocuri. Dezasamblează încărcături și mai mari și rambursează o porțiune din resursele clădite. Mai eficient decăt să deconstruiești blocul tu. +block.betamindy-payload-deconstructor.description = Dezsambleaz\u0103 \u0219i ramburseaz\u0103 o por\u021Biune din resursele cl\u0103dite. Mai eficient dec\u00E2t s\u0103 deconstruie\u0219ti blocul tu. +block.betamindy-payload-destroyer.name = Blender de \u00CEnc\u0103rc\u0103tur\u0103 +block.betamindy-payload-destroyer.description = O versiune mai mare a dezasamblatorului de blocuri. Dezasambleaz\u0103 \u00EEnc\u0103rc\u0103turi mai mari \u0219i ramburseaz\u0103 o por\u021Biune din resursele cl\u0103dite. Mai eficient dec\u00E2t s\u0103 deconstruie\u0219ti blocul tu. +block.betamindy-payload-eradicator.name = Eradicator de \u00CEnc\u0103rc\u0103tur\u0103 +block.betamindy-payload-eradicator.description = O versiune \u0219i mai mare a dezasamblatorului de blocuri. Dezasambleaz\u0103 \u00EEnc\u0103rc\u0103turi \u0219i mai mari \u0219i ramburseaz\u0103 o por\u021Biune din resursele cl\u0103dite. Mai eficient dec\u0103t s\u0103 deconstruie\u0219ti blocul tu. # Environment -block.betamindy-radiation.name = Radiație -block.betamindy-exotic-matter.name = Materie Exotică +block.betamindy-radiation.name = Radia\u021Bie +block.betamindy-exotic-matter.name = Materie Exotic\u0103 block.betamindy-present.name = Cadou -block.betamindy-present.description = Un bloc holly vesel. Apasă ca să desfaci, tu nu vei cunoaște ce este înăuntru! -block.betamindy-present.details = [scarlet]Crăciun[] [lime]fericit[] [scarlet]și un[] [lime]An[] [scarlet]Nou[] [lime]fericit[][scarlet]![] +block.betamindy-present.description = Un bloc holly vesel. Apas\u0103 ca s\u0103 desfaci, tu nu vei cunoa\u0219te ce este \u00EEn\u0103untru! +block.betamindy-present.details = [scarlet]Cr\u0103ciun[] [lime]fericit[] [scarlet]\u0219i un[] [lime]An[] [scarlet]Nou[] [lime]fericit[][scarlet]![] # Effect block.betamindy-silo.name = Siloz -block.betamindy-silo.description = Stochează un număr enorm de itemi din fiecare tip. Conținuturile pot fi recuperate cu un descărcător. +block.betamindy-silo.description = Stocheaz\u0103 un num\u0103r enorm de itemi din fiecare tip. Con\u021Binuturile pot fi recuperate cu un desc\u0103rc\u0103tor. block.betamindy-warehouse.name = Depozit -block.betamindy-warehouse.description = Stochează un număr extraordinar de itemi din fiecare tip. Conținuturile pot fi recuperate cu un descărcător. -block.betamindy-team-wall.name = Bloc de Echipă -block.betamindy-team-wall.description = Când este spart, alertează toată lumea despre atac și ofensator. Folositor pentru teaming sau pentru evidența trădătorilor în PvP, sau doar pentru a alerta o spargere de apărare în supraviețuire. +block.betamindy-warehouse.description = Stocheaz\u0103 un num\u0103r extraordinar de itemi din fiecare tip. Con\u021Binuturile pot fi recuperate cu un desc\u0103rc\u0103tor. +block.betamindy-team-wall.name = Bloc de Echip\u0103 +block.betamindy-team-wall.description = C\u00E2nd este spart, alerteaz\u0103 toat\u0103 lumea despre atac \u0219i ofensator. Folositor pentru teaming sau pentru eviden\u021Ba tr\u0103d\u0103torilor \u00EEn PvP, sau doar pentru a alerta o spargere de ap\u0103rare \u00EEn supravie\u021Buire. # Stats -stat.dphealth = {0}*viața încărcăturii*distanță(blocuri) +stat.dphealth = {0}*via\u021Ba \u00EEnc\u0103rc\u0103turii*distan\u021B\u0103(blocuri) # Settings -setting.slimeeffect.name = Mâzgă animată [lightgray](are nevoie de scuturi animate)[] -setting.correctview.name = Sus-jos încarcătură vedere +setting.slimeeffect.name = M\u00E2zg\u0103 animat\u0103 [lightgray](are nevoie de scuturi animate)[] +setting.correctview.name = Sus-jos \u00EEncarc\u0103tur\u0103 vedere # UI -ui.teamalert = Echipa {0} a fost atacată de echipa {1}! -ui.teamalertsilent = Echipa {0} a fost atacată! +ui.teamalert = Echipa {0} a fost atacat\u0103 de echipa {1}! +ui.teamalertsilent = Echipa {0} a fost atacat\u0103! diff --git a/assets/bundles/bundle_ru.properties b/assets/bundles/bundle_ru.properties index e42227c3..fdba5a09 100644 --- a/assets/bundles/bundle_ru.properties +++ b/assets/bundles/bundle_ru.properties @@ -1,67 +1,67 @@ mod.betamindy.name = [accent]Beta[][white]Mindy[] -mod.betamindy.short = [#b59e72]Демонстрация Самого Хаоса[] -mod.betamindy.description = Моя первая [accent]Java[] модификация, имеет такое же количество хаотической энергии как у и [cyan]sk7725/Commandblocks[].\n\n[green]Участники[]: GlennFolker, EyeofDarkness, younggam, Voz-Duh, Rayforce +mod.betamindy.short = [#b59e72]\u0414\u0435\u043C\u043E\u043D\u0441\u0442\u0440\u0430\u0446\u0438\u044F \u0421\u0430\u043C\u043E\u0433\u043E \u0425\u0430\u043E\u0441\u0430[] +mod.betamindy.description = \u041C\u043E\u044F \u043F\u0435\u0440\u0432\u0430\u044F [accent]Java[] \u043C\u043E\u0434\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F, \u0438\u043C\u0435\u0435\u0442 \u0442\u0430\u043A\u043E\u0435 \u0436\u0435 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u0445\u0430\u043E\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u0439 \u044D\u043D\u0435\u0440\u0433\u0438\u0438 \u043A\u0430\u043A \u0443 \u0438 [cyan]sk7725/Commandblocks[].\n\n[green]\u0423\u0447\u0430\u0441\u0442\u043D\u0438\u043A\u0438[]: GlennFolker, EyeofDarkness, younggam, Voz-Duh, Rayforce # Pistons -block.betamindy-piston.name = Поршень [scarlet](WIP)[] -block.betamindy-piston.description = Может толкать или тянуть до 16 блоков. Не может двишать ториевые стены. -block.betamindy-piston-sticky.name = Липкий поршень [scarlet](WIP)[] -block.betamindy-piston-sticky.description = Может толкать или тянуть до 16 блоков. Не может двигать ториевые стены. +block.betamindy-piston.name = \u041F\u043E\u0440\u0448\u0435\u043D\u044C +block.betamindy-piston.description = \u041C\u043E\u0436\u0435\u0442 \u0442\u043E\u043B\u043A\u0430\u0442\u044C \u0438\u043B\u0438 \u0442\u044F\u043D\u0443\u0442\u044C \u0434\u043E 16 \u0431\u043B\u043E\u043A\u043E\u0432. \u041D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0434\u0432\u0438\u0448\u0430\u0442\u044C \u0442\u043E\u0440\u0438\u0435\u0432\u044B\u0435 \u0441\u0442\u0435\u043D\u044B. +block.betamindy-piston-sticky.name = \u041B\u0438\u043F\u043A\u0438\u0439 \u043F\u043E\u0440\u0448\u0435\u043D\u044C +block.betamindy-piston-sticky.description = \u041C\u043E\u0436\u0435\u0442 \u0442\u043E\u043B\u043A\u0430\u0442\u044C \u0438\u043B\u0438 \u0442\u044F\u043D\u0443\u0442\u044C \u0434\u043E 16 \u0431\u043B\u043E\u043A\u043E\u0432. \u041D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0434\u0432\u0438\u0433\u0430\u0442\u044C \u0442\u043E\u0440\u0438\u0435\u0432\u044B\u0435 \u0441\u0442\u0435\u043D\u044B. -block.betamindy-spore-slime.name = Споровая слизь -block.betamindy-spore-slime.description = Прилипает к соседним блокам. Не прилипает к фазовому покрытию. -block.betamindy-spore-slime.details = Имеет виноградный вкус и очень жевательна. -block.betamindy-spore-slime-sided.name = Односторонняя споровая слизь -block.betamindy-spore-slime-sided.description = Только одна её сторона липкая. Прилипает к соседним блокам. Не прилипает к фазовому покрытию. -block.betamindy-accel.name = Ускоритель -block.betamindy-accel.description = Производит энергию при движении, обычно используется в поршнях. +block.betamindy-spore-slime.name = \u0421\u043F\u043E\u0440\u043E\u0432\u0430\u044F \u0441\u043B\u0438\u0437\u044C +block.betamindy-spore-slime.description = \u041F\u0440\u0438\u043B\u0438\u043F\u0430\u0435\u0442 \u043A \u0441\u043E\u0441\u0435\u0434\u043D\u0438\u043C \u0431\u043B\u043E\u043A\u0430\u043C. \u041D\u0435 \u043F\u0440\u0438\u043B\u0438\u043F\u0430\u0435\u0442 \u043A \u0444\u0430\u0437\u043E\u0432\u043E\u043C\u0443 \u043F\u043E\u043A\u0440\u044B\u0442\u0438\u044E. +block.betamindy-spore-slime.details = \u0418\u043C\u0435\u0435\u0442 \u0432\u0438\u043D\u043E\u0433\u0440\u0430\u0434\u043D\u044B\u0439 \u0432\u043A\u0443\u0441 \u0438 \u043E\u0447\u0435\u043D\u044C \u0436\u0435\u0432\u0430\u0442\u0435\u043B\u044C\u043D\u0430. +block.betamindy-spore-slime-sided.name = \u041E\u0434\u043D\u043E\u0441\u0442\u043E\u0440\u043E\u043D\u043D\u044F\u044F \u0441\u043F\u043E\u0440\u043E\u0432\u0430\u044F \u0441\u043B\u0438\u0437\u044C +block.betamindy-spore-slime-sided.description = \u0422\u043E\u043B\u044C\u043A\u043E \u043E\u0434\u043D\u0430 \u0435\u0451 \u0441\u0442\u043E\u0440\u043E\u043D\u0430 \u043B\u0438\u043F\u043A\u0430\u044F. \u041F\u0440\u0438\u043B\u0438\u043F\u0430\u0435\u0442 \u043A \u0441\u043E\u0441\u0435\u0434\u043D\u0438\u043C \u0431\u043B\u043E\u043A\u0430\u043C. \u041D\u0435 \u043F\u0440\u0438\u043B\u0438\u043F\u0430\u0435\u0442 \u043A \u0444\u0430\u0437\u043E\u0432\u043E\u043C\u0443 \u043F\u043E\u043A\u0440\u044B\u0442\u0438\u044E. +block.betamindy-accel.name = \u0423\u0441\u043A\u043E\u0440\u0438\u0442\u0435\u043B\u044C +block.betamindy-accel.description = \u041F\u0440\u043E\u0438\u0437\u0432\u043E\u0434\u0438\u0442 \u044D\u043D\u0435\u0440\u0433\u0438\u044E \u043F\u0440\u0438 \u0434\u0432\u0438\u0436\u0435\u043D\u0438\u0438, \u043E\u0431\u044B\u0447\u043D\u043E \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F \u0432 \u043F\u043E\u0440\u0448\u043D\u044F\u0445. # Payloads -block.betamindy-payload-cannon.name = Грузовая пушка -block.betamindy-payload-cannon.description = Может запускать грузы. Чем выше здоровье груза и чем больше блоков в грузе, тем больше наносит урона, но тем больше урона получает сам груз. Груз может быть доставлен без повреждений во [#98ffa9]внутреннем диапазоне[]. -block.betamindy-payload-catapult.name = Грузовая катапульта -block.betamindy-payload-catapult.description = Может запускать большие грузы на более высоких скоростях. Разрушительные новости для врага. -block.block-forge.description = Куёт грузы из блоков. Используйте с грузовой пушкой для удалённого размещения вниз блоков. -block.block-forge.details = Скрытый блок, выявленный BetaMindy(tm). -block.betamindy-block-workshop.name = Мастерская блоков -block.betamindy-block-workshop.description = Создает большие блоки. Требует воду для работы. -block.betamindy-block-factory.name = Завод блоков -block.betamindy-block-factory.description = Создает ещё более большие блоки. Может быть сконфигурирован и для создания меньших блоков, в отличие от мастерской блоков. Требует охлаждающую жидкость для работы. -block.betamindy-block-packer.name = Паковщик блоков -block.block-loader.description = Загружает запасы в блоки. -block.betamindy-block-packer.description = Увеличенная версия разгрузчика блоков. Загружает запасы в более крупные блоки. -block.betamindy-block-unpacker.name = Распаковщик блоков -block.block-unloader.description = Выгружает запасы из блоков. -block.betamindy-block-unpacker.description = Увеличенная версия разгрузчика блоков. Выгружает запасы из более крупных блоков. -block.betamindy-payload-deconstructor.name = Разборщик грузов -block.betamindy-payload-deconstructor.description = Разбирает грузы и возвращает часть ресурсов. Гораздо эффективнее, чем самостоятельное разбирание блоков. -block.betamindy-payload-destroyer.name = Блендер грузов -block.betamindy-payload-destroyer.description = Увеличенная версия разборщика грузов. Разбирает большие грузы и возвращает часть ресурсов. Гораздо эффективнее, чем самостоятельное разбирание блоков. -block.betamindy-payload-eradicator.name = Искоренитель грузов -block.betamindy-payload-eradicator.description = Ещё более крупная версия разборщика грузов. Разбирает ещё большие грузы и возвращает часть ресурсов. Гораздо эффективнее, чем самостоятельное разбирание блоков. +block.betamindy-payload-cannon.name = \u0413\u0440\u0443\u0437\u043E\u0432\u0430\u044F \u043F\u0443\u0448\u043A\u0430 +block.betamindy-payload-cannon.description = \u041C\u043E\u0436\u0435\u0442 \u0437\u0430\u043F\u0443\u0441\u043A\u0430\u0442\u044C \u0433\u0440\u0443\u0437\u044B. \u0427\u0435\u043C \u0432\u044B\u0448\u0435 \u0437\u0434\u043E\u0440\u043E\u0432\u044C\u0435 \u0433\u0440\u0443\u0437\u0430 \u0438 \u0447\u0435\u043C \u0431\u043E\u043B\u044C\u0448\u0435 \u0431\u043B\u043E\u043A\u043E\u0432 \u0432 \u0433\u0440\u0443\u0437\u0435, \u0442\u0435\u043C \u0431\u043E\u043B\u044C\u0448\u0435 \u043D\u0430\u043D\u043E\u0441\u0438\u0442 \u0443\u0440\u043E\u043D\u0430, \u043D\u043E \u0442\u0435\u043C \u0431\u043E\u043B\u044C\u0448\u0435 \u0443\u0440\u043E\u043D\u0430 \u043F\u043E\u043B\u0443\u0447\u0430\u0435\u0442 \u0441\u0430\u043C \u0433\u0440\u0443\u0437. \u0413\u0440\u0443\u0437 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u0434\u043E\u0441\u0442\u0430\u0432\u043B\u0435\u043D \u0431\u0435\u0437 \u043F\u043E\u0432\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0439 \u0432\u043E [#98ffa9]\u0432\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u0435\u043C \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D\u0435[]. +block.betamindy-payload-catapult.name = \u0413\u0440\u0443\u0437\u043E\u0432\u0430\u044F \u043A\u0430\u0442\u0430\u043F\u0443\u043B\u044C\u0442\u0430 +block.betamindy-payload-catapult.description = \u041C\u043E\u0436\u0435\u0442 \u0437\u0430\u043F\u0443\u0441\u043A\u0430\u0442\u044C \u0431\u043E\u043B\u044C\u0448\u0438\u0435 \u0433\u0440\u0443\u0437\u044B \u043D\u0430 \u0431\u043E\u043B\u0435\u0435 \u0432\u044B\u0441\u043E\u043A\u0438\u0445 \u0441\u043A\u043E\u0440\u043E\u0441\u0442\u044F\u0445. \u0420\u0430\u0437\u0440\u0443\u0448\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u043D\u043E\u0432\u043E\u0441\u0442\u0438 \u0434\u043B\u044F \u0432\u0440\u0430\u0433\u0430. +block.block-forge.description = \u041A\u0443\u0451\u0442 \u0433\u0440\u0443\u0437\u044B \u0438\u0437 \u0431\u043B\u043E\u043A\u043E\u0432. \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u0441 \u0433\u0440\u0443\u0437\u043E\u0432\u043E\u0439 \u043F\u0443\u0448\u043A\u043E\u0439 \u0434\u043B\u044F \u0443\u0434\u0430\u043B\u0451\u043D\u043D\u043E\u0433\u043E \u0440\u0430\u0437\u043C\u0435\u0449\u0435\u043D\u0438\u044F \u0432\u043D\u0438\u0437 \u0431\u043B\u043E\u043A\u043E\u0432. +block.block-forge.details = \u0421\u043A\u0440\u044B\u0442\u044B\u0439 \u0431\u043B\u043E\u043A, \u0432\u044B\u044F\u0432\u043B\u0435\u043D\u043D\u044B\u0439 BetaMindy(tm). +block.betamindy-block-workshop.name = \u041C\u0430\u0441\u0442\u0435\u0440\u0441\u043A\u0430\u044F \u0431\u043B\u043E\u043A\u043E\u0432 +block.betamindy-block-workshop.description = \u0421\u043E\u0437\u0434\u0430\u0435\u0442 \u0431\u043E\u043B\u044C\u0448\u0438\u0435 \u0431\u043B\u043E\u043A\u0438. \u0422\u0440\u0435\u0431\u0443\u0435\u0442 \u0432\u043E\u0434\u0443 \u0434\u043B\u044F \u0440\u0430\u0431\u043E\u0442\u044B. +block.betamindy-block-factory.name = \u0417\u0430\u0432\u043E\u0434 \u0431\u043B\u043E\u043A\u043E\u0432 +block.betamindy-block-factory.description = \u0421\u043E\u0437\u0434\u0430\u0435\u0442 \u0435\u0449\u0451 \u0431\u043E\u043B\u0435\u0435 \u0431\u043E\u043B\u044C\u0448\u0438\u0435 \u0431\u043B\u043E\u043A\u0438. \u041C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u0441\u043A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043E\u0432\u0430\u043D \u0438 \u0434\u043B\u044F \u0441\u043E\u0437\u0434\u0430\u043D\u0438\u044F \u043C\u0435\u043D\u044C\u0448\u0438\u0445 \u0431\u043B\u043E\u043A\u043E\u0432, \u0432 \u043E\u0442\u043B\u0438\u0447\u0438\u0435 \u043E\u0442 \u043C\u0430\u0441\u0442\u0435\u0440\u0441\u043A\u043E\u0439 \u0431\u043B\u043E\u043A\u043E\u0432. \u0422\u0440\u0435\u0431\u0443\u0435\u0442 \u043E\u0445\u043B\u0430\u0436\u0434\u0430\u044E\u0449\u0443\u044E \u0436\u0438\u0434\u043A\u043E\u0441\u0442\u044C \u0434\u043B\u044F \u0440\u0430\u0431\u043E\u0442\u044B. +block.betamindy-block-packer.name = \u041F\u0430\u043A\u043E\u0432\u0449\u0438\u043A \u0431\u043B\u043E\u043A\u043E\u0432 +block.block-loader.description = \u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0437\u0430\u043F\u0430\u0441\u044B \u0432 \u0431\u043B\u043E\u043A\u0438. +block.betamindy-block-packer.description = \u0423\u0432\u0435\u043B\u0438\u0447\u0435\u043D\u043D\u0430\u044F \u0432\u0435\u0440\u0441\u0438\u044F \u0440\u0430\u0437\u0433\u0440\u0443\u0437\u0447\u0438\u043A\u0430 \u0431\u043B\u043E\u043A\u043E\u0432. \u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0437\u0430\u043F\u0430\u0441\u044B \u0432 \u0431\u043E\u043B\u0435\u0435 \u043A\u0440\u0443\u043F\u043D\u044B\u0435 \u0431\u043B\u043E\u043A\u0438. +block.betamindy-block-unpacker.name = \u0420\u0430\u0441\u043F\u0430\u043A\u043E\u0432\u0449\u0438\u043A \u0431\u043B\u043E\u043A\u043E\u0432 +block.block-unloader.description = \u0412\u044B\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0437\u0430\u043F\u0430\u0441\u044B \u0438\u0437 \u0431\u043B\u043E\u043A\u043E\u0432. +block.betamindy-block-unpacker.description = \u0423\u0432\u0435\u043B\u0438\u0447\u0435\u043D\u043D\u0430\u044F \u0432\u0435\u0440\u0441\u0438\u044F \u0440\u0430\u0437\u0433\u0440\u0443\u0437\u0447\u0438\u043A\u0430 \u0431\u043B\u043E\u043A\u043E\u0432. \u0412\u044B\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0437\u0430\u043F\u0430\u0441\u044B \u0438\u0437 \u0431\u043E\u043B\u0435\u0435 \u043A\u0440\u0443\u043F\u043D\u044B\u0445 \u0431\u043B\u043E\u043A\u043E\u0432. +block.betamindy-payload-deconstructor.name = \u0420\u0430\u0437\u0431\u043E\u0440\u0449\u0438\u043A \u0433\u0440\u0443\u0437\u043E\u0432 +block.betamindy-payload-deconstructor.description = \u0420\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u0442 \u0433\u0440\u0443\u0437\u044B \u0438 \u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0447\u0430\u0441\u0442\u044C \u0440\u0435\u0441\u0443\u0440\u0441\u043E\u0432. \u0413\u043E\u0440\u0430\u0437\u0434\u043E \u044D\u0444\u0444\u0435\u043A\u0442\u0438\u0432\u043D\u0435\u0435, \u0447\u0435\u043C \u0441\u0430\u043C\u043E\u0441\u0442\u043E\u044F\u0442\u0435\u043B\u044C\u043D\u043E\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u043D\u0438\u0435 \u0431\u043B\u043E\u043A\u043E\u0432. +block.betamindy-payload-destroyer.name = \u0411\u043B\u0435\u043D\u0434\u0435\u0440 \u0433\u0440\u0443\u0437\u043E\u0432 +block.betamindy-payload-destroyer.description = \u0423\u0432\u0435\u043B\u0438\u0447\u0435\u043D\u043D\u0430\u044F \u0432\u0435\u0440\u0441\u0438\u044F \u0440\u0430\u0437\u0431\u043E\u0440\u0449\u0438\u043A\u0430 \u0433\u0440\u0443\u0437\u043E\u0432. \u0420\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u0442 \u0431\u043E\u043B\u044C\u0448\u0438\u0435 \u0433\u0440\u0443\u0437\u044B \u0438 \u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0447\u0430\u0441\u0442\u044C \u0440\u0435\u0441\u0443\u0440\u0441\u043E\u0432. \u0413\u043E\u0440\u0430\u0437\u0434\u043E \u044D\u0444\u0444\u0435\u043A\u0442\u0438\u0432\u043D\u0435\u0435, \u0447\u0435\u043C \u0441\u0430\u043C\u043E\u0441\u0442\u043E\u044F\u0442\u0435\u043B\u044C\u043D\u043E\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u043D\u0438\u0435 \u0431\u043B\u043E\u043A\u043E\u0432. +block.betamindy-payload-eradicator.name = \u0418\u0441\u043A\u043E\u0440\u0435\u043D\u0438\u0442\u0435\u043B\u044C \u0433\u0440\u0443\u0437\u043E\u0432 +block.betamindy-payload-eradicator.description = \u0415\u0449\u0451 \u0431\u043E\u043B\u0435\u0435 \u043A\u0440\u0443\u043F\u043D\u0430\u044F \u0432\u0435\u0440\u0441\u0438\u044F \u0440\u0430\u0437\u0431\u043E\u0440\u0449\u0438\u043A\u0430 \u0433\u0440\u0443\u0437\u043E\u0432. \u0420\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u0442 \u0435\u0449\u0451 \u0431\u043E\u043B\u044C\u0448\u0438\u0435 \u0433\u0440\u0443\u0437\u044B \u0438 \u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0447\u0430\u0441\u0442\u044C \u0440\u0435\u0441\u0443\u0440\u0441\u043E\u0432. \u0413\u043E\u0440\u0430\u0437\u0434\u043E \u044D\u0444\u0444\u0435\u043A\u0442\u0438\u0432\u043D\u0435\u0435, \u0447\u0435\u043C \u0441\u0430\u043C\u043E\u0441\u0442\u043E\u044F\u0442\u0435\u043B\u044C\u043D\u043E\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u043D\u0438\u0435 \u0431\u043B\u043E\u043A\u043E\u0432. # Environment -block.betamindy-radiation.name = Радиация -block.betamindy-exotic-matter.name = Экзотическая материя -block.betamindy-present.name = Подарок -block.betamindy-present.description = Весёлый блок. Нажмите, чтобы развернуть, вы не знаете, что внутри! -block.betamindy-present.details = [scarlet]Счастливого[] [lime]Рождества[] [scarlet]и[] [lime]Весёлого[] [scarlet]Нового[] [lime]Года[][scarlet]![] +block.betamindy-radiation.name = \u0420\u0430\u0434\u0438\u0430\u0446\u0438\u044F +block.betamindy-exotic-matter.name = \u042D\u043A\u0437\u043E\u0442\u0438\u0447\u0435\u0441\u043A\u0430\u044F \u043C\u0430\u0442\u0435\u0440\u0438\u044F +block.betamindy-present.name = \u041F\u043E\u0434\u0430\u0440\u043E\u043A +block.betamindy-present.description = \u0412\u0435\u0441\u0451\u043B\u044B\u0439 \u0431\u043B\u043E\u043A. \u041D\u0430\u0436\u043C\u0438\u0442\u0435, \u0447\u0442\u043E\u0431\u044B \u0440\u0430\u0437\u0432\u0435\u0440\u043D\u0443\u0442\u044C, \u0432\u044B \u043D\u0435 \u0437\u043D\u0430\u0435\u0442\u0435, \u0447\u0442\u043E \u0432\u043D\u0443\u0442\u0440\u0438! +block.betamindy-present.details = [scarlet]\u0421\u0447\u0430\u0441\u0442\u043B\u0438\u0432\u043E\u0433\u043E[] [lime]\u0420\u043E\u0436\u0434\u0435\u0441\u0442\u0432\u0430[] [scarlet]\u0438[] [lime]\u0412\u0435\u0441\u0451\u043B\u043E\u0433\u043E[] [scarlet]\u041D\u043E\u0432\u043E\u0433\u043E[] [lime]\u0413\u043E\u0434\u0430[][scarlet]![] # Effect -block.betamindy-silo.name = Силос -block.betamindy-silo.description = Хранит огромное количество предметов каждого типа. Содержимое может быть извлечено с помощью разгрузчика. -block.betamindy-warehouse.name = Склад -block.betamindy-warehouse.description = Хранит необычайное количество предметов каждого типа. Содержимое может быть извлечено с помощью разгрузчика. -block.betamindy-team-wall.name = Блок команды -block.betamindy-team-wall.description = Когда он сломан, предупреждает всех о нападении и предателе. Полезно для объединения или доказательства предателя в PvP, или просто предупреждая о нарушении защиты в выживании. +block.betamindy-silo.name = \u0421\u0438\u043B\u043E\u0441 +block.betamindy-silo.description = \u0425\u0440\u0430\u043D\u0438\u0442 \u043E\u0433\u0440\u043E\u043C\u043D\u043E\u0435 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043F\u0440\u0435\u0434\u043C\u0435\u0442\u043E\u0432 \u043A\u0430\u0436\u0434\u043E\u0433\u043E \u0442\u0438\u043F\u0430. \u0421\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0435 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u0438\u0437\u0432\u043B\u0435\u0447\u0435\u043D\u043E \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E \u0440\u0430\u0437\u0433\u0440\u0443\u0437\u0447\u0438\u043A\u0430. +block.betamindy-warehouse.name = \u0421\u043A\u043B\u0430\u0434 +block.betamindy-warehouse.description = \u0425\u0440\u0430\u043D\u0438\u0442 \u043D\u0435\u043E\u0431\u044B\u0447\u0430\u0439\u043D\u043E\u0435 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043F\u0440\u0435\u0434\u043C\u0435\u0442\u043E\u0432 \u043A\u0430\u0436\u0434\u043E\u0433\u043E \u0442\u0438\u043F\u0430. \u0421\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0435 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u0438\u0437\u0432\u043B\u0435\u0447\u0435\u043D\u043E \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E \u0440\u0430\u0437\u0433\u0440\u0443\u0437\u0447\u0438\u043A\u0430. +block.betamindy-team-wall.name = \u0411\u043B\u043E\u043A \u043A\u043E\u043C\u0430\u043D\u0434\u044B +block.betamindy-team-wall.description = \u041A\u043E\u0433\u0434\u0430 \u043E\u043D \u0441\u043B\u043E\u043C\u0430\u043D, \u043F\u0440\u0435\u0434\u0443\u043F\u0440\u0435\u0436\u0434\u0430\u0435\u0442 \u0432\u0441\u0435\u0445 \u043E \u043D\u0430\u043F\u0430\u0434\u0435\u043D\u0438\u0438 \u0438 \u043F\u0440\u0435\u0434\u0430\u0442\u0435\u043B\u0435. \u041F\u043E\u043B\u0435\u0437\u043D\u043E \u0434\u043B\u044F \u043E\u0431\u044A\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u044F \u0438\u043B\u0438 \u0434\u043E\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u044C\u0441\u0442\u0432\u0430 \u043F\u0440\u0435\u0434\u0430\u0442\u0435\u043B\u044F \u0432 PvP, \u0438\u043B\u0438 \u043F\u0440\u043E\u0441\u0442\u043E \u043F\u0440\u0435\u0434\u0443\u043F\u0440\u0435\u0436\u0434\u0430\u044F \u043E \u043D\u0430\u0440\u0443\u0448\u0435\u043D\u0438\u0438 \u0437\u0430\u0449\u0438\u0442\u044B \u0432 \u0432\u044B\u0436\u0438\u0432\u0430\u043D\u0438\u0438. # Stats -stat.dphealth = {0}*здоровье груза*дистанция(в блоках) +stat.dphealth = {0}*\u0437\u0434\u043E\u0440\u043E\u0432\u044C\u0435 \u0433\u0440\u0443\u0437\u0430*\u0434\u0438\u0441\u0442\u0430\u043D\u0446\u0438\u044F(\u0432 \u0431\u043B\u043E\u043A\u0430\u0445) # Settings -setting.slimeeffect.name = Анимированная слизь [lightgray](требуются анимированные щиты)[] -setting.correctview.name = Отображение груза сверху вниз +setting.slimeeffect.name = \u0410\u043D\u0438\u043C\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u0430\u044F \u0441\u043B\u0438\u0437\u044C [lightgray](\u0442\u0440\u0435\u0431\u0443\u044E\u0442\u0441\u044F \u0430\u043D\u0438\u043C\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0449\u0438\u0442\u044B)[] +setting.correctview.name = \u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u0433\u0440\u0443\u0437\u0430 \u0441\u0432\u0435\u0440\u0445\u0443 \u0432\u043D\u0438\u0437 # UI -ui.teamalert = Команда {0} атакована командой {1}! -ui.teamalertsilent = Команда {0} под атакой! +ui.teamalert = \u041A\u043E\u043C\u0430\u043D\u0434\u0430 {0} \u0430\u0442\u0430\u043A\u043E\u0432\u0430\u043D\u0430 \u043A\u043E\u043C\u0430\u043D\u0434\u043E\u0439 {1}! +ui.teamalertsilent = \u041A\u043E\u043C\u0430\u043D\u0434\u0430 {0} \u043F\u043E\u0434 \u0430\u0442\u0430\u043A\u043E\u0439! diff --git a/src/betamindy/util/XeloUtil.java b/src/betamindy/util/XeloUtil.java index 69979677..c334e495 100644 --- a/src/betamindy/util/XeloUtil.java +++ b/src/betamindy/util/XeloUtil.java @@ -8,8 +8,10 @@ import betamindy.world.blocks.distribution.*; import mindustry.*; import mindustry.content.*; +import mindustry.entities.Units; import mindustry.gen.*; import mindustry.world.*; +import mindustry.world.blocks.ControlBlock; import mindustry.world.blocks.storage.*; import java.util.PriorityQueue; @@ -93,10 +95,36 @@ public boolean canPush(Building build, int direction){ } /** - * pushes a single building. if obstructed does not push multiple tiles. returns false if its blocked, otherwise true. used as a subtorutine for the function that actually does push all obstructed tiles. - * @param build the building to be pushed. DO NOT CALL FROM WITHIN THE BUILDING. + * pushes units in front of a a single building. + * @param build the building to be pushed. * @param direction number from 0-4 same direction as the block rotation to push the building in. */ + public void _pushUnits(Building build, int direction){ + float ox = d4(direction).x * (build.block.size * 4f + 4f); + float oy = d4(direction).y * (build.block.size * 4f + 4f); + //grouded units don't experience impulses anyway + //boolean bouncy = ((build.block instanceof SlimeBlock) && (!build.block.rotate || build.rotation == direction)); + if(direction % 2 == 0){ + //tall rectangle + float dr = d4(direction).x; + Units.nearby(build.x + ox - 4f, build.y + oy - build.block.size * 4f, 8f, build.block.size * 8f, u -> { + if(!u.isFlying() && u.x >= build.x + ox - 4f && u.x <= build.x + ox + 4f){ + u.move(build.x + dr * (3.8f + build.block.size * 4f + 8f) - u.x, 0f); + //if(bouncy) u.impulse(dr * 40f, 0f); + } + }); + } + else{ + //wide rectangle + float dr = d4(direction).y; + Units.nearby(build.x + ox - build.block.size * 4f, build.y + oy - 4f, build.block.size * 8f, 8f, u -> { + if(!u.isFlying() && u.y >= build.y + oy - 4f && u.y <= build.y + oy + 4f){ + u.move(0f, build.y + dr * (3.8f + build.block.size * 4f + 8f) - u.y); + //if(bouncy) u.impulse(0f, dr * 40f); + } + }); + } + } /*algorithm: scan forward tiles for blockage @@ -104,18 +132,30 @@ public boolean canPush(Building build, int direction){ remove building readd building. */ + /** + * pushes a single building. if obstructed does not push multiple tiles. returns false if its blocked, otherwise true. used as a subtorutine for the function that actually does push all obstructed tiles. + * @param build the building to be pushed. DO NOT CALL FROM WITHIN THE BUILDING. + * @param direction number from 0-4 same direction as the block rotation to push the building in. + */ public boolean _pushSingle(Building build, int direction){ direction = direction % 4; //don't move the core. >:( BAD BAD BAD BAD if(build.block instanceof CoreBlock){return false;} int bx = build.tile.x; int by = build.tile.y; + + + //Player control = (build instanceof ControlBlock) ? ((ControlBlock) build).unit().getPlayer() : null; build.tile.remove(); + /* //scan forward tiles for blockage if(!Build.validPlace(build.block, build.team, bx+d4(direction).x, by+d4(direction).y, build.rotation, false)){ Vars.world.tile(bx,by).setBlock(build.block, build.team, build.rotation, () -> build); return false; - } + }*/ + + //move units + _pushUnits(build, direction); Vars.world.tile(bx+d4(direction).x, by+d4(direction).y).setBlock(build.block, build.team, build.rotation, () -> build); return true; diff --git a/src/betamindy/world/blocks/distribution/Piston.java b/src/betamindy/world/blocks/distribution/Piston.java index a78baef8..c1d18cb0 100644 --- a/src/betamindy/world/blocks/distribution/Piston.java +++ b/src/betamindy/world/blocks/distribution/Piston.java @@ -3,20 +3,21 @@ import arc.audio.Sound; import arc.func.*; import arc.graphics.g2d.*; -import arc.math.Mathf; -import arc.math.geom.Geometry; +import arc.math.*; +import arc.math.geom.*; +import arc.struct.*; import arc.util.*; -import arc.util.io.Reads; -import arc.util.io.Writes; -import betamindy.BetaMindy; -import betamindy.content.MindySounds; -import mindustry.content.Blocks; -import mindustry.gen.Building; +import arc.util.io.*; +import betamindy.*; +import betamindy.content.*; +import mindustry.*; +import mindustry.content.*; +import mindustry.gen.*; import mindustry.type.Category; import mindustry.world.*; import betamindy.world.blocks.distribution.PistonArm.*; import mindustry.world.blocks.payloads.*; -import mindustry.world.meta.BlockGroup; +import mindustry.world.meta.*; import static arc.Core.atlas; import static mindustry.Vars.tilesize; @@ -122,6 +123,7 @@ public void extendArm(){ extended = push(); if(extended){ heatTimer.reset(0, 0); + BetaMindy.pushUtil._pushUnits(this, rotation); tile.nearby(rotation).setBlock(armBlock, team, (rotation + 2) % 4); ((PistonArmBuild)tile.nearbyBuild(rotation)).piston = this; pushSound.at(this); @@ -169,5 +171,38 @@ public void write(Writes write){ write.bool(extended); write.b((byte)Mathf.clamp(heatTimer.getTime(0), 0, 8)); } + + /* + @Override + public Seq getPowerConnections(Seq out){ + out.clear(); + if(power == null) return out; + + //the facing block will not be added to the piston's graph + for(Building other : proximity){ + if(other != null && other.power != null + && !(block.consumesPower && other.block.consumesPower && !block.outputsPower && !other.block.outputsPower) && tile.nearbyBuild(rotation) != other + && !power.links.contains(other.pos())){ + out.add(other); + } + } + + for(int i = 0; i < power.links.size; i++){ + Tile link = Vars.world.tile(power.links.get(i)); + if(link != null && link.build != null && link.build.power != null) out.add(link.build); + } + return out; + } + //TODO: override conductsTo (I hope) + @Override + public void onProximityUpdate(){ + super.onProximityUpdate(); + //remove this piston from the other's proximities + if(tile.nearbyBuild(rotation) != null){ + Building other = tile.nearbyBuild(rotation); + other.proximity.remove(self(), true); + proximity.remove(other, true); + } + }*/ } } \ No newline at end of file diff --git a/src/betamindy/world/blocks/power/AccelBlock.java b/src/betamindy/world/blocks/power/AccelBlock.java index 696a1d7d..a8f64ee9 100644 --- a/src/betamindy/world/blocks/power/AccelBlock.java +++ b/src/betamindy/world/blocks/power/AccelBlock.java @@ -19,7 +19,7 @@ public class AccelBlock extends PowerBlock { public TextureRegion[] baseRegion = new TextureRegion[2]; public TextureRegion ballRegion; public final float ballTicks = 8f; - public float powerProduction = 8f; + public float powerProduction = 2f; public AccelBlock(String name){ super(name);