diff --git a/assets/bundles/bundle.properties b/assets/bundles/bundle.properties index a3d0e10..a00f788 100644 --- a/assets/bundles/bundle.properties +++ b/assets/bundles/bundle.properties @@ -19,6 +19,10 @@ bullet.subLightDamage = [stat]{0} [lightgray] sub lightning damage bullet.pierceDrag = [stat]{0}x[lightgray] loss of speed when pierced weapon.torpedDefence = Anti torpedo system + +status.deepsea-water-leak.name = Water leak +status.deepsea-water-leak.description = Reduces the unit's health to 50%. Submarines lose speed in inverse proportion to their remaining health. + #Items item.deepsea-aluminium.name = Aluminium item.deepsea-aluminium.description = A common metal. Used in most structures. @@ -131,7 +135,6 @@ block.deepsea-repair-module.description = Required for automatic repair of struc block.deepsea-light-projector.name = Light projector block.deepsea-light-projector.description = One of the few ways to see anything in the impenetrable darkness. -block.deepsea-light-projector.details = Highly advisable to protect from <>. block.deepsea-pressured-container.name = Pressured container block.deepsea-pressured-container.description = Stores items and also expands the core's capacity. @@ -181,10 +184,10 @@ block.deepsea-pipe-junction.name = Pipe junction block.deepsea-pipe-junction.description = Directs liquids/gases in their respective directions without mixing them. #Unit blocks -block.deepsea-shade-unit-factory.name = Deepsea unit factory +block.deepsea-shade-unit-factory.name = Underwater unit factory block.deepsea-shade-unit-factory.description = Produces units to attack enemy fortifications or units. -block.deepsea-shade-unit-reconstructor.name = Deepsea unit refabricator +block.deepsea-shade-unit-reconstructor.name = Underwater unit reconstructor block.deepsea-shade-unit-reconstructor.description = Spends resources and some time to improve the basic properties of units, as well as the units themselves to the second level. #Defend @@ -208,17 +211,17 @@ unit.deepsea-oversight.description = A relatively average infantry unit. Usually #Tanks unit.deepsea-note.name = Note -unit.deepsea-note.description = Small tank. Needed for assaulting weakly fortified structures, or as a shield for other units. +unit.deepsea-note.description = Small tank. Needed for assaulting weakly/medium fortified structures, or as a shield for other units. #Submarines unit.deepsea-complicity.name = Complicity unit.deepsea-complicity.description = A small submarine. Designed to destroy other non-maneuverable combat units or weak fortifications. unit.deepsea-consequences.name = Consequence -unit.deepsea-consequences.decription = Relatively average submarine. Used to assault other units or medium-strength fortifications. Torpedoes cause leaks in other submarines. +unit.deepsea-consequences.decription = Relatively average submarine. Used to assault other units or not-big fortifications. Torpedoes cause leaks in units. #Planets -planet.deepsea-P-I-312.name = P-I-312 +planet.deepsea-obj-312.name = Object - 312 #Sectors sector.deepsea-the-beginning.name = Beginning @@ -275,4 +278,6 @@ block.deepsea-ironstone-wall.name = Ironstone wall # Nature block.deepsea-seaweed-floor.name = Seaweed floor block.deepsea-seaweed-wall.name = Seaweed wall -block.deepsea-seaweed.name = Seaweed \ No newline at end of file +block.deepsea-seaweed.name = Seaweed + +dsObjective.supplyTurrets = [accent]Supply the turrets with ammo \ No newline at end of file diff --git a/assets/bundles/bundle_ru.properties b/assets/bundles/bundle_ru.properties index 5a72a48..696837a 100644 --- a/assets/bundles/bundle_ru.properties +++ b/assets/bundles/bundle_ru.properties @@ -14,13 +14,16 @@ ui.craftTime = [lightgray]{0}сек setting.onlyDeepseaMusic = Включить только моддовую музыку (нужно перезагрузить игру) -weapon.torpedDefence = Анти торпедная система +weapon.anti-torpedo-defence = [stat]Анти торпедная система bullet.lightningNum = [stat]{0}[lightgray]x молний bullet.subLightNum = [stat]{0}[lightgray]x разветвлений bullet.subLightDamage = [stat]{0}[lightgray] урона разветвлений bullet.pierceDrag = [stat]{0}[lightgray]x потеря скорости при пробитии +status.deepsea-water-leak.name = Протечка +status.deepsea-water-leak.description = Истощает единицу до половины прочности. Субмарины теряют скорость обратно пропорционально количеству прочности. + #Предметы item.deepsea-aluminium.name = Алюминий item.deepsea-aluminium.description = Распространенный метал. Используется в большинстве построек. @@ -47,43 +50,42 @@ item.deepsea-magnesium.name = Магний item.deepsea-magnesium.description = Лёгкий металл с высоким электрохимическим потенциалом. Используется в комплексных энергосистемах. item.deepsea-lithium.name = Литий -item.deepsea-lithium.description = Щелочноземельный металл. Применяется в аккумуляторах и комплексной энергоёмких. +item.deepsea-lithium.description = Щелочной металл. Применяется в аккумуляторах и комплексной энергоёмких. item.deepsea-potassium.name = Калий -item.deepsea-potassium.description = Щелочноземельный металл. Используется в химических процессах и как боеприпас. +item.deepsea-potassium.description = Щелочной металл. Используется в химических процессах и как боеприпас. #Жидкости/газы liquid.deepsea-hydrogen-sulfide.name = Сероводород liquid.deepsea-hydrogen-sulfide.description = Нужен для получения других ресурсов. liquid.deepsea-oxygen.name = Кислород -liquid.deepsea-oxygen.description = Отличный окислитель. Поддерживает горение. Возгораемый. Нужен для получения других ресурсов, а также используется как ускоритель в некоторых постройках. -liquid.deepsea-oxygen.details = Этот газ распространен в растворенной форме и служит ключом в поддержании биологической жизни. \n[#fab1b1] Смесь 2 H2 + O2 КРАЙНЕ ВЗРЫВООПАСНА!!!. +liquid.deepsea-oxygen.description = Отличный окислитель. Поддерживает горение. Нужен для получения других ресурсов, а также используется как ускоритель в некоторых постройках. +liquid.deepsea-oxygen.details = Этот газ распространен в растворенной форме и служит ключом в поддержании биологической жизни. \n[#fab1b1] Смесь 2H₂ + O₂ КРАЙНЕ ВЗРЫВООПАСНА!!!. liquid.deepsea-sulfuric-acid.name = Серная кислота liquid.deepsea-sulfuric-acid.description = Очень едкое соединение. При реакции с водой выделяет много тепла. Нужна во многих сложных реакциях. - #Турели block.deepsea-cutoff.name = Рассечение -block.deepsea-cutoff.description = Стреляет гарпуном прошивающим цели. Гарпун теряет скорость при полете и пробитии цели. +block.deepsea-cutoff.description = Стреляет гарпуном прошивающим цели. Вызывает протечку. Гарпун теряет скорость и пробитии цели. block.deepsea-cutoff.details = Рассекает врагов!!!!!! block.deepsea-irritation.name = Возражение block.deepsea-irritation.description = Стреляет дробью из прошивающих пуль. block.deepsea-discharge.name = Разряд -block.deepsea-discharge.description = Стреляет молнией по одной цели. Постепенно ускоряется во время стрельбы. Теряет всю скорость через несколько секунд после простоя. +block.deepsea-discharge.description = Стреляет молнией по одной цели. Постепенно ускоряется во время стрельбы. Теряет всю скорость через несколько секунд покоя. block.deepsea-hydroid.name = Гидроид -block.deepsea-hydroid.description = Стреляет разными типами торпед. +block.deepsea-hydroid.description = Выпускает высокоскоростные торпеды торпеды. block.deepsea-execution.name = Исполнение block.deepsea-execution.description = Стреляет прошивающими субмарины (воздушные цели) снарядами. Требует пару выстрелов для полного разгона. #Блоки добычи block.deepsea-hydraulic-drill.name = Гидравлический бур -block.deepsea-hydraulic-drill.description = Раз в несколько секунд ударяет в руду, тем самым буря ее. +block.deepsea-hydraulic-drill.description = Раз в несколько секунд ударяет в руду. block.deepsea-hydraulic-wall-drill.name = Настенная гидравлическая дрель block.deepsea-hydraulic-wall-drill.description = Бурит руду из стен в постоянном темпе. @@ -115,7 +117,7 @@ block.deepsea-chemical-plant.description = Производит ресурсы #Энергетика block.deepsea-power-transmitter.name = Передатчик энергии -block.deepsea-power-transmitter.description = Передает энергию на расстояния. +block.deepsea-power-transmitter.description = Передает энергию на расстояния. Не очень эффективен в распределении энергии. block.deepsea-power-distributor.name = Распределитель энергии block.deepsea-power-distributor.description = Компактный распределитель энергии, имеющий большое количество доступных соединений. @@ -125,7 +127,6 @@ block.deepsea-condensator.description = Запасает энергию. block.deepsea-hydro-turbine-generator.name = Гидротурбинный генератор block.deepsea-hydro-turbine-generator.description = Вырабатывает энергию, когда установлен на гейзерах. -block.deepsea-hydro-turbine-generator.details = Гейзеры делают пшшшшшшшшшшшшшшшшшшшшшшшшшш. block.deepsea-geothermal-generator.name = Геотермальный генератор block.deepsea-geothermal-generator.description = Вырабатывает энергию, пока стоит на геотермальных плитках. @@ -142,8 +143,7 @@ block.deepsea-repair-module.name = Модуль ремонта block.deepsea-repair-module.description = Нужен для автоматического ремонта построек. block.deepsea-light-projector.name = Прожектор -block.deepsea-light-projector.description = Один из единственных способов увидеть хоть что-то из непроглядной темноты. -block.deepsea-light-projector.details = Очень предпочтительно защищать от <<ДАННЫЕ ПОВРЕЖДЕНЫ>>. +block.deepsea-light-projector.description = Один из единственных способов увидеть хоть что-то из непроглядной тьмы. block.deepsea-pressured-container.name = Уплотненный контейнер block.deepsea-pressured-container.description = Хранит в себе предметы, а также расширяет вместимость ядра. @@ -170,9 +170,6 @@ block.deepsea-isolated-overflow-gate.description = Пропускает пред block.deepsea-isolated-underflow-gate.name = Изолированный избыточный шлюз block.deepsea-isolated-underflow-gate.description = Пропускает предметы вперед, если боковые выходы заблокированы. -block.deepsea-pressured-liquid-container.name = Уплотненный жидкостный контейнер -block.deepsea-pressured-liquid-container.description = Хранит большое количество жидкости. -block.deepsea-pressured-liquid-container.details = Может сильно рвануть, если его уничтожат, пока он хранит взрывоопасную жидкость. block.deepsea-isolated-junction.name = Изолированный перекресток block.deepsea-isolated-junction.description = Проводит предметы в своих направлениях, не перемешивая их. @@ -180,6 +177,12 @@ block.deepsea-isolated-junction.description = Проводит предметы block.deepsea-isolated-bridge.name = Изолированный мостовой конвейер block.deepsea-isolated-bridge.description = Мост для ресурсов. +#Жидкостная логистика + +block.deepsea-pressured-liquid-container.name = Уплотненный жидкостный контейнер +block.deepsea-pressured-liquid-container.description = Хранит большое количество жидкости. +block.deepsea-pressured-liquid-container.details = Может сильно рвануть, если его уничтожат, пока он хранит взрывоопасную жидкость. + block.deepsea-liquid-pipe.name = Трубопровод block.deepsea-liquid-pipe.description = Перемещает жидкости/газы. @@ -192,11 +195,11 @@ block.deepsea-pipe-bridge.description = Мост для жидкостей/га block.deepsea-pipe-junction.name = Перекресток для трубопровода block.deepsea-pipe-junction.description = Проводит жидкости/газы в своих направлениях, не перемешивая их. -#Блоки юнитов +#Блоки производства юнитов block.deepsea-shade-unit-factory.name = Глубоководная фабрика юнитов block.deepsea-shade-unit-factory.description = Производит юнитов для атаки вражеских укреплений или юнитов. -block.deepsea-shade-unit-reconstructor.name = Рефабрикатор глубоководных единиц +block.deepsea-shade-unit-reconstructor.name = Реконструктор глубоководных единиц block.deepsea-shade-unit-reconstructor.description = Затрачивает ресурсы и некоторое время для улучшения основных свойств единиц, а также самих единиц до второго уровня. #Стены/блоки защиты @@ -215,7 +218,7 @@ unit.deepsea-condition.name = Обстановка unit.deepsea-condition.description = Небольшая боевая единица пехоты. Обычно нужна для штурма не сильно укрепленных сооружений. unit.deepsea-oversight.name = Надзор -unit.deepsea-oversight.description = Относительно средняя боевая единица пехоты. Обычно нужна для штурма средних по силе укреплений. +unit.deepsea-oversight.description = Средняя боевая единица пехоты. Обычно нужна для штурма средних по силе укреплений. #Танки unit.deepsea-note.name = Нота @@ -229,10 +232,10 @@ unit.deepsea-complicity.name = Вклад unit.deepsea-complicity.description = Небольшая субмарина. Нужна для уничтожения других неманевренных боевых единиц или слабых укреплений. unit.deepsea-consequences.name = Последствие -unit.deepsea-consequences.description = Относительно средняя субмарина. Используется для штурма других единиц, или средних по силе укреплений. Торпеды вызывают протечку у других субмарин. +unit.deepsea-consequences.description = Средняя субмарина. Используется для штурма других единиц, или небольших по силе укреплений. Торпеды вызывают протечку. #Планеты -planet.deepsea-P-I-312.name = P-I-312 +planet.deepsea-obj-312.name = Объект - 312 #Сектора sector.deepsea-the-beginning.name = Начало @@ -292,3 +295,4 @@ block.deepsea-seaweed-wall.name = Стена из водорослевых за block.deepsea-seaweed.name = Водоросли dsObjectives.canyon-manganese = Вы высадились на второй сектор. На нем обнаружены залежи гидроксида марганца, он розового цвета.\n Гидроксид марганца необходим для получения [accent]марганца[] - основы продвинутой электроники. +dsObjective.supplyTurrets = [accent]Снабдите турели боеприпасами / топливом diff --git a/assets/icon.ico b/assets/icon.ico deleted file mode 100644 index e01571b..0000000 Binary files a/assets/icon.ico and /dev/null differ diff --git a/assets/maps/crevice.msav b/assets/maps/crevice.msav new file mode 100644 index 0000000..2b7644a Binary files /dev/null and b/assets/maps/crevice.msav differ diff --git a/assets/maps/the-beginning.msav b/assets/maps/the-beginning.msav index 2e1081a..85f08ad 100644 Binary files a/assets/maps/the-beginning.msav and b/assets/maps/the-beginning.msav differ diff --git a/assets/sounds/chargeEMP.ogg b/assets/sounds/chargeEMP.ogg new file mode 100644 index 0000000..cc4de3a Binary files /dev/null and b/assets/sounds/chargeEMP.ogg differ diff --git a/assets/sounds/chargeMassive.ogg b/assets/sounds/chargeMassive.ogg new file mode 100644 index 0000000..afbf553 Binary files /dev/null and b/assets/sounds/chargeMassive.ogg differ diff --git a/assets/sounds/drillDetonate.ogg b/assets/sounds/drillDetonate.ogg deleted file mode 100644 index 5e1855f..0000000 Binary files a/assets/sounds/drillDetonate.ogg and /dev/null differ diff --git a/assets/sounds/shoot-1.ogg b/assets/sounds/shoot-1.ogg deleted file mode 100644 index a19d1ab..0000000 Binary files a/assets/sounds/shoot-1.ogg and /dev/null differ diff --git a/assets/sounds/shootBlast.ogg b/assets/sounds/shootBlast.ogg new file mode 100644 index 0000000..f648cad Binary files /dev/null and b/assets/sounds/shootBlast.ogg differ diff --git a/assets/sounds/shootBolt.ogg b/assets/sounds/shootBolt.ogg new file mode 100644 index 0000000..98fc073 Binary files /dev/null and b/assets/sounds/shootBolt.ogg differ diff --git a/assets/sounds/shootImpulse.ogg b/assets/sounds/shootImpulse.ogg new file mode 100644 index 0000000..3d942eb Binary files /dev/null and b/assets/sounds/shootImpulse.ogg differ diff --git a/assets/sounds/shootMassive.ogg b/assets/sounds/shootMassive.ogg new file mode 100644 index 0000000..6b0b597 Binary files /dev/null and b/assets/sounds/shootMassive.ogg differ diff --git a/assets/sounds/shootPlasma.ogg b/assets/sounds/shootPlasma.ogg new file mode 100644 index 0000000..ccfda92 Binary files /dev/null and b/assets/sounds/shootPlasma.ogg differ diff --git a/assets/sounds/shootTank.ogg b/assets/sounds/shootTank.ogg index 41b238e..27a6105 100644 Binary files a/assets/sounds/shootTank.ogg and b/assets/sounds/shootTank.ogg differ diff --git a/assets/sounds/shootVoid.ogg b/assets/sounds/shootVoid.ogg new file mode 100644 index 0000000..1d82bba Binary files /dev/null and b/assets/sounds/shootVoid.ogg differ diff --git a/assets/sprites-override/ui/logo.png b/assets/sprites-override/ui/logo.png index 1131536..e4e0e86 100644 Binary files a/assets/sprites-override/ui/logo.png and b/assets/sprites-override/ui/logo.png differ diff --git a/assets/sprites/additional/harpoon-wire-end.png b/assets/sprites/additional/harpoon-wire-end.png new file mode 100644 index 0000000..a30f5fd Binary files /dev/null and b/assets/sprites/additional/harpoon-wire-end.png differ diff --git a/assets/sprites/additional/harpoon-wire.png b/assets/sprites/additional/harpoon-wire.png index cfb1594..2c06acf 100644 Binary files a/assets/sprites/additional/harpoon-wire.png and b/assets/sprites/additional/harpoon-wire.png differ diff --git a/assets/sprites/blocks/environment/floors/deep-rough-sandstone1.png b/assets/sprites/blocks/environment/floors/deep-rough-sandstone1.png index 1668858..0c1fb4f 100644 Binary files a/assets/sprites/blocks/environment/floors/deep-rough-sandstone1.png and b/assets/sprites/blocks/environment/floors/deep-rough-sandstone1.png differ diff --git a/assets/sprites/blocks/environment/floors/deep-rough-sandstone2.png b/assets/sprites/blocks/environment/floors/deep-rough-sandstone2.png index e27a71f..d16805b 100644 Binary files a/assets/sprites/blocks/environment/floors/deep-rough-sandstone2.png and b/assets/sprites/blocks/environment/floors/deep-rough-sandstone2.png differ diff --git a/assets/sprites/blocks/environment/floors/deep-rough-sandstone3.png b/assets/sprites/blocks/environment/floors/deep-rough-sandstone3.png index 3b8cb4b..d4ff27c 100644 Binary files a/assets/sprites/blocks/environment/floors/deep-rough-sandstone3.png and b/assets/sprites/blocks/environment/floors/deep-rough-sandstone3.png differ diff --git a/assets/sprites/blocks/environment/floors/deep-rough-sandstone4.png b/assets/sprites/blocks/environment/floors/deep-rough-sandstone4.png deleted file mode 100644 index a785b7c..0000000 Binary files a/assets/sprites/blocks/environment/floors/deep-rough-sandstone4.png and /dev/null differ diff --git a/assets/sprites/blocks/environment/floors/deep-sandstone1.png b/assets/sprites/blocks/environment/floors/deep-sandstone1.png index 448b20a..f85c4af 100644 Binary files a/assets/sprites/blocks/environment/floors/deep-sandstone1.png and b/assets/sprites/blocks/environment/floors/deep-sandstone1.png differ diff --git a/assets/sprites/blocks/environment/floors/deep-sandstone2.png b/assets/sprites/blocks/environment/floors/deep-sandstone2.png index 5bfff0e..f2fbabb 100644 Binary files a/assets/sprites/blocks/environment/floors/deep-sandstone2.png and b/assets/sprites/blocks/environment/floors/deep-sandstone2.png differ diff --git a/assets/sprites/blocks/environment/floors/deep-sandstone3.png b/assets/sprites/blocks/environment/floors/deep-sandstone3.png deleted file mode 100644 index 97ff9a6..0000000 Binary files a/assets/sprites/blocks/environment/floors/deep-sandstone3.png and /dev/null differ diff --git a/assets/sprites/blocks/environment/floors/deep-spores1.png b/assets/sprites/blocks/environment/floors/deep-spores1.png new file mode 100644 index 0000000..49b21b2 Binary files /dev/null and b/assets/sprites/blocks/environment/floors/deep-spores1.png differ diff --git a/assets/sprites/blocks/environment/floors/deep-spores2.png b/assets/sprites/blocks/environment/floors/deep-spores2.png new file mode 100644 index 0000000..71503c3 Binary files /dev/null and b/assets/sprites/blocks/environment/floors/deep-spores2.png differ diff --git a/assets/sprites/blocks/environment/floors/deep-spores3.png b/assets/sprites/blocks/environment/floors/deep-spores3.png new file mode 100644 index 0000000..f79c942 Binary files /dev/null and b/assets/sprites/blocks/environment/floors/deep-spores3.png differ diff --git a/assets/sprites/blocks/environment/floors/deep-spores4.png b/assets/sprites/blocks/environment/floors/deep-spores4.png new file mode 100644 index 0000000..2c8d023 Binary files /dev/null and b/assets/sprites/blocks/environment/floors/deep-spores4.png differ diff --git a/assets/sprites/blocks/environment/floors/deep-spores5.png b/assets/sprites/blocks/environment/floors/deep-spores5.png new file mode 100644 index 0000000..76f78c0 Binary files /dev/null and b/assets/sprites/blocks/environment/floors/deep-spores5.png differ diff --git a/assets/sprites/blocks/environment/floors/deep-spores6.png b/assets/sprites/blocks/environment/floors/deep-spores6.png new file mode 100644 index 0000000..84bbe28 Binary files /dev/null and b/assets/sprites/blocks/environment/floors/deep-spores6.png differ diff --git a/assets/sprites/blocks/environment/floors/deep-spores7.png b/assets/sprites/blocks/environment/floors/deep-spores7.png new file mode 100644 index 0000000..395ba08 Binary files /dev/null and b/assets/sprites/blocks/environment/floors/deep-spores7.png differ diff --git a/assets/sprites/blocks/environment/floors/deep-spores8.png b/assets/sprites/blocks/environment/floors/deep-spores8.png new file mode 100644 index 0000000..ce01100 Binary files /dev/null and b/assets/sprites/blocks/environment/floors/deep-spores8.png differ diff --git a/assets/sprites/blocks/environment/floors/geothermal-rift.png b/assets/sprites/blocks/environment/floors/geothermal-rift.png new file mode 100644 index 0000000..b76b9c4 Binary files /dev/null and b/assets/sprites/blocks/environment/floors/geothermal-rift.png differ diff --git a/assets/sprites/blocks/environment/floors/geothermal-rift1.png b/assets/sprites/blocks/environment/floors/geothermal-rift1.png deleted file mode 100644 index d2bf6e8..0000000 Binary files a/assets/sprites/blocks/environment/floors/geothermal-rift1.png and /dev/null differ diff --git a/assets/sprites/blocks/environment/floors/geothermal-rift2.png b/assets/sprites/blocks/environment/floors/geothermal-rift2.png deleted file mode 100644 index d17f82c..0000000 Binary files a/assets/sprites/blocks/environment/floors/geothermal-rift2.png and /dev/null differ diff --git a/assets/sprites/blocks/environment/floors/geothermal-rift3.png b/assets/sprites/blocks/environment/floors/geothermal-rift3.png deleted file mode 100644 index 6f6ea22..0000000 Binary files a/assets/sprites/blocks/environment/floors/geothermal-rift3.png and /dev/null differ diff --git a/assets/sprites/blocks/environment/floors/hilly-ekronite1.png b/assets/sprites/blocks/environment/floors/hilly-ekronite1.png new file mode 100644 index 0000000..b76e811 Binary files /dev/null and b/assets/sprites/blocks/environment/floors/hilly-ekronite1.png differ diff --git a/assets/sprites/blocks/environment/floors/hilly-ekronite2.png b/assets/sprites/blocks/environment/floors/hilly-ekronite2.png new file mode 100644 index 0000000..daf918a Binary files /dev/null and b/assets/sprites/blocks/environment/floors/hilly-ekronite2.png differ diff --git a/assets/sprites/blocks/environment/floors/hilly-ekronite3.png b/assets/sprites/blocks/environment/floors/hilly-ekronite3.png new file mode 100644 index 0000000..a25c83b Binary files /dev/null and b/assets/sprites/blocks/environment/floors/hilly-ekronite3.png differ diff --git a/assets/sprites/blocks/environment/floors/hilly-ekronite4.png b/assets/sprites/blocks/environment/floors/hilly-ekronite4.png new file mode 100644 index 0000000..6a8ebeb Binary files /dev/null and b/assets/sprites/blocks/environment/floors/hilly-ekronite4.png differ diff --git a/assets/sprites/blocks/environment/floors/hilly-ekronite5.png b/assets/sprites/blocks/environment/floors/hilly-ekronite5.png new file mode 100644 index 0000000..f3916b2 Binary files /dev/null and b/assets/sprites/blocks/environment/floors/hilly-ekronite5.png differ diff --git a/assets/sprites/blocks/environment/floors/limestone-floor1.png b/assets/sprites/blocks/environment/floors/limestone-floor1.png index f4bb58a..476a9e0 100644 Binary files a/assets/sprites/blocks/environment/floors/limestone-floor1.png and b/assets/sprites/blocks/environment/floors/limestone-floor1.png differ diff --git a/assets/sprites/blocks/environment/floors/limestone-floor2.png b/assets/sprites/blocks/environment/floors/limestone-floor2.png index 8edac88..1650149 100644 Binary files a/assets/sprites/blocks/environment/floors/limestone-floor2.png and b/assets/sprites/blocks/environment/floors/limestone-floor2.png differ diff --git a/assets/sprites/blocks/environment/floors/limestone-floor3.png b/assets/sprites/blocks/environment/floors/limestone-floor3.png index 4490dc6..115e2ec 100644 Binary files a/assets/sprites/blocks/environment/floors/limestone-floor3.png and b/assets/sprites/blocks/environment/floors/limestone-floor3.png differ diff --git a/assets/sprites/blocks/environment/floors/limestone-floor4.png b/assets/sprites/blocks/environment/floors/limestone-floor4.png index 6dd77b2..46502b0 100644 Binary files a/assets/sprites/blocks/environment/floors/limestone-floor4.png and b/assets/sprites/blocks/environment/floors/limestone-floor4.png differ diff --git a/assets/sprites/blocks/environment/floors/manganese-hydroxide-floor1.png b/assets/sprites/blocks/environment/floors/manganese-hydroxide-floor1.png index daa64bc..4b062a5 100644 Binary files a/assets/sprites/blocks/environment/floors/manganese-hydroxide-floor1.png and b/assets/sprites/blocks/environment/floors/manganese-hydroxide-floor1.png differ diff --git a/assets/sprites/blocks/environment/floors/manganese-hydroxide-floor2.png b/assets/sprites/blocks/environment/floors/manganese-hydroxide-floor2.png index a64cf06..4c1e04b 100644 Binary files a/assets/sprites/blocks/environment/floors/manganese-hydroxide-floor2.png and b/assets/sprites/blocks/environment/floors/manganese-hydroxide-floor2.png differ diff --git a/assets/sprites/blocks/environment/floors/manganese-hydroxide-floor3.png b/assets/sprites/blocks/environment/floors/manganese-hydroxide-floor3.png deleted file mode 100644 index 07138ab..0000000 Binary files a/assets/sprites/blocks/environment/floors/manganese-hydroxide-floor3.png and /dev/null differ diff --git a/assets/sprites/blocks/environment/floors/nartanite-stone-rough1.png b/assets/sprites/blocks/environment/floors/nartanite-stone-rough1.png new file mode 100644 index 0000000..3bfb27e Binary files /dev/null and b/assets/sprites/blocks/environment/floors/nartanite-stone-rough1.png differ diff --git a/assets/sprites/blocks/environment/floors/nartanite-stone-rough2.png b/assets/sprites/blocks/environment/floors/nartanite-stone-rough2.png new file mode 100644 index 0000000..424e66b Binary files /dev/null and b/assets/sprites/blocks/environment/floors/nartanite-stone-rough2.png differ diff --git a/assets/sprites/blocks/environment/floors/nartanite-stone-rough3.png b/assets/sprites/blocks/environment/floors/nartanite-stone-rough3.png new file mode 100644 index 0000000..ceb8bb5 Binary files /dev/null and b/assets/sprites/blocks/environment/floors/nartanite-stone-rough3.png differ diff --git a/assets/sprites/blocks/environment/floors/nartanite-stone-rough4.png b/assets/sprites/blocks/environment/floors/nartanite-stone-rough4.png new file mode 100644 index 0000000..3bfb27e Binary files /dev/null and b/assets/sprites/blocks/environment/floors/nartanite-stone-rough4.png differ diff --git a/assets/sprites/blocks/environment/floors/nartanite-stone-rough5.png b/assets/sprites/blocks/environment/floors/nartanite-stone-rough5.png new file mode 100644 index 0000000..557095b Binary files /dev/null and b/assets/sprites/blocks/environment/floors/nartanite-stone-rough5.png differ diff --git a/assets/sprites/blocks/environment/floors/nartanite-stone-rough6.png b/assets/sprites/blocks/environment/floors/nartanite-stone-rough6.png new file mode 100644 index 0000000..1cb92b6 Binary files /dev/null and b/assets/sprites/blocks/environment/floors/nartanite-stone-rough6.png differ diff --git a/assets/sprites/blocks/environment/floors/nartanite-stone1.png b/assets/sprites/blocks/environment/floors/nartanite-stone1.png new file mode 100644 index 0000000..120d99e Binary files /dev/null and b/assets/sprites/blocks/environment/floors/nartanite-stone1.png differ diff --git a/assets/sprites/blocks/environment/floors/nartanite-stone2.png b/assets/sprites/blocks/environment/floors/nartanite-stone2.png new file mode 100644 index 0000000..8b5d44c Binary files /dev/null and b/assets/sprites/blocks/environment/floors/nartanite-stone2.png differ diff --git a/assets/sprites/blocks/environment/floors/nartanite-stone3.png b/assets/sprites/blocks/environment/floors/nartanite-stone3.png new file mode 100644 index 0000000..a77f2b0 Binary files /dev/null and b/assets/sprites/blocks/environment/floors/nartanite-stone3.png differ diff --git a/assets/sprites/blocks/environment/floors/nartanite-stone4.png b/assets/sprites/blocks/environment/floors/nartanite-stone4.png new file mode 100644 index 0000000..ca5ca12 Binary files /dev/null and b/assets/sprites/blocks/environment/floors/nartanite-stone4.png differ diff --git a/assets/sprites/blocks/environment/floors/rough-limestone-floor1.png b/assets/sprites/blocks/environment/floors/rough-limestone-floor1.png index 9c8697a..47f4860 100644 Binary files a/assets/sprites/blocks/environment/floors/rough-limestone-floor1.png and b/assets/sprites/blocks/environment/floors/rough-limestone-floor1.png differ diff --git a/assets/sprites/blocks/environment/floors/rough-limestone-floor2.png b/assets/sprites/blocks/environment/floors/rough-limestone-floor2.png index 0a352c7..6d10bae 100644 Binary files a/assets/sprites/blocks/environment/floors/rough-limestone-floor2.png and b/assets/sprites/blocks/environment/floors/rough-limestone-floor2.png differ diff --git a/assets/sprites/blocks/environment/floors/rough-limestone-floor3.png b/assets/sprites/blocks/environment/floors/rough-limestone-floor3.png deleted file mode 100644 index 1754ee7..0000000 Binary files a/assets/sprites/blocks/environment/floors/rough-limestone-floor3.png and /dev/null differ diff --git a/assets/sprites/blocks/environment/floors/rough-limestone-floor4.png b/assets/sprites/blocks/environment/floors/rough-limestone-floor4.png deleted file mode 100644 index 4481103..0000000 Binary files a/assets/sprites/blocks/environment/floors/rough-limestone-floor4.png and /dev/null differ diff --git a/assets/sprites/blocks/environment/floors/seaweed-floor8.png b/assets/sprites/blocks/environment/floors/seaweed-floor8.png index cfb3fb5..a95ade6 100644 Binary files a/assets/sprites/blocks/environment/floors/seaweed-floor8.png and b/assets/sprites/blocks/environment/floors/seaweed-floor8.png differ diff --git a/assets/sprites/blocks/environment/floors/smooth-ekronite1.png b/assets/sprites/blocks/environment/floors/smooth-ekronite1.png new file mode 100644 index 0000000..0a3c0b7 Binary files /dev/null and b/assets/sprites/blocks/environment/floors/smooth-ekronite1.png differ diff --git a/assets/sprites/blocks/environment/floors/smooth-ekronite2.png b/assets/sprites/blocks/environment/floors/smooth-ekronite2.png new file mode 100644 index 0000000..8bdd246 Binary files /dev/null and b/assets/sprites/blocks/environment/floors/smooth-ekronite2.png differ diff --git a/assets/sprites/blocks/environment/floors/smooth-ekronite3.png b/assets/sprites/blocks/environment/floors/smooth-ekronite3.png new file mode 100644 index 0000000..ae3a931 Binary files /dev/null and b/assets/sprites/blocks/environment/floors/smooth-ekronite3.png differ diff --git a/assets/sprites/blocks/environment/floors/smooth-ekronite4.png b/assets/sprites/blocks/environment/floors/smooth-ekronite4.png new file mode 100644 index 0000000..3eea4e8 Binary files /dev/null and b/assets/sprites/blocks/environment/floors/smooth-ekronite4.png differ diff --git a/assets/sprites/blocks/environment/floors/smooth-ekronite5.png b/assets/sprites/blocks/environment/floors/smooth-ekronite5.png new file mode 100644 index 0000000..b6117fa Binary files /dev/null and b/assets/sprites/blocks/environment/floors/smooth-ekronite5.png differ diff --git a/assets/sprites/blocks/environment/floors/sulfur-floor1.png b/assets/sprites/blocks/environment/floors/sulfur-floor1.png index 2b23d85..eaa3d7c 100644 Binary files a/assets/sprites/blocks/environment/floors/sulfur-floor1.png and b/assets/sprites/blocks/environment/floors/sulfur-floor1.png differ diff --git a/assets/sprites/blocks/environment/floors/sulfur-floor2.png b/assets/sprites/blocks/environment/floors/sulfur-floor2.png index 2673ed5..9c5d267 100644 Binary files a/assets/sprites/blocks/environment/floors/sulfur-floor2.png and b/assets/sprites/blocks/environment/floors/sulfur-floor2.png differ diff --git a/assets/sprites/blocks/environment/floors/sulfur-floor3.png b/assets/sprites/blocks/environment/floors/sulfur-floor3.png index 31388fe..b33663a 100644 Binary files a/assets/sprites/blocks/environment/floors/sulfur-floor3.png and b/assets/sprites/blocks/environment/floors/sulfur-floor3.png differ diff --git a/assets/sprites/blocks/environment/floors/sulfur-floor4.png b/assets/sprites/blocks/environment/floors/sulfur-floor4.png new file mode 100644 index 0000000..3907c21 Binary files /dev/null and b/assets/sprites/blocks/environment/floors/sulfur-floor4.png differ diff --git a/assets/sprites/blocks/environment/floors/sulfur-sand-floor1.png b/assets/sprites/blocks/environment/floors/sulfur-sand-floor1.png index 8060b68..a73d283 100644 Binary files a/assets/sprites/blocks/environment/floors/sulfur-sand-floor1.png and b/assets/sprites/blocks/environment/floors/sulfur-sand-floor1.png differ diff --git a/assets/sprites/blocks/environment/floors/sulfur-sand-floor2.png b/assets/sprites/blocks/environment/floors/sulfur-sand-floor2.png index 28a0767..437ecc6 100644 Binary files a/assets/sprites/blocks/environment/floors/sulfur-sand-floor2.png and b/assets/sprites/blocks/environment/floors/sulfur-sand-floor2.png differ diff --git a/assets/sprites/blocks/environment/floors/sulfur-sand-floor3.png b/assets/sprites/blocks/environment/floors/sulfur-sand-floor3.png index 1ecc04b..87909e5 100644 Binary files a/assets/sprites/blocks/environment/floors/sulfur-sand-floor3.png and b/assets/sprites/blocks/environment/floors/sulfur-sand-floor3.png differ diff --git a/assets/sprites/blocks/environment/floors/sulfur-sand-floor4.png b/assets/sprites/blocks/environment/floors/sulfur-sand-floor4.png index 5f46250..45a5417 100644 Binary files a/assets/sprites/blocks/environment/floors/sulfur-sand-floor4.png and b/assets/sprites/blocks/environment/floors/sulfur-sand-floor4.png differ diff --git a/assets/sprites/blocks/environment/ores/ore-magnesium1.png b/assets/sprites/blocks/environment/ores/ore-magnesium1.png new file mode 100644 index 0000000..6802d80 Binary files /dev/null and b/assets/sprites/blocks/environment/ores/ore-magnesium1.png differ diff --git a/assets/sprites/blocks/environment/ores/ore-magnesium2.png b/assets/sprites/blocks/environment/ores/ore-magnesium2.png new file mode 100644 index 0000000..e586765 Binary files /dev/null and b/assets/sprites/blocks/environment/ores/ore-magnesium2.png differ diff --git a/assets/sprites/blocks/environment/ores/ore-magnesium3.png b/assets/sprites/blocks/environment/ores/ore-magnesium3.png new file mode 100644 index 0000000..2c70e0b Binary files /dev/null and b/assets/sprites/blocks/environment/ores/ore-magnesium3.png differ diff --git a/assets/sprites/blocks/environment/props/boulders/limestone-boulder-shadow.png b/assets/sprites/blocks/environment/props/boulders/limestone-boulder1-shadow.png similarity index 100% rename from assets/sprites/blocks/environment/props/boulders/limestone-boulder-shadow.png rename to assets/sprites/blocks/environment/props/boulders/limestone-boulder1-shadow.png diff --git a/assets/sprites/blocks/environment/props/boulders/limestone-boulder.png b/assets/sprites/blocks/environment/props/boulders/limestone-boulder1.png similarity index 100% rename from assets/sprites/blocks/environment/props/boulders/limestone-boulder.png rename to assets/sprites/blocks/environment/props/boulders/limestone-boulder1.png diff --git a/assets/sprites/blocks/environment/props/ekronite-boulder1.png b/assets/sprites/blocks/environment/props/ekronite-boulder1.png new file mode 100644 index 0000000..e95cc4e Binary files /dev/null and b/assets/sprites/blocks/environment/props/ekronite-boulder1.png differ diff --git a/assets/sprites/blocks/environment/props/ekronite-boulder2.png b/assets/sprites/blocks/environment/props/ekronite-boulder2.png new file mode 100644 index 0000000..c24db83 Binary files /dev/null and b/assets/sprites/blocks/environment/props/ekronite-boulder2.png differ diff --git a/assets/sprites/blocks/environment/props/ekronite-boulder3.png b/assets/sprites/blocks/environment/props/ekronite-boulder3.png new file mode 100644 index 0000000..357010f Binary files /dev/null and b/assets/sprites/blocks/environment/props/ekronite-boulder3.png differ diff --git a/assets/sprites/blocks/environment/props/ekronite-cluster1.png b/assets/sprites/blocks/environment/props/ekronite-cluster1.png new file mode 100644 index 0000000..c3299ad Binary files /dev/null and b/assets/sprites/blocks/environment/props/ekronite-cluster1.png differ diff --git a/assets/sprites/blocks/environment/props/ekronite-cluster2.png b/assets/sprites/blocks/environment/props/ekronite-cluster2.png new file mode 100644 index 0000000..4034998 Binary files /dev/null and b/assets/sprites/blocks/environment/props/ekronite-cluster2.png differ diff --git a/assets/sprites/blocks/environment/props/ekronite-cluster3.png b/assets/sprites/blocks/environment/props/ekronite-cluster3.png new file mode 100644 index 0000000..22905a4 Binary files /dev/null and b/assets/sprites/blocks/environment/props/ekronite-cluster3.png differ diff --git a/assets/sprites/blocks/environment/props/nartanite-stone-boulder-big1.png b/assets/sprites/blocks/environment/props/nartanite-stone-boulder-big1.png new file mode 100644 index 0000000..26a3ff8 Binary files /dev/null and b/assets/sprites/blocks/environment/props/nartanite-stone-boulder-big1.png differ diff --git a/assets/sprites/blocks/environment/props/nartanite-stone-boulder-big2.png b/assets/sprites/blocks/environment/props/nartanite-stone-boulder-big2.png new file mode 100644 index 0000000..48be307 Binary files /dev/null and b/assets/sprites/blocks/environment/props/nartanite-stone-boulder-big2.png differ diff --git a/assets/sprites/blocks/environment/props/nartanite-stone-boulder-big3.png b/assets/sprites/blocks/environment/props/nartanite-stone-boulder-big3.png new file mode 100644 index 0000000..232e5e0 Binary files /dev/null and b/assets/sprites/blocks/environment/props/nartanite-stone-boulder-big3.png differ diff --git a/assets/sprites/blocks/environment/props/nartanite-stone-boulder1.png b/assets/sprites/blocks/environment/props/nartanite-stone-boulder1.png new file mode 100644 index 0000000..000aeef Binary files /dev/null and b/assets/sprites/blocks/environment/props/nartanite-stone-boulder1.png differ diff --git a/assets/sprites/blocks/environment/props/nartanite-stone-boulder2.png b/assets/sprites/blocks/environment/props/nartanite-stone-boulder2.png new file mode 100644 index 0000000..7e779bb Binary files /dev/null and b/assets/sprites/blocks/environment/props/nartanite-stone-boulder2.png differ diff --git a/assets/sprites/blocks/environment/props/nartanite-stone-boulder3.png b/assets/sprites/blocks/environment/props/nartanite-stone-boulder3.png new file mode 100644 index 0000000..1bc8af8 Binary files /dev/null and b/assets/sprites/blocks/environment/props/nartanite-stone-boulder3.png differ diff --git a/assets/sprites/blocks/environment/vents/sulfur-geyser1.png b/assets/sprites/blocks/environment/vents/sulfur-geyser1.png index 40cd175..d51b242 100644 Binary files a/assets/sprites/blocks/environment/vents/sulfur-geyser1.png and b/assets/sprites/blocks/environment/vents/sulfur-geyser1.png differ diff --git a/assets/sprites/blocks/environment/vents/sulfur-vent1.png b/assets/sprites/blocks/environment/vents/sulfur-vent1.png index 774ff81..bb05056 100644 Binary files a/assets/sprites/blocks/environment/vents/sulfur-vent1.png and b/assets/sprites/blocks/environment/vents/sulfur-vent1.png differ diff --git a/assets/sprites/blocks/environment/vents/sulfur-vent2.png b/assets/sprites/blocks/environment/vents/sulfur-vent2.png index d4e34f9..3177ee0 100644 Binary files a/assets/sprites/blocks/environment/vents/sulfur-vent2.png and b/assets/sprites/blocks/environment/vents/sulfur-vent2.png differ diff --git a/assets/sprites/blocks/environment/vents/sulfur-vent3.png b/assets/sprites/blocks/environment/vents/sulfur-vent3.png index cb3a677..3a2c8d2 100644 Binary files a/assets/sprites/blocks/environment/vents/sulfur-vent3.png and b/assets/sprites/blocks/environment/vents/sulfur-vent3.png differ diff --git a/assets/sprites/blocks/environment/walls/basalt-wall1.png b/assets/sprites/blocks/environment/walls/basalt-wall1.png index 79b4ec7..2974119 100644 Binary files a/assets/sprites/blocks/environment/walls/basalt-wall1.png and b/assets/sprites/blocks/environment/walls/basalt-wall1.png differ diff --git a/assets/sprites/blocks/environment/walls/basalt-wall2.png b/assets/sprites/blocks/environment/walls/basalt-wall2.png index a72b642..6e27e00 100644 Binary files a/assets/sprites/blocks/environment/walls/basalt-wall2.png and b/assets/sprites/blocks/environment/walls/basalt-wall2.png differ diff --git a/assets/sprites/blocks/environment/walls/deep-sandstone-wall-large.png b/assets/sprites/blocks/environment/walls/deep-sandstone-wall-large.png index 31c6578..11387f3 100644 Binary files a/assets/sprites/blocks/environment/walls/deep-sandstone-wall-large.png and b/assets/sprites/blocks/environment/walls/deep-sandstone-wall-large.png differ diff --git a/assets/sprites/blocks/environment/walls/deep-sandstone-wall1.png b/assets/sprites/blocks/environment/walls/deep-sandstone-wall1.png index 1a14c36..aa2474a 100644 Binary files a/assets/sprites/blocks/environment/walls/deep-sandstone-wall1.png and b/assets/sprites/blocks/environment/walls/deep-sandstone-wall1.png differ diff --git a/assets/sprites/blocks/environment/walls/deep-sandstone-wall2.png b/assets/sprites/blocks/environment/walls/deep-sandstone-wall2.png index e618fbf..00f5c98 100644 Binary files a/assets/sprites/blocks/environment/walls/deep-sandstone-wall2.png and b/assets/sprites/blocks/environment/walls/deep-sandstone-wall2.png differ diff --git a/assets/sprites/blocks/environment/walls/deep-sandstone-wall3.png b/assets/sprites/blocks/environment/walls/deep-sandstone-wall3.png index 4fd4cec..01b7380 100644 Binary files a/assets/sprites/blocks/environment/walls/deep-sandstone-wall3.png and b/assets/sprites/blocks/environment/walls/deep-sandstone-wall3.png differ diff --git a/assets/sprites/blocks/environment/walls/deep-spores-wall1.png b/assets/sprites/blocks/environment/walls/deep-spores-wall1.png new file mode 100644 index 0000000..2dc461b Binary files /dev/null and b/assets/sprites/blocks/environment/walls/deep-spores-wall1.png differ diff --git a/assets/sprites/blocks/environment/walls/deep-spores-wall2.png b/assets/sprites/blocks/environment/walls/deep-spores-wall2.png new file mode 100644 index 0000000..d60b70a Binary files /dev/null and b/assets/sprites/blocks/environment/walls/deep-spores-wall2.png differ diff --git a/assets/sprites/blocks/environment/walls/deep-spores-wall3.png b/assets/sprites/blocks/environment/walls/deep-spores-wall3.png new file mode 100644 index 0000000..df22748 Binary files /dev/null and b/assets/sprites/blocks/environment/walls/deep-spores-wall3.png differ diff --git a/assets/sprites/blocks/environment/walls/ekronite-wall-large.png b/assets/sprites/blocks/environment/walls/ekronite-wall-large.png new file mode 100644 index 0000000..5a2165e Binary files /dev/null and b/assets/sprites/blocks/environment/walls/ekronite-wall-large.png differ diff --git a/assets/sprites/blocks/environment/walls/ekronite-wall1.png b/assets/sprites/blocks/environment/walls/ekronite-wall1.png new file mode 100644 index 0000000..ad8e1ee Binary files /dev/null and b/assets/sprites/blocks/environment/walls/ekronite-wall1.png differ diff --git a/assets/sprites/blocks/environment/walls/ekronite-wall2.png b/assets/sprites/blocks/environment/walls/ekronite-wall2.png new file mode 100644 index 0000000..efe960d Binary files /dev/null and b/assets/sprites/blocks/environment/walls/ekronite-wall2.png differ diff --git a/assets/sprites/blocks/environment/walls/ekronite-wall3.png b/assets/sprites/blocks/environment/walls/ekronite-wall3.png new file mode 100644 index 0000000..5d1bc0e Binary files /dev/null and b/assets/sprites/blocks/environment/walls/ekronite-wall3.png differ diff --git a/assets/sprites/blocks/environment/walls/limestone-mountain-shadow.png b/assets/sprites/blocks/environment/walls/limestone-mountain-shadow.png new file mode 100644 index 0000000..2f9e234 Binary files /dev/null and b/assets/sprites/blocks/environment/walls/limestone-mountain-shadow.png differ diff --git a/assets/sprites/blocks/environment/walls/limestone-mountain.png b/assets/sprites/blocks/environment/walls/limestone-mountain.png new file mode 100644 index 0000000..f3cf347 Binary files /dev/null and b/assets/sprites/blocks/environment/walls/limestone-mountain.png differ diff --git a/assets/sprites/blocks/environment/walls/limestone-wall-large.png b/assets/sprites/blocks/environment/walls/limestone-wall-large.png index 4171189..55afc13 100644 Binary files a/assets/sprites/blocks/environment/walls/limestone-wall-large.png and b/assets/sprites/blocks/environment/walls/limestone-wall-large.png differ diff --git a/assets/sprites/blocks/environment/walls/limestone-wall1.png b/assets/sprites/blocks/environment/walls/limestone-wall1.png index 4352781..5162165 100644 Binary files a/assets/sprites/blocks/environment/walls/limestone-wall1.png and b/assets/sprites/blocks/environment/walls/limestone-wall1.png differ diff --git a/assets/sprites/blocks/environment/walls/limestone-wall2.png b/assets/sprites/blocks/environment/walls/limestone-wall2.png index 515a663..e0ff854 100644 Binary files a/assets/sprites/blocks/environment/walls/limestone-wall2.png and b/assets/sprites/blocks/environment/walls/limestone-wall2.png differ diff --git a/assets/sprites/blocks/environment/walls/limestone-wall3.png b/assets/sprites/blocks/environment/walls/limestone-wall3.png index 5f727f6..e2c84ee 100644 Binary files a/assets/sprites/blocks/environment/walls/limestone-wall3.png and b/assets/sprites/blocks/environment/walls/limestone-wall3.png differ diff --git a/assets/sprites/blocks/environment/walls/nartanite-stone-wall-large.png b/assets/sprites/blocks/environment/walls/nartanite-stone-wall-large.png new file mode 100644 index 0000000..86c6d6b Binary files /dev/null and b/assets/sprites/blocks/environment/walls/nartanite-stone-wall-large.png differ diff --git a/assets/sprites/blocks/environment/walls/nartanite-stone-wall1.png b/assets/sprites/blocks/environment/walls/nartanite-stone-wall1.png new file mode 100644 index 0000000..389f405 Binary files /dev/null and b/assets/sprites/blocks/environment/walls/nartanite-stone-wall1.png differ diff --git a/assets/sprites/blocks/environment/walls/nartanite-stone-wall2.png b/assets/sprites/blocks/environment/walls/nartanite-stone-wall2.png new file mode 100644 index 0000000..aec0ed1 Binary files /dev/null and b/assets/sprites/blocks/environment/walls/nartanite-stone-wall2.png differ diff --git a/assets/sprites/blocks/environment/walls/nartanite-stone-wall3.png b/assets/sprites/blocks/environment/walls/nartanite-stone-wall3.png new file mode 100644 index 0000000..2e9dc34 Binary files /dev/null and b/assets/sprites/blocks/environment/walls/nartanite-stone-wall3.png differ diff --git a/assets/sprites/blocks/environment/walls/seaweed-wall1.png b/assets/sprites/blocks/environment/walls/seaweed-wall1.png index 2a8378d..96c8b8e 100644 Binary files a/assets/sprites/blocks/environment/walls/seaweed-wall1.png and b/assets/sprites/blocks/environment/walls/seaweed-wall1.png differ diff --git a/assets/sprites/blocks/environment/walls/seaweed-wall2.png b/assets/sprites/blocks/environment/walls/seaweed-wall2.png index 9684625..0b7bec9 100644 Binary files a/assets/sprites/blocks/environment/walls/seaweed-wall2.png and b/assets/sprites/blocks/environment/walls/seaweed-wall2.png differ diff --git a/assets/sprites/blocks/environment/walls/seaweed-wall3.png b/assets/sprites/blocks/environment/walls/seaweed-wall3.png index f109a14..533e435 100644 Binary files a/assets/sprites/blocks/environment/walls/seaweed-wall3.png and b/assets/sprites/blocks/environment/walls/seaweed-wall3.png differ diff --git a/assets/sprites/blocks/environment/walls/sulfur-sand-wall-large.png b/assets/sprites/blocks/environment/walls/sulfur-sand-wall-large.png index b7cce4c..ef3e92c 100644 Binary files a/assets/sprites/blocks/environment/walls/sulfur-sand-wall-large.png and b/assets/sprites/blocks/environment/walls/sulfur-sand-wall-large.png differ diff --git a/assets/sprites/blocks/environment/walls/sulfur-sand-wall1.png b/assets/sprites/blocks/environment/walls/sulfur-sand-wall1.png index c1b8d20..263a920 100644 Binary files a/assets/sprites/blocks/environment/walls/sulfur-sand-wall1.png and b/assets/sprites/blocks/environment/walls/sulfur-sand-wall1.png differ diff --git a/assets/sprites/blocks/environment/walls/sulfur-sand-wall2.png b/assets/sprites/blocks/environment/walls/sulfur-sand-wall2.png index 040f33a..6721285 100644 Binary files a/assets/sprites/blocks/environment/walls/sulfur-sand-wall2.png and b/assets/sprites/blocks/environment/walls/sulfur-sand-wall2.png differ diff --git a/assets/sprites/blocks/environment/walls/sulfur-sand-wall3.png b/assets/sprites/blocks/environment/walls/sulfur-sand-wall3.png index 92b3023..d663997 100644 Binary files a/assets/sprites/blocks/environment/walls/sulfur-sand-wall3.png and b/assets/sprites/blocks/environment/walls/sulfur-sand-wall3.png differ diff --git a/assets/sprites/blocks/environment/walls/sulfur-wall2.png b/assets/sprites/blocks/environment/walls/sulfur-wall2.png index c21c6a0..d5408d1 100644 Binary files a/assets/sprites/blocks/environment/walls/sulfur-wall2.png and b/assets/sprites/blocks/environment/walls/sulfur-wall2.png differ diff --git a/assets/sprites/blocks/environment/walls/sulfur-wall3.png b/assets/sprites/blocks/environment/walls/sulfur-wall3.png index 377d6f9..cfc606c 100644 Binary files a/assets/sprites/blocks/environment/walls/sulfur-wall3.png and b/assets/sprites/blocks/environment/walls/sulfur-wall3.png differ diff --git a/assets/sprites/blocks/environment/walls/underwater-red-wall1.png b/assets/sprites/blocks/environment/walls/underwater-red-wall1.png new file mode 100644 index 0000000..a66918d Binary files /dev/null and b/assets/sprites/blocks/environment/walls/underwater-red-wall1.png differ diff --git a/assets/sprites/blocks/environment/walls/underwater-red-wall2.png b/assets/sprites/blocks/environment/walls/underwater-red-wall2.png new file mode 100644 index 0000000..d03091b Binary files /dev/null and b/assets/sprites/blocks/environment/walls/underwater-red-wall2.png differ diff --git a/assets/sprites/blocks/environment/walls/underwater-red-wall3.png b/assets/sprites/blocks/environment/walls/underwater-red-wall3.png new file mode 100644 index 0000000..591d447 Binary files /dev/null and b/assets/sprites/blocks/environment/walls/underwater-red-wall3.png differ diff --git a/assets/sprites/blocks/p312/defends/aluminium-wall-large.png b/assets/sprites/blocks/p312/defense/aluminium-wall-large.png similarity index 100% rename from assets/sprites/blocks/p312/defends/aluminium-wall-large.png rename to assets/sprites/blocks/p312/defense/aluminium-wall-large.png diff --git a/assets/sprites/blocks/p312/defends/aluminium-wall.png b/assets/sprites/blocks/p312/defense/aluminium-wall.png similarity index 100% rename from assets/sprites/blocks/p312/defends/aluminium-wall.png rename to assets/sprites/blocks/p312/defense/aluminium-wall.png diff --git a/assets/sprites/blocks/p312/defense/steel-wall-large.png b/assets/sprites/blocks/p312/defense/steel-wall-large.png new file mode 100644 index 0000000..db8ee01 Binary files /dev/null and b/assets/sprites/blocks/p312/defense/steel-wall-large.png differ diff --git a/assets/sprites/blocks/p312/defense/steel-wall.png b/assets/sprites/blocks/p312/defense/steel-wall.png new file mode 100644 index 0000000..be1c633 Binary files /dev/null and b/assets/sprites/blocks/p312/defense/steel-wall.png differ diff --git a/assets/sprites/blocks/p312/light/light-projector-top.png b/assets/sprites/blocks/p312/light/light-projector-top.png index eca8028..9a0d02b 100644 Binary files a/assets/sprites/blocks/p312/light/light-projector-top.png and b/assets/sprites/blocks/p312/light/light-projector-top.png differ diff --git a/assets/sprites/blocks/p312/logic/logicalExecutor.png b/assets/sprites/blocks/p312/logic/logicalExecutor.png new file mode 100644 index 0000000..5656106 Binary files /dev/null and b/assets/sprites/blocks/p312/logic/logicalExecutor.png differ diff --git a/assets/sprites/blocks/p312/logistic/item/isolated-bridge-end.png b/assets/sprites/blocks/p312/logistic/item/isolated-bridge-end.png index 19b3dfb..feba260 100644 Binary files a/assets/sprites/blocks/p312/logistic/item/isolated-bridge-end.png and b/assets/sprites/blocks/p312/logistic/item/isolated-bridge-end.png differ diff --git a/assets/sprites/blocks/p312/logistic/item/isolated-bridge.png b/assets/sprites/blocks/p312/logistic/item/isolated-bridge.png index 94dd705..992f009 100644 Binary files a/assets/sprites/blocks/p312/logistic/item/isolated-bridge.png and b/assets/sprites/blocks/p312/logistic/item/isolated-bridge.png differ diff --git a/assets/sprites/blocks/p312/logistic/item/isolated-conveyor/isolated-conveyor-full.png b/assets/sprites/blocks/p312/logistic/item/isolated-conveyor/isolated-conveyor-full.png index 719a905..983d999 100644 Binary files a/assets/sprites/blocks/p312/logistic/item/isolated-conveyor/isolated-conveyor-full.png and b/assets/sprites/blocks/p312/logistic/item/isolated-conveyor/isolated-conveyor-full.png differ diff --git a/assets/sprites/blocks/p312/logistic/item/isolated-conveyor/isolated-conveyor-top-0.png b/assets/sprites/blocks/p312/logistic/item/isolated-conveyor/isolated-conveyor-top-0.png index d5b1fb1..b5e3858 100644 Binary files a/assets/sprites/blocks/p312/logistic/item/isolated-conveyor/isolated-conveyor-top-0.png and b/assets/sprites/blocks/p312/logistic/item/isolated-conveyor/isolated-conveyor-top-0.png differ diff --git a/assets/sprites/blocks/p312/logistic/item/isolated-conveyor/isolated-conveyor-top-1.png b/assets/sprites/blocks/p312/logistic/item/isolated-conveyor/isolated-conveyor-top-1.png index 432bcb6..46c8f77 100644 Binary files a/assets/sprites/blocks/p312/logistic/item/isolated-conveyor/isolated-conveyor-top-1.png and b/assets/sprites/blocks/p312/logistic/item/isolated-conveyor/isolated-conveyor-top-1.png differ diff --git a/assets/sprites/blocks/p312/logistic/item/isolated-conveyor/isolated-conveyor-top-2.png b/assets/sprites/blocks/p312/logistic/item/isolated-conveyor/isolated-conveyor-top-2.png index 581adc2..a599f22 100644 Binary files a/assets/sprites/blocks/p312/logistic/item/isolated-conveyor/isolated-conveyor-top-2.png and b/assets/sprites/blocks/p312/logistic/item/isolated-conveyor/isolated-conveyor-top-2.png differ diff --git a/assets/sprites/blocks/p312/logistic/item/isolated-conveyor/isolated-conveyor-top-3.png b/assets/sprites/blocks/p312/logistic/item/isolated-conveyor/isolated-conveyor-top-3.png index bd20cfe..9f52435 100644 Binary files a/assets/sprites/blocks/p312/logistic/item/isolated-conveyor/isolated-conveyor-top-3.png and b/assets/sprites/blocks/p312/logistic/item/isolated-conveyor/isolated-conveyor-top-3.png differ diff --git a/assets/sprites/blocks/p312/logistic/item/isolated-conveyor/isolated-conveyor-top-4.png b/assets/sprites/blocks/p312/logistic/item/isolated-conveyor/isolated-conveyor-top-4.png index 68e8b04..be48b2d 100644 Binary files a/assets/sprites/blocks/p312/logistic/item/isolated-conveyor/isolated-conveyor-top-4.png and b/assets/sprites/blocks/p312/logistic/item/isolated-conveyor/isolated-conveyor-top-4.png differ diff --git a/assets/sprites/blocks/p312/logistic/item/isolated-inverted-sorter-cross-full.png b/assets/sprites/blocks/p312/logistic/item/isolated-inverted-sorter-cross-full.png new file mode 100644 index 0000000..126e95c Binary files /dev/null and b/assets/sprites/blocks/p312/logistic/item/isolated-inverted-sorter-cross-full.png differ diff --git a/assets/sprites/blocks/p312/logistic/item/isolated-inverted-sorter-cross.png b/assets/sprites/blocks/p312/logistic/item/isolated-inverted-sorter-cross.png new file mode 100644 index 0000000..126e95c Binary files /dev/null and b/assets/sprites/blocks/p312/logistic/item/isolated-inverted-sorter-cross.png differ diff --git a/assets/sprites/blocks/p312/logistic/item/isolated-inverted-sorter.png b/assets/sprites/blocks/p312/logistic/item/isolated-inverted-sorter.png index 49686c6..46322c5 100644 Binary files a/assets/sprites/blocks/p312/logistic/item/isolated-inverted-sorter.png and b/assets/sprites/blocks/p312/logistic/item/isolated-inverted-sorter.png differ diff --git a/assets/sprites/blocks/p312/logistic/item/isolated-junction.png b/assets/sprites/blocks/p312/logistic/item/isolated-junction.png index 8f4bf34..f4ce33e 100644 Binary files a/assets/sprites/blocks/p312/logistic/item/isolated-junction.png and b/assets/sprites/blocks/p312/logistic/item/isolated-junction.png differ diff --git a/assets/sprites/blocks/p312/logistic/item/isolated-overflow-gate.png b/assets/sprites/blocks/p312/logistic/item/isolated-overflow-gate.png index 8a3cb20..04e54cb 100644 Binary files a/assets/sprites/blocks/p312/logistic/item/isolated-overflow-gate.png and b/assets/sprites/blocks/p312/logistic/item/isolated-overflow-gate.png differ diff --git a/assets/sprites/blocks/p312/logistic/item/isolated-router.png b/assets/sprites/blocks/p312/logistic/item/isolated-router.png index a4995b0..f4ab43b 100644 Binary files a/assets/sprites/blocks/p312/logistic/item/isolated-router.png and b/assets/sprites/blocks/p312/logistic/item/isolated-router.png differ diff --git a/assets/sprites/blocks/p312/logistic/item/isolated-sorter-center.png b/assets/sprites/blocks/p312/logistic/item/isolated-sorter-center.png new file mode 100644 index 0000000..e9e6a84 Binary files /dev/null and b/assets/sprites/blocks/p312/logistic/item/isolated-sorter-center.png differ diff --git a/assets/sprites/blocks/p312/logistic/item/isolated-sorter-cross-full.png b/assets/sprites/blocks/p312/logistic/item/isolated-sorter-cross-full.png new file mode 100644 index 0000000..126e95c Binary files /dev/null and b/assets/sprites/blocks/p312/logistic/item/isolated-sorter-cross-full.png differ diff --git a/assets/sprites/blocks/p312/logistic/item/isolated-sorter-cross.png b/assets/sprites/blocks/p312/logistic/item/isolated-sorter-cross.png new file mode 100644 index 0000000..126e95c Binary files /dev/null and b/assets/sprites/blocks/p312/logistic/item/isolated-sorter-cross.png differ diff --git a/assets/sprites/blocks/p312/logistic/item/isolated-sorter.png b/assets/sprites/blocks/p312/logistic/item/isolated-sorter.png index 0bef1c1..e3c1ec6 100644 Binary files a/assets/sprites/blocks/p312/logistic/item/isolated-sorter.png and b/assets/sprites/blocks/p312/logistic/item/isolated-sorter.png differ diff --git a/assets/sprites/blocks/p312/logistic/item/isolated-underflow-gate.png b/assets/sprites/blocks/p312/logistic/item/isolated-underflow-gate.png index 9888659..d9b7115 100644 Binary files a/assets/sprites/blocks/p312/logistic/item/isolated-underflow-gate.png and b/assets/sprites/blocks/p312/logistic/item/isolated-underflow-gate.png differ diff --git a/assets/sprites/blocks/p312/logistic/liquid/liquid-distributor-bottom.png b/assets/sprites/blocks/p312/logistic/liquid/liquid-distributor-bottom.png index 8d1749f..772e56f 100644 Binary files a/assets/sprites/blocks/p312/logistic/liquid/liquid-distributor-bottom.png and b/assets/sprites/blocks/p312/logistic/liquid/liquid-distributor-bottom.png differ diff --git a/assets/sprites/blocks/p312/logistic/liquid/liquid-distributor-full.png b/assets/sprites/blocks/p312/logistic/liquid/liquid-distributor-full.png index f043743..e1b1163 100644 Binary files a/assets/sprites/blocks/p312/logistic/liquid/liquid-distributor-full.png and b/assets/sprites/blocks/p312/logistic/liquid/liquid-distributor-full.png differ diff --git a/assets/sprites/blocks/p312/logistic/liquid/liquid-distributor.png b/assets/sprites/blocks/p312/logistic/liquid/liquid-distributor.png index e40973a..2287487 100644 Binary files a/assets/sprites/blocks/p312/logistic/liquid/liquid-distributor.png and b/assets/sprites/blocks/p312/logistic/liquid/liquid-distributor.png differ diff --git a/assets/sprites/blocks/p312/logistic/liquid/pipe-bridge-end.png b/assets/sprites/blocks/p312/logistic/liquid/pipe-bridge-end.png index ea1bf4f..b1dfd39 100644 Binary files a/assets/sprites/blocks/p312/logistic/liquid/pipe-bridge-end.png and b/assets/sprites/blocks/p312/logistic/liquid/pipe-bridge-end.png differ diff --git a/assets/sprites/blocks/p312/logistic/liquid/pipe-bridge.png b/assets/sprites/blocks/p312/logistic/liquid/pipe-bridge.png index c9f8f9a..53ea09d 100644 Binary files a/assets/sprites/blocks/p312/logistic/liquid/pipe-bridge.png and b/assets/sprites/blocks/p312/logistic/liquid/pipe-bridge.png differ diff --git a/assets/sprites/blocks/p312/logistic/liquid/pipe-junction.png b/assets/sprites/blocks/p312/logistic/liquid/pipe-junction.png index b4e6d76..86d9a32 100644 Binary files a/assets/sprites/blocks/p312/logistic/liquid/pipe-junction.png and b/assets/sprites/blocks/p312/logistic/liquid/pipe-junction.png differ diff --git a/assets/sprites/blocks/p312/logistic/liquid/pipes/liquid-pipe-cap.png b/assets/sprites/blocks/p312/logistic/liquid/pipes/liquid-pipe-cap.png index 0e3049c..07c1314 100644 Binary files a/assets/sprites/blocks/p312/logistic/liquid/pipes/liquid-pipe-cap.png and b/assets/sprites/blocks/p312/logistic/liquid/pipes/liquid-pipe-cap.png differ diff --git a/assets/sprites/blocks/p312/logistic/liquid/pipes/liquid-pipe-full.png b/assets/sprites/blocks/p312/logistic/liquid/pipes/liquid-pipe-full.png index 8b5c4a5..d2c6490 100644 Binary files a/assets/sprites/blocks/p312/logistic/liquid/pipes/liquid-pipe-full.png and b/assets/sprites/blocks/p312/logistic/liquid/pipes/liquid-pipe-full.png differ diff --git a/assets/sprites/blocks/p312/logistic/liquid/pipes/liquid-pipe-top-0.png b/assets/sprites/blocks/p312/logistic/liquid/pipes/liquid-pipe-top-0.png index 14b73fe..80ad9c3 100644 Binary files a/assets/sprites/blocks/p312/logistic/liquid/pipes/liquid-pipe-top-0.png and b/assets/sprites/blocks/p312/logistic/liquid/pipes/liquid-pipe-top-0.png differ diff --git a/assets/sprites/blocks/p312/logistic/liquid/pipes/liquid-pipe-top-1.png b/assets/sprites/blocks/p312/logistic/liquid/pipes/liquid-pipe-top-1.png index 2d58774..615223f 100644 Binary files a/assets/sprites/blocks/p312/logistic/liquid/pipes/liquid-pipe-top-1.png and b/assets/sprites/blocks/p312/logistic/liquid/pipes/liquid-pipe-top-1.png differ diff --git a/assets/sprites/blocks/p312/logistic/liquid/pipes/liquid-pipe-top-2.png b/assets/sprites/blocks/p312/logistic/liquid/pipes/liquid-pipe-top-2.png index b67fe68..2d4cab2 100644 Binary files a/assets/sprites/blocks/p312/logistic/liquid/pipes/liquid-pipe-top-2.png and b/assets/sprites/blocks/p312/logistic/liquid/pipes/liquid-pipe-top-2.png differ diff --git a/assets/sprites/blocks/p312/logistic/liquid/pipes/liquid-pipe-top-3.png b/assets/sprites/blocks/p312/logistic/liquid/pipes/liquid-pipe-top-3.png index da8423b..47aade3 100644 Binary files a/assets/sprites/blocks/p312/logistic/liquid/pipes/liquid-pipe-top-3.png and b/assets/sprites/blocks/p312/logistic/liquid/pipes/liquid-pipe-top-3.png differ diff --git a/assets/sprites/blocks/p312/logistic/liquid/pipes/liquid-pipe-top-4.png b/assets/sprites/blocks/p312/logistic/liquid/pipes/liquid-pipe-top-4.png index c4f953c..fbc9999 100644 Binary files a/assets/sprites/blocks/p312/logistic/liquid/pipes/liquid-pipe-top-4.png and b/assets/sprites/blocks/p312/logistic/liquid/pipes/liquid-pipe-top-4.png differ diff --git a/assets/sprites/blocks/p312/power/fuel-generator-top.png b/assets/sprites/blocks/p312/power/fuel-generator-top.png index d690da7..43a8a36 100644 Binary files a/assets/sprites/blocks/p312/power/fuel-generator-top.png and b/assets/sprites/blocks/p312/power/fuel-generator-top.png differ diff --git a/assets/sprites/blocks/p312/power/fuel-generator.png b/assets/sprites/blocks/p312/power/fuel-generator.png index 8354294..79d33cb 100644 Binary files a/assets/sprites/blocks/p312/power/fuel-generator.png and b/assets/sprites/blocks/p312/power/fuel-generator.png differ diff --git a/assets/sprites/blocks/p312/power/reg-generator-top.png b/assets/sprites/blocks/p312/power/reg-generator-top.png new file mode 100644 index 0000000..d690da7 Binary files /dev/null and b/assets/sprites/blocks/p312/power/reg-generator-top.png differ diff --git a/assets/sprites/blocks/p312/power/reg-generator.png b/assets/sprites/blocks/p312/power/reg-generator.png new file mode 100644 index 0000000..8354294 Binary files /dev/null and b/assets/sprites/blocks/p312/power/reg-generator.png differ diff --git a/assets/sprites/blocks/p312/production/crafting/chemical-plant-bottom.png b/assets/sprites/blocks/p312/production/crafting/chemical-plant-bottom.png new file mode 100644 index 0000000..a6ba8f0 Binary files /dev/null and b/assets/sprites/blocks/p312/production/crafting/chemical-plant-bottom.png differ diff --git a/assets/sprites/blocks/p312/production/crafting/chemical-plant-glow.png b/assets/sprites/blocks/p312/production/crafting/chemical-plant-glow.png index c478eed..bc350b6 100644 Binary files a/assets/sprites/blocks/p312/production/crafting/chemical-plant-glow.png and b/assets/sprites/blocks/p312/production/crafting/chemical-plant-glow.png differ diff --git a/assets/sprites/blocks/p312/production/crafting/chemical-plant.png b/assets/sprites/blocks/p312/production/crafting/chemical-plant.png index 20d3b9b..652c293 100644 Binary files a/assets/sprites/blocks/p312/production/crafting/chemical-plant.png and b/assets/sprites/blocks/p312/production/crafting/chemical-plant.png differ diff --git a/assets/sprites/blocks/p312/production/drills/detonate-drill.png b/assets/sprites/blocks/p312/production/drills/detonate-drill.png index 1d77806..c0d7cfd 100644 Binary files a/assets/sprites/blocks/p312/production/drills/detonate-drill.png and b/assets/sprites/blocks/p312/production/drills/detonate-drill.png differ diff --git a/assets/sprites/blocks/p312/turrets/bases/ds-turret-block-4.png b/assets/sprites/blocks/p312/turrets/bases/ds-turret-block-4.png new file mode 100644 index 0000000..a9fdda5 Binary files /dev/null and b/assets/sprites/blocks/p312/turrets/bases/ds-turret-block-4.png differ diff --git a/assets/sprites/blocks/p312/turrets/cutoff.png b/assets/sprites/blocks/p312/turrets/cutoff.png index 7f844b9..843fecd 100644 Binary files a/assets/sprites/blocks/p312/turrets/cutoff.png and b/assets/sprites/blocks/p312/turrets/cutoff.png differ diff --git a/assets/sprites/blocks/p312/turrets/execution-barrel-1.png b/assets/sprites/blocks/p312/turrets/execution-barrel-1.png new file mode 100644 index 0000000..ae269dc Binary files /dev/null and b/assets/sprites/blocks/p312/turrets/execution-barrel-1.png differ diff --git a/assets/sprites/blocks/p312/turrets/execution-barrel-2.png b/assets/sprites/blocks/p312/turrets/execution-barrel-2.png new file mode 100644 index 0000000..066386f Binary files /dev/null and b/assets/sprites/blocks/p312/turrets/execution-barrel-2.png differ diff --git a/assets/sprites/blocks/p312/turrets/execution-barrel-3.png b/assets/sprites/blocks/p312/turrets/execution-barrel-3.png new file mode 100644 index 0000000..2ef65fe Binary files /dev/null and b/assets/sprites/blocks/p312/turrets/execution-barrel-3.png differ diff --git a/assets/sprites/blocks/p312/turrets/execution-barrel-4.png b/assets/sprites/blocks/p312/turrets/execution-barrel-4.png new file mode 100644 index 0000000..47f550b Binary files /dev/null and b/assets/sprites/blocks/p312/turrets/execution-barrel-4.png differ diff --git a/assets/sprites/blocks/p312/turrets/execution-preview.png b/assets/sprites/blocks/p312/turrets/execution-preview.png new file mode 100644 index 0000000..bf35625 Binary files /dev/null and b/assets/sprites/blocks/p312/turrets/execution-preview.png differ diff --git a/assets/sprites/blocks/p312/turrets/execution.png b/assets/sprites/blocks/p312/turrets/execution.png index bf35625..218a6fb 100644 Binary files a/assets/sprites/blocks/p312/turrets/execution.png and b/assets/sprites/blocks/p312/turrets/execution.png differ diff --git a/assets/sprites/blocks/p312/turrets/hydroid-draw-torpedo-aluminium.png b/assets/sprites/blocks/p312/turrets/hydroid-draw-torpedo-aluminium.png new file mode 100644 index 0000000..4fa0933 Binary files /dev/null and b/assets/sprites/blocks/p312/turrets/hydroid-draw-torpedo-aluminium.png differ diff --git a/assets/sprites/blocks/p312/turrets/hydroid-draw-torpedo.png b/assets/sprites/blocks/p312/turrets/hydroid-draw-torpedo-steel.png similarity index 100% rename from assets/sprites/blocks/p312/turrets/hydroid-draw-torpedo.png rename to assets/sprites/blocks/p312/turrets/hydroid-draw-torpedo-steel.png diff --git a/assets/sprites/blocks/p312/turrets/irritation.png b/assets/sprites/blocks/p312/turrets/irritation.png index b6a9660..62cb265 100644 Binary files a/assets/sprites/blocks/p312/turrets/irritation.png and b/assets/sprites/blocks/p312/turrets/irritation.png differ diff --git a/assets/sprites/blocks/p312/turrets/termination-barrel.png b/assets/sprites/blocks/p312/turrets/termination-barrel.png new file mode 100644 index 0000000..135a182 Binary files /dev/null and b/assets/sprites/blocks/p312/turrets/termination-barrel.png differ diff --git a/assets/sprites/blocks/p312/turrets/termination-preview.png b/assets/sprites/blocks/p312/turrets/termination-preview.png new file mode 100644 index 0000000..2777731 Binary files /dev/null and b/assets/sprites/blocks/p312/turrets/termination-preview.png differ diff --git a/assets/sprites/blocks/p312/turrets/termination-side-l.png b/assets/sprites/blocks/p312/turrets/termination-side-l.png new file mode 100644 index 0000000..9806c9c Binary files /dev/null and b/assets/sprites/blocks/p312/turrets/termination-side-l.png differ diff --git a/assets/sprites/blocks/p312/turrets/termination-side-r.png b/assets/sprites/blocks/p312/turrets/termination-side-r.png new file mode 100644 index 0000000..a180b41 Binary files /dev/null and b/assets/sprites/blocks/p312/turrets/termination-side-r.png differ diff --git a/assets/sprites/blocks/p312/turrets/termination.png b/assets/sprites/blocks/p312/turrets/termination.png new file mode 100644 index 0000000..a4ea801 Binary files /dev/null and b/assets/sprites/blocks/p312/turrets/termination.png differ diff --git a/assets/sprites/blocks/p312/units/shade-unit-factory-out.png b/assets/sprites/blocks/p312/units/deep-unit-factory-out.png similarity index 100% rename from assets/sprites/blocks/p312/units/shade-unit-factory-out.png rename to assets/sprites/blocks/p312/units/deep-unit-factory-out.png diff --git a/assets/sprites/blocks/p312/units/shade-unit-factory-top.png b/assets/sprites/blocks/p312/units/deep-unit-factory-top.png similarity index 100% rename from assets/sprites/blocks/p312/units/shade-unit-factory-top.png rename to assets/sprites/blocks/p312/units/deep-unit-factory-top.png diff --git a/assets/sprites/blocks/p312/units/shade-unit-factory.png b/assets/sprites/blocks/p312/units/deep-unit-factory.png similarity index 100% rename from assets/sprites/blocks/p312/units/shade-unit-factory.png rename to assets/sprites/blocks/p312/units/deep-unit-factory.png diff --git a/assets/sprites/blocks/p312/units/shade-unit-reconstructor-in.png b/assets/sprites/blocks/p312/units/deep-unit-reconstructor-in.png similarity index 100% rename from assets/sprites/blocks/p312/units/shade-unit-reconstructor-in.png rename to assets/sprites/blocks/p312/units/deep-unit-reconstructor-in.png diff --git a/assets/sprites/blocks/p312/units/shade-unit-reconstructor-out.png b/assets/sprites/blocks/p312/units/deep-unit-reconstructor-out.png similarity index 100% rename from assets/sprites/blocks/p312/units/shade-unit-reconstructor-out.png rename to assets/sprites/blocks/p312/units/deep-unit-reconstructor-out.png diff --git a/assets/sprites/blocks/p312/units/shade-unit-reconstructor-top.png b/assets/sprites/blocks/p312/units/deep-unit-reconstructor-top.png similarity index 100% rename from assets/sprites/blocks/p312/units/shade-unit-reconstructor-top.png rename to assets/sprites/blocks/p312/units/deep-unit-reconstructor-top.png diff --git a/assets/sprites/blocks/p312/units/shade-unit-reconstructor.png b/assets/sprites/blocks/p312/units/deep-unit-reconstructor.png similarity index 100% rename from assets/sprites/blocks/p312/units/shade-unit-reconstructor.png rename to assets/sprites/blocks/p312/units/deep-unit-reconstructor.png diff --git a/assets/sprites/icon.png b/assets/sprites/icon.png deleted file mode 100644 index 491ada5..0000000 Binary files a/assets/sprites/icon.png and /dev/null differ diff --git a/assets/sprites/items/molybdenum.png b/assets/sprites/items/molybdenum.png new file mode 100644 index 0000000..885d0af Binary files /dev/null and b/assets/sprites/items/molybdenum.png differ diff --git a/assets/sprites/items/sapphirum.png b/assets/sprites/items/sapphirum.png new file mode 100644 index 0000000..0ca78eb Binary files /dev/null and b/assets/sprites/items/sapphirum.png differ diff --git a/assets/sprites/items/steel.png b/assets/sprites/items/steel.png index e8c1fc4..f4fc326 100644 Binary files a/assets/sprites/items/steel.png and b/assets/sprites/items/steel.png differ diff --git a/assets/sprites/units/z387/core-units/moment.png b/assets/sprites/units/z387/core-units/moment.png index 7c99d29..7bbbc49 100644 Binary files a/assets/sprites/units/z387/core-units/moment.png and b/assets/sprites/units/z387/core-units/moment.png differ diff --git a/assets/sprites/units/z387/mechs/oppression/control-full.ase b/assets/sprites/units/z387/mechs/oppression/control-full.ase new file mode 100644 index 0000000..ff754b5 Binary files /dev/null and b/assets/sprites/units/z387/mechs/oppression/control-full.ase differ diff --git a/assets/sprites/units/z387/mechs/oppression/control-weapon.ase b/assets/sprites/units/z387/mechs/oppression/control-weapon.ase new file mode 100644 index 0000000..ea6fc89 Binary files /dev/null and b/assets/sprites/units/z387/mechs/oppression/control-weapon.ase differ diff --git a/assets/sprites/units/z387/mechs/oppression/control.ase b/assets/sprites/units/z387/mechs/oppression/control.ase new file mode 100644 index 0000000..8606574 Binary files /dev/null and b/assets/sprites/units/z387/mechs/oppression/control.ase differ diff --git a/assets/sprites/units/z387/mechs/oppression/oppression-ats.png b/assets/sprites/units/z387/mechs/oppression/oppression-ats.png new file mode 100644 index 0000000..157c823 Binary files /dev/null and b/assets/sprites/units/z387/mechs/oppression/oppression-ats.png differ diff --git a/assets/sprites/units/z387/mechs/oppression/oppression-base.png b/assets/sprites/units/z387/mechs/oppression/oppression-base.png new file mode 100644 index 0000000..c7ca6dd Binary files /dev/null and b/assets/sprites/units/z387/mechs/oppression/oppression-base.png differ diff --git a/assets/sprites/units/z387/mechs/oppression/oppression-cell.png b/assets/sprites/units/z387/mechs/oppression/oppression-cell.png new file mode 100644 index 0000000..513c526 Binary files /dev/null and b/assets/sprites/units/z387/mechs/oppression/oppression-cell.png differ diff --git a/assets/sprites/units/z387/mechs/oppression/oppression-full.png b/assets/sprites/units/z387/mechs/oppression/oppression-full.png new file mode 100644 index 0000000..006452c Binary files /dev/null and b/assets/sprites/units/z387/mechs/oppression/oppression-full.png differ diff --git a/assets/sprites/units/z387/mechs/oppression/oppression-leg.png b/assets/sprites/units/z387/mechs/oppression/oppression-leg.png new file mode 100644 index 0000000..017488c Binary files /dev/null and b/assets/sprites/units/z387/mechs/oppression/oppression-leg.png differ diff --git a/assets/sprites/units/z387/mechs/oppression/oppression-weapon.png b/assets/sprites/units/z387/mechs/oppression/oppression-weapon.png new file mode 100644 index 0000000..0e61568 Binary files /dev/null and b/assets/sprites/units/z387/mechs/oppression/oppression-weapon.png differ diff --git a/assets/sprites/units/z387/mechs/oppression/oppression.png b/assets/sprites/units/z387/mechs/oppression/oppression.png new file mode 100644 index 0000000..cd149be Binary files /dev/null and b/assets/sprites/units/z387/mechs/oppression/oppression.png differ diff --git a/assets/sprites/units/z387/mics/hydroid-torpedo-aluminium.png b/assets/sprites/units/z387/mics/hydroid-torpedo-aluminium.png new file mode 100644 index 0000000..24cf009 Binary files /dev/null and b/assets/sprites/units/z387/mics/hydroid-torpedo-aluminium.png differ diff --git a/assets/sprites/units/z387/submarines/complicity.png b/assets/sprites/units/z387/submarines/complicity.png index 6828f3d..d138eab 100644 Binary files a/assets/sprites/units/z387/submarines/complicity.png and b/assets/sprites/units/z387/submarines/complicity.png differ diff --git a/assets/sprites/units/z387/submarines/consequences.png b/assets/sprites/units/z387/submarines/consequences.png index 35077e9..75b049c 100644 Binary files a/assets/sprites/units/z387/submarines/consequences.png and b/assets/sprites/units/z387/submarines/consequences.png differ diff --git a/assets/sprites/units/z387/submarines/sprig-cell.png b/assets/sprites/units/z387/submarines/sprig-cell.png new file mode 100644 index 0000000..f686d27 Binary files /dev/null and b/assets/sprites/units/z387/submarines/sprig-cell.png differ diff --git a/assets/sprites/units/z387/submarines/sprig.png b/assets/sprites/units/z387/submarines/sprig.png new file mode 100644 index 0000000..393aa09 Binary files /dev/null and b/assets/sprites/units/z387/submarines/sprig.png differ diff --git a/build.gradle b/build.gradle index d5d58a7..9caa5e4 100644 --- a/build.gradle +++ b/build.gradle @@ -17,7 +17,7 @@ java{ ext{ //the build number that this mod is made for - mindustryVersion = 'v154' + mindustryVersion = 'v158' jabelVersion = "93fde537c7" //windows sucks isWindows = System.getProperty("os.name").toLowerCase().contains("windows") diff --git a/mod.hjson b/mod.hjson index 1d0966b..2a4a6e4 100644 --- a/mod.hjson +++ b/mod.hjson @@ -1,7 +1,7 @@ name: "deepsea" main: "ds.DeepSea" version: 0.2.1 -minGameVersion: 154.3 +minGameVersion: 159 displayName: "Project: [#324ba6[]]Deep [#5aa9d6[]]Sea[white[]] [accent[]](Alpha)[white[]]" description: "The mod is about planet P-I-312 and more. Some fishes and underwater campaign \nSpecial thanks to: \n- [#5865f2[]]@meepoffaith[white[]] for the pseudo-3D drawing code. \n\n[gray[]]Fish: (*=)<[]" diff --git a/src/ds/DSSetting.java b/src/ds/DSSetting.java index eb6b7a0..16da752 100644 --- a/src/ds/DSSetting.java +++ b/src/ds/DSSetting.java @@ -5,12 +5,15 @@ public class DSSetting { public static float rayAmountMultiplier; + + public static float[] raysMultipliers = {1, 1.5f, 2}; + public static void init(){ Vars.ui.settings.addCategory("Deep sea", root ->{ root.checkPref("@setting.onlyDeepseaMusic", false); - root.sliderPref("@setting.rayQuality", 1,1, 5,1,i -> { - rayAmountMultiplier = i; - return i + "x"; + root.sliderPref("@setting.rayQuality", 0,0, 2,1,i -> { + rayAmountMultiplier = raysMultipliers[i]; + return (i + 1) + "x"; }); }); } diff --git a/src/ds/DeepSea.java b/src/ds/DeepSea.java index 52b616d..4707196 100644 --- a/src/ds/DeepSea.java +++ b/src/ds/DeepSea.java @@ -1,28 +1,40 @@ package ds; import arc.Events; +import arc.math.Mathf; +import arc.math.geom.Vec2; import ds.content.ContentLoader; import ds.content.DSMusicLoader; +import ds.type.entities.Cable; +import ds.world.global.CableProcess; +import ds.world.global.DSWorldProcessor; import ds.world.graphics.DSEnvRenderers; import mindustry.Vars; +import mindustry.core.GameState; import mindustry.game.EventType; +import mindustry.gen.Posc; import mindustry.mod.*; public class DeepSea extends Mod{ - public DeepSea(){} + public DeepSea(){ + ClassMap.classes.put("WorldProcessor", DSWorldProcessor.class); + } @Override public void loadContent(){ DSMusicLoader.load(); ContentLoader.load(); + DSWorldProcessor.load(); DSEnvRenderers.init(); Events.on(EventType.ClientLoadEvent.class, e -> { IconLoader.loadIcons(); + DSWorldProcessor.init(); }); } @Override public void init() { + Cable.load(); //DSMusicLoader.attach(); if (!Vars.headless && Vars.ui != null) { Events.on(EventType.ClientLoadEvent.class, e -> DSSetting.init()); @@ -33,5 +45,25 @@ public void init() { }); */ } + + Events.run(EventType.Trigger.update, ()->{ + DSWorldProcessor.update(); + }); + //Test + /* + Events.on(EventType.WorldLoadEvent.class, e->{ + for(int i = 0; i < 970; i++){ + CableProcess.addCable(new Cable( + new Vec2(Mathf.random()*200 * 8, Mathf.random()*200 * 8), + new Vec2(Mathf.random()*200 * 8, Mathf.random()*200 * 8) + )); + }; + }); + */ + Events.on(EventType.StateChangeEvent.class, e ->{ + if (e.from != GameState.State.menu && e.to == GameState.State.menu) { + DSWorldProcessor.resetProcesses(); + } + }); } } \ No newline at end of file diff --git a/src/ds/content/ContentLoader.java b/src/ds/content/ContentLoader.java index a50d349..ceca486 100644 --- a/src/ds/content/ContentLoader.java +++ b/src/ds/content/ContentLoader.java @@ -6,9 +6,13 @@ import ds.content.planets.DSPlanets; import ds.content.planets.PiSectors; import ds.content.units.PiUnits; +import ds.type.entities.Cable; +import ds.world.global.*; public class ContentLoader { public static void load(){ + DSWorldProcessor.addProcess(new CableProcess("Cable processor")); + DSStatusEffects.load(); DSAttributes.load(); SchematicsLoader.load(); @@ -22,6 +26,6 @@ public static void load(){ //end load DSPlanets.loadContent(); PiSectors.load(); - Pi312TechTree.load(); + DSTechTree.load(); } } diff --git a/src/ds/content/DSFx.java b/src/ds/content/DSFx.java index e8c90bc..ecec705 100644 --- a/src/ds/content/DSFx.java +++ b/src/ds/content/DSFx.java @@ -11,6 +11,7 @@ import arc.math.geom.Vec2; import arc.struct.Seq; import arc.util.Tmp; +import ds.world.graphics.DSPal; import mindustry.entities.Effect; import mindustry.entities.effect.ParticleEffect; import mindustry.graphics.Drawf; @@ -33,7 +34,7 @@ public class DSFx { Lines.ellipse(e.x + eX, e.y + eY, 0.45f * e.fin()+ 0.45f, 2.5f, 8, e.rotation); }), dsColorSparkSmall = new Effect(15f, e -> { - color(Color.white, e.color, e.fin()); + color(e.color); stroke(e.fout() * 1.1f + 0.5f); randLenVectors(e.id, 2, 14f * e.fin(), e.rotation, 0f, (x, y) -> { @@ -77,12 +78,6 @@ public class DSFx { Fill.circle(e.x + x, e.y + y, e.fin(Interp.circleOut) * 6f + 4.75f); }); }), - torpedoTrail = new Effect(120, e -> { - color(Color.valueOf("e0f4ff80"), Color.valueOf("bfe0f200"), e.fin()); - randLenVectors(e.id, 2, 10 * e.fin(), (x, y)->{ - Fill.circle(e.x + x, e.y + y, e.fin() * 0.75f + 1); - }); - }), drillImpact = new Effect(150, e->{ color(Color.valueOf("525570"), Color.valueOf("a4adfc00"), e.fin(Interp.circleOut)); randLenVectors(e.id, 7, 30 * e.fin(), (x, y)->{ @@ -121,7 +116,7 @@ public class DSFx { Lines.ellipse(e.x + eX, e.y + eY, 0.45f * e.fin()+ 0.25f, 2.5f, 8, e.rotation); }; }), - dsBulletTrail = new Effect(15, e ->{ + dsBulletTrail = new Effect(12, e ->{ color(Color.valueOf("e0f4ff"), Color.valueOf("bfe0f200"), e.fin()); randLenVectors(e.id, 3, 5 * e.fin(), (x, y)->{ Fill.circle(e.x + x, e.y + y, e.fin() * 0.85f + 0.45f); @@ -149,6 +144,77 @@ public class DSFx { Lines.circle(e.x, e.y, 10 * e.fin()); Drawf.light(e.x, e.y, 4 + 7 * e.fout(), Color.valueOf("ccdef0"), 0.7f * e.fout()); }), + dsMassiveExplosion = new Effect(40, e ->{ + color(e.color); + stroke(e.fout() * 2.5f); + float circleRad = 6f + e.finpow() * 90f; + Lines.circle(e.x, e.y, circleRad); + stroke(e.fout() * 0.25f + 0.9f); + rand.setSeed(e.id); + for(int i = 0; i < 19; i++){ + float angle = rand.random(360f); + float lenRand = rand.random(0.5f, 1f); + Lines.lineAngle(e.x, e.y, angle, e.foutpow() * 40f * rand.random(1f, 0.8f) + 2f, e.finpow() * 89f * lenRand + 6f); + } + Drawf.light(e.x, e.y, circleRad * 2.5f, e.color, e.fout()); + }), + dsMassiveDeepSmoke = new Effect(100, e ->{ + color(e.color ,Color.valueOf("b5b3b3").a(0.8f), Color.valueOf("212121").a(0), e.fin()); + randLenVectors(e.id, 14, 70f * e.fin(Interp.pow5Out), (x, y) -> { + Fill.circle(e.x + x, e.y + y, e.fout(Interp.circleOut) * 4 + 1.45f); + }); + randLenVectors(e.id+1, 8, 60f * e.fin(Interp.pow5Out), (x, y) -> { + Fill.circle(e.x + x, e.y + y, e.fout() * 2 + 0.95f); + }); + }), + dsMassiveSparkSpikes = new Effect(29, e->{ + color(e.color); + rand.setSeed(e.id); + for(int i = 0; i < 5; i++){ + float len = rand.random(50, 90); + float wid = rand.random(1, 2); + float rot = rand.random(360); + Drawf.tri(e.x, e.y, wid * e.fout(Interp.pow3Out), len * 0.8f + (len * 0.2f * e.fin()), rot); + } + rand.setSeed(e.id+1); + for(int i = 0; i < 3; i++){ + float len = rand.random(90, 140); + float wid = rand.random(8, 6); + float rot = rand.random(360); + Drawf.tri(e.x, e.y, wid * e.fout(Interp.pow3Out), len * e.fin(), rot); + } + }), + dsColorSparkTrail = new Effect(12, e->{ + color(e.color); + stroke(0.6f + e.fout() * 1.1f); + rand.setSeed(e.id); + + for(int i = 0; i < 3; i++){ + float rot = e.rotation + rand.range(15f) + 180f; + v.trns(rot, rand.random(e.fin() * 25f)); + lineAngle(e.x + v.x, e.y + v.y, rot, e.fout() * rand.random(4f, 9f) + 1.2f); + } + rand.setSeed(e.id+1); + for(int s : Mathf.signs){ + lineAngle(e.x, e.y, e.rotation + 90 * s + 20 * s * e.fin(Interp.circleOut), e.fout(Interp.circleOut) * 5 + 1.2f); + } + Drawf.light(e.x, e.y, e.fout(Interp.circleOut) * 10, e.color, e.fout() * 0.5f); + }), + dsFastSparkTrail = new ParticleEffect(){{ + cone = 12.5f; + length = -16; + lifetime = 15; + particles = 3; + line = true; + lenFrom = 3; + lenTo = 5.85f; + interp = Interp.linear; + sizeInterp = Interp.circleOut; + strokeFrom = 1.75f; + strokeTo = 0; + colorFrom = DSPal.dsBulletFront; + colorTo = DSPal.dsBulletBack; + }}, sulfurVentSteam = new Effect(250f, e -> { color(e.color, Color.valueOf("22261000"), e.fin()); @@ -195,10 +261,16 @@ public class DSFx { drillDetonateEffectTri = new Effect(70, e ->{ color(Color.valueOf("fcffeb"), Color.valueOf("d1c497"), e.fin()); + float rotation = Mathf.randomSeedRange(e.id, 35); for(int sign : Mathf.signs){ float cOut = e.fout(Interp.circleOut); - Drawf.tri(e.x, e.y, 12 * cOut, 30 * e.fin(Interp.bounceOut), 90 + 90 * sign); + Drawf.tri(e.x, e.y, 12 * cOut, 30 * e.fin(Interp.bounceOut), 90 + rotation + 90 * sign); Drawf.light(e.x, e.y, 30 * cOut, Color.valueOf("fcffeb"), 0.4f * cOut + 0.15f); + stroke(e.fout(Interp.circleOut) * 1.15f); + randLenVectors(e.id + 1, 9, 3 + 50 * e.fin(Interp.pow5Out), 90 + rotation + 90 * sign, 35, (x, y)->{ + lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout(Interp.pow5Out) * 6f); + }); + } }), drillDetonateEffectWave = new Effect(40, e ->{ diff --git a/src/ds/content/DSMusicLoader.java b/src/ds/content/DSMusicLoader.java index 835e4c7..cdf2c33 100644 --- a/src/ds/content/DSMusicLoader.java +++ b/src/ds/content/DSMusicLoader.java @@ -64,9 +64,7 @@ public static boolean bothMusic(){ public static void attach() { Events.on(EventType.WorldLoadEvent.class, e -> { if (Vars.state.rules.planet != null && Vars.state.rules.planet == DSPlanets.pi312) { - if(!DSSetting.getOnlyModMus()) { - vannilaMusic = true; - } else vannilaMusic = false; + vannilaMusic = !DSSetting.getOnlyModMus(); deepSeaMusic = true; } else { vannilaMusic = true; diff --git a/src/ds/content/DSSounds.java b/src/ds/content/DSSounds.java index a11d177..e8c85b4 100644 --- a/src/ds/content/DSSounds.java +++ b/src/ds/content/DSSounds.java @@ -4,6 +4,7 @@ import arc.assets.AssetDescriptor; import arc.assets.loaders.SoundLoader; import arc.audio.Sound; +import arc.util.Log; import mindustry.Vars; public class DSSounds { diff --git a/src/ds/content/DSStatusEffects.java b/src/ds/content/DSStatusEffects.java index 66e19a4..ab7c38d 100644 --- a/src/ds/content/DSStatusEffects.java +++ b/src/ds/content/DSStatusEffects.java @@ -1,6 +1,7 @@ package ds.content; import arc.struct.Seq; +import arc.util.Time; import ds.type.entities.dsUnits.SubmarineUnitType; import mindustry.entities.effect.ParticleEffect; import mindustry.entities.units.StatusEntry; @@ -24,9 +25,9 @@ public static void load(){ public void update(Unit unit, StatusEntry entry){ super.update(unit, entry); if (unit.type instanceof SubmarineUnitType) { - unit.damageContinuousPierce(0.2f * (unit.health / (unit.maxHealth / 1.5f))); + unit.damageContinuousPierce((unit.health / (unit.maxHealth * 2)) / 2.5f * Time.delta); unit.speedMultiplier = Math.max(0.25f, unit.health / unit.maxHealth); - } else unit.damageContinuousPierce(0.025f * (unit.health / (unit.maxHealth / 1.15f))); + } else unit.damageContinuousPierce((unit.health / (unit.maxHealth * 2)) / 3.4f * Time.delta); } }; } diff --git a/src/ds/content/Pi312TechTree.java b/src/ds/content/DSTechTree.java similarity index 75% rename from src/ds/content/Pi312TechTree.java rename to src/ds/content/DSTechTree.java index 4bcff71..5695e2e 100644 --- a/src/ds/content/Pi312TechTree.java +++ b/src/ds/content/DSTechTree.java @@ -1,7 +1,6 @@ package ds.content; import arc.struct.Seq; -import ds.content.planets.PiSectors; import mindustry.game.Objectives; import mindustry.type.ItemStack; @@ -11,10 +10,11 @@ import static ds.content.planets.DSPlanets.*; import static ds.content.planets.PiSectors.*; import static ds.content.units.PiUnits.*; +import static mindustry.content.Items.*; import static mindustry.content.Liquids.*; import static mindustry.content.TechTree.*; -public class Pi312TechTree { +public class DSTechTree { public static void load(){ pi312.techTree = nodeRoot("P-I-312", coreInfluence, false, ()->{ //Sectors @@ -36,14 +36,14 @@ public static void load(){ nodeProduce(oxygen, ()->{}); }); }); + nodeProduce(graphite, ()->{}); nodeProduce(manganeseHydroxide, ()->{ nodeProduce(manganese, ()->{ + nodeProduce(ironstone, ()->{ + nodeProduce(steel, ()->{}); + }); nodeProduce(magnesium, ()->{ - nodeProduce(lithium, ()->{ - nodeProduce(ironstone, ()->{ - nodeProduce(steel, ()->{}); - }); - }); + nodeProduce(lithium, ()->{}); }); }); }); @@ -51,19 +51,19 @@ public static void load(){ }); }); //Unit blocks - node(shadeUnitFactory, Seq.with(new Objectives.SectorComplete(plate)), ()->{ + node(deepUnitFactory, Seq.with(new Objectives.SectorComplete(plate)), ()->{ //Units node(condition, ()->{ - node(oversight, Seq.with(new Objectives.Research(shadeUnitReconstructor)), ()->{}); + node(oversight, Seq.with(new Objectives.Research(deepUnitReconstructor)), ()->{}); }); node(note, ()->{ - node(sound, Seq.with(new Objectives.Research(shadeUnitReconstructor)), ()->{}); + node(sound, Seq.with(new Objectives.Research(deepUnitReconstructor)), ()->{}); }); node(complicity, ()->{ - node(consequences, Seq.with(new Objectives.Research(shadeUnitReconstructor)), ()->{}); + node(consequences, Seq.with(new Objectives.Research(deepUnitReconstructor)), ()->{}); }); - node(shadeUnitReconstructor, ()->{}); + node(deepUnitReconstructor, ()->{}); }); //Effect node(pressuredContainer, ()->{ @@ -73,21 +73,21 @@ public static void load(){ node(repairModule); //Turrets node(cutoff, ItemStack.with(aluminium, 100, silver, 90),()->{ - node(irritation, Seq.with(new Objectives.SectorComplete(PiSectors.theBeginning)), ()->{ + node(irritation, ItemStack.with(aluminium, 150, silver, 120), ()->{ node(discharge); }); }); //Defence node(aluminiumWall, ItemStack.with(aluminium, 10), ()->{ - node(aluminiumWallLarge); + node(aluminiumWallLarge, ItemStack.with(aluminium, 80), ()->{}); }); //Logistic node(isolatedConveyor, ItemStack.with(aluminium, 10),()->{ - node(isolatedRouter, ItemStack.with(aluminium, 80), ()->{ - node(isolatedJunction, ItemStack.with(aluminium, 100), ()->{}); - node(isolatedBridge, ItemStack.with(aluminium, 120, silver, 90), ()->{}); - node(isolatedSorter, ()->{ - node(isolatedInvertedSorter); + node(isolatedRouter, ItemStack.with(aluminium, 20), ()->{ + node(isolatedJunction, ItemStack.with(aluminium, 20), ()->{}); + node(isolatedBridge, ItemStack.with(aluminium, 30, silver, 20), ()->{}); + node(isolatedSorter, ItemStack.with(aluminium, 20, silver, 10), ()->{ + node(isolatedInvertedSorter, ItemStack.with(aluminium, 20, silver, 10), ()->{}); }); node(isolatedOverflowGate, ()->{ node(isolatedUnderflowGate); @@ -112,7 +112,7 @@ public static void load(){ //Drills node(hydraulicDrill, ItemStack.with(aluminium, 20), ()->{ - node(hydraulicWallDrill, ItemStack.with(aluminium, 200, silver, 100), Seq.with(new Objectives.OnSector(canyon)),()->{ + node(hydraulicWallDrill, ItemStack.with(aluminium, 200, silver, 100), ()->{ node(gasBore, Seq.with(new Objectives.SectorComplete(plate)), ()->{}); }); node(detonateDrill); @@ -123,8 +123,10 @@ public static void load(){ node(powerDistributor); node(condensator); }); - node(hydroTurbineGenerator, ItemStack.with(aluminium, 120, silver, 90), ()->{ - node(geothermalGenerator, ItemStack.with(aluminium, 500, silver, 400, manganese, 120), ()->{}); + node(fuelGenerator, ItemStack.with(aluminium, 30, silver, 20), ()->{ + node(hydroTurbineGenerator, ItemStack.with(aluminium, 120, silver, 90, graphite, 50), ()->{ + node(geothermalGenerator, ItemStack.with(aluminium, 500, silver, 400, manganese, 120, steel, 200), ()->{}); + }); }); }); } diff --git a/src/ds/content/blocks/PiBlocks.java b/src/ds/content/blocks/PiBlocks.java index 8a7831e..7ffaec0 100644 --- a/src/ds/content/blocks/PiBlocks.java +++ b/src/ds/content/blocks/PiBlocks.java @@ -7,34 +7,28 @@ import ds.content.DSFx; import ds.content.DSSounds; import ds.content.DSStatusEffects; +import ds.content.items.PiItems; import ds.content.units.PiUnits; -import ds.world.blocks.crafting.DynamicCrafter; -import ds.world.blocks.distribution.ClosedConveyor; -import ds.world.blocks.power.AdvancedThermalGenerator; -import ds.world.blocks.production.WallDrill; -import ds.world.blocks.turret.AccelItemTurret; -import ds.world.blocks.turret.AccelPowerTurret; -import ds.world.blocks.turret.DSHarpoonTurret; -import ds.world.blocks.turret.DSItemTurret; -import ds.world.consumers.RecipeIO; -import ds.draw.drawers.DrawBetterRegion; +import ds.world.blocks.crafting.*; +import ds.world.blocks.distribution.*; +import ds.world.blocks.power.*; +import ds.world.blocks.production.*; +import ds.world.blocks.turret.*; +import ds.world.modules.RecipeIO; +import ds.draw.drawers.*; import ds.world.graphics.DSPal; import ds.world.meta.DSEnv; -import ds.type.entities.bullets.HarpoonBulletType; -import ds.type.entities.bullets.PointLightningBulletType; -import ds.type.entities.dsUnits.TorpedoUnitType; +import ds.type.entities.bullets.*; +import ds.type.entities.dsUnits.*; import ds.type.entities.effect.RandRadialEffect; import ds.type.entities.weapons.DSWeapon; +import mindustry.Vars; import mindustry.content.Fx; import mindustry.entities.UnitSorts; -import mindustry.entities.bullet.BasicBulletType; -import mindustry.entities.bullet.BulletType; -import mindustry.entities.bullet.ExplosionBulletType; -import mindustry.entities.effect.MultiEffect; -import mindustry.entities.effect.ParticleEffect; -import mindustry.entities.part.RegionPart; -import mindustry.entities.pattern.ShootBarrel; -import mindustry.entities.pattern.ShootSpread; +import mindustry.entities.bullet.*; +import mindustry.entities.effect.*; +import mindustry.entities.part.*; +import mindustry.entities.pattern.*; import mindustry.gen.Sounds; import mindustry.graphics.Layer; import mindustry.graphics.Pal; @@ -43,26 +37,17 @@ import mindustry.type.LiquidStack; import mindustry.type.UnitType; import mindustry.world.Block; -import mindustry.world.blocks.defense.MendProjector; -import mindustry.world.blocks.defense.Wall; +import mindustry.world.blocks.defense.*; import mindustry.world.blocks.distribution.*; import mindustry.world.blocks.liquid.*; +import mindustry.world.blocks.logic.LogicBlock; import mindustry.world.blocks.power.*; -import mindustry.world.blocks.production.AttributeCrafter; -import mindustry.world.blocks.production.BeamDrill; -import mindustry.world.blocks.production.BurstDrill; -import mindustry.world.blocks.production.GenericCrafter; -import mindustry.world.blocks.storage.CoreBlock; -import mindustry.world.blocks.storage.StorageBlock; -import mindustry.world.blocks.storage.Unloader; -import mindustry.world.blocks.units.Reconstructor; -import mindustry.world.blocks.units.UnitFactory; -import mindustry.world.consumers.ConsumeItemFlammable; +import mindustry.world.blocks.production.*; +import mindustry.world.blocks.storage.*; +import mindustry.world.blocks.units.*; +import mindustry.world.consumers.*; import mindustry.world.draw.*; -import mindustry.world.meta.Attribute; -import mindustry.world.meta.BlockGroup; -import mindustry.world.meta.BuildVisibility; -import mindustry.world.meta.Env; +import mindustry.world.meta.*; import static ds.content.DSAttributes.*; @@ -78,7 +63,7 @@ public class PiBlocks { //Production hydraulicDrill, hydraulicWallDrill, gasBore, detonateDrill, //Power - powerTransmitter, powerDistributor, condensator, hydroTurbineGenerator, geothermalGenerator, fuelGenerator, + powerTransmitter, powerDistributor, condensator, fuelGenerator, hydroTurbineGenerator, geothermalGenerator, //Effect lightProjector, repairModule, //Crafting @@ -90,11 +75,13 @@ public class PiBlocks { //Cores coreInfluence, coreEnforcement, coreEminence, //Turrets - cutoff, irritation, discharge, hydroid, execution, + cutoff, irritation, discharge, hydroid, execution, termination, //Defends - aluminiumWall, aluminiumWallLarge, + aluminiumWall, aluminiumWallLarge, steelWall, steelWallLarge, //UnitBlocks - shadeUnitFactory, shadeUnitReconstructor; + deepUnitFactory, deepUnitReconstructor, + //Logic + logicalExecutor; public static void load(){ loadLogisticBlocks(); @@ -105,14 +92,20 @@ public static void load(){ loadTurrets(); loadDefence(); loadUnitBlocks(); + logicalExecutor = new LogicBlock("logicalExecutor"){{ + requirements(Category.logic, with(aluminium, 15, silver, 20, manganese, 10)); + instructionsPerTick = 60; + consumePower(0.1f); + }}; } public static void loadTurrets(){ cutoff = new DSHarpoonTurret("cutoff"){{ - scaledHealth = 60; + emitDirectLight = false; + scaledHealth = 90; requirements(Category.turret, with(aluminium, 75, silver, 45)); outlineColor = DSPal.dsTurretOutline; size = 2; - reload = 300; + reload = 120; range = 200; shake = 2; envRequired = DSEnv.underwaterWarm; @@ -120,8 +113,11 @@ public static void loadTurrets(){ consumeItem(sulfur, 3); shootCone = 1; drawer = new DrawTurret("ds-turret-"); - shootY = 2; - shootType = new HarpoonBulletType(16, 45){{ + shootY = 3.75f; + shootType = new HarpoonBulletType(16, 30){{ + knockback = 2.3f; + status = DSStatusEffects.waterLeak; + statusDuration = 180; buildingDamageMultiplier = 0.3f; lifetime = 45; pierceDrag = 0.25f; @@ -130,14 +126,15 @@ public static void loadTurrets(){ drag = 0.08f; frontColor = Color.valueOf("d4d4d4"); backColor = Color.valueOf("929aa8"); - wireStroke = 3.75f; + wireStroke = 1.75f; width = 10; height = 25; returnSpeed = 3; }}; }}; irritation = new DSItemTurret("irritation"){{ - scaledHealth = 80; + lightCone = 45; + scaledHealth = 90; requirements(Category.turret, with(aluminium, 75, silver, 45)); outlineColor = DSPal.dsTurretOutline; size = 2; @@ -151,10 +148,10 @@ public static void loadTurrets(){ shootSound = Sounds.shootDiffuse; consumePower(30/60f); range = 17 * tilesize; - reload = 30; + reload = 50; + shake = 2.75f; targetAir = false; drawer = new DrawTurret("ds-turret-"); - ammoUseEffect = Fx.casing2Double; ammo( silver, new BasicBulletType(8,15){{ pierce = true; @@ -171,26 +168,49 @@ silver, new BasicBulletType(8,15){{ trailEffect = DSFx.dsBulletSparkTrail; ammoMultiplier = 1; }}, - steel, new BasicBulletType(8,23){{ + steel, new BasicBulletType(8,25){{ + shootPattern = new ShootPattern(){{ + shots = 1; + }}; reloadMultiplier = 0.75f; pierce = true; pierceCap = 3; - lifetime = 22; + lifetime = 8; rangeChange = 5 * tilesize; - trailLength = 4; - trailWidth = 0.6f; - width = 5.75f; - height = 13; + trailLength = 6; + trailWidth = 3; + width = 15; + height = 18; frontColor = hitColor = Color.valueOf("ffc7bf"); backColor = trailColor = Color.valueOf("d98e84"); hitEffect = despawnEffect = Fx.hitBulletColor; trailInterval = 2; trailEffect = DSFx.dsBulletSparkTrail; - ammoMultiplier = 2; + ammoMultiplier = 1; + fragVelocityMin = 0.9f; + fragVelocityMax = 1; + fragSpread = 2.25f; + fragRandomSpread = 1.5f; + fragBullets = 10; + pierceFragCap = 2; + fragBullet = new BasicBulletType(11.2f, 19){{ + lifetime = 10; + rangeChange = 5 * tilesize; + trailLength = 4; + trailWidth = 0.6f; + width = 5; + height = 12; + frontColor = hitColor = Color.valueOf("ffc7bf"); + backColor = trailColor = Color.valueOf("d98e84"); + hitEffect = despawnEffect = Fx.hitBulletColor; + trailInterval = 2; + trailEffect = DSFx.dsBulletSparkTrail; + }}; }} ); }}; discharge = new AccelPowerTurret("discharge"){{ + envDisabled = DSEnv.underwaterWarm; shootY = 28/4f; scaledHealth = 90; predictTarget = false; @@ -230,7 +250,8 @@ steel, new BasicBulletType(8,23){{ }}; execution = new AccelItemTurret("execution"){{ - requirements(Category.turret, with(aluminium, 125, silver, 35, graphite, 50, steel, 35)); + lightCone = 45; + requirements(Category.turret, with(aluminium, 125, silver, 35, graphite, 50, manganese, 35)); size = 3; outlineColor = DSPal.dsTurretOutline; scaledHealth = 100; @@ -243,28 +264,44 @@ steel, new BasicBulletType(8,23){{ maxAccel = 50; shake = 1.25f; speedUpPerShoot = 10; - recoil = 3; - recoilTime = 10; + recoil = 0.35f; + recoilTime = 20f; + recoils = 4; cooldownSpeed = 1f; targetGround = false; consumeLiquid(hydrogen, 0.25f); consumePower(1f); shootSound = Sounds.shootDisperse; range = 30 * tilesize; - drawer = new DrawTurret("ds-turret-"); + drawer = new DrawTurret("ds-turret-"){{ + for(int i = 0; i < 4; i++){ + int f = i; + parts.add( + new RegionPart("-barrel-"+ (f + 1) ){{ + progress = PartProgress.recoil.curve(Interp.pow2In); + recoilIndex = f; + under = true; + moveY = -4; + if(f > 1) { + moveRot = (f == 2 ? -3.5f : 3.5f); + } + }} + ); + } + }}; shoot = new ShootBarrel(){{ barrels = new float[]{ 2f, 0, 0, -2f, 0, 0, - 6.5f, -1.5f, 0, - -6.5f, -1.5f, 0 + 6.5f, -3f, 0, + -6.5f, -3f, 0 }; }}; ammo( - aluminium, new BasicBulletType(8,28f){{ + aluminium, new BasicBulletType(10,28f){{ pierce = true; pierceCap = 3; - lifetime = 30; + lifetime = 24; ammoMultiplier = 3; frontColor = hitColor = Color.valueOf("f5d9ff"); backColor = trailColor = Color.valueOf("cea4de"); @@ -301,8 +338,8 @@ silver, new BasicBulletType(12,21){{ despawnEffect = Fx.hitBulletColor; collidesGround = false; }}, - steel, new BasicBulletType(4,38){{ - lifetime = 60; + steel, new BasicBulletType(6,38){{ + lifetime = 40; ammoMultiplier = 4; frontColor = hitColor = Color.valueOf("ab7272"); backColor = trailColor = Color.valueOf("824d4d"); @@ -319,18 +356,20 @@ steel, new BasicBulletType(4,38){{ despawnEffect = Fx.hitBulletColor; status = DSStatusEffects.waterLeak; statusDuration = 60; + collidesGround = false; }} ); }}; hydroid = new DSItemTurret("hydroid"){{ + lightCone = 15; requirements(Category.turret, with(aluminium, 95, silver, 65, manganese, 95, steel, 20)); size = 3; outlineColor = DSPal.dsTurretOutline; scaledHealth = 110; rotateSpeed = 1.1f; shootCone = 1; - reload = 300; + reload = 480; targetUnderBlocks = false; shootY = -1; consumeLiquid(oxygen, 15/60f); @@ -342,11 +381,11 @@ steel, new BasicBulletType(4,38){{ shootSoundVolume = 1.45f; range = 400; shootWarmupSpeed = 0.06f; - ammoPerShot = 10; - maxAmmo = 30; + ammoPerShot = 15; + maxAmmo = 45; drawer = new DrawTurret("ds-turret-"){{ - parts.add( - new RegionPart("-draw-torpedo"){{ + setAmmoParts( + PiItems.aluminium, Seq.with(new RegionPart("-draw-torpedo-aluminium"){{ progress = PartProgress.reload.curve(Interp.pow2In); colorTo = new Color(1f, 1f, 1f, 0f); color = Color.white; @@ -356,18 +395,29 @@ steel, new BasicBulletType(4,38){{ under = true; layerOffset = -0.01f; moves.add(new PartMove(PartProgress.warmup.inv(), 0f, -2, 0f)); - }} + }}), + PiItems.steel, Seq.with(new RegionPart("-draw-torpedo-steel"){{ + progress = PartProgress.reload.curve(Interp.pow2In); + colorTo = new Color(1f, 1f, 1f, 0f); + color = Color.white; + mixColorTo = Pal.accent; + mixColor = new Color(1f, 1f, 1f, 0f); + outline = false; + under = true; + layerOffset = -0.01f; + moves.add(new PartMove(PartProgress.warmup.inv(), 0f, -2, 0f)); + }}) ); }}; ammo( steel, new BulletType(){{ keepVelocity = false; instantDisappear = true; - ammoMultiplier = 1; + ammoMultiplier = 2; speed = 0.01f; spawnUnit = new TorpedoUnitType("hydroid-torpedo"){{ speed = 5; - rotateSpeed = 1; + rotateSpeed = 0.75f; deathSound = Sounds.explosionPlasmaSmall; lifetime = 110; health = 60; @@ -380,7 +430,7 @@ steel, new BulletType(){{ reload = 1f; shootOnDeath = true; shootSound = Sounds.none; - bullet = new ExplosionBulletType(120,5.5f * tilesize){{ + bullet = new ExplosionBulletType(195,5.5f * tilesize){{ buildingDamageMultiplier = 0.15f; status = DSStatusEffects.waterLeak; statusDuration = 600; @@ -392,6 +442,113 @@ steel, new BulletType(){{ }}; }}); }}; + }}, + aluminium, new BulletType(){{ + keepVelocity = false; + instantDisappear = true; + ammoMultiplier = 1; + speed = 0.01f; + reloadMultiplier = 1.25f; + spawnUnit = new TorpedoUnitType("hydroid-torpedo-aluminium"){{ + speed = 8; + rotateSpeed = 1.35f; + deathSound = Sounds.explosionPlasmaSmall; + lifetime = 58; + health = 130; + missileAccelTime = 15f; + maxRange = 10; + deathSoundVolume = 1.05f; + weapons.add(new DSWeapon(){{ + shootCone = 360f; + mirror = false; + reload = 1f; + shootOnDeath = true; + shootSound = Sounds.none; + bullet = new ExplosionBulletType(310,2.15f * tilesize){{ + reloadMultiplier = 1.25f; + buildingDamageMultiplier = 0.15f; + status = DSStatusEffects.waterLeak; + statusDuration = 120; + despawnEffect = new MultiEffect( + Fx.massiveExplosion, + DSFx.smoothColorCircle(aluminium.color, 2.15f* tilesize, 45, Interp.circleOut) + ); + damage = 0; + }}; + }}); + }}; + }} + ); + }}; + termination = new DSItemTurret("termination"){{ + lightCone = 45; + lightLength = 200; + requirements(Category.turret, with(aluminium, 210, silver, 135, magnesium, 40, molybdenum, 130)); + size = 4; + outlineColor = DSPal.dsTurretOutline; + targetBlocks = false; + shootCone = 1; + range = 600; + unitSort = UnitSorts.strongest; + ammoPerShot = 10; + maxAmmo = ammoPerShot * 3; + shake = 7.5f; + reload = 600; + scaledHealth = 170; + rotateSpeed = 1f; + shootSound = Sounds.shootTank; + targetAir = false; + recoil = 1; + shootY = 14f; + consumePower(2.5f); + consumeLiquid(oxygen, 0.5f); + drawer = new DrawTurret("ds-turret-"){{ + parts.add(new RegionPart("-barrel"){{ + progress = PartProgress.recoil.curve(Interp.pow2In).blend(PartProgress.warmup, 0.4f); + moveY = -4; + mirror = false; + }}, + new RegionPart("-side"){{ + progress = PartProgress.recoil.curve(Interp.pow2In).blend(PartProgress.warmup, 0.5f); + mirror = true; + under = true; + moveRot = -35; + }} + ); + }}; + ammo( + steel, new AdvArtilleryBulletType(){{ + speed = 4; + damage = 790; + sprite = "shell"; + hitSize = 8; + hitEffect = new MultiEffect(DSFx.dsMassiveExplosion, DSFx.dsMassiveDeepSmoke, DSFx.dsMassiveSparkSpikes); + shrinkY = 0.5f; + trajectoryZ = 110; + angleFactor = 20f; + lifetime = 150; + height = 24; + width = 15; + ammoMultiplier = 1; + splashDamageRadius = 70; + splashDamage = 370; + scaledSplashDamage = true; + despawnEffect = Fx.none; + backColor = hitColor = trailColor = Color.valueOf("e8aa9b"); + frontColor = Color.valueOf("f7eeed"); + trailRotation = true; + trailEffect = DSFx.dsColorSparkTrail; + trailInterval = 1; + trailLength = 30; + trailWidth = 2.35f; + trailSinScl = 2.5f; + trailSinMag = 0.5f; + hitShake = 19f; + shootEffect = Fx.shootTitan; + smokeEffect = Fx.shootSmokeTitan; + buildingDamageMultiplier = 0.15f; + hitSound = Sounds.explosionMissile; + hitSoundPitch *= 0.85f; }} ); }}; @@ -422,10 +579,10 @@ public static void loadEffectBlocks(){ speed = 4.8f; }}; repairModule = new MendProjector("repair-module"){{ - requirements(Category.effect, with(aluminium, 55, silver, 45, manganese, 30)); + requirements(Category.effect, with(aluminium, 55, silver, 45, graphite, 30)); consumePower(1); - consumeLiquid(hydrogen, 3/60f); - researchCostMultiplier = 0.6f; + consumeLiquid(hydrogen, 1/60f); + researchCostMultiplier = 0.5f; size = 2; reload = 300; range = 120; @@ -438,9 +595,9 @@ public static void loadEffectBlocks(){ lightProjector = new LightBlock("light-projector"){{ requirements(Category.effect, BuildVisibility.lightingOnly, with(aluminium, 25, silver, 15)); size = 2; - brightness = 0.875f; - radius = 25 * tilesize; - consumePower(0.5f); + brightness = 0.575f; + radius = 15 * tilesize; + consumePower(0.25f); }}; } public static void loadLogisticBlocks(){ @@ -545,7 +702,7 @@ public static void loadProductionBlocks(){ tier = 5; }}; detonateDrill = new BurstDrill("detonate-drill"){{ - requirements(Category.production, with(aluminium, 85, silver, 55, graphite, 45, steel, 70)); + requirements(Category.production, with(aluminium, 85, silver, 55, graphite, 45, manganese, 50, steel, 70)); size = 4; arrows = 1; itemCapacity = 70; @@ -575,12 +732,12 @@ public static void loadPowerBlocks(){ laserColor1 = Color.valueOf("ffdede"); laserColor2 = Color.valueOf("e56e6e"); laserScale = 0.75f; - maxNodes = 3; + maxNodes = 2; laserRange = 15; underBullets = true; }}; powerDistributor = new PowerNode("power-distributor"){{ - requirements(Category.power, with(aluminium, 6, silver, 4, manganese, 2)); + requirements(Category.power, with(aluminium, 6, silver, 4, graphite, 2)); size = 1; laserColor1 = Color.valueOf("ffdede"); laserColor2 = Color.valueOf("e56e6e"); @@ -590,14 +747,24 @@ public static void loadPowerBlocks(){ underBullets = true; }}; condensator = new Battery("condensator"){{ - requirements(Category.power, with(aluminium, 45, silver, 25, manganese, 35)); + requirements(Category.power, with(aluminium, 45, silver, 25, graphite, 35)); size = 2; fullLightColor = Color.valueOf("bed5f7"); consumePowerBuffered(7800f); baseExplosiveness = 3.5f; }}; + fuelGenerator = new ConsumeGenerator("fuel-generator"){{ + requirements(Category.power, with(aluminium, 65, silver, 95)); + size = 2; + powerProduction = 0.75f; + itemDuration = 120; + consume(new ConsumeItemFlammable(0.45f)); + drawer = new DrawMulti(new DrawDefault(), new DrawWarmupRegion(){{ + color = Color.valueOf("ebfaff"); + }}); + }}; hydroTurbineGenerator = new ThermalGenerator("hydro-turbine-generator"){{ - requirements(Category.power, with(aluminium, 95, silver, 85)); + requirements(Category.power, with(aluminium, 95, silver, 85, graphite, 35)); displayEfficiencyScale = 1f / 9f; minEfficiency = 9f - 0.0001f; displayEfficiency = false; @@ -610,7 +777,7 @@ public static void loadPowerBlocks(){ drawer = new DrawMulti(new DrawRegion("-bottom"), new DrawLiquidTile(hydrogenSulfide), new DrawBlurSpin("-rotator", 6), new DrawDefault()); }}; geothermalGenerator = new AdvancedThermalGenerator("geothermal-generator"){{ - requirements(Category.power, with(aluminium, 100, silver, 95, manganese, 65)); + requirements(Category.power, with(aluminium, 100, silver, 95, manganese, 65, steel, 50, lithium, 15)); size = 4; attribute = Attribute.heat; powerProduction = 5/16f; @@ -650,19 +817,10 @@ public static void loadPowerBlocks(){ new DrawDefault() ); }}; - fuelGenerator = new ConsumeGenerator("fuel-generator"){{ - requirements(Category.power, with(aluminium, 65, silver, 95, graphite, 50)); - size = 4; - powerProduction = 3; - consume(new ConsumeItemFlammable(0.45f)); - drawer = new DrawMulti(new DrawDefault(), new DrawWarmupRegion(){{ - color = Color.valueOf("ebfaff"); - }}); - }}; } public static void loadCraftBlocks(){ hydrogenSulfideCollector = new AttributeCrafter("hydrogen-sulfide-collector"){{ - requirements(Category.production, with(aluminium, 65, silver, 25)); + requirements(Category.production, with(aluminium, 65, silver, 25, graphite, 10)); liquidCapacity = 60; attribute = sulfuric; boostScale = 1f/9f; @@ -674,19 +832,19 @@ public static void loadCraftBlocks(){ drawer = new DrawMulti(new DrawRegion("-bottom"), new DrawLiquidTile(hydrogenSulfide), new DrawBlurSpin("-rotator", 12), new DrawDefault()); }}; hydrogenSulfideDiffuser = new GenericCrafter("hydrogen-sulfide-diffuser"){{ - requirements(Category.crafting, with(aluminium, 85, silver, 55)); + requirements(Category.crafting, with(aluminium, 85, silver, 55, graphite, 20)); liquidCapacity = 60; size = 3; consumeLiquid(hydrogenSulfide, 12/60f); consumePower(1); - craftTime = 60; + craftTime = 20; outputItem = new ItemStack(sulfur, 1); outputLiquid = new LiquidStack(hydrogen, 9/60f); drawer = new DrawMulti(new DrawRegion("-bottom"), new DrawLiquidTile(hydrogenSulfide), new DrawLiquidTile(hydrogen),new DrawDefault()); ignoreLiquidFullness = true; }}; manganeseSynthesizer = new GenericCrafter("manganese-synthesizer"){{ - requirements(Category.crafting, with(aluminium, 125, silver, 95)); + requirements(Category.crafting, with(aluminium, 125, silver, 95, graphite, 30)); size = 4; consumePower(2); consumeLiquid(hydrogen, 9/60f); @@ -709,7 +867,7 @@ public static void loadCraftBlocks(){ ); }}; decompositionChamber = new AttributeCrafter("decomposition-chamber"){{ - requirements(Category.crafting, with(aluminium, 95, silver, 75, graphite, 85)); + requirements(Category.crafting, with(aluminium, 95, silver, 75, manganese, 85)); size = 4; craftTime = 60; attribute = Attribute.heat; @@ -774,34 +932,38 @@ public static void loadCraftBlocks(){ new DrawDefault() ); }}; - chemicalPlant = new DynamicCrafter("chemical-plant"){{ + chemicalPlant = new MultiRecipeCrafter("chemical-plant"){{ requirements(Category.crafting, with(aluminium, 175, silver, 125, manganese, 85, steel, 120)); + recipesUniqueDrawers = true; alwaysUnlocked = true; - size = 4; + size = 5; buildVisibility = BuildVisibility.sandboxOnly; - itemCapacity = 30; - liquidCapacity = 120; + itemCapacity = 50; + liquidCapacity = 220; addRecipes( new RecipeIO(){{ - liquidOut = LiquidStack.with(sulfuricAcid, 0.1f); - liquidIn = LiquidStack.with(hydrogenSulfide, 0.1f, oxygen, 0.4f); - input = ItemStack.with(sulfur, 2); + liquidInput = LiquidStack.with(hydrogenSulfide, 0.2, hydrogen, 0.1, oxygen, 0.25); + liquidOutput = LiquidStack.with(sulfuricAcid, 0.25); + craftTime = 60; + uniqueDrawer = new DrawMulti(new DrawRegion("-bottom"), new DrawLiquidTile(sulfuricAcid), new DrawDefault(), new DrawGlowRegion("-glow"){{ + color = Color.valueOf("bae6ff"); + }}); + powerUse = 1; }}, new RecipeIO(){{ - input = ItemStack.with(manganeseHydroxide, 8, aluminium, 3, sulfur, 1); - liquidIn = LiquidStack.with(hydrogen, 0.25f); - output = ItemStack.with(manganese, 7); - recipeTime = 120f; + itemInput = ItemStack.with(aluminium, 10, potassium, 5); + liquidInput = LiquidStack.with(hydrogen, 0.25); + itemOutput = ItemStack.with(sapphire, 2); + craftTime = 300; }} ); - consumePower(4); - drawer = new DrawMulti(new DrawDefault(), new DrawGlowRegion("-glow"){{ + drawer = new DrawMulti(new DrawRegion("-bottom"),new DrawDefault(), new DrawGlowRegion("-glow"){{ color = Color.valueOf("bae6ff"); }}); }}; } public static void loadUnitBlocks(){ - shadeUnitFactory = new UnitFactory("shade-unit-factory"){{ + deepUnitFactory = new UnitFactory("deep-unit-factory"){{ requirements(Category.units, with(aluminium, 95, silver, 75, manganese, 55)); size = 3; consumePower(2.5f); @@ -812,7 +974,7 @@ public static void loadUnitBlocks(){ new UnitPlan(PiUnits.complicity, 60f * 25, with(aluminium, 25, manganese, 20)) ); }}; - shadeUnitReconstructor = new Reconstructor("shade-unit-reconstructor"){{ + deepUnitReconstructor = new Reconstructor("deep-unit-reconstructor"){{ requirements(Category.units, with(aluminium, 125, silver, 95, manganese, 75, steel, 55)); size = 3; consumePower(3); @@ -827,17 +989,31 @@ public static void loadUnitBlocks(){ }}; } public static void loadDefence(){ - float dswallHealthMultiplier = 45; + float dsWallHealthMultiplier = 150; aluminiumWall = new Wall("aluminium-wall"){{ size = 1; - health = (int) (dswallHealthMultiplier * this.size * this.size * 10); + health = 300; requirements(Category.defense, with(aluminium, 6 * this.size * this.size)); }}; aluminiumWallLarge = new Wall("aluminium-wall-large"){{ researchCostMultiplier = 0.5f; size = 2; - health = (int) (dswallHealthMultiplier * this.size * this.size * 10); + health = 1200; requirements(Category.defense, with(aluminium, 6 * this.size * this.size)); }}; + steelWall = new Wall("steel-wall"){{ + researchCostMultiplier = 0.65f; + size = 1; + health = 500; + armor = 2; + requirements(Category.defense, with(steel, 8 * this.size * this.size)); + }}; + steelWallLarge = new Wall("steel-wall-large"){{ + researchCostMultiplier = 0.65f; + size = 2; + health = 2000; + armor = 2; + requirements(Category.defense, with(steel, 8 * this.size * this.size)); + }}; } } diff --git a/src/ds/content/blocks/PiEnv.java b/src/ds/content/blocks/PiEnv.java index 092c7b7..fd9753e 100644 --- a/src/ds/content/blocks/PiEnv.java +++ b/src/ds/content/blocks/PiEnv.java @@ -5,23 +5,27 @@ import ds.content.items.PiItems; import ds.world.blocks.environment.EffectFloor; import ds.world.blocks.environment.GlowingSeaweed; +import ds.world.blocks.environment.RockBlock; import ds.world.blocks.environment.TiledFloor; +import mindustry.type.Category; import mindustry.world.Block; import mindustry.world.blocks.environment.*; import mindustry.world.meta.Attribute; +import mindustry.world.meta.BuildVisibility; import static ds.content.DSAttributes.*; import static mindustry.content.Blocks.*; +import static mindustry.type.ItemStack.with; public class PiEnv { public static Block //Ores aluminiumOre, silverOre, potasiumOre, //Limestone - limestoneFloor, limestoneWall, roughLimestone, limestoneBoulder, + limestoneFloor, limestoneWall, roughLimestone, limestoneMountain, limestoneBoulder, //Manganese biome - manganeseHydroxideFloor, manganeseHydroxideCrystals, + manganeseHydroxideFloor, manganeseHydroxideCrystals, // Quartz biome quartzFloor, quartzSlabs, quartsCrystalWall, quartsWall, quartzCrystal, @@ -39,11 +43,12 @@ public class PiEnv { deepSandstone, deepSandstoneWall, deepRoughSandstone, // Ironstone ironstoneFloor, ironstoneWall, - // Nature glowingCoral, bigGlowingCoral, deadYellowCoralFloor, + //Deep spores + deepSpore, deepSporeWall, // some sea bushes - seaweedFloor, seaweedWall, seaweed, deadYellowcoral, deadYellowcoralAlt, fernAlphared, fernYellow, underwaterRedGrass, underwaterRegGrassAlt; + seaweedFloor, seaweedWall, seaweed, deadYellowcoral, deadYellowcoralAlt, fernAlphared, fernYellow, underwaterRedGrass, underwaterRegGrassAlt, underwaterRedWall; public static void load(){ //Ores @@ -63,9 +68,19 @@ public static void load(){ variants = 3; }}; roughLimestone = new Floor("rough-limestone-floor"){{ - variants = 4; + variants = 2; wall = limestoneWall; }}; + limestoneBoulder = new Prop("limestone-boulder"){{ + variants = 1; + limestoneFloor.asFloor().decoration = roughLimestone.asFloor().decoration = this; + }}; + limestoneMountain = new RockBlock("limestone-mountain"){{ + requirements(Category.effect, with(PiItems.aluminium, 900, PiItems.silver, 700)); + buildTime = 1900; + size = 4; + buildVisibility = BuildVisibility.editorOnly; + }}; // Quartz quartzSlabs = new TiledFloor("quartz-slabs") {{ @@ -81,17 +96,21 @@ public static void load(){ quartsCrystalWall = new StaticWall("quarts-crystal-wall"){{ variants = 3; }}; + quartzCrystal = new Prop("quartz-crystal"){{ + variants = 2; + quartzFloor.asFloor().decoration = this; + }}; // Sulfur sulfurSandFloor = new Floor("sulfur-sand-floor"){{ - variants = 3; + variants = 4; wall = sulfurSandWall; }}; sulfurSandWall = new StaticWall("sulfur-sand-wall"){{ variants = 3; }}; sulfurFloor = new Floor("sulfur-floor"){{ - variants = 3; + variants = 4; itemDrop = PiItems.sulfur; wall = sulfurWall; }}; @@ -100,6 +119,11 @@ public static void load(){ itemDrop = PiItems.sulfur; }}; + sulfurCrystal = new Prop("sulfur-crystal"){{ + variants = 2; + sulfurFloor.asFloor().decoration = this; + }}; + sulfurVent = new SteamVent("sulfur-vent"){{ parent = blendGroup = sulfurSandFloor; variants = 3; @@ -133,22 +157,20 @@ public static void load(){ effectChance = 0.04f; }}; geothermalRift = new EffectFloor("geothermal-rift"){{ - variants = 3; - emitLight = true; - lightRadius = 12f; - lightColor = Color.valueOf("f5954c").a(0.02f); - effectChance = 0.004f; + variants = 0; + effectChance = 0.0001f; canShadow = false; placeableOn = false; solid = true; + drawEdgeOut = false; }}; // Sandstone deepSandstone = new Floor("deep-sandstone"){{ - variants = 3; + variants = 2; wall = deepSandstoneWall; }}; deepRoughSandstone = new Floor("deep-rough-sandstone"){{ - variants = 4; + variants = 3; wall = deepSandstoneWall; }}; deepSandstoneWall = new StaticWall("deep-sandstone-wall"){{ @@ -156,7 +178,7 @@ public static void load(){ }}; // Manganese hydroxide manganeseHydroxideFloor = new Floor("manganese-hydroxide-floor"){{ - variants = 3; + variants = 2; itemDrop = PiItems.manganeseHydroxide; }}; manganeseHydroxideCrystals = new StaticWall("manganese-hydroxide-crystals"){{ diff --git a/src/ds/content/items/PiItems.java b/src/ds/content/items/PiItems.java index 85057f1..e31a67a 100644 --- a/src/ds/content/items/PiItems.java +++ b/src/ds/content/items/PiItems.java @@ -12,9 +12,11 @@ public class PiItems { public static Item sulfur; public static Item ironstone; public static Item steel; + public static Item molybdenum; public static Item magnesium; public static Item lithium; public static Item potassium; + public static Item sapphire; public static Seq piItems = new Seq<>(); public static void load(){ aluminium = new Item("aluminium"){{ @@ -70,6 +72,20 @@ public static void load(){ alwaysUnlocked = false; piItems.add(this); }}; + potassium = new Item("potassium", Color.valueOf("e8bdc5")){{ + cost = 1.45f; + hardness = 3; + explosiveness = 0.95f; + flammability = 0.75f; + alwaysUnlocked = false; + piItems.add(this); + }}; + molybdenum = new Item("molybdenum", Color.valueOf("c0bdff")){{ + cost = 2f; + hardness = 5; + alwaysUnlocked = false; + piItems.add(this); + }}; lithium = new Item("lithium", Color.valueOf("ebc4bc")){{ cost = 1.25f; hardness = 3; @@ -78,11 +94,9 @@ public static void load(){ alwaysUnlocked = false; piItems.add(this); }}; - potassium = new Item("potassium", Color.valueOf("e8bdc5")){{ - cost = 1.45f; - hardness = 3; - explosiveness = 0.95f; - flammability = 0.75f; + sapphire = new Item("sapphire"){{ + cost = 2; + hardness = 6; alwaysUnlocked = false; piItems.add(this); }}; diff --git a/src/ds/content/liquids/PiLiquids.java b/src/ds/content/liquids/PiLiquids.java index 5e9df61..46c159f 100644 --- a/src/ds/content/liquids/PiLiquids.java +++ b/src/ds/content/liquids/PiLiquids.java @@ -7,25 +7,25 @@ public class PiLiquids { public static Liquid hydrogenSulfide, sulfuricAcid, oxygen; - public static Seq piLiquid = new Seq<>(); + public static Seq piLiquids = new Seq<>(); public static void load(){ hydrogenSulfide = new DSLiquid("hydrogen-sulfide", Color.valueOf("d7dba9")){{ gas = true; explosiveness = 0.65f; reactivity = 0.75f; - piLiquid.add(this); + piLiquids.add(this); }}; oxygen = new DSLiquid("oxygen", Color.valueOf("f2d5d3")){{ gas = true; flammability = 1.75f; explosiveness = 0.95f; reactivity = 0.85f; - piLiquid.add(this); + piLiquids.add(this); }}; - sulfuricAcid = new DSLiquid("sulfuric-acid", Color.valueOf("d5fa84")){{ + sulfuricAcid = new DSLiquid("sulfuric-acid", Color.valueOf("5bc28b")){{ exothermic = true; reactivity = 1.25f; - piLiquid.add(this); + piLiquids.add(this); }}; } } diff --git a/src/ds/content/planets/DSPlanets.java b/src/ds/content/planets/DSPlanets.java index 9984186..d76553f 100644 --- a/src/ds/content/planets/DSPlanets.java +++ b/src/ds/content/planets/DSPlanets.java @@ -21,7 +21,7 @@ public class DSPlanets { public static Planet pi312; public static void loadContent(){ //"Vmtkb2JFbEZWbWhqYmxKdg==" - pi312 = new Planet("P-I-312", Planets.sun, 2f, 3){{ + pi312 = new Planet("obj-312", Planets.sun, 2f, 3){{ generator = new PiGenerator(); meshLoader = () -> new HexMesh(this, 6); cloudMeshLoader = () -> new MultiMesh( @@ -62,7 +62,7 @@ public static void loadContent(){ unitWhiteList(PiUnits.pi312units, pi312); addItemWhitelist(Seq.with(Items.graphite), pi312); - addLiquidWhitelist(PiLiquids.piLiquid, pi312); + addLiquidWhitelist(PiLiquids.piLiquids, pi312); } protected static void unitWhiteList(Sequnits, Planet planet){ diff --git a/src/ds/content/units/PiUnits.java b/src/ds/content/units/PiUnits.java index 1b0394b..e4ad235 100644 --- a/src/ds/content/units/PiUnits.java +++ b/src/ds/content/units/PiUnits.java @@ -11,10 +11,15 @@ import ds.content.DSFx; import ds.content.DSSounds; import ds.content.DSStatusEffects; +import ds.content.items.PiItems; +import ds.type.entities.bullets.EmptyBulletType; +import ds.type.entities.weapons.AntiTorpedoesWeapon; import ds.world.graphics.DSPal; import ds.type.entities.dsUnits.*; import ds.type.entities.weapons.AdvancedLightWeapon; import ds.type.entities.weapons.DSWeapon; +import mindustry.ai.UnitCommand; +import mindustry.ai.types.MinerAI; import mindustry.content.Fx; import mindustry.entities.Effect; import mindustry.entities.bullet.*; @@ -37,49 +42,51 @@ public class PiUnits { public static float[] tierMultipliers = {1, 2f, 4f, 8f, 20f}; public static Seq pi312units = new Seq<>(); public static UnitType + //Support units + sprig, //Core units moment, + //Assault units - //Mech - condition, oversight, - //Tank - note, sound, + //Mechs + condition, oversight, control, oppression, suppression, + //Tanks + note, sound, chord, melody, composition, //Submarines - complicity, consequences, - //fauna + complicity, consequences, correlation, culmination, cessation, + //fauna untitledFish, angler, - //DONT ASK + //DO NOT ASK annihilator; public static void loadUnits(){ //Core units moment = new SubmarineUnitType("moment"){{ - setEngine(0, -5, 180, false); + setUndEngines(0, -5, 180, false); omniMovement = true; strafePenalty = 0.45f; constructor = UnitEntity::create; - targetable = true; - speed = 3; - health = 275; + speed = 4.5f; + health = 125; buildRange = 20 * tilesize; buildSpeed = 2.75f; mineSpeed = 6.25f; mineFloor = true; mineWalls = true; drawCell = false; - mineTier = 3; + mineTier = 4; weapons.add(new AdvancedLightWeapon(){{ x = 2; y = 1; shootCone = 15; - lightCone = 35; - lightLength = 22 * tilesize; + lightCone = 45; + lightLength = 28 * tilesize; lightTileable = false; shootSound = Sounds.shootAlpha; rotate = false; mirror = true; reload = 12; - bullet = new LaserBoltBulletType(4, 15){{ + bullet = new LaserBoltBulletType(4, 12){{ width = 1; height = 8; buildingDamageMultiplier = 0.01f; @@ -92,38 +99,67 @@ public static void loadUnits(){ }}; }}); }}; + //Support submarines + sprig = new SubmarineUnitType("sprig"){{ + setUndEngines(0, -3, 180, false); + constructor = UnitEntity::create; + mineItems = Seq.with(PiItems.aluminium, PiItems.silver); + defaultCommand = UnitCommand.mineCommand; + aiController = MinerAI::new; + speed = 1.2f; + health = 60; + hitSize = 6; + isEnemy = false; + mineTier = 4; + mineSpeed = 1.5f; + mineFloor = true; + mineWalls = true; + canAttack = false; + weapons.add(new AdvancedLightWeapon(){{ + y = 1; + shootCone = 0; + lightCone = 35; + lightLength = 17 * tilesize; + lightTileable = false; + rotate = false; + mirror = false; + reload = 0; + bullet = new BulletType(0, 0){{ + instantDisappear = true; + hitEffect = shootEffect = despawnEffect = smokeEffect = none; + }}; + }}); + }}; //Assault Submarines complicity = new SubmarineUnitType("complicity"){{ - setEngine(0, -5, 180, false); + setUndEngines(0, -5, 180, false); constructor = UnitEntity::create; - speed = 1.8f; - health = 115; - armor = 1; + rotateSpeed = 1.85f; + speed = 2.65f; + health = 95; omniMovement = true; hitSize = 8; moveSound = Sounds.none; weapons.add(new AdvancedLightWeapon(){{ x = 18/4f; y = 1; mirror = true; - lightCone = 80; - lightLength = 16*tilesize; + lightCone = 30; + lightLength = 30 * tilesize; shootSound = Sounds.shootRetusa; lightTileable = false; reload = 120; rotate = false; shootCone = 40; inaccuracy = 7; - shoot.shots = 2; - shoot.shotDelay = 10; - bullet = new BulletType(){{ + bullet = new EmptyBulletType(){{ instantDisappear = true; keepVelocity = false; - speed = 0.01f; + speed = 0.001f; spawnUnit = new TorpedoUnitType("basic-torpedo"){{ - speed = 3.5f; - lifetime = 40; + speed = 4f; + lifetime = 58; rotateSpeed = 1.75f; - maxRange = 4; + maxRange = 5; deathSound = Sounds.explosionPlasmaSmall; deathSoundVolume = 0.65f; weapons.add(new DSWeapon(){{ @@ -143,32 +179,34 @@ public static void loadUnits(){ }}); }}; consequences = new SubmarineUnitType("consequences"){{ - setEngine(18/4f, -26/4f, 180, true); + setUndEngines(18/4f, -26/4f, 180, true); speed = 1.85f; - health = 495; - armor = 1 * tierMultipliers[1]; + rotateSpeed = 1.5f; + health = 395; hitSize = 14; constructor = UnitEntity::create; omniMovement = true; strafePenalty = 0.25f; weapons.add(new AdvancedLightWeapon(){{ x = 24/4f; y = 1; + shootY = 5; mirror = true; lightCone = 32; lightLength = 30*tilesize; shootSound = Sounds.shootRetusa; lightTileable = false; - reload = 60; + reload = 30; rotate = false; - shootCone = 2; - bullet = new BulletType(){{ + baseRotation = -9f; + shootCone = 13; + bullet = new EmptyBulletType(){{ instantDisappear = true; keepVelocity = false; speed = 0.01f; spawnUnit = new TorpedoUnitType("consequences-torpedo"){{ - speed = 5.5f; - rotateSpeed = 1.5f; - lifetime = 50; + speed = 5f; + rotateSpeed = 2.25f; + lifetime = 48; maxRange = 6f; deathSound = Sounds.explosionPlasmaSmall; weapons.add(new DSWeapon(){{ @@ -192,8 +230,8 @@ public static void loadUnits(){ //Mech condition = new DSMechUnitType("condition"){{ speed = 0.38f; - health = 195; - armor = 3; + health = 180; + armor = 2; hitSize = 8; stepSound = DSSounds.dsMechStep; stepSoundVolume *= 0.23f; @@ -203,30 +241,33 @@ public static void loadUnits(){ rotate = false; top = false; mirror = true; - lightCone = 15; - lightLength = 20 * tilesize; + lightCone = 25; + lightLength = 26 * tilesize; shootSound = DSSounds.shootSmallWeapon; - shootSoundVolume = 0.45f; - bullet = new BasicBulletType(3.5f, 22){{ + shootSoundVolume = 0.35f; + shake = 1.5f; + bullet = new BasicBulletType(8f, 22){{ height = 13; width = 10; lightOpacity = 0.75f; lightRadius = 5f; - trailInterval = 3; + trailInterval = 0.85f; + hitShake = 3; + despawnShake = 1.75f; trailEffect = DSFx.dsBulletTrail; shootEffect = DSFx.dsShoot; lightColor = Color.valueOf("bfe8ff"); frontColor = hitColor = DSPal.dsBulletFront; backColor = DSPal.dsBulletBack; - lifetime = 45; + lifetime = 22; hitEffect = despawnEffect = DSFx.dsBulletHit; }}; }}); }}; oversight = new DSMechUnitType("oversight"){{ speed = 0.34f; - health = 685; - armor = 3 * tierMultipliers[1]; + health = 580; + armor = 2 * tierMultipliers[1]; hitSize = 13; stepSound = DSSounds.dsMechStep; stepSoundPitch = 0.7f; @@ -237,7 +278,7 @@ public static void loadUnits(){ mirror = true; rotate = false; top = false; - reload = 45; + reload = 35; shake = 3.5f; recoil = 2.1f; shootSound = Sounds.shootDiffuse; @@ -248,10 +289,12 @@ public static void loadUnits(){ inaccuracy = 10; shoot.shots = 9; velocityRnd = 0.25f; - bullet = new BasicBulletType(8, 21){{ + bullet = new BasicBulletType(12, 24.5f){{ + recoil = 0.03f; pierce = true; pierceCap = 2; - lifetime = 15; + pierceBuilding = true; + lifetime = 10; trailLength = 6; trailWidth = 0.6f; width = 4; @@ -265,11 +308,165 @@ public static void loadUnits(){ }} ); }}; + oppression = new DSMechUnitType("oppression"){{ + speed = 0.35f; + health = 11000; + rotateSpeed *= 0.35f; + armor = 2 * tierMultipliers[3]; + hitSize = 26; + stepSound = DSSounds.dsMechStep; + stepSoundPitch = 0.5f; + mechLegColor = Color.valueOf("131623"); + stepSoundVolume *= 0.7f; + weapons.add( + new AdvancedLightWeapon("deepsea-oppression-weapon"){{ + x = 16.75f; y = 0; + mirror = true; + rotate = true; + rotateSpeed = 0.85f; + rotationLimit = 15f; + shootCone = 25f; + top = false; + reload = 30; + shake = 5.5f; + recoil = 4.1f; + shootSound = DSSounds.shootMediumTank; + shootSoundVolume = 1f; + lightLength = 36 * tilesize; + lightCone = 35f; + shootY = 11; + inaccuracy = 2; + bullet = new BasicBulletType(20, 195){{ + splashDamage = 56; + splashDamageRadius = 20; + recoil = 0.4f; + sprite = "missile-large"; + pierce = true; + pierceBuilding = true; + pierceDamageFactor = 0.25f; + lifetime = 14; + trailLength = 8; + trailWidth = 1f; + width = 10; + height = 25; + shootEffect = DSFx.dsShootTank; + smokeEffect = new ParticleEffect(){{ + line = true; + cone = 15; + length = 40; + lifetime = 20; + interp = Interp.pow5Out; + sizeInterp = Interp.linear; + colorFrom = colorTo = Color.valueOf("7cbcf7"); + lenFrom = 6; + lenTo = 0; + strokeTo = 0.85f; + strokeFrom = 1f; + }}; + frontColor = hitColor = Color.valueOf("7cbcf7"); + backColor = trailColor = Color.valueOf("6783e5"); + hitEffect = new MultiEffect( + new Effect(10 ,e->{ + color(Color.valueOf("7cbcf7")); + for(int i = 0; i < 3; i++){ + Drawf.tri(e.x, e.y, e.fout() * 3 + 1, e.fin() * 44 + 2, e.rotation + Mathf.randomSeedRange(e.id + i, 90)); + Drawf.tri(e.x, e.y, e.fout() * 3 + 1, e.fout() * 17, e.rotation + Mathf.randomSeedRange(e.id + i, 90) + 180); + } + }), + DSFx.dsBulletHit + ); + trailEffect = DSFx.dsFastSparkTrail; + trailInterval = 0.5f; + trailRotation = true; + despawnEffect = new MultiEffect( + new WaveEffect(){{ + lifetime = 8; + sizeFrom = 3; + sizeTo = 14; + strokeFrom = 2; + strokeTo = 0; + colorFrom = colorTo = Color.valueOf("7cbcf7"); + }}, + + new ParticleEffect(){{ + cone = 46; + length = -50; + lifetime = 10; + particles = 9; + line = true; + lenFrom = 6; + lenTo = 0; + interp = Interp.pow5Out; + sizeInterp = Interp.linear; + strokeFrom = 1.75f; + strokeTo = 1; + colorFrom = colorTo = Color.valueOf("7cbcf7"); + }} + ); + }}; + }}, + new AntiTorpedoesWeapon("deepsea-oppression-ats"){{ + x = 8; y = -3; + alternate = false; + baseRotation = -45f; + mirror = true; + rotate = true; + rotateSpeed = 5; + reload = 3; + inaccuracy = 3.75f; + shootCone = 0.85f; + recoil = 1; + shake = 1; + shootSound = Sounds.shootBreach; + shootSoundVolume *= 0.65f; + bullet = new RailBulletType(){{ + collidesGround = false; + length = 17 * tilesize; + damage = 40; + hitColor = DSPal.dsBulletFront; + hitEffect = Fx.hitBulletColor; + despawnEffect = none; + pierceDamageFactor = 0.2f; + endEffect = new Effect(14f, e -> { + color(e.color); + Drawf.tri(e.x, e.y, e.fout() * 3, 3 + 12 * e.fin(), e.rotation); + }); + + shootEffect = new Effect(10, e ->{ + color(e.color); + Drawf.tri(e.x, e.y, 1.25f+ 1.25f * e.fout(Interp.circleOut), 20f * e.fout(), e.rotation); + color(e.color); + for(int sign : Mathf.signs){ + Drawf.tri(e.x, e.y, 0.85f + e.fout(), 9f * e.fout(), e.rotation + sign * 140 + (e.fout() * 20 * sign)); + } + }); + smokeEffect = none; + lineEffect = new Effect(20, e->{ + if(!(e.data instanceof Vec2 v)) return; + color(e.color); + stroke(e.fout() * 0.8f + 0.4f); + Fx.rand.setSeed(e.id); + for(int i = 0; i < 9; i++){ + Fx.v.trns(e.rotation, Fx.rand.random(10f, v.dst(e.x, e.y) - 10f)); + Lines.lineAngleCenter(e.x + Fx.v.x, e.y + Fx.v.y, e.rotation + e.finpow(), e.foutpowdown() * 20f * Fx.rand.random(0.5f, 1f) + 0.3f); + + e.scaled(14f, b -> { + stroke(b.fout() * 1.1f); + color(e.color); + Lines.line(e.x, e.y, v.x, v.y); + Drawf.light(e.x, e.y, v.x, v.y, b.fout(Interp.circleOut) * 2 + 1.15f, e.color, b.fout()); + }); + } + }); + }}; + }} + ); + }}; //Tanks note = new DSTankUnitType("note"){{ - speed = 0.29f; - health = 380; - armor = 6; + speed = 0.2f; + health = 280; + armor = 3; hitSize = 8; treadRects = new Rect[] { new Rect(-22f, -24f, 11, 50) @@ -281,36 +478,38 @@ public static void loadUnits(){ y = -1; mirror = false; rotate = true; - rotateSpeed = 1.9f; + rotateSpeed = 1.35f; reload = 90; lightCone = 30; - lightLength = 25 * tilesize; - shake = 1; + lightLength = 30 * tilesize; shootSound = Sounds.shootStell; - bullet = new BasicBulletType(8f, 40){{ + shake = 3.25f; + bullet = new BasicBulletType(16f, 40){{ height = 13; width = 9; sprite = "missile-large"; lightOpacity = 0.85f; lightRadius = 9f; - trailInterval = 2; + trailInterval = 0.5f; trailEffect = DSFx.dsBulletTrail; shootEffect = DSFx.dsShootBig; lightColor = Color.valueOf("bfe8ff"); frontColor = hitColor = DSPal.dsBulletFront; backColor = DSPal.dsBulletBack; trailColor = DSPal.dsBulletBack; + hitShake = 3; + despawnShake = 2.35f; trailLength = 5; trailWidth = 0.75f; - lifetime = 25; + lifetime = 13; hitEffect = despawnEffect = DSFx.dsBulletHit; }}; }}); }}; sound = new DSTankUnitType("sound"){{ - speed = 0.26f; - health = 895; - armor = 8 * tierMultipliers[1]; + speed = 0.18f; + health = 600; + armor = 3 * tierMultipliers[1]; hitSize = 14; treadRects = new Rect[] { new Rect(-26f, -31f, 11, 66) @@ -321,13 +520,14 @@ public static void loadUnits(){ weapons.add( new DSWeapon("deepsea-sound-light-weapon"){{ x = -30 / 4f; y = -20 / 4f; + rotateSpeed = 3.5f; rotate = true; mirror = true; reload = 25; shootSound = Sounds.shootLocus; bullet = new RailBulletType(){{ length = 17 * tilesize; - damage = 17; + damage = 36; hitColor = DSPal.dsBulletFront; hitEffect = Fx.hitBulletColor; despawnEffect = none; @@ -335,20 +535,24 @@ public static void loadUnits(){ endEffect = new Effect(14f, e -> { color(e.color); for(int sign : Mathf.signs) { - Drawf.tri(e.x, e.y, e.fout() * 1.12f, 5f + 9 * e.fin(), e.rotation + 15 * sign); + Drawf.tri(e.x, e.y, e.fout() * 2, 5f + 9 * e.fin(), e.rotation + 45 * sign); } + Drawf.tri(e.x, e.y, e.fout() * 3, 3 + 12 * e.fin(), e.rotation); + Drawf.tri(e.x, e.y, e.fout() * 3, 2 + 5 * e.fout(), e.rotation + 180); }); + shootEffect = new Effect(10, e ->{ color(e.color); Drawf.tri(e.x, e.y, 1.25f+ 1.25f * e.fout(Interp.circleOut), 20f * e.fout(), e.rotation); color(e.color); for(int sign : Mathf.signs){ - Drawf.tri(e.x, e.y, 0.85f + 1.25f * e.fout(), 18f * e.fout(), e.rotation + sign * 90f); + Drawf.tri(e.x, e.y, 0.85f + 1.25f * e.fout(), 14f * e.fout(), e.rotation + sign * 90f); + Drawf.tri(e.x, e.y, 0.85f + e.fout(), 9f * e.fout(), e.rotation + sign * 140 + (e.fout() * 20 * sign)); } }); + smokeEffect = none; lineEffect = new Effect(20, e->{ if(!(e.data instanceof Vec2 v)) return; - color(e.color); stroke(e.fout() * 0.8f + 0.4f); Fx.rand.setSeed(e.id); @@ -360,6 +564,7 @@ public static void loadUnits(){ stroke(b.fout() * 1.1f); color(e.color); Lines.line(e.x, e.y, v.x, v.y); + Drawf.light(e.x, e.y, v.x, v.y, b.fout(Interp.circleOut) * 2 + 1.15f, e.color, b.fout()); }); } }); @@ -369,16 +574,16 @@ public static void loadUnits(){ x = 0; y = 0; mirror = false; rotate = true; - rotateSpeed = 1.6f; - reload = 180; + rotateSpeed = 1.25f; + reload = 150; lightCone = 35; lightLength = 28 * tilesize; recoil = 3; shootSound = DSSounds.shootMediumTank; shootY = 30 / 4f; shake = 4; - bullet = new BasicBulletType(9, 96){{ - lifetime = 28 * tilesize / 9f; + bullet = new BasicBulletType(16, 130){{ + lifetime = 28 * tilesize / 16f; width = 8; height = 16; sprite = "missile-large"; @@ -390,6 +595,7 @@ public static void loadUnits(){ pierce = true; pierceBuilding = true; pierceDamageFactor = 0.4f; + trailRotation = true; despawnEffect = new MultiEffect( DSFx.dsBulletHit, hitSquaresColor, @@ -411,22 +617,7 @@ public static void loadUnits(){ }); hitShake = 3; despawnShake = 3; - trailEffect = new ParticleEffect(){{ - trailRotation = true; - cone = 12.5f; - length = -16; - lifetime = 15; - particles = 3; - line = true; - lenFrom = 3; - lenTo = 5.85f; - interp = Interp.linear; - sizeInterp = Interp.circleOut; - strokeFrom = 1.75f; - strokeTo = 0; - colorFrom = DSPal.dsBulletFront; - colorTo = DSPal.dsBulletBack; - }}; + trailEffect = DSFx.dsFastSparkTrail; trailLength = 8; trailWidth = 1.55f; lightOpacity = 1.95f; diff --git a/src/ds/draw/DrawCurveLightning.java b/src/ds/draw/DrawCurveLightning.java index 3ca69c2..692be41 100644 --- a/src/ds/draw/DrawCurveLightning.java +++ b/src/ds/draw/DrawCurveLightning.java @@ -5,7 +5,6 @@ import arc.math.geom.Vec2; import arc.struct.Seq; import ds.content.DSFx; -import mindustry.content.Fx; public class DrawCurveLightning { diff --git a/src/ds/draw/DrawDirLight.java b/src/ds/draw/DrawDirLight.java index 89dac4c..90ffb70 100644 --- a/src/ds/draw/DrawDirLight.java +++ b/src/ds/draw/DrawDirLight.java @@ -3,15 +3,23 @@ import arc.graphics.Color; import arc.math.Mathf; import arc.math.geom.Vec2; +import arc.struct.Seq; import ds.DSSetting; +import ds.utilities.DSMath; +import mindustry.core.World; +import mindustry.gen.Building; import mindustry.graphics.Drawf; +import mindustry.world.Block; +import static ds.content.blocks.PiEnv.*; import static ds.utilities.DSMath.*; +import static mindustry.content.Blocks.*; //Draws lights from cone //TODO Better organisation public class DrawDirLight { + public static Seq exceptionsBlocks = Seq.with(empty, geothermalRift); public static void DrawLightBeamNonTileable(float tx, float ty, float beamRotation, float length, float cone, float rayW){ float sideCone = cone / 2; @@ -33,15 +41,18 @@ public static void DrawLightBeamNonTileable(float tx, float ty, float beamRotati } public static void DrawBasicRay(float x1, float y1, float stroke, float length, float rD, float intensity){ - Vec2 endPoint = new Vec2(x1+ Mathf.cosDeg(rD)* length, y1+ Mathf.sinDeg(rD)* length); + float endPointX = x1+ Mathf.cosDeg(rD)* length; + float endPointY = y1+ Mathf.sinDeg(rD)* length; int segments = 10; - Vec2 dir = new Vec2(Mathf.cosDeg(rD), Mathf.sinDeg(rD)).nor(); - float segmentLength = Mathf.dst(x1, y1, endPoint.x, endPoint.y) / segments; + float dirX = Mathf.cosDeg(rD); + float dirY = Mathf.sinDeg(rD); + + float segmentLength = Mathf.dst(x1, y1, endPointX, endPointY) / segments; for(int j = 0; j < segments; j++){ - float segmentStartX = x1 + dir.x * segmentLength * j; - float segmentStartY = y1 + dir.y * segmentLength * j; - float segmentEndX = x1 + dir.x * segmentLength * (j + 1); - float segmentEndY = y1 + dir.y * segmentLength * (j + 1); + float segmentStartX = x1 + dirX * segmentLength * j; + float segmentStartY = y1 + dirY * segmentLength * j; + float segmentEndX = x1 + dirX * segmentLength * (j + 1); + float segmentEndY = y1 + dirY * segmentLength * (j + 1); float segmentAlpha = intensity * (1.0f - (j / (float)segments) * 0.7f) * 0.75f; Drawf.light(segmentStartX, segmentStartY, segmentEndX, segmentEndY, stroke, Color.white, segmentAlpha); } @@ -68,8 +79,9 @@ public static void DrawLightBeam(float tx, float ty, float beamRotation, float l public static void DrawRayCastRay(float x1, float y1, float stroke, float length, float rD, float intensity){ - Vec2 endPoint = RayCastSolid(x1, y1, rD, (int)length, 2); - int segments = 10; + + Vec2 endPoint = RayCastSolid(x1, y1, rD, (int)length, 2, exceptionsBlocks); + int segments = (int)(10 * DSSetting.rayAmountMultiplier); Vec2 dir = new Vec2(Mathf.cosDeg(rD), Mathf.sinDeg(rD)).nor(); float segmentLength = Mathf.dst(x1, y1, endPoint.x, endPoint.y) / segments; for(int j = 0; j < segments; j++){ diff --git a/src/ds/draw/DrawWire.java b/src/ds/draw/DrawWire.java index 34e5876..1174134 100644 --- a/src/ds/draw/DrawWire.java +++ b/src/ds/draw/DrawWire.java @@ -1,14 +1,51 @@ package ds.draw; import arc.graphics.g2d.*; +import arc.math.Angles; +import arc.math.Mathf; +import arc.math.geom.Vec2; +import arc.struct.Seq; import mindustry.graphics.Layer; //Draws line with coordinates //TODO segmented wire with physics public class DrawWire { - public static void draw(float x1, float y1, float x2, float y2, TextureRegion region, float stroke) { - Lines.stroke(stroke); + + public static void draw(float x1, float y1, float x2, float y2, TextureRegion region, TextureRegion startRegion, float regionStroke, float regionLen, float rotation){ + float hypot = (float) Math.hypot(x2-x1, y2-y1); + int steps = Math.round(hypot/regionLen); + + //Calculate all points to draw + Seq points = calculatePoints(x1, y1, x2, y2, steps); + Vec2 tmpVec2 = new Vec2(x1, y1); + + //Starts drawing Draw.z(Layer.turret - 1); - Lines.line(region, x1, y1, x2, y2, false); + Lines.stroke(regionStroke); + for(Vec2 curPoint : points){ + Lines.line(region, tmpVec2.x, tmpVec2.y, curPoint.x, curPoint.y, true); + tmpVec2 = curPoint; + } + Draw.rect(startRegion, x1, y1, startRegion.width * regionStroke / 10, startRegion.width * regionStroke / 10, rotation); + } + + public static void draw(float x1, float y1, float x2, float y2, TextureRegion region, TextureRegion startRegion, float regionStroke, float regionLen) { + float rot = Angles.angle(x1, y1, x2, y2); + draw(x1, y1, x2, y2, region, startRegion, regionStroke, regionLen, rot); + } + + public static void draw(Vec2 startPos, Vec2 endPos, TextureRegion region, TextureRegion startRegion, float regionStroke, float regionLen){ + draw(startPos.x, startPos.y, endPos.x, endPos.y, region, startRegion, regionStroke, regionLen); + } + + + + public static Seq calculatePoints(float x1, float y1, float x2, float y2, int steps){ + Seq points = new Seq<>(); + for(int step = 0; step < steps; step++){ + float progress = (float) step / steps; + points.add(new Vec2(Mathf.lerp(x1, x2, progress), Mathf.lerp(y1, y2, progress))); + } + return points; } } diff --git a/src/ds/draw/DrawArcSmeltReverse.java b/src/ds/draw/drawers/DrawArcSmeltReverse.java similarity index 98% rename from src/ds/draw/DrawArcSmeltReverse.java rename to src/ds/draw/drawers/DrawArcSmeltReverse.java index 81ed0a5..96e86f0 100644 --- a/src/ds/draw/DrawArcSmeltReverse.java +++ b/src/ds/draw/drawers/DrawArcSmeltReverse.java @@ -1,4 +1,4 @@ -package ds.draw; +package ds.draw.drawers; import arc.graphics.g2d.*; import arc.math.*; diff --git a/src/ds/draw/DrawSpinFlame.java b/src/ds/draw/drawers/DrawSpinFlame.java similarity index 99% rename from src/ds/draw/DrawSpinFlame.java rename to src/ds/draw/drawers/DrawSpinFlame.java index 006cd8a..7c0b243 100644 --- a/src/ds/draw/DrawSpinFlame.java +++ b/src/ds/draw/drawers/DrawSpinFlame.java @@ -1,4 +1,4 @@ -package ds.draw; +package ds.draw.drawers; import arc.*; import arc.graphics.*; diff --git a/src/ds/type/DSLiquid.java b/src/ds/type/DSLiquid.java index a9a99fe..1e6b5b8 100644 --- a/src/ds/type/DSLiquid.java +++ b/src/ds/type/DSLiquid.java @@ -15,7 +15,7 @@ public DSLiquid(String name){ super(name); } - //If yes it can be use in exothermic reactor. + //If true it can be use in exothermic reactors. public boolean exothermic = false; public float reactivity = 0f; diff --git a/src/ds/type/FluxLiquid.java b/src/ds/type/FluxLiquid.java deleted file mode 100644 index 41115f4..0000000 --- a/src/ds/type/FluxLiquid.java +++ /dev/null @@ -1,17 +0,0 @@ -package ds.type; - -import arc.graphics.Color; -import arc.struct.Seq; -import mindustry.type.Item; - -public class FluxLiquid extends DSLiquid{ - - public Seq containedItems = new Seq<>(); - - public FluxLiquid(String name, Color color) { - super(name, color); - } - public FluxLiquid(String name){ - super(name); - } -} diff --git a/src/ds/type/StageStatusEffect.java b/src/ds/type/StageStatusEffect.java new file mode 100644 index 0000000..e3fa6ba --- /dev/null +++ b/src/ds/type/StageStatusEffect.java @@ -0,0 +1,38 @@ +package ds.type; + +import arc.math.Mathf; +import arc.util.Time; +import arc.util.Tmp; +import mindustry.Vars; +import mindustry.content.Fx; +import mindustry.entities.units.StatusEntry; +import mindustry.gen.Unit; +import mindustry.type.StatusEffect; + +public class StageStatusEffect extends StatusEffect { + public StageStatusEffect(String name) { + super(name); + } + public StageStatusEffect nextStage; + + public StageStatusEffect previousStage; + + public float defaultDuration = 60f * 5f; + + public void applyStatus(Unit unit, float duration){ + if(unit.hasEffect(this) && nextStage != null){ + unit.apply(nextStage, duration); + unit.unapply(this); + } else unit.apply(this, duration); + } + + @Override + public void onRemoved(Unit unit) { + if(previousStage != null){ + unit.apply(previousStage, previousStage.defaultDuration); + } + } + + + +} diff --git a/src/ds/type/entities/Cable.java b/src/ds/type/entities/Cable.java new file mode 100644 index 0000000..06bd867 --- /dev/null +++ b/src/ds/type/entities/Cable.java @@ -0,0 +1,165 @@ +package ds.type.entities; + +import arc.Core; +import arc.graphics.g2d.Draw; +import arc.graphics.g2d.Lines; +import arc.graphics.g2d.TextureRegion; +import arc.math.Angles; +import arc.math.Mathf; +import arc.math.geom.Vec2; +import arc.struct.Seq; +import arc.util.Log; +import arc.util.Tmp; +import ds.draw.DrawWire; +import ds.world.global.CableProcess; +import mindustry.Vars; +import mindustry.gen.Posc; +import mindustry.graphics.Layer; + +public class Cable { + + private Seq cableSegments; + + //Main owner (like a harpoon turret) + private Posc owner1; + //Second owner (like a harpoon projectile) + private Posc owner2; + + //Physical cable position + private Vec2 point1; + private Vec2 point2; + + //Drawing region + public static TextureRegion baseRegion; + + public static TextureRegion baseNodeRegion; + + public TextureRegion region; + + public TextureRegion nodeRegion; + + + public float elasticity = 1; + + //the max extent to which cables can expand under the influence of force + public float maxExpandthreshold = 1.15f; + + public float initialSegmentLen = 25; + + public float height = 10; + + public float width = 4; + + public float clipSize = 50; + + public Cable(Vec2 pos1, Vec2 pos2){ + this.point1 = pos1; + this.point2 = pos2; + this.owner1 = null; + this.owner2 = null; + createCable(pos1, pos2); + } + + public Cable(Posc owner1, Posc owner2){ + this.owner1 = owner1; + this.owner2 = owner2; + this.point1 = (Vec2) owner1; + this.point2 = (Vec2) owner2; + createCable(point1, point2); + baseRegion = Core.atlas.find("deepsea-harpoon-wire"); + Log.debug(baseRegion.found() ? "Deep sea log: Wire region is found" : "Deep sea log: Wire region isn't found" ); + baseNodeRegion = Core.atlas.find("deepsea-harpoon-wire-end"); + Log.debug(baseNodeRegion.found() ? "Deep sea log: Wire start region is found" : "Deep sea log: Wire start region isn't found" ); + } + + public void createCable(Vec2 pos1, Vec2 pos2){ + cableSegments = new Seq<>(); + float len = pos1.dst(pos2); + int segmentsAmount = Math.round(len / initialSegmentLen); + Vec2 tmp = pos1; + Vec2 tmp2; + CableSegment segment = null; + for(int i = 0; i < segmentsAmount; i++){ + float progress = (float) i / segmentsAmount; + tmp2 = new Vec2(Mathf.lerp(pos1.x, pos2.x, progress), Mathf.lerp(pos1.y, pos2.y, progress)); + CableSegment curSegment = new CableSegment(tmp, tmp2, segment, null); + Log.info("Creating cable segment -> " + i + " Coordinates -> {" + curSegment.pos1.x + " ; " + curSegment.pos1.y + " to " + curSegment.pos2.x + " ; " + curSegment.pos2.y + "}"); + if(i > 0){ + cableSegments.get(i - 1).nextSegment = curSegment; + } + cableSegments.add(curSegment); + segment = curSegment; + tmp = new Vec2(tmp2); + } + CableProcess.initCable(this); + } + + public void update(){ + + } + + public void draw(){ + for(CableSegment c : cableSegments){ + c.draw(); + } + } + + public static void load(){ + baseRegion = Core.atlas.find("deepsea-harpoon-wire"); + Log.info(baseRegion.found() ? "Deep sea log: Wire region is found" : "Deep sea log: Wire region isn't found" ); + baseNodeRegion = Core.atlas.find("deepsea-harpoon-wire-end"); + Log.info(baseNodeRegion.found() ? "Deep sea log: Wire start region is found" : "Deep sea log: Wire start region isn't found" ); + } + + public void init(){ + + } + + public class CableSegment { + + private Vec2 pos1, pos2; + + private CableSegment nextSegment, previousSegment; + + protected Seq forces; + + public CableSegment(Vec2 point1, Vec2 point2, CableSegment previousSegment, CableSegment nextSegment){ + pos1 = new Vec2(point1); + pos2 = new Vec2(point2); + this.previousSegment = previousSegment; + this.nextSegment = nextSegment; + } + + private boolean isVisible(){ + return Core.camera.bounds(Tmp.r1).overlaps(Tmp.r2.setCentered((pos1.x + pos2.x) / 2, (pos1.y + pos2.y) / 2, clipSize)); + } + + public void draw(){ + if(!isVisible()) return; + Draw.z(Layer.turret - 1); + Lines.stroke(width); + Lines.line(baseRegion, pos1.x, pos1.y, pos2.x, pos2.y, true); + + Draw.z(Layer.turret); + if(previousSegment == null){ + Draw.rect(baseNodeRegion, pos1.x, pos1.y, baseNodeRegion.width * width / 15, baseNodeRegion.width * width / 15, Angles.angle(pos1.x, pos1.y, pos2.x, pos2.y)); + } + Draw.rect(baseNodeRegion, pos2.x, pos2.y, baseNodeRegion.width * width / 15, baseNodeRegion.width * width / 15, Angles.angle(pos1.x, pos1.y, pos2.x, pos2.y)); + Draw.reset(); + } + + + public void update(){ + + } + + private void updatePhysics(){ + + } + + public void removeThisSegment(){ + nextSegment.previousSegment = null; + cableSegments.remove(this); + } + } +} diff --git a/src/ds/type/entities/bullets/AdvArtilleryBulletType.java b/src/ds/type/entities/bullets/AdvArtilleryBulletType.java new file mode 100644 index 0000000..2363266 --- /dev/null +++ b/src/ds/type/entities/bullets/AdvArtilleryBulletType.java @@ -0,0 +1,214 @@ +package ds.type.entities.bullets; + +import arc.graphics.Color; +import arc.graphics.g2d.Draw; +import arc.math.Interp; +import arc.math.Mathf; +import arc.math.geom.Vec2; +import arc.util.Time; +import arc.util.Tmp; +import ds.type.entities.Cable; +import ds.world.global.CableProcess; +import mindustry.Vars; +import mindustry.content.Fx; +import mindustry.entities.Units; +import mindustry.entities.bullet.BasicBulletType; +import mindustry.gen.*; +import mindustry.graphics.Drawf; +import mindustry.graphics.Layer; +import mindustry.graphics.Pal; +import mindustry.graphics.Trail; + +import static mindustry.Vars.headless; + +public class AdvArtilleryBulletType extends BasicBulletType { + public float trailMult = 1f, trailSize = 4f; + //Bullet trajectory height + public float trajectoryZ = 50; + //Degree of bullet rotation deviation along the trajectory + public float angleFactor = 0.25f; + + public float shadowIncreaseFactor = 1f; + + private static float cdist = 0f; + private static Unit result; + + public AdvArtilleryBulletType() { + super(1, 1, "shell"); + collidesTiles = false; + collides = false; + collidesAir = false; + scaleLife = true; + hitShake = 1f; + hitSound = Sounds.explosionArtillery; + hitEffect = Fx.flakExplosion; + shootEffect = Fx.shootBig; + trailEffect = Fx.artilleryTrail; + shrinkInterp = Interp.slope; + } + + public AdvArtilleryBulletType(float speed, float damage, String sprite){ + super(speed, damage, sprite); + collidesTiles = false; + collides = false; + collidesAir = false; + scaleLife = true; + hitShake = 1f; + hitSound = Sounds.explosionArtillery; + hitEffect = Fx.flakExplosion; + shootEffect = Fx.shootBig; + trailEffect = Fx.artilleryTrail; + shrinkInterp = Interp.slope; + } + + @Override + public void init(Bullet b){ + super.init(b); + drawSize += trajectoryZ * 1.2f; + } + + @Override + public void update(Bullet b){ + super.update(b); + + if(b.time >= (b.lifetime - 5) && !b.hit){ + cdist = 0f; + result = null; + float range = b.hitSize; + + Units.nearbyEnemies(b.team, b.x - range, b.y - range, range * 2f, range * 2f, e -> { + if (e.dead() || !e.checkTarget(collidesAir, collidesGround) || !e.hittable()) return; + + e.hitbox(Tmp.r1); + if (!Tmp.r1.contains(b.x, b.y)) return; + + float dst = e.dst(b.x, b.y) - e.hitSize; + if ((result == null || dst < cdist)) { + result = e; + cdist = dst; + } + }); + + if (result != null) { + b.collision(result, b.x, b.y); + b.hit = true; + } else if (collidesTiles) { + Building build = Vars.world.buildWorld(b.x, b.y); + if (build != null && build.team != b.team) { + build.collision(b); + hit(b, b.x, b.y); + b.hit = true; + } + } + } + } + + public void drawLight(Bullet b){ + if(lightOpacity <= 0f || lightRadius <= 0f) return; + float pr = Mathf.sinDeg(b.time() / b.lifetime * 180); + float bulletZ = Mathf.sinDeg(b.rotation()) * pr * trajectoryZ * (b.lifetime / b.type.lifetime); + Drawf.light(b.x, b.y + bulletZ, lightRadius, lightColor, lightOpacity); + } + + @Override + public void updateTrail(Bullet b){ + float pr = Mathf.sinDeg(b.time() / b.lifetime * 180); + float bulletZ = Mathf.sinDeg(b.rotation()) * pr * trajectoryZ * (b.lifetime / b.type.lifetime); + + if(!headless && trailLength > 0){ + if(b.trail == null){ + b.trail = new Trail(trailLength); + } + b.trail.length = trailLength; + b.trail.update(b.x, b.y + bulletZ, trailInterp.apply(b.fin()) * (1f + (trailSinMag > 0 ? Mathf.absin(Time.time, trailSinScl, trailSinMag) : 0f))); + } + } + + + @Override + public void updateTrailEffects(Bullet b){ + + float pr = Mathf.sinDeg(b.time() / b.lifetime * 180); + float bulletZ = Mathf.sinDeg(b.rotation()) * pr * trajectoryZ * (b.lifetime / b.type.lifetime); + float secProg = Mathf.sinDeg(b.time() / b.lifetime * 180 + 90); + + float str = Mathf.cosDeg(b.rotation()) * Mathf.sinDeg(b.rotation()) * 2; + + float degree = angleFactor * -secProg * str * Math.min(b.fin() * 2, 1); + + float drawRotation = b.rotation() - degree; + + boolean canSpawn = trailMinVelocity <= 0f || b.vel.len2() >= trailMinVelocity * trailMinVelocity; + + if(trailChance > 0 && canSpawn){ + if(Mathf.chanceDelta(trailChance)){ + if(trailSpread > 0){ + Tmp.v1.rnd(Mathf.random(trailSpread)); + }else{ + Tmp.v1.setZero(); + } + trailEffect.at(b.x + Tmp.v1.x, b.y + Tmp.v1.y + bulletZ, trailRotation ? drawRotation : trailParam, trailColor); + } + } + + if(trailInterval > 0f && canSpawn){ + if(b.timer(0, trailInterval)){ + if(trailSpread > 0){ + Tmp.v1.rnd(Mathf.random(trailSpread)); + }else{ + Tmp.v1.setZero(); + } + trailEffect.at(b.x + Tmp.v1.x, b.y + Tmp.v1.y + bulletZ, trailRotation ? drawRotation: trailParam, trailColor); + } + } + } + + @Override + public void draw(Bullet b){ + float zLayer = Draw.z(); + + if(trailLength > 0 && b.trail != null){ + //draw below bullets + Draw.z(zLayer - 0.0001f); + b.trail.draw(trailColor, trailWidth); + Draw.z(zLayer); + } + + float offset = -90 + (spin != 0 ? Mathf.randomSeed(b.id, 360f) + b.time * spin : 0f) + rotationOffset; + float pr = Mathf.sinDeg(b.time() / b.lifetime * 180); + float secProg = Mathf.sinDeg(b.time() / b.lifetime * 180 + 90); + float shrink = shrinkInterp.apply(b.fout()); + float height = this.height + ((1f - shrinkX) + shrinkX * shrink * Math.min(0.35f + Mathf.sinDeg(b.rotation()), 1) ); + float width = this.width * ((1f - shrinkX) + shrinkX * shrink); + + + float bulletZ = Mathf.sinDeg(b.rotation()) * pr * trajectoryZ * (b.lifetime / b.type.lifetime); + + + Draw.z(Layer.darkness); + + Draw.color(Pal.shadow, Pal.shadow.a); + + Draw.rect(frontRegion, b.x , b.y, Mathf.lerp(width, width + trajectoryZ / 8, pr * (b.lifetime / b.type.lifetime) * shadowIncreaseFactor), Mathf.lerp(height, height + trajectoryZ / 8, pr * (b.lifetime / b.type.lifetime) * shadowIncreaseFactor), b.rotation() + offset); + + Draw.z(zLayer); + + Color mix = Tmp.c1.set(mixColorFrom).lerp(mixColorTo, b.fin()); + Draw.mixcol(mix, mix.a); + + float str = Mathf.cosDeg(b.rotation()) * Mathf.sinDeg(b.rotation()) * 2; + + float degree = angleFactor * -secProg * str * Math.min(b.fin() * 2, 1); + + float drawRotation = b.rotation() - degree; + + if(backRegion.found()){ + Draw.color(backColor); + Draw.rect(backRegion, b.x, b.y + bulletZ, width, height, drawRotation + offset); + } + + Draw.color(frontColor); + Draw.rect(frontRegion, b.x, b.y + bulletZ, width, height, drawRotation + offset); + Draw.reset(); + } +} diff --git a/src/ds/type/entities/bullets/EmptyBulletType.java b/src/ds/type/entities/bullets/EmptyBulletType.java new file mode 100644 index 0000000..ff28871 --- /dev/null +++ b/src/ds/type/entities/bullets/EmptyBulletType.java @@ -0,0 +1,14 @@ +package ds.type.entities.bullets; + +import arc.math.Mathf; +import mindustry.entities.bullet.BulletType; +import mindustry.type.unit.MissileUnitType; + +//For torpedoes +public class EmptyBulletType extends BulletType { + public EmptyBulletType(){ + speed = 0.0001f; + instantDisappear = true; + keepVelocity = false; + } +} diff --git a/src/ds/type/entities/bullets/HarpoonBulletType.java b/src/ds/type/entities/bullets/HarpoonBulletType.java index 5a9340e..a96b0bf 100644 --- a/src/ds/type/entities/bullets/HarpoonBulletType.java +++ b/src/ds/type/entities/bullets/HarpoonBulletType.java @@ -5,10 +5,12 @@ import arc.graphics.g2d.TextureRegion; import arc.math.Mathf; import arc.math.Angles; +import arc.util.Log; import arc.util.Time; import ds.world.blocks.turret.DSHarpoonTurret; import ds.draw.DrawWire; import ds.type.entities.comp.HarpoonBulletComp; +import ds.world.blocks.turret.DSTurret; import mindustry.content.Fx; import mindustry.entities.bullet.BasicBulletType; import mindustry.game.EventType; @@ -19,30 +21,35 @@ public class HarpoonBulletType extends BasicBulletType { static final EventType.UnitDamageEvent bulletDamageEvent = new EventType.UnitDamageEvent(); public Color wireColor = Color.brown; - public float wireStroke = 1f; + public float wireStroke = 0.1f; + public float wireLen = 8f; public float returnSpeed = 2; public float returnDelay = 60f; - public static TextureRegion wireRegion; + public TextureRegion wireRegion; + public TextureRegion startRegion; public float pierceDrag = 0.5f; + public float pierceAccelFactor = 0.15f; + public HarpoonBulletType(float speed, float damage, String bulletSprite) { super(speed, damage, bulletSprite); pierce = true; sprite = "deepsea-spear"; - pierceBuilding = false; + pierceBuilding = true; pierceCap = -1; drag = 0.05f; shrinkX = shrinkY = 0; layer = Layer.bullet - 2; despawnEffect = Fx.none; drawSize = 999; + lightRadius = 0; } public HarpoonBulletType(float speed, float damage) { super(speed, damage, "deepsea-spear"); pierce = true; sprite = "deepsea-spear"; - pierceBuilding = false; + pierceBuilding = true; pierceCap = -1; drag = 0.05f; shrinkX = shrinkY = 0; @@ -51,6 +58,7 @@ public HarpoonBulletType(float speed, float damage) { drawSize = 999; hittable = false; absorbable = false; + lightRadius = 0; } public HarpoonBulletType() { @@ -58,7 +66,7 @@ public HarpoonBulletType() { pierce = true; returnDelay = this.lifetime/1.1f; sprite = "deepsea-spear"; - pierceBuilding = false; + pierceBuilding = true; pierceCap = -1; drag = 0.05f; shrinkX = shrinkY = 0; @@ -67,41 +75,38 @@ public HarpoonBulletType() { drawSize = 999; hittable = false; absorbable = false; + lightRadius = 0; } @Override public void init(Bullet b){ super.init(b); - HarpoonBulletComp hdata = new HarpoonBulletComp(){}; - hdata.BulletReturnData = returnDelay; - hdata.BulletReturn = false; - b.data = hdata; - b.time = (lifetime - returnDelay) >= 0 ? lifetime - returnDelay : lifetime; - float length = speed * lifetime; - float returnTime = length / returnSpeed; - b.time -= returnTime; + b.data = new HarpoonBulletComp(){{ + returning = false; + }}; + b.lifetime += speed * lifetime / returnSpeed; } @Override public void load(){ super.load(); wireRegion = Core.atlas.find("deepsea-harpoon-wire"); + Log.debug(wireRegion.found() ? "Deep sea log: Wire region is found" : "Deep sea log: Wire region isn't found" ); + startRegion = Core.atlas.find("deepsea-harpoon-wire-end"); + Log.debug(startRegion.found() ? "Deep sea log: Wire start region is found" : "Deep sea log: Wire start region isn't found" ); } @Override public void update(Bullet b) { super.update(b); HarpoonBulletComp hdata = (HarpoonBulletComp)b.data; - if(b.data != null && !hdata.BulletReturn){ - hdata.BulletReturnData -= Time.delta; - if(hdata.BulletReturnData <= 0 && b.owner instanceof Posc){ - hdata.BulletReturn = true; - Fx.bubble.at(b.x, b.y); - } - }else { - if(b.owner instanceof Posc) { - assert hdata != null; - if (hdata.BulletReturn) { + if(b.data != null){ + if (!hdata.returning) { + if (b.time >= lifetime && b.owner instanceof Posc) { + hdata.returning = true; + } + } else { + if (b.owner instanceof Posc) { updateReturn(b, (Posc) b.owner); } } @@ -125,6 +130,7 @@ private boolean ownerValid(Bullet b){ @Override public void draw(Bullet b) { super.draw(b); + if (b.owner instanceof Posc && ownerValid(b)){ float ownerX = ((Posc)b.owner).getX(); float ownerY = ((Posc)b.owner).getY(); @@ -133,12 +139,15 @@ public void draw(Bullet b) { float rotation = turret.rotation; float muzzleX = turret.x + Angles.trnsx(rotation, turret.block.size * 2f); float muzzleY = turret.y + Angles.trnsy(rotation, turret.block.size * 2f); - + if(turret.block instanceof Turret bl){ + muzzleX = turret.x + Angles.trnsx(rotation - 90, bl.shootX, bl.shootY); + muzzleY = turret.y + Angles.trnsy(rotation - 90, bl.shootX, bl.shootY); + } ownerX = muzzleX; ownerY = muzzleY; } - DrawWire.draw(b.x, b.y, ownerX, ownerY, wireRegion, wireStroke); + DrawWire.draw(ownerX, ownerY, b.x, b.y, wireRegion, startRegion, wireStroke, wireLen, b.rotation()); } } @@ -147,12 +156,15 @@ private void updateReturn(Bullet b, Posc owner){ float targetX = owner.getX(); float targetY = owner.getY(); - // Если владелец - турель, получаем позицию ствола - if(owner instanceof Turret.TurretBuild turret){ - // Используем последний угол выстрела для определения позиции ствола + if(owner instanceof DSHarpoonTurret.HarpoonTurretBuild turret){ float rotation = turret.rotation; - float muzzleX = turret.x + Angles.trnsx(rotation, turret.block.size * 4f); - float muzzleY = turret.y + Angles.trnsy(rotation, turret.block.size * 4f); + float muzzleX = turret.x; + float muzzleY = turret.y; + + if(turret.block instanceof Turret t){ + muzzleX = turret.x + Angles.trnsx(rotation - 90, t.shootX, t.shootY); + muzzleY = turret.y + Angles.trnsy(rotation - 90, t.shootX, t.shootY); + } targetX = muzzleX; targetY = muzzleY; @@ -179,25 +191,36 @@ public void removed(Bullet b){ } @Override - public void hit(Bullet b, float x, float y) { + public void hit(Bullet b, float x, float y){ HarpoonBulletComp hdata = (HarpoonBulletComp)b.data; - if(!hdata.BulletReturn) { - b.vel().scl(pierceDrag); + if(!hdata.returning) { + b.vel().scl(1 - pierceDrag); super.hit(b, x, y); + if(b.vel().len2() < speed * pierceAccelFactor) manualBackup(b); } } @Override - public void hitEntity(Bullet b, Hitboxc entity, float health) { + public void hitEntity(Bullet b, Hitboxc entity, float health){ HarpoonBulletComp hdata = (HarpoonBulletComp) b.data; - if (!hdata.BulletReturn) { + if (!hdata.returning) { super.hitEntity(b, entity, health); } } + protected void manualBackup(Bullet b){ + if(b.data instanceof HarpoonBulletComp){ + ((HarpoonBulletComp) b.data).returning = true; + b.vel.scl(0.05f); + } + } + @Override public void hitTile(Bullet b, Building build, float x, float y, float initialHealth, boolean direct){ - ((DSHarpoonTurret.HarpoonTurretBuild) b.owner).bulletBroken(); - super.hitTile(b, build, x, y, initialHealth, direct); + HarpoonBulletComp hdata = (HarpoonBulletComp) b.data; + if (!hdata.returning) { + super.hitTile(b, build, x, y, initialHealth, direct); + manualBackup(b); + } } } \ No newline at end of file diff --git a/src/ds/type/entities/bullets/PointLightningBulletType.java b/src/ds/type/entities/bullets/PointLightningBulletType.java index 9663970..b859fe2 100644 --- a/src/ds/type/entities/bullets/PointLightningBulletType.java +++ b/src/ds/type/entities/bullets/PointLightningBulletType.java @@ -142,10 +142,8 @@ private void createSubLightnings(Bullet b, float x, float y, float rotation) { } private void hitTarget(Bullet b, float px, float py) { - // Поиск юнита для попадания cdist = 0f; - result = null; - float range = 10f; // Радиус поиска + float range = 10f; Units.nearbyEnemies(b.team, px - range, py - range, range * 2f, range * 2f, e -> { if (e.dead() || !e.checkTarget(collidesAir, collidesGround) || !e.hittable()) return; @@ -158,13 +156,13 @@ private void hitTarget(Bullet b, float px, float py) { result = e; cdist = dst; } - }); - if (result != null) { b.collision(result, px, py); result.damage(b.damage()); result.apply(status, statusDuration); - } else if (collidesTiles) { + }); + + if (collidesTiles) { Building build = Vars.world.buildWorld(px, py); if (build != null && build.team != b.team) { build.collision(b); @@ -187,8 +185,7 @@ private Position findInterceptedPoint(Bullet owner, Position target, Team fromTe (x, y) -> { Building build = Vars.world.build(x, y); return (furthest = build) != null && - build.team() != fromTeam && - build.block.insulated; + build.team() != fromTeam; } ); diff --git a/src/ds/type/entities/comp/HarpoonBulletComp.java b/src/ds/type/entities/comp/HarpoonBulletComp.java index c377e47..bb053bc 100644 --- a/src/ds/type/entities/comp/HarpoonBulletComp.java +++ b/src/ds/type/entities/comp/HarpoonBulletComp.java @@ -5,7 +5,6 @@ //A class that need for store some data public abstract class HarpoonBulletComp { - public float BulletReturnData; - public boolean BulletReturn; + public boolean returning; public Seq targets = new Seq<>(); } \ No newline at end of file diff --git a/src/ds/type/entities/dsUnits/SubmarineUnitType.java b/src/ds/type/entities/dsUnits/SubmarineUnitType.java index f370b7c..7116801 100644 --- a/src/ds/type/entities/dsUnits/SubmarineUnitType.java +++ b/src/ds/type/entities/dsUnits/SubmarineUnitType.java @@ -1,16 +1,19 @@ package ds.type.entities.dsUnits; import arc.math.Mathf; +import arc.struct.Seq; import ds.content.DSFx; import ds.world.graphics.DSPal; import ds.world.meta.DSEnv; import ds.type.entities.DSUnitType; import ds.type.entities.dsUnits.comp.UnderwaterUnitEngine; import mindustry.entities.Effect; +import mindustry.gen.Unit; public class SubmarineUnitType extends DSUnitType { public float bubblesInterval = 2; public Effect bubbleEffect = DSFx.dsMoveEffect; + public Seq undEngines = new Seq<>(); public SubmarineUnitType(String name) { super(name); @@ -20,14 +23,26 @@ public SubmarineUnitType(String name) { engineOffset = 3; engineSize = 0; omniMovement = false; + accel = 1 / (hitSize * 10); + drag = accel * 0.9f; } - public void setEngine(float x, float y, float rotation, boolean mirror){ + public void setUndEngines(float x, float y, float rotation, boolean mirror){ if(!mirror){ - engines.add(new UnderwaterUnitEngine(x, y, rotation)); + undEngines.add(new UnderwaterUnitEngine(x, y, rotation)); }else { - for(int sign : Mathf.signs){ - engines.add(new UnderwaterUnitEngine(x * sign, y, rotation)); + for (int s : Mathf.signs){ + undEngines.add(new UnderwaterUnitEngine(x * s, y, rotation * s)); + } + } + } + + @Override + public void update(Unit unit){ + super.update(unit); + if(!undEngines.isEmpty()){ + for(var e : undEngines){ + e.update(unit); } } } diff --git a/src/ds/type/entities/dsUnits/TorpedoUnitType.java b/src/ds/type/entities/dsUnits/TorpedoUnitType.java index 62362e2..7461a2a 100644 --- a/src/ds/type/entities/dsUnits/TorpedoUnitType.java +++ b/src/ds/type/entities/dsUnits/TorpedoUnitType.java @@ -1,14 +1,18 @@ package ds.type.entities.dsUnits; +import arc.math.Mathf; +import arc.struct.Seq; import ds.content.DSFx; import ds.type.entities.dsUnits.comp.UnderwaterUnitEngine; import ds.world.meta.DSEnv; import mindustry.entities.abilities.MoveEffectAbility; import mindustry.gen.Sounds; +import mindustry.gen.Unit; import mindustry.graphics.Pal; import mindustry.type.unit.MissileUnitType; public class TorpedoUnitType extends MissileUnitType { + public Seq undEngines = new Seq<>(); public TorpedoUnitType(String name) { super(name); health = 40; @@ -19,8 +23,26 @@ public TorpedoUnitType(String name) { engineOffset = 0; loopSound = Sounds.none; outlineColor = Pal.darkOutline; - engines.add(new UnderwaterUnitEngine(0, -4, 180){{ - engineEffectChance = 0.45f; - }}); + setUndEngines(0, -2, 180, false); + } + + public void setUndEngines(float x, float y, float rotation, boolean mirror){ + if(!mirror){ + undEngines.add(new UnderwaterUnitEngine(x, y, rotation)); + }else { + for (int s : Mathf.signs){ + undEngines.add(new UnderwaterUnitEngine(x * s, y, rotation * s)); + } + } + } + + @Override + public void update(Unit unit){ + super.update(unit); + if(!undEngines.isEmpty()){ + for(var e : undEngines){ + e.update(unit); + } + } } } diff --git a/src/ds/type/entities/dsUnits/comp/UnderwaterUnitEngine.java b/src/ds/type/entities/dsUnits/comp/UnderwaterUnitEngine.java index f8b264d..d539195 100644 --- a/src/ds/type/entities/dsUnits/comp/UnderwaterUnitEngine.java +++ b/src/ds/type/entities/dsUnits/comp/UnderwaterUnitEngine.java @@ -3,60 +3,40 @@ import arc.math.Angles; import arc.math.Mathf; import arc.util.Time; +import arc.util.Tmp; import ds.content.DSFx; import mindustry.Vars; import mindustry.entities.Effect; import mindustry.gen.Unit; import mindustry.type.UnitType; -public class UnderwaterUnitEngine extends UnitType.UnitEngine{ - public float engineEffectInterval = 0.65f; - public float engineEffectChance = 0.75f; +public class UnderwaterUnitEngine{ + public float x, y; + public float rotation; + public float engineEffectInterval = 2f; + public float engineEffectChance = 1f; public float engineXRand = 0; - public float zLayer = -1; public Effect engineEffect = DSFx.dsMoveEffect; - protected float timer = 0; + private float counter = 0; + private float efficiency; - public UnderwaterUnitEngine(float x, float y, float radius, float rotation){ - super(x, y, radius, rotation); - } public UnderwaterUnitEngine(float x, float y, float rotation){ - this(x, y, 1, rotation); - } - - public UnderwaterUnitEngine(float x, float y, float rotation, float engineEffectInterval, float engineEffectChance, Effect engineEffect){ - this(x, y, rotation); - this.engineEffectInterval = engineEffectInterval; - this.engineEffectChance = engineEffectChance; - this.engineEffect = engineEffect; + this.x = x; + this.y = y; + this.rotation = rotation; } - public UnderwaterUnitEngine(float x, float y, float rotation, float engineEffectInterval, float engineEffectChance, Effect engineEffect, float engineXRand){ - this(x, y, rotation); - this.engineEffectInterval = engineEffectInterval; - this.engineEffectChance = engineEffectChance; - this.engineEffect = engineEffect; - this.engineXRand = engineXRand; - } - - protected float calcUnitSpeedEff(Unit unit){ + public void update(Unit unit){ UnitType type = unit.type; - return Mathf.curve(unit.vel.len2(), 0.001f, type.speed * type.speed); - } - - @Override - public void draw(Unit unit){ - float eff = calcUnitSpeedEff(unit); - if(eff > 0.001f && !Vars.state.isPaused()){ - timer += Time.delta * eff; - if(timer > engineEffectInterval){ - if(Mathf.chance(engineEffectChance)) { - float ex = unit.x + Angles.trnsx(unit.rotation - 90, x + engineXRand, y); - float ey = unit.y + Angles.trnsy(unit.rotation - 90, x + engineXRand, y); - engineEffect.at(ex, ey, unit.rotation+180); - } - timer = 0; + efficiency = unit.moving() ? Mathf.approachDelta(efficiency, 1,1) : Mathf.approachDelta(efficiency, 0,1); + + if(efficiency > 0.05f && !unit.inFogTo(Vars.player.team())){ + counter += Time.delta * efficiency; + if(counter > engineEffectInterval && Mathf.chanceDelta(engineEffectChance)){ + Tmp.v1.trns(unit.rotation - 90f, x, y); + engineEffect.at(Tmp.v1.x + unit.x, Tmp.v1.y + unit.y, rotation + unit.rotation); + counter %= engineEffectInterval; } } } diff --git a/src/ds/type/entities/weapons/AdvancedLightWeapon.java b/src/ds/type/entities/weapons/AdvancedLightWeapon.java index 5599d6a..4d5c24a 100644 --- a/src/ds/type/entities/weapons/AdvancedLightWeapon.java +++ b/src/ds/type/entities/weapons/AdvancedLightWeapon.java @@ -1,17 +1,22 @@ package ds.type.entities.weapons; import arc.math.Angles; +import arc.struct.Seq; import mindustry.Vars; import mindustry.entities.units.WeaponMount; +import mindustry.game.FogControl; +import mindustry.gen.FogEvent; import mindustry.gen.Unit; import ds.draw.*; +import mindustry.world.Block; public class AdvancedLightWeapon extends DSWeapon { public float lightLength = 180; public float rayWidth = 10; public float lightCone = 90; - public boolean canShoot; + public boolean dispelsFog = true; public boolean lightTileable = true; + public AdvancedLightWeapon(String name){ super(name); } @@ -42,5 +47,6 @@ public void drawLight(Unit unit , WeaponMount mount){ } else { DrawDirLight.DrawLightBeamNonTileable(wX, wY, mount.rotation + unit.rotation(), lightLength, lightCone, rayWidth); } + } } diff --git a/src/ds/type/entities/weapons/AntiTorpedoSystemWeapon.java b/src/ds/type/entities/weapons/AntiTorpedoSystemWeapon.java deleted file mode 100644 index 6f5d909..0000000 --- a/src/ds/type/entities/weapons/AntiTorpedoSystemWeapon.java +++ /dev/null @@ -1,238 +0,0 @@ -package ds.type.entities.weapons; - -import arc.Core; -import arc.graphics.Color; -import arc.math.Angles; -import arc.math.Mathf; -import arc.math.geom.Vec2; -import arc.scene.ui.layout.Table; -import arc.util.Time; -import arc.util.Tmp; -import ds.type.entities.dsUnits.TorpedoUnitType; -import mindustry.Vars; -import mindustry.audio.SoundLoop; -import mindustry.content.Fx; -import mindustry.entities.Effect; -import mindustry.entities.Predict; -import mindustry.entities.Sized; -import mindustry.entities.Units; -import mindustry.entities.units.WeaponMount; -import mindustry.gen.Sounds; -import mindustry.gen.Teamc; -import mindustry.gen.Unit; -import mindustry.gen.UnitEntity; -import mindustry.type.UnitType; - -import static mindustry.Vars.headless; -import static mindustry.Vars.state; - -public class AntiTorpedoSystemWeapon extends DSWeapon { - public float damage = 20; - - public Effect beamEffect = Fx.pointBeam; - - public Color color = Color.white; - - public AntiTorpedoSystemWeapon(String name, float damage){ - super(name); - this.damage = damage; - } - - public AntiTorpedoSystemWeapon(String name){ - super(name); - } - - public AntiTorpedoSystemWeapon(float damage){ - super(""); - this.damage = damage; - } - - public AntiTorpedoSystemWeapon(){ - super(""); - } - - @Override - public void addStats(UnitType u, Table t){ - t.add(Core.bundle.format("weapon.torpedDefence")); - super.addStats(u, t); - } - - @Override - public void update(Unit unit, WeaponMount mount) { - boolean can = unit.canShoot(); - float lastReload = mount.reload; - mount.reload = Math.max(mount.reload - Time.delta * unit.reloadMultiplier, 0); - mount.recoil = Mathf.approachDelta(mount.recoil, 0, unit.reloadMultiplier / recoilTime); - if(recoils > 0){ - if(mount.recoils == null) mount.recoils = new float[recoils]; - for(int i = 0; i < recoils; i++){ - mount.recoils[i] = Mathf.approachDelta(mount.recoils[i], 0, unit.reloadMultiplier / recoilTime); - } - } - mount.smoothReload = Mathf.lerpDelta(mount.smoothReload, mount.reload / reload, smoothReloadSpeed); - mount.charge = mount.charging && shoot.firstShotDelay > 0 ? Mathf.approachDelta(mount.charge, 1, 1 / shoot.firstShotDelay) : 0; - - float warmupTarget = (can && mount.shoot) || (continuous && mount.bullet != null) || mount.charging ? 1f : 0f; - if(linearWarmup){ - mount.warmup = Mathf.approachDelta(mount.warmup, warmupTarget, shootWarmupSpeed); - }else{ - mount.warmup = Mathf.lerpDelta(mount.warmup, warmupTarget, shootWarmupSpeed); - } - - float - mountX = unit.x + Angles.trnsx(unit.rotation - 90, x, y), - mountY = unit.y + Angles.trnsy(unit.rotation - 90, x, y); - - //find a new target - if(!controllable && autoTarget){ - if((mount.retarget -= Time.delta) <= 0f){ - mount.target = findTarget(unit, mountX, mountY, bullet.range, TorpedoUnitType.class); - mount.retarget = mount.target == null ? targetInterval : targetSwitchInterval; - } - - if(mount.target != null && checkTarget(unit, mount.target, mountX, mountY, bullet.range)){ - mount.target = null; - } - - boolean shoot = false; - - if(mount.target != null){ - shoot = mount.target.within(mountX, mountY, bullet.range + Math.abs(shootY) + (mount.target instanceof Sized s ? s.hitSize()/2f : 0f)) && can; - - if(predictTarget){ - Vec2 to = Predict.intercept(unit, mount.target, bullet); - mount.aimX = to.x; - mount.aimY = to.y; - }else{ - mount.aimX = mount.target.x(); - mount.aimY = mount.target.y(); - } - } - - mount.shoot = mount.rotate = shoot; - - //note that shooting state is not affected, as these cannot be controlled - //logic will return shooting as false even if these return true, which is fine - } - - //rotate if applicable - if(rotate && (mount.rotate || mount.shoot) && can){ - float axisX = unit.x + Angles.trnsx(unit.rotation - 90, x, y), - axisY = unit.y + Angles.trnsy(unit.rotation - 90, x, y); - - mount.targetRotation = Angles.angle(axisX, axisY, mount.aimX, mount.aimY) - unit.rotation; - mount.rotation = Angles.moveToward(mount.rotation, mount.targetRotation, rotateSpeed * Time.delta); - if(rotationLimit < 360){ - float dst = Angles.angleDist(mount.rotation, baseRotation); - if(dst > rotationLimit/2f){ - mount.rotation = Angles.moveToward(mount.rotation, baseRotation, dst - rotationLimit/2f); - } - } - }else if(!rotate){ - mount.rotation = baseRotation; - mount.targetRotation = unit.angleTo(mount.aimX, mount.aimY); - } - - float - weaponRotation = unit.rotation - 90 + (rotate ? mount.rotation : baseRotation), - bulletX = mountX + Angles.trnsx(weaponRotation, this.shootX, this.shootY), - bulletY = mountY + Angles.trnsy(weaponRotation, this.shootX, this.shootY), - shootAngle = bulletRotation(unit, mount, bulletX, bulletY); - - if(alwaysShooting) mount.shoot = true; - - //update continuous state - if(continuous && mount.bullet != null){ - if(!mount.bullet.isAdded() || mount.bullet.time >= mount.bullet.lifetime || mount.bullet.type != bullet){ - mount.bullet = null; - }else{ - mount.bullet.rotation(weaponRotation + 90); - mount.bullet.set(bulletX, bulletY); - mount.reload = reload; - mount.recoil = 1f; - unit.vel.add(Tmp.v1.trns(mount.bullet.rotation() + 180f, mount.bullet.type.recoil * Time.delta)); - if(shootSound != Sounds.none && !headless){ - if(mount.sound == null) mount.sound = new SoundLoop(shootSound, 1f); - mount.sound.update(bulletX, bulletY, true); - } - - //target length of laser - float shootLength = Math.min(Mathf.dst(bulletX, bulletY, mount.aimX, mount.aimY), range()); - //current length of laser - float curLength = Mathf.dst(bulletX, bulletY, mount.bullet.aimX, mount.bullet.aimY); - //resulting length of the bullet (smoothed) - float resultLength = Mathf.approachDelta(curLength, shootLength, aimChangeSpeed); - //actual aim end point based on length - Tmp.v1.trns(shootAngle, mount.lastLength = resultLength).add(bulletX, bulletY); - - mount.bullet.aimX = Tmp.v1.x; - mount.bullet.aimY = Tmp.v1.y; - - if(alwaysContinuous && mount.shoot){ - mount.bullet.time = mount.bullet.lifetime * mount.bullet.type.optimalLifeFract * mount.warmup; - mount.bullet.keepAlive = true; - - unit.apply(shootStatus, shootStatusDuration); - } - } - }else{ - //heat decreases when not firing - mount.heat = Math.max(mount.heat - Time.delta * unit.reloadMultiplier / cooldownTime, 0); - - if(mount.sound != null){ - mount.sound.update(bulletX, bulletY, false); - } - } - - //flip weapon shoot side for alternating weapons - boolean wasFlipped = mount.side; - if(otherSide >= 0 && alternate && mount.side == flipSprite && otherSide < unit.mounts.length && mount.reload <= reload / 2f && lastReload > reload / 2f){ - unit.mounts[otherSide].side = !unit.mounts[otherSide].side; - mount.side = !mount.side; - } - - if(!headless && activeSound != Sounds.none && mount.shoot && can && mount.warmup >= minWarmup){ - Vars.control.sound.loop(activeSound, unit, activeSoundVolume); - } - - float velLen = unit.isRemote() ? unit.vel.len() : unit.deltaLen() / Time.delta; - - //shoot if applicable - if(mount.shoot && //must be shooting - can && //must be able to shoot - !(bullet.killShooter && mount.totalShots > 0) && //if the bullet kills the shooter, you should only ever be able to shoot once - (!useAmmo || unit.ammo > 0 || !state.rules.unitAmmo || unit.team.rules().infiniteAmmo) && //check ammo - (!alternate || wasFlipped == flipSprite) && - mount.warmup >= minWarmup && //must be warmed up - velLen >= minShootVelocity && //check velocity requirements - (mount.reload <= 0.0001f || (alwaysContinuous && mount.bullet == null)) && //reload has to be 0, or it has to be an always-continuous weapon - (alwaysShooting || Angles.within(rotate ? mount.rotation : unit.rotation + baseRotation, mount.targetRotation, shootCone)) //has to be within the cone - ){ - shoot(unit, mount, bulletX, bulletY, shootAngle); - - mount.reload = reload; - - if(useAmmo){ - unit.ammo--; - if(unit.ammo < 0) unit.ammo = 0; - } - } - } - - protected Teamc findTarget(Unit unit, float x, float y, float range, Class type) { - return Units.closestTarget(unit.team, x, y, range + Math.abs(shootY), u -> u.getClass() == type); - } - - @Override - protected void shoot(Unit unit, WeaponMount mount, float shootX, float shootY, float rotation) { - if(!(mount.target instanceof UnitEntity target && target.type instanceof TorpedoUnitType)) return; - target.damage(damage); - - beamEffect.at(shootX, shootY, rotation, color, new Vec2().set(target)); - bullet.shootEffect.at(shootX, shootY, rotation, color); - bullet.hitEffect.at(target.x, target.y, color); - shootSound.at(shootX, shootY, Mathf.random(0.9f, 1.1f)); - mount.recoil = 1f; - mount.heat = 1f; - } -} diff --git a/src/ds/type/entities/weapons/AntiTorpedoesWeapon.java b/src/ds/type/entities/weapons/AntiTorpedoesWeapon.java new file mode 100644 index 0000000..c40722e --- /dev/null +++ b/src/ds/type/entities/weapons/AntiTorpedoesWeapon.java @@ -0,0 +1,48 @@ +package ds.type.entities.weapons; + +import arc.Core; +import arc.scene.ui.layout.Table; +import ds.type.entities.dsUnits.TorpedoUnitType; +import mindustry.entities.Units; +import mindustry.gen.Groups; +import mindustry.gen.Teamc; +import mindustry.gen.Unit; +import mindustry.type.UnitType; +import mindustry.type.Weapon; +import mindustry.world.meta.Stat; +import mindustry.world.meta.StatUnit; + +public class AntiTorpedoesWeapon extends DSWeapon { + + public AntiTorpedoesWeapon(String name){ + super(name); + } + + public AntiTorpedoesWeapon(){ + } + + { + autoTarget = true; + controllable = false; + rotate = true; + useAttackRange = false; + targetInterval = targetSwitchInterval = 5f; + } + + @Override + public void addStats(UnitType u, Table t){ + super.addStats(u, t); + t.add(Core.bundle.get("weapon.anti-torpedo-defence")); + } + + @Override + protected Teamc findTarget(Unit unit, float x, float y, float range, boolean air, boolean ground){ + return Units.closestTarget(unit.team, x, y, range + Math.abs(shootY), u -> u.checkTarget(air, ground) && u.type instanceof TorpedoUnitType); + } + + protected boolean checkTarget(Unit unit, Teamc target, float x, float y, float range){ + return !(target instanceof Unit u && u.type instanceof TorpedoUnitType); + } + + +} diff --git a/src/ds/type/entities/weapons/DSWeapon.java b/src/ds/type/entities/weapons/DSWeapon.java index 48e4c37..556d13e 100644 --- a/src/ds/type/entities/weapons/DSWeapon.java +++ b/src/ds/type/entities/weapons/DSWeapon.java @@ -5,6 +5,7 @@ import arc.math.geom.Vec2; import arc.scene.ui.layout.Table; import arc.struct.ObjectMap; +import arc.util.Strings; import arc.util.Time; import arc.util.Tmp; import ds.world.meta.DSStatValues; @@ -17,15 +18,25 @@ import mindustry.gen.Unit; import mindustry.type.UnitType; import mindustry.type.Weapon; +import mindustry.world.meta.Stat; +import mindustry.world.meta.StatUnit; import static mindustry.Vars.headless; -import static mindustry.Vars.state; public class DSWeapon extends Weapon { - + public boolean targetUnitPointPosition = false; + @Override public void addStats(UnitType u, Table t){ + if(inaccuracy > 0){ + t.row(); + t.add("[lightgray]" + Stat.inaccuracy.localized() + ": [white]" + (int)inaccuracy + " " + StatUnit.degrees.localized()); + } + if(!alwaysContinuous && reload > 0 && !bullet.killShooter){ + t.row(); + t.add("[lightgray]" + Stat.reload.localized() + ": " + (mirror ? "2x " : "") + "[white]" + Strings.autoFixed(60f / reload, 2) + " (x" + shoot.shots + ")"+ " " + StatUnit.perSecond.localized()); + } DSStatValues.ammo(ObjectMap.of(u, bullet)).display(t); } @@ -45,6 +56,11 @@ public DSWeapon(){ super(""); } + @Override + public void draw(Unit unit, WeaponMount mount){ + super.draw(unit, mount); + } + public void update(Unit unit, WeaponMount mount){ boolean can = unit.canShoot(); float lastReload = mount.reload; @@ -188,7 +204,6 @@ public void update(Unit unit, WeaponMount mount){ if(mount.shoot && //must be shooting can && //must be able to shoot !(bullet.killShooter && mount.totalShots > 0) && //if the bullet kills the shooter, you should only ever be able to shoot once - (!useAmmo || unit.ammo > 0 || !state.rules.unitAmmo || unit.team.rules().infiniteAmmo) && //check ammo (!alternate || wasFlipped == flipSprite) && mount.warmup >= minWarmup && //must be warmed up velLen >= minShootVelocity && //check velocity requirements @@ -199,10 +214,6 @@ public void update(Unit unit, WeaponMount mount){ mount.reload = reload; - if(useAmmo){ - unit.ammo--; - if(unit.ammo < 0) unit.ammo = 0; - } } } } diff --git a/src/ds/utilities/DSMath.java b/src/ds/utilities/DSMath.java index 014313a..bd149da 100644 --- a/src/ds/utilities/DSMath.java +++ b/src/ds/utilities/DSMath.java @@ -2,10 +2,12 @@ import arc.math.Mathf; import arc.math.geom.Vec2; +import arc.struct.Seq; import ds.content.blocks.PiEnv; import ds.world.meta.DSEnv; import mindustry.Vars; import mindustry.content.Blocks; +import mindustry.world.Block; import mindustry.world.Tile; import static mindustry.Vars.tilesize; @@ -13,7 +15,7 @@ public class DSMath { public static int[] singsZeroInclude = {-1, 0, 1}; //for FX - public static Vec2 RayCastSolid(float stx, float sty, float dir, int len, int stepS){ + public static Vec2 RayCastSolid(float stx, float sty, float dir, int len, int stepS, Seq exceptions){ Vec2 vec = new Vec2(Mathf.cosDeg(dir) * len + stx, Mathf.sinDeg(dir) * len + sty); Vec2 dirV = new Vec2(Mathf.cosDeg(dir), Mathf.sinDeg(dir)).nor(); float x = stx; @@ -26,7 +28,7 @@ public static Vec2 RayCastSolid(float stx, float sty, float dir, int len, int st int tileX = (int)(x / tilesize); int tileY = (int)(y / tilesize); Tile tile = Vars.world.tile(tileX, tileY); - if(tile != null && (tile.solid() && tile.floor() != Blocks.empty.asFloor() && tile.floor() != PiEnv.geothermalRift.asFloor() )){ + if(tile != null && (tile.solid() || exceptions.contains(tile.block()))){ vec = new Vec2(x, y); return vec; } diff --git a/src/ds/world/ai/PandemoniumMinigameAi.java b/src/ds/world/ai/PandemoniumMinigameAi.java deleted file mode 100644 index 7120048..0000000 --- a/src/ds/world/ai/PandemoniumMinigameAi.java +++ /dev/null @@ -1,7 +0,0 @@ -package ds.world.ai; - -import mindustry.entities.units.AIController; - -public class PandemoniumMinigameAi extends AIController { - -} diff --git a/src/ds/world/blocks/crafting/DynamicCrafter.java b/src/ds/world/blocks/crafting/MultiRecipeCrafter.java similarity index 62% rename from src/ds/world/blocks/crafting/DynamicCrafter.java rename to src/ds/world/blocks/crafting/MultiRecipeCrafter.java index 2d0d0a7..ff0f631 100644 --- a/src/ds/world/blocks/crafting/DynamicCrafter.java +++ b/src/ds/world/blocks/crafting/MultiRecipeCrafter.java @@ -1,21 +1,24 @@ package ds.world.blocks.crafting; import arc.Core; +import arc.func.Func; import arc.graphics.Color; import arc.graphics.g2d.TextureRegion; import arc.math.Mathf; import arc.scene.ui.layout.Table; import arc.struct.EnumSet; +import arc.struct.OrderedMap; import arc.struct.Seq; import arc.util.Eachable; import arc.util.Strings; import arc.util.Time; import arc.util.io.Reads; import arc.util.io.Writes; -import ds.world.consumers.RecipeIO; +import ds.world.modules.RecipeIO; import ds.world.meta.DSStats; import mindustry.Vars; import mindustry.content.Fx; +import mindustry.core.UI; import mindustry.entities.Effect; import mindustry.entities.units.BuildPlan; import mindustry.gen.Building; @@ -25,24 +28,30 @@ import mindustry.type.ItemStack; import mindustry.type.Liquid; import mindustry.type.LiquidStack; +import mindustry.ui.Bar; import mindustry.ui.Styles; import mindustry.world.Block; import mindustry.world.consumers.Consume; +import mindustry.world.consumers.ConsumePowerDynamic; import mindustry.world.draw.DrawBlock; import mindustry.world.draw.DrawDefault; import mindustry.world.meta.BlockFlag; -//A LOT of code is stolen from Carpe-Diem. Sorry :'( -public class DynamicCrafter extends Block { +public class MultiRecipeCrafter extends Block { + //Standard block drawer (can be overwritten by Recipes) public DrawBlock drawer = new DrawDefault(); + //Recipes public Seq recipes = new Seq<>(); public Effect craftEffect = Fx.none; public Effect updateEffect = Fx.smeltsmoke; public float updateEffectChance = 0.01f; public float warmupSpeed = 0.019f; + public boolean recipesUniqueDrawers = false; + public int[] liquidOutputDirections = {-1}; + private final OrderedMap liquidBarMap = new OrderedMap<>(); - public DynamicCrafter(String name) { + public MultiRecipeCrafter(String name) { super(name); configurable = true; update = true; @@ -50,31 +59,57 @@ public DynamicCrafter(String name) { hasItems = true; sync = true; flags = EnumSet.of(BlockFlag.factory); - - - config(Integer.class, (DynamicCraferBuild crafter, Integer recipeIDX) ->{ - if(crafter.recipeIDX < 0) crafter.recipeIDX = recipeIDX; - }); + copyConfig = true; + saveConfig = true; + config(Integer.class, MultiRecipeCrafterBuild::setRecipe); } + //Adding recipes for recipes array :/ public void addRecipes(RecipeIO...r){ recipes.add(r); } + public void addRecipesNonRequire(Boolean unlocked, RecipeIO...r){ + for(RecipeIO recipe : r){ + recipe.needDoUnlock = false; + } + recipes.add(r); + } + + //Bars @Override public void setBars(){ super.setBars(); removeBar("items"); + removeBar("liquid"); + removeBar("liquids"); + removeBar("power"); + + addBar("liquid", b -> null); + + addBar("power", (MultiRecipeCrafterBuild b) -> { + if (b.getCurRecipe() == null || !(b.getCurRecipe().powerUse > 0) || consPower == null) { + return null; + } + + return new Bar( + consPower.buffered ? Core.bundle.format("bar.poweramount", Float.isNaN(b.power.status * consPower.capacity) ? "" : UI.formatAmount((int) (b.power.status * consPower.capacity))) : + "bar.power", + Pal.powerBar, + () -> b.power.status + ); + }); } @Override public void init(){ for(RecipeIO r : recipes){ r.apply(this); + if(r.powerUse > 0) hasPower = true; } - for(RecipeIO r : recipes) r.init(); + //Dynamic consumer for recipes (from Carpe Diem) consume(new Consume(){ @Override @@ -100,7 +135,7 @@ public void apply(Block block) { @Override public void trigger(Building build) { - if (build instanceof DynamicCraferBuild crafter && crafter.getCurRecipe() != null) { + if (build instanceof MultiRecipeCrafterBuild crafter && crafter.getCurRecipe() != null) { for (Consume consume : crafter.getCurRecipe().consumers) { consume.trigger(crafter); } @@ -109,7 +144,7 @@ public void trigger(Building build) { @Override public float efficiency(Building build) { - if (build instanceof DynamicCraferBuild crafter && crafter.getCurRecipe() != null) { + if (build instanceof MultiRecipeCrafterBuild crafter && crafter.getCurRecipe() != null) { float minEfficiency = 1f; for (Consume consume : crafter.getCurRecipe().consumers) { @@ -128,7 +163,7 @@ public void build(Building build, Table table) { table.table(cont -> { table.update(() -> { - if (build instanceof DynamicCraferBuild crafter) { + if (build instanceof MultiRecipeCrafterBuild crafter) { RecipeIO recipe = crafter.getCurRecipe(); if (current[0] != recipe) { current[0] = recipe; @@ -152,6 +187,20 @@ public void rebuild(Building build, Table table, RecipeIO recipe) { } }); + if (hasPower) { + consume(new ConsumePowerDynamic(build -> + ((MultiRecipeCrafterBuild) build).getCurRecipe() == null ? 0f : ((MultiRecipeCrafterBuild) build).getCurRecipe().powerUse) { + @Override + public float efficiency(Building build) { + MultiRecipeCrafterBuild multiCrafterBuild = (MultiRecipeCrafterBuild) build; + if (multiCrafterBuild.getCurRecipe() == null || multiCrafterBuild.getCurRecipe().powerUse <= 0f) { + return 1f; + } + return super.efficiency(build); + } + }); + } + super.init(); } @@ -189,17 +238,26 @@ public void load() { super.load(); drawer.load(this); + for(RecipeIO r : recipes){ + if(r.uniqueDrawer != null) r.uniqueDrawer.load(this); + } } - public class DynamicCraferBuild extends Building{ - public int recipeIDX = 1; + public class MultiRecipeCrafterBuild extends Building{ + public int recipeIDX = 0; public float progress = 0; public float totalProgress = 0; public float warmup = 0; + //if a recipe has a unique drawer, draw this drawer @Override public void draw(){ - drawer.draw(this); + RecipeIO r = getCurRecipe(); + if(!recipesUniqueDrawers || r == null || r.uniqueDrawer == null){ + drawer.draw(this); + }else{ + r.uniqueDrawer.draw(this); + } } @@ -213,6 +271,7 @@ public float efficiencyScale() { return multiplier; } + //Getting current recipe from current recipe index. public RecipeIO getCurRecipe(){ if (recipeIDX < 0 || recipeIDX >= recipes.size || !recipes.get(recipeIDX).recipeIsValid()) { return null; @@ -220,19 +279,23 @@ public RecipeIO getCurRecipe(){ return recipes.get(recipeIDX); } + //Setting new recipe by index public void setRecipe(int idx){ if(recipes.get(idx).recipeIsValid()) { progress = 0; + totalProgress = 0; + warmup = 0; recipeIDX = idx; } } + //Craft progress @Override public void updateTile(){ RecipeIO recipe = getCurRecipe(); if(recipe != null){ if(efficiency > 0){ - progress += getProgressIncrease(recipe.recipeTime); + progress += getProgressIncrease(recipe.craftTime); warmup = Mathf.approachDelta(warmup, warmupTarget(), warmupSpeed); recipe.update(this); @@ -249,18 +312,16 @@ public void updateTile(){ craft(); } - dumpOutputs(); + dumpOutputs(recipe); } if (items != null) { if (timer(timerDump, dumpTime / timeScale)) { dump(); } } - if (liquids != null) { - dumpLiquid(liquids.current()); - } } + //Craft itself public void craft() { RecipeIO recipe = getCurRecipe(); consume(); @@ -276,25 +337,30 @@ public void craft() { progress %= 1f; } - - - public void dumpOutputs() { - RecipeIO currentRecipe = getCurRecipe(); - if (currentRecipe != null) { - currentRecipe.dumpOutputs(this); - + //Output progress + public void dumpOutputs(RecipeIO r) { + if (r != null) { + r.dumpOutputs(this); if (timer(timerDump, dumpTime / timeScale)) { - currentRecipe.dumpTimedOutputs(this); + r.dumpTimedOutputs(this); + } + if(r.liquidOutput != null){ + for(int i = 0; i < r.liquidOutput.length; i++){ + int dir = liquidOutputDirections.length > i ? liquidOutputDirections[i] : -1; + dumpLiquid(r.liquidOutput[i].liquid, 2f, dir); + } } } } + //Checking block fullness @Override public boolean shouldConsume() { RecipeIO currentRecipe = getCurRecipe(); return currentRecipe != null && currentRecipe.shouldConsume(this); } + //Checking input item & liquid @Override public boolean acceptItem(Building source, Item item) { if (!hasItems) return false; @@ -331,30 +397,36 @@ public boolean acceptLiquid(Building source, Liquid liquid) { return (consumesLiquid(liquid) || recipeConsumes); } + //Need to drawers @Override public float totalProgress() { return totalProgress; } + //Need to drawers @Override public float warmup(){ return warmup; } + //Need to drawers @Override public float progress(){ return Mathf.clamp(progress); } + //Constant public float warmupTarget(){ return 1f; } + //Ambient sound....... @Override public boolean shouldAmbientSound(){ return efficiency > 0; } + //Buttons when pressed etc. @Override public void buildConfiguration(Table table){ table.table(Styles.grayPanel, t ->{ @@ -375,11 +447,16 @@ public void buildConfiguration(Table table){ new Table(td -> { td.table(input -> addRecipeResources(input, recipe)) .left().grow().pad(10f); - + if(recipe.powerUse != 0){ + td.table(pwrUse ->{ + pwrUse.image(Icon.power).color(Pal.accent); + pwrUse.add(recipe.powerUse * 60 + "/s"); + }); + } td.table(arrow -> { arrow.image(Icon.right).color(Pal.darkishGray).size(20f); }).pad(10f); - td.add(Core.bundle.format("ui.craftTime", Strings.autoFixed(recipe.recipeTime / 60, 3))); + td.add(Core.bundle.format("ui.craftTime", Strings.autoFixed(recipe.craftTime / 60, 3))); td.table(output -> addOutputResources(output, recipe)) .right().grow().pad(10f); @@ -390,6 +467,7 @@ public void buildConfiguration(Table table){ } else b.image(Icon.cancel).color(Color.white).size(20); }, Styles.togglet, () ->{ if(!isCurrent & recipes.get(recipeIndex).recipeIsValid()) { + configure(recipeIndex); setRecipe(recipeIndex); } deselect(); @@ -398,33 +476,75 @@ public void buildConfiguration(Table table){ }).pad(4); }); } - // Вспомогательный метод для добавления ресурсов рецепта - private void addRecipeResources(Table table, RecipeIO recipe){ - if(recipe.input != null){ - for(ItemStack input : recipe.input){ - if(input == null || input.item == null) continue; - addResourceElement(table, input.item.uiIcon, - Strings.autoFixed(input.amount / (recipe.recipeTime / 60), 3) + "/s", false); + + @Override + public void displayBars(Table table) { + if (getCurRecipe() == null) return; + + var liquidBarPos = barMap.get("liquid"); + boolean liquidAdded = false; + + for (Func bar : this.block.listBars()) { + if (getCurRecipe().hasLiquids() && !liquidAdded && bar == liquidBarPos) { + if(getCurRecipe().liquidInput != null) for (LiquidStack liquid : getCurRecipe().liquidInput) { + Bar liquidBar = liquidBarMap.get("liquid-" + liquid.liquid.name, () -> new Bar( + () -> liquid.liquid.localizedName, + liquid.liquid::barColor, + () -> this.liquids.get(liquid.liquid) / liquidCapacity + )); + + table.add(liquidBar).growX(); + table.row(); } - } - if(recipe.liquidIn != null){ - for(LiquidStack liquid : recipe.liquidIn){ - if(liquid == null || liquid.liquid == null) continue; - addResourceElement(table, liquid.liquid.uiIcon, - Strings.autoFixed(liquid.amount * 60, 3) + "/s", false); + + if(getCurRecipe().liquidOutput != null) for (LiquidStack liquid : getCurRecipe().liquidOutput) { + Bar liquidBar = liquidBarMap.get("liquid-" + liquid.liquid.name, () -> new Bar( + () -> liquid.liquid.localizedName, + liquid.liquid::barColor, + () -> this.liquids.get(liquid.liquid) / liquidCapacity + )); + + table.add(liquidBar).growX(); + table.row(); } + liquidAdded = true; + continue; + } + + Bar result = (Bar) bar.get(this); + if (result != null) { + table.add(result).growX(); + table.row(); } + } + } + //Interface functions... + private void addRecipeResources(Table table, RecipeIO recipe){ + if(recipe.itemInput != null){ + for(ItemStack input : recipe.itemInput){ + if(input == null || input.item == null) continue; + addResourceElement(table, input.item.uiIcon, + Strings.autoFixed(input.amount / (recipe.craftTime / 60), 3) + "/s", false); + } + } + if(recipe.liquidInput != null){ + for(LiquidStack liquid : recipe.liquidInput){ + if(liquid == null || liquid.liquid == null) continue; + addResourceElement(table, liquid.liquid.uiIcon, + Strings.autoFixed(liquid.amount * 60, 3) + "/s", false); + } + } } private void addOutputResources(Table table, RecipeIO recipe){ - if(recipe.output != null){ - for(ItemStack output : recipe.output){ + if(recipe.itemOutput != null){ + for(ItemStack output : recipe.itemOutput){ if(output == null || output.item == null) continue; addResourceElement(table, output.item.uiIcon, - Strings.autoFixed(output.amount / (recipe.recipeTime / 60), 3) + "/s", true); + Strings.autoFixed(output.amount / (recipe.craftTime / 60), 3) + "/s", true); } } - if(recipe.liquidOut != null){ - for(LiquidStack liquid : recipe.liquidOut){ + if(recipe.liquidOutput != null){ + for(LiquidStack liquid : recipe.liquidOutput){ if(liquid == null || liquid.liquid == null) continue; addResourceElement(table, liquid.liquid.uiIcon, Strings.autoFixed(liquid.amount * 60, 3) + "/s", true); @@ -439,6 +559,13 @@ private void addResourceElement(Table table, TextureRegion icon, String text, bo }).padRight(3); } + @Override + public Object config(){ + return recipeIDX; + } + + + //Saving and load functions @Override public void write(Writes write) { super.write(write); diff --git a/src/ds/world/blocks/effect/OutpostBlock.java b/src/ds/world/blocks/effect/OutpostBlock.java index 7d69bb1..4e02375 100644 --- a/src/ds/world/blocks/effect/OutpostBlock.java +++ b/src/ds/world/blocks/effect/OutpostBlock.java @@ -97,6 +97,7 @@ public void handleItem(Building source, Item item){ incinerateEffect(this, source); } } + @Override public byte version(){ return 1; diff --git a/src/ds/world/blocks/environment/RockBlock.java b/src/ds/world/blocks/environment/RockBlock.java new file mode 100644 index 0000000..d7bb3f2 --- /dev/null +++ b/src/ds/world/blocks/environment/RockBlock.java @@ -0,0 +1,26 @@ +package ds.world.blocks.environment; + +import arc.Core; +import arc.graphics.g2d.Draw; +import arc.graphics.g2d.TextureRegion; +import arc.math.Mathf; +import mindustry.content.Fx; +import mindustry.gen.Sounds; +import mindustry.graphics.Layer; +import mindustry.world.Block; +import mindustry.world.Tile; +import mindustry.world.meta.BuildVisibility; + +public class RockBlock extends Block { + public RockBlock(String name) { + super(name); + breakable = true; + solid = true; + breakEffect = Fx.breakProp; + update = true; + breakSound = Sounds.rockBreak; + destroySound = Sounds.rockBreak; + forceDark = true; + buildVisibility = BuildVisibility.editorOnly; + } +} diff --git a/src/ds/world/blocks/turret/AccelItemTurret.java b/src/ds/world/blocks/turret/AccelItemTurret.java index 871033f..5b0e740 100644 --- a/src/ds/world/blocks/turret/AccelItemTurret.java +++ b/src/ds/world/blocks/turret/AccelItemTurret.java @@ -15,9 +15,13 @@ import static mindustry.Vars.tilesize; public class AccelItemTurret extends DSItemTurret { + public float speedUpPerShoot = 2; + //0.5f = 150%, 0.6f = 160% etc. public float maxAccel = 0.5f; + public float cooldownSpeed = 1; + public float cooldownInterval = 60f; public AccelItemTurret(String name){ @@ -44,7 +48,7 @@ public void setStats(){ stats.add(DSStats.acTurrReloadEnd, (reload / (maxAccel + 1.0f)) / 60f, StatUnit.seconds); } - public class AccelItemTurretBuild extends ItemTurretBuild { + public class AccelItemTurretBuild extends DSItemTurretBuild { protected float speedUp = 0; protected float coolantSpeedMultiplier; protected boolean overheated = false; @@ -97,13 +101,8 @@ public void updateShooting(){ public void shoot(BulletType type){ //speedUp per shoot super.shoot(type); - if (speedUp < maxAccel){ - speedUp += speedUpPerShoot * ammoReloadMultiplier() * delta(); - speedUp += coolantSpeedMultiplier * delta(); - if(speedUp>maxAccel) speedUp = maxAccel; - }else { - speedUp = maxAccel; - } + speedUp = Math.min(speedUp + speedUpPerShoot * ammoReloadMultiplier() * delta(), maxAccel); + speedUp = Math.min(speedUp + coolantSpeedMultiplier * delta(), maxAccel); } @Override public void write(Writes write){ diff --git a/src/ds/world/blocks/turret/AccelPowerTurret.java b/src/ds/world/blocks/turret/AccelPowerTurret.java index 0056f2f..6c3d978 100644 --- a/src/ds/world/blocks/turret/AccelPowerTurret.java +++ b/src/ds/world/blocks/turret/AccelPowerTurret.java @@ -45,7 +45,7 @@ public void setStats(){ stats.add(DSStats.acTurrReloadEnd, (reload / (maxAccel + 1.0f)) / 60f, StatUnit.seconds); } - public class AccelTurretBuild extends PowerTurretBuild { + public class AccelTurretBuild extends DSPowerTurretBuild { protected float speedUp = 0; protected float coolantSpeedMultiplier; protected boolean overheated = false; diff --git a/src/ds/world/blocks/turret/CalibratingTurret.java b/src/ds/world/blocks/turret/CalibratingTurret.java new file mode 100644 index 0000000..1bbc355 --- /dev/null +++ b/src/ds/world/blocks/turret/CalibratingTurret.java @@ -0,0 +1,10 @@ +package ds.world.blocks.turret; + +public class CalibratingTurret extends DSTurret{ + public CalibratingTurret(String name) { + super(name); + } + public float fullCaliInaccuracy = 1; + public float noCaliInaccuracy = 25; + +} diff --git a/src/ds/world/blocks/turret/DSConsumeTurret.java b/src/ds/world/blocks/turret/DSConsumeTurret.java index e55b7e2..6d9dd1e 100644 --- a/src/ds/world/blocks/turret/DSConsumeTurret.java +++ b/src/ds/world/blocks/turret/DSConsumeTurret.java @@ -19,7 +19,7 @@ public void setStats(){ stats.remove(Stat.maxEfficiency); } - public class FuelTurretBuild extends TurretBuild{ + public class FuelTurretBuild extends DSTurretBuild{ @Override public BulletType useAmmo(){ consume(); diff --git a/src/ds/world/blocks/turret/DSHarpoonTurret.java b/src/ds/world/blocks/turret/DSHarpoonTurret.java index f244026..2678ef3 100644 --- a/src/ds/world/blocks/turret/DSHarpoonTurret.java +++ b/src/ds/world/blocks/turret/DSHarpoonTurret.java @@ -5,7 +5,10 @@ import arc.math.Angles; import arc.util.Time; import ds.content.DSFx; +import ds.draw.DrawDirLight; +import mindustry.Vars; import mindustry.entities.bullet.BulletType; +import mindustry.gen.Bullet; import mindustry.ui.Bar; public class DSHarpoonTurret extends DSConsumeTurret { @@ -28,6 +31,7 @@ public class HarpoonTurretBuild extends FuelTurretBuild{ protected boolean returnedBullet = true; protected boolean broken = false; protected float timer = 0; + public void bulletReturned(){ returnedBullet = true; } @@ -56,6 +60,17 @@ public void updateTile(){ broken = false; } } + if(!Vars.state.isPaused() && canConsume() && emitDirectLight){ + DrawDirLight.DrawLightBeamNonTileable(x, y, rotation, lightLength, lightCone, 10); + } + } + + @Override + public void draw(){ + super.draw(); + if(Vars.state.isPaused() && canConsume() && emitDirectLight){ + DrawDirLight.DrawLightBeamNonTileable(x, y, rotation, lightLength, lightCone, 10); + } } @Override diff --git a/src/ds/world/blocks/turret/DSItemTurret.java b/src/ds/world/blocks/turret/DSItemTurret.java index a69ec32..3844dbb 100644 --- a/src/ds/world/blocks/turret/DSItemTurret.java +++ b/src/ds/world/blocks/turret/DSItemTurret.java @@ -1,18 +1,55 @@ package ds.world.blocks.turret; +import arc.math.Mathf; +import ds.draw.DrawDirLight; import ds.world.meta.DSStatValues; +import mindustry.Vars; import mindustry.world.blocks.defense.turrets.ItemTurret; import mindustry.world.meta.Stat; +import mindustry.world.meta.StatUnit; public class DSItemTurret extends ItemTurret { public DSItemTurret(String name) { super(name); } + public boolean emitDirectLight = true; + public float lightLength; + public float lightCone; + public float lightOffsetX, lightOffsetY; + @Override public void setStats(){ super.setStats(); stats.remove(Stat.ammo); stats.add(Stat.ammo, DSStatValues.ammo(ammoTypes)); + stats.remove(Stat.reload); + stats.add(Stat.reload, (60f / (reload + (!reloadWhileCharging ? shoot.firstShotDelay : 0f)) + " (x"+shoot.shots+")"), StatUnit.perSecond); + } + + @Override + public void init(){ + super.init(); + lightLength = Mathf.zero(lightLength) ? range : lightLength; + lightCone = Mathf.zero(lightCone) ? shootCone * 3 : lightCone; + } + + public class DSItemTurretBuild extends ItemTurretBuild{ + + @Override + public void updateTile(){ + super.updateTile(); + if(!Vars.state.isPaused() && hasAmmo() && emitDirectLight){ + DrawDirLight.DrawLightBeamNonTileable(x, y, rotation, lightLength, lightCone, 10); + } + } + + @Override + public void draw(){ + super.draw(); + if(Vars.state.isPaused() && hasAmmo() && emitDirectLight){ + DrawDirLight.DrawLightBeamNonTileable(x, y, rotation, lightLength, lightCone, 10); + } + } } } diff --git a/src/ds/world/blocks/turret/DSPowerTurret.java b/src/ds/world/blocks/turret/DSPowerTurret.java index d1ae700..5ad7ce1 100644 --- a/src/ds/world/blocks/turret/DSPowerTurret.java +++ b/src/ds/world/blocks/turret/DSPowerTurret.java @@ -1,19 +1,55 @@ package ds.world.blocks.turret; +import arc.math.Mathf; import arc.struct.ObjectMap; +import ds.draw.DrawDirLight; import ds.world.meta.DSStatValues; +import mindustry.Vars; import mindustry.world.blocks.defense.turrets.PowerTurret; import mindustry.world.meta.Stat; +import mindustry.world.meta.StatUnit; public class DSPowerTurret extends PowerTurret { public DSPowerTurret(String name) { super(name); } + public boolean emitDirectLight = true; + public float lightLength; + public float lightCone; + public float lightOffsetX, lightOffsetY; + @Override public void setStats(){ super.setStats(); stats.remove(Stat.ammo); stats.add(Stat.ammo, DSStatValues.ammo(ObjectMap.of(this, shootType))); + stats.remove(Stat.reload); + stats.add(Stat.reload, (60f / (reload + (!reloadWhileCharging ? shoot.firstShotDelay : 0f)) + " (x"+shoot.shots+")"), StatUnit.perSecond); + } + + @Override + public void init(){ + super.init(); + lightLength = Mathf.zero(lightLength) ? range : lightLength; + lightCone = Mathf.zero(lightCone) ? shootCone * 3: lightCone; + } + + public class DSPowerTurretBuild extends PowerTurretBuild{ + @Override + public void updateTile(){ + super.updateTile(); + if(!Vars.state.isPaused() && hasAmmo() && emitDirectLight){ + DrawDirLight.DrawLightBeamNonTileable(x, y, rotation, lightLength, lightCone, 10); + } + } + + @Override + public void draw(){ + super.draw(); + if(Vars.state.isPaused() && hasAmmo() && emitDirectLight){ + DrawDirLight.DrawLightBeamNonTileable(x, y, rotation, lightLength, lightCone, 10); + } + } } } diff --git a/src/ds/world/blocks/turret/DSTurret.java b/src/ds/world/blocks/turret/DSTurret.java index 6ac443b..3e78428 100644 --- a/src/ds/world/blocks/turret/DSTurret.java +++ b/src/ds/world/blocks/turret/DSTurret.java @@ -1,6 +1,11 @@ package ds.world.blocks.turret; +import arc.math.Mathf; +import ds.draw.DrawDirLight; +import mindustry.Vars; import mindustry.world.blocks.defense.turrets.Turret; +import mindustry.world.meta.Stat; +import mindustry.world.meta.StatUnit; public class DSTurret extends Turret { public DSTurret(String name) { @@ -10,5 +15,32 @@ public DSTurret(String name) { @Override public void setStats(){ super.setStats(); + stats.remove(Stat.reload); + stats.add(Stat.reload, (60f / (reload + (!reloadWhileCharging ? shoot.firstShotDelay : 0f)) + " (x"+shoot.shots+")"), StatUnit.perSecond); + } + + public boolean emitDirectLight = true; + public float lightLength; + public float lightCone; + public float lightOffsetX, lightOffsetY; + + @Override + public void init(){ + super.init(); + lightLength = Mathf.zero(lightLength) ? range : lightLength; + lightCone = Mathf.zero(lightCone) ? shootCone * 3 : lightCone; + } + + public class DSTurretBuild extends TurretBuild{ + + @Override + public void updateTile(){ + super.updateTile(); + } + + @Override + public void draw(){ + super.draw(); + } } } diff --git a/src/ds/world/consumers/ConsumeReactiveLiquid.java b/src/ds/world/consumers/ConsumeReactiveLiquid.java new file mode 100644 index 0000000..29e19d9 --- /dev/null +++ b/src/ds/world/consumers/ConsumeReactiveLiquid.java @@ -0,0 +1,34 @@ +package ds.world.consumers; + +import ds.type.DSLiquid; +import ds.world.meta.DSStats; +import mindustry.type.Liquid; +import mindustry.world.consumers.ConsumeLiquidFilter; +import mindustry.world.meta.Stat; +import mindustry.world.meta.Stats; + +public class ConsumeReactiveLiquid extends ConsumeLiquidFilter { + public float minReactivity; + + public ConsumeReactiveLiquid(float minReactivity, float amount){ + super(l -> l instanceof DSLiquid a && a.reactivity >= minReactivity, amount); + this.minReactivity = minReactivity; + } + + @Override + public void display(Stats stats){ + stats.add( + booster ? Stat.booster : Stat.input, + DSStats.liquidEffMultiplier( + l -> l instanceof DSLiquid a ? a.reactivity : 0f, + amount, + filter + ) + ); + } + + @Override + public float liquidEfficiencyMultiplier(Liquid liquid){ + return liquid instanceof DSLiquid a ? a.reactivity : 0f; + } +} diff --git a/src/ds/world/global/CableProcess.java b/src/ds/world/global/CableProcess.java new file mode 100644 index 0000000..05c3ba4 --- /dev/null +++ b/src/ds/world/global/CableProcess.java @@ -0,0 +1,65 @@ +package ds.world.global; + +import arc.Events; +import arc.graphics.g2d.Draw; +import arc.struct.Seq; +import arc.util.Log; +import ds.type.entities.Cable; +import mindustry.game.EventType; + +public class CableProcess extends WorldProcess{ + public CableProcess(String name) { + super(name); + } + + public static Seq cableHandler; + + @Override + public void init(){ + eraseCables(); + super.init(); + } + + public static void eraseCables(){ + cableHandler = new Seq<>(); + } + + public static void initCable(Cable cable){ + cable.init(); + } + + public static void addCable(Cable cable){ + cableHandler.add(cable); + } + + public static void addCables(Cable...cables){ + cableHandler.add(cables); + } + + public static void removeCable(int idx){ + cableHandler.remove(idx); + } + + public static void removeCable(Cable cable){ + cableHandler.remove(cable); + } + + @Override + public void reset(){ + eraseCables(); + } + + @Override + public void update(){ + for(Cable c : cableHandler){ + c.update(); + } + } + + @Override + public void visualUpdate(){ + for(Cable c : cableHandler){ + c.draw(); + } + } +} diff --git a/src/ds/world/global/DSWorldProcessor.java b/src/ds/world/global/DSWorldProcessor.java new file mode 100644 index 0000000..b79e979 --- /dev/null +++ b/src/ds/world/global/DSWorldProcessor.java @@ -0,0 +1,55 @@ +package ds.world.global; + +import arc.Events; +import arc.struct.Seq; +import arc.util.Log; +import mindustry.Vars; +import mindustry.game.EventType; + +public class DSWorldProcessor { + + public static Seq processes = new Seq<>(); + + public static void addProcesses(WorldProcess... objects){ + processes.add(objects); + } + + public static void addProcess(WorldProcess process){ + processes.add(process); + } + + public static void load(){ + Log.info("Deep sea. World processor loading. \n"); + for (WorldProcess process : processes){ + process.load(); + } + } + + public static void init(){ + Log.info("Deep sea. World processor initialization. \n"); + for (WorldProcess process : processes){ + process.init(); + } + + Log.info("Deep sea. World processor -> visual updater starting"); + Events.run(EventType.Trigger.drawOver, ()->{ + for(WorldProcess process : processes){ + process.visualUpdate(); + } + }); + } + + public static void update(){ + if(Vars.world != null && Vars.state.isGame() && !Vars.state.isPaused() && !processes.isEmpty()){ + for(WorldProcess procces : processes){ + procces.update(); + } + } + } + + public static void resetProcesses(){ + for (WorldProcess process : processes){ + process.reset(); + } + } +} diff --git a/src/ds/world/global/DangerousWeatherProcessor.java b/src/ds/world/global/DangerousWeatherProcessor.java new file mode 100644 index 0000000..e261f03 --- /dev/null +++ b/src/ds/world/global/DangerousWeatherProcessor.java @@ -0,0 +1,54 @@ +package ds.world.global; + +import arc.audio.Sound; +import arc.math.Mathf; +import arc.util.Time; +import mindustry.Vars; +import mindustry.entities.bullet.BulletType; +import mindustry.game.Team; +import mindustry.gen.Bullet; +import mindustry.gen.Sounds; +import mindustry.type.Weather; + +public class DangerousWeatherProcessor extends WorldProcess{ + + public Weather weather; + + public BulletType bulletType; + + public Sound strikeSound = Sounds.shootArc; + + public float interval = 60; + + public Team team = Team.derelict; + + public float bulletRotation = 90; + + public float bulletRotationRnd = 5; + + protected float timer; + + @Override + public void init(){ + super.init(); + timer = 0; + } + + public DangerousWeatherProcessor(String name) { + super(name); + } + + @Override + public void update(){ + if(weather != null && weather.isActive()){ + timer += Time.delta; + if (timer >= interval) { + logProcess("Strike"); + timer = 0; + Bullet b = bulletType.create(null, team, getRandomPosInUnits()[0], getRandomPosInUnits()[1], bulletRotation + Mathf.randomSeedRange((long) Time.globalTime, bulletRotationRnd)); + strikeSound.at(b.x, b.y, 1, 1); + } + } + } + +} diff --git a/src/ds/world/global/FishSpawnProcess.java b/src/ds/world/global/FishSpawnProcess.java new file mode 100644 index 0000000..8566926 --- /dev/null +++ b/src/ds/world/global/FishSpawnProcess.java @@ -0,0 +1,66 @@ +package ds.world.global; + +import arc.Events; +import arc.math.geom.Vec2; +import arc.struct.Seq; +import arc.util.Log; +import arc.util.Time; +import ds.content.units.PiUnits; +import mindustry.Vars; +import mindustry.entities.Units; +import mindustry.game.EventType; +import mindustry.game.Team; +import mindustry.gen.Unit; +import mindustry.type.UnitType; + +public class FishSpawnProcess extends WorldProcess{ + + public FishSpawnProcess(String name){ + super(name); + } + + public Seq spawnUnits = new Seq<>(); + + public Team team; + + public int maxUnits = 20; + + public float interval = 300; + + protected float timer; + + @Override + public void init(){ + super.init(); + Events.on(EventType.WorldLoadEvent.class, e->{ + team = Vars.state.rules.waveTeam; + timer = 0; + }); + } + + @Override + public void load(){ + super.load(); + spawnUnits.add(PiUnits.untitledFish); + } + + @Override + public void update(){ + timer += Time.delta; + if(timer >= interval) { + timer = 0; + if(team != null) { + for (UnitType unit : spawnUnits) { + Unit u = null; + if (getRandomValue() < 0.2f && team.data().countType(unit) < maxUnits) { + u = unit.create(team); + logProcess("spawned: " + u.type.name); + u.set(new Vec2(getRandomPos()[0] * 8, getRandomPos()[1] * 8)); + u.add(); + } + return; + } + } + } + } +} diff --git a/src/ds/world/global/WorldProcess.java b/src/ds/world/global/WorldProcess.java new file mode 100644 index 0000000..5faed6f --- /dev/null +++ b/src/ds/world/global/WorldProcess.java @@ -0,0 +1,98 @@ +package ds.world.global; + +import arc.math.Mathf; +import arc.math.geom.Vec2; +import arc.struct.Seq; +import arc.util.Log; +import mindustry.Vars; +import mindustry.world.Tile; + +import static mindustry.Vars.tilesize; + +public abstract class WorldProcess { + + public static void logStateProcess(Object obj){ + Log.info((String) obj); + } + + public static void logErrors(Object obj){ + Log.err((String) obj); + } + + public void logProcess(Object obj, boolean error){ + if(!error){ + logStateProcess("Deep sea. World process: " + name + " -> " + obj); + return; + } + logErrors("Deep sea. World process: " + name + " -> " + obj); + } + + public void logProcess(Object obj){ + logProcess(obj, false); + } + + public WorldProcess(String name){ + this.name = name; + } + + public String name; + + public float[] worldSize(){ + if(!Vars.headless && Vars.world != null){ + return new float[]{Vars.world.width(), Vars.world.height()}; + } + return null; + } + + public float[] getRandomPos(){ + return new float[]{Mathf.randomSeed((long) Vars.state.tick, worldSize()[0]), Mathf.randomSeed((long) Vars.state.tick * 2, worldSize()[1])}; + } + + public float[] getRandomPosInUnits(){ + return new float[]{Mathf.randomSeed((long) Vars.state.tick, worldSize()[0] * tilesize), Mathf.randomSeed((long) Vars.state.tick * 2, worldSize()[1] * tilesize)}; + } + + + public float getRandomValue(){ + return Mathf.random(Mathf.randomSeed((long) Vars.state.tick + 1)); + } + + public float getRandomValue(long seed){ + return Mathf.random(Mathf.randomSeed(seed)); + } + + public float getRandomValue(long seed, float max){ + return Mathf.random(Mathf.randomSeed(seed, max)); + } + + public Seq getTiles(Vec2 startPosition, int w, int h){ + Seq output = new Seq<>(); + for(int i = 0; i < w; i++){ + for(int j = 0; j < h; j++){ + output.add(Vars.world.tileWorld(startPosition.x + i, startPosition.y + j)); + } + } + return output; + } + + public void update(){ + } + + public void visualUpdate(){ + + } + + public void init(){ + logProcess("Initialization complete"); + } + + public void load(){ + logProcess("Loading complete"); + } + + public void reset(){ + + } + + +} diff --git a/src/ds/world/meta/DSEnv.java b/src/ds/world/meta/DSEnv.java index b66b620..5369645 100644 --- a/src/ds/world/meta/DSEnv.java +++ b/src/ds/world/meta/DSEnv.java @@ -6,5 +6,6 @@ public class DSEnv extends Env { public static final int /* Underwater but for my mod. A bit different color. */ - underwaterWarm = 1 << 14; + underwaterWarm = 1 << 8; + } \ No newline at end of file diff --git a/src/ds/world/meta/DSStatValues.java b/src/ds/world/meta/DSStatValues.java index 5175a95..862e325 100644 --- a/src/ds/world/meta/DSStatValues.java +++ b/src/ds/world/meta/DSStatValues.java @@ -161,6 +161,62 @@ public static StatValue ammo(ObjectMap { + it.left().defaults().left(); + + it.add(Core.bundle.format("bullet.interval", Strings.autoFixed(type.intervalBullets / type.bulletInterval * 60, 2))); + it.button(Icon.downOpen, Styles.emptyi, () -> coll.toggle(false)).update(i -> i.getStyle().imageUp = (!coll.isCollapsed() ? Icon.upOpen : Icon.downOpen)).size(8).padLeft(16f).expandX(); + }); + bt.row(); + bt.add(coll); + } + + if(type.fragBullet != null){ + bt.row(); + + Table fc = new Table(); + ammo(ObjectMap.of(t, type.fragBullet), true, false).display(fc); + Collapser coll = new Collapser(fc, true); + coll.setDuration(0.1f); + + bt.table(ft -> { + ft.left().defaults().left(); + + ft.add(Core.bundle.format("bullet.frags", type.fragBullets)); + ft.button(Icon.downOpen, Styles.emptyi, () -> coll.toggle(false)).update(i -> i.getStyle().imageUp = (!coll.isCollapsed() ? Icon.upOpen : Icon.downOpen)).size(8).padLeft(16f).expandX(); + }); + bt.row(); + bt.add(coll); + } + + if(type.spawnBullets != null && type.spawnBullets.size > 0){ + bt.row(); + + Table sc = new Table(); + for(BulletType spawn : type.spawnBullets){ + if(spawn.showStats) ammo(ObjectMap.of(t, spawn), true, false).display(sc); + } + Collapser coll = new Collapser(sc, true); + coll.setDuration(0.1f); + + bt.table(st -> { + st.left().defaults().left(); + + st.add(Core.bundle.format("bullet.spawnBullets", type.spawnBullets.size)); + if(sc.getChildren().size > 0) st.button(Icon.downOpen, Styles.emptyi, () -> coll.toggle(false)).update(i -> i.getStyle().imageUp = (!coll.isCollapsed() ? Icon.upOpen : Icon.downOpen)).size(8).padLeft(16f).expandX(); + }); + bt.row(); + bt.add(coll); + } + }).padLeft(indent * 5).padTop(5).padBottom(compact ? 0 : 5).growX().margin(compact ? 0 : 10); table.row(); } diff --git a/src/ds/world/meta/DSStats.java b/src/ds/world/meta/DSStats.java index 92dc798..ea8361c 100644 --- a/src/ds/world/meta/DSStats.java +++ b/src/ds/world/meta/DSStats.java @@ -1,7 +1,19 @@ package ds.world.meta; +import arc.Core; +import arc.func.Boolf; +import arc.func.Floatf; +import arc.scene.ui.layout.Cell; +import arc.scene.ui.layout.Table; +import mindustry.Vars; +import mindustry.type.Liquid; +import mindustry.ui.Styles; import mindustry.world.meta.Stat; import mindustry.world.meta.StatCat; +import mindustry.world.meta.StatValue; + +import static mindustry.world.meta.StatValues.displayLiquid; +import static mindustry.world.meta.StatValues.fixValue; public class DSStats { public static final Stat @@ -13,4 +25,23 @@ public class DSStats { //Liquid Stats reactivity = new Stat("reactivity"), exothermic = new Stat("exothermic"); + + public static StatValue liquidEffMultiplier(Floatf efficiency, float amount, Boolf filter){ + return (Table table) -> { + if(table.getCells().size > 0){ + ((Cell)table.getCells().peek()).growX(); + } + + table.row(); + table.table(c -> { + for(Liquid liquid : Vars.content.liquids().select(l -> filter.get(l) && l.unlockedNow() && !l.isHidden())){ + c.table(Styles.grayPanel, b -> { + b.add(displayLiquid(liquid, amount * 60, true)).pad(10f).left().grow(); + b.add(Core.bundle.format("stat.efficiency", fixValue(efficiency.get(liquid) * 100f))) + .right().pad(10f).padRight(15f); + }).growX().pad(5f).row(); + } + }).growX().colspan(table.getColumns()).row(); + }; + } } diff --git a/src/ds/world/consumers/RecipeIO.java b/src/ds/world/modules/RecipeIO.java similarity index 50% rename from src/ds/world/consumers/RecipeIO.java rename to src/ds/world/modules/RecipeIO.java index ec0bb73..6e61db3 100644 --- a/src/ds/world/consumers/RecipeIO.java +++ b/src/ds/world/modules/RecipeIO.java @@ -1,8 +1,10 @@ -package ds.world.consumers; +package ds.world.modules; +import arc.Core; import arc.scene.ui.layout.Table; import arc.struct.OrderedMap; import arc.struct.Seq; +import arc.util.Strings; import mindustry.Vars; import mindustry.ctype.UnlockableContent; import mindustry.gen.Building; @@ -16,29 +18,30 @@ import mindustry.world.Block; import mindustry.world.consumers.Consume; import mindustry.world.consumers.ConsumeItems; -import mindustry.world.consumers.ConsumeLiquid; import mindustry.world.consumers.ConsumeLiquids; +import mindustry.world.draw.DrawBlock; import mindustry.world.meta.*; public class RecipeIO { - public ItemStack[] input; - public ItemStack[] output; + + public ItemStack[] itemInput; + public ItemStack[] itemOutput; public float powerUse = 0; - public LiquidStack[] liquidIn; - public LiquidStack[] liquidOut; - public float recipeTime = 60; + public LiquidStack[] liquidInput; + public LiquidStack[] liquidOutput; + public float craftTime = 60; public boolean needDoUnlock = true; public Seq consumers = new Seq<>(); - public UnlockableContent primaryOutput; + public DrawBlock uniqueDrawer; public boolean[] itemFilter, liquidFilter; public Seq recipeReq = new Seq<>(); public void dumpOutputs(Building build) { - if(output != null){ - for (ItemStack i : output) { + if(itemOutput != null){ + for (ItemStack i : itemOutput) { for (int j = 0; j < i.amount; j++) { build.dump(i.item); } @@ -47,8 +50,8 @@ public void dumpOutputs(Building build) { } public void dumpTimedOutputs(Building build) { - if(output != null){ - for (ItemStack i : output) { + if(itemOutput != null){ + for (ItemStack i : itemOutput) { for (int j = 0; j < i.amount; j++) { build.dump(i.item); } @@ -57,8 +60,8 @@ public void dumpTimedOutputs(Building build) { } public void craft(Building build){ - if(output != null){ - for (ItemStack stack : output) { + if(itemOutput != null){ + for (ItemStack stack : itemOutput) { for (int i = 0; i < stack.amount; i++) { build.offload(stack.item); } @@ -71,9 +74,9 @@ public void update(Building build) { consume.update(build); } - if(liquidOut != null){ + if(liquidOutput != null){ float inc = build.getProgressIncrease(1f); - for (LiquidStack stack : liquidOut) { + for (LiquidStack stack : liquidOutput) { build.handleLiquid(build, stack.liquid, Math.min(stack.amount * inc, build.block.liquidCapacity - build.liquids.get(stack.liquid))); } } @@ -82,67 +85,67 @@ public void update(Building build) { public RecipeIO(){ } - public RecipeIO(ItemStack[] input, ItemStack[] output){ - this.input = input; - this.output = output; + public RecipeIO(ItemStack[] itemInput, ItemStack[] itemOutput){ + this.itemInput = itemInput; + this.itemOutput = itemOutput; } - public RecipeIO(ItemStack[] input, ItemStack[] output, float recipeTime){ - this.input = input; - this.output = output; - this.recipeTime = recipeTime; + public RecipeIO(ItemStack[] itemInput, ItemStack[] itemOutput, float craftTime){ + this.itemInput = itemInput; + this.itemOutput = itemOutput; + this.craftTime = craftTime; } - public RecipeIO(ItemStack[] input, ItemStack[] output, float recipeTime, float powerUse){ - this.input = input; - this.output = output; - this.recipeTime = recipeTime; + public RecipeIO(ItemStack[] itemInput, ItemStack[] itemOutput, float craftTime, float powerUse){ + this.itemInput = itemInput; + this.itemOutput = itemOutput; + this.craftTime = craftTime; this.powerUse = powerUse; } - public RecipeIO(ItemStack[] input, ItemStack[] output, LiquidStack[] liquidIn){ - this.input = input; - this.output = output; - this.liquidIn = liquidIn; + public RecipeIO(ItemStack[] itemInput, ItemStack[] itemOutput, LiquidStack[] liquidInput){ + this.itemInput = itemInput; + this.itemOutput = itemOutput; + this.liquidInput = liquidInput; } - public RecipeIO(ItemStack[] input, ItemStack[] output, LiquidStack[] liquidIn, float recipeTime){ - this.input = input; - this.output = output; - this.liquidIn = liquidIn; - this.recipeTime = recipeTime; + public RecipeIO(ItemStack[] itemInput, ItemStack[] itemOutput, LiquidStack[] liquidInput, float craftTime){ + this.itemInput = itemInput; + this.itemOutput = itemOutput; + this.liquidInput = liquidInput; + this.craftTime = craftTime; } - public RecipeIO(ItemStack[] input, ItemStack[] output, LiquidStack[] liquidIn, float recipeTime, float powerUse){ - this.input = input; - this.output = output; - this.liquidIn = liquidIn; - this.recipeTime = recipeTime; + public RecipeIO(ItemStack[] itemInput, ItemStack[] itemOutput, LiquidStack[] liquidInput, float craftTime, float powerUse){ + this.itemInput = itemInput; + this.itemOutput = itemOutput; + this.liquidInput = liquidInput; + this.craftTime = craftTime; this.powerUse = powerUse; } - public RecipeIO(ItemStack[] input, ItemStack[] output, LiquidStack[] liquidIn, LiquidStack[] liquidOut){ - this.input = input; - this.output = output; - this.liquidIn = liquidIn; - this.liquidOut = liquidOut; + public RecipeIO(ItemStack[] itemInput, ItemStack[] itemOutput, LiquidStack[] liquidInput, LiquidStack[] liquidOutput){ + this.itemInput = itemInput; + this.itemOutput = itemOutput; + this.liquidInput = liquidInput; + this.liquidOutput = liquidOutput; } - public RecipeIO(ItemStack[] input, ItemStack[] output, LiquidStack[] liquidIn, LiquidStack[] liquidOut, float recipeTime){ - this.input = input; - this.output = output; - this.liquidIn = liquidIn; - this.liquidOut = liquidOut; - this.recipeTime = recipeTime; + public RecipeIO(ItemStack[] itemInput, ItemStack[] itemOutput, LiquidStack[] liquidInput, LiquidStack[] liquidOutput, float craftTime){ + this.itemInput = itemInput; + this.itemOutput = itemOutput; + this.liquidInput = liquidInput; + this.liquidOutput = liquidOutput; + this.craftTime = craftTime; } - public RecipeIO(ItemStack[] input, ItemStack[] output, LiquidStack[] liquidIn, LiquidStack[] liquidOut, float recipeTime, float powerUse){ - this.input = input; - this.output = output; - this.liquidIn = liquidIn; - this.liquidOut = liquidOut; - this.recipeTime = recipeTime; + public RecipeIO(ItemStack[] itemInput, ItemStack[] itemOutput, LiquidStack[] liquidInput, LiquidStack[] liquidOutput, float craftTime, float powerUse){ + this.itemInput = itemInput; + this.itemOutput = itemOutput; + this.liquidInput = liquidInput; + this.liquidOutput = liquidOutput; + this.craftTime = craftTime; this.powerUse = powerUse; } @@ -178,47 +181,43 @@ public boolean recipeIsValid(){ } public void init(){ - if(input != null) addConsumers(input); - if(liquidIn != null) addConsumers(liquidIn); + if(itemInput != null) addConsumers(itemInput); + if(liquidInput != null) addConsumers(liquidInput); if(needDoUnlock){ - if(input != null) addRequire(input); - if(liquidIn != null) addRequire(liquidIn); + if(itemInput != null) addRequire(itemInput); + if(liquidInput != null) addRequire(liquidInput); } } public void addConsumers(ItemStack[] i){ - if(i != null){ - consumers.add(new ConsumeItems(i)); - } + consumers.add(new ConsumeItems(i)); } public void addConsumers(LiquidStack[] l){ - if(l != null){ - consumers.add(new ConsumeLiquids(l)); - } + consumers.add(new ConsumeLiquids(l)); } public void addConsumers(ItemStack[] i, LiquidStack[] l){ - if(i != null){ - consumers.add(new ConsumeItems(i)); - } - if(l != null){ - consumers.add(new ConsumeLiquids(l)); - } + consumers.add(new ConsumeItems(i)); + consumers.add(new ConsumeLiquids(l)); + } + + public void addConsumer(Consume cons){ + consumers.add(cons); } public void apply(Block block){ - if(output != null || input != null) block.hasItems = true; - if(liquidIn != null || liquidOut != null) block.hasLiquids = true; + if(itemOutput != null || itemInput != null) block.hasItems = true; + if(liquidInput != null || liquidOutput != null) block.hasLiquids = true; } public void display(Table table){ Stats recipeStats = new Stats(); - recipeStats.timePeriod = recipeTime; + recipeStats.timePeriod = craftTime; for (Consume consume : consumers) { consume.display(recipeStats); } - if(output != null || liquidOut != null) displayOut(recipeStats); + if(itemOutput != null || liquidOutput != null) displayOut(recipeStats); table.table(Styles.grayPanel, t -> { if(recipeIsValid()){ @@ -231,11 +230,24 @@ public void display(Table table){ value.display(in); } } - }).left().grow().pad(10f); + if(this.powerUse != 0) in.table(pwrUse -> { + pwrUse.image(Icon.power).color(Pal.accent).size(40); + pwrUse.add(this.powerUse * 60 + "/s"); + }); + }).left().pad(10f); + t.table(arrow ->{ arrow.image(Icon.right).color(Pal.darkishGray).size(40f); - }).pad(10f); + arrow.left(); + }); + + t.table(time -> { + time.image(Icon.crafting).color(Pal.accent).size(40); + time.left(); + }); + + t.add(Core.bundle.format("ui.craftTime", Strings.autoFixed(this.craftTime / 60, 3))).color(Pal.accent).pad(10f).left(); t.table(out ->{ out.right(); @@ -248,23 +260,32 @@ public void display(Table table){ } }).right().grow().pad(10f); }else { - t.image(Icon.lock).color(Pal.darkerGray).size(40f).pad(10f); + t.image(Icon.lock).color(Pal.darkerGray).size(40f).grow().pad(10f); } - }); + }).growX(); + } + + public boolean hasLiquids(){ + return liquidInput != null || liquidOutput != null; } + + public boolean hasItems(){ + return itemInput != null || itemOutput != null; + } + public void displayOut(Stats stats) { - if(output != null)stats.add(Stat.output, stats.timePeriod < 0 ? StatValues.items(output) : StatValues.items(stats.timePeriod, output)); - if(liquidOut != null)stats.add(Stat.output, StatValues.liquids(1, liquidOut)); + if(itemInput != null)stats.add(Stat.output, stats.timePeriod < 0 ? StatValues.items(itemOutput) : StatValues.items(stats.timePeriod, itemOutput)); + if(liquidOutput != null)stats.add(Stat.output, StatValues.liquids(1, liquidOutput)); } public boolean shouldConsume(Building build){ - if(output != null) { - for (ItemStack i : output) { + if(itemOutput != null) { + for (ItemStack i : itemOutput) { if (i.amount > build.block.itemCapacity) return false; } } - if(liquidOut != null){ - for (LiquidStack l : liquidOut) { + if(liquidOutput != null){ + for (LiquidStack l : liquidOutput) { if (l.amount > build.block.liquidCapacity) return false; } }