├── animalia.png ├── assets ├── icon.png ├── sounds │ ├── ribbit1.mp3 │ ├── ribbit2.mp3 │ ├── thunder1.ogg │ └── thunder2.ogg ├── sprites │ ├── effects │ │ ├── graph1.png │ │ ├── note-0.png │ │ └── note-1.png │ ├── items │ │ ├── eggshell.png │ │ ├── frog-egg.png │ │ ├── carbon-fiber.png │ │ ├── chlorophyll.png │ │ ├── eggshell-up.png │ │ ├── frog-egg-up.png │ │ ├── exotic-frog-egg.png │ │ ├── assault-frog-egg.png │ │ ├── exotic-frog-egg-up.png │ │ ├── gliding-frog-egg.png │ │ ├── leopard-frog-egg.png │ │ ├── assault-frog-egg-up.png │ │ ├── gliding-frog-egg-up.png │ │ └── leopard-frog-egg-up.png │ ├── units │ │ ├── firefly.png │ │ ├── frogs │ │ │ ├── frog.png │ │ │ ├── phroge.png │ │ │ ├── frog-cell.png │ │ │ ├── frog-full.png │ │ │ ├── frog-jump.png │ │ │ ├── frog-swim.png │ │ │ ├── assault-frog.png │ │ │ ├── exotic-frog.png │ │ │ ├── frog-outline.png │ │ │ ├── gliding-frog.png │ │ │ ├── leopard-frog.png │ │ │ ├── phroge-full.png │ │ │ ├── phroge-jump.png │ │ │ ├── phroge-swim.png │ │ │ ├── phroge-outline.png │ │ │ ├── assault-frog-cell.png │ │ │ ├── assault-frog-full.png │ │ │ ├── assault-frog-jump.png │ │ │ ├── assault-frog-swim.png │ │ │ ├── exotic-frog-cell.png │ │ │ ├── exotic-frog-full.png │ │ │ ├── exotic-frog-jump.png │ │ │ ├── exotic-frog-swim.png │ │ │ ├── frog-jump-outline.png │ │ │ ├── frog-swim-outline.png │ │ │ ├── gliding-frog-cell.png │ │ │ ├── gliding-frog-full.png │ │ │ ├── gliding-frog-jump.png │ │ │ ├── gliding-frog-swim.png │ │ │ ├── leopard-frog-full.png │ │ │ ├── leopard-frog-jump.png │ │ │ ├── leopard-frog-swim.png │ │ │ ├── exotic-frog-outline.png │ │ │ ├── phroge-jump-outline.png │ │ │ ├── phroge-swim-outline.png │ │ │ ├── assault-frog-outline.png │ │ │ ├── gliding-frog-outline.png │ │ │ ├── leopard-frog-outline.png │ │ │ ├── exotic-frog-jump-outline.png │ │ │ ├── exotic-frog-swim-outline.png │ │ │ ├── assault-frog-jump-outline.png │ │ │ ├── assault-frog-swim-outline.png │ │ │ ├── gliding-frog-jump-outline.png │ │ │ ├── gliding-frog-swim-outline.png │ │ │ ├── leopard-frog-jump-outline.png │ │ │ └── leopard-frog-swim-outline.png │ │ ├── firefly-cell.png │ │ ├── firefly-full.png │ │ └── weapons │ │ │ ├── assault-cannon.png │ │ │ └── assault-cannon-outline.png │ ├── weathers │ │ ├── storm.png │ │ ├── tropical-storm.png │ │ └── volcanic-ember.png │ ├── ui │ │ ├── pane-clear.9.png │ │ ├── icons │ │ │ └── icon-frog.png │ │ └── sidebar-left.9.png │ ├── statuses │ │ └── poisoned.png │ ├── blocks │ │ ├── turrets │ │ │ ├── lysis.png │ │ │ ├── apoptosis.png │ │ │ ├── necrosis.png │ │ │ ├── egg-thrower.png │ │ │ ├── lysis-heat.png │ │ │ ├── apoptosis-heat.png │ │ │ ├── lysis-charge0.png │ │ │ ├── lysis-charge1.png │ │ │ ├── lysis-charge2.png │ │ │ ├── lysis-charge3.png │ │ │ ├── necrosis-heat.png │ │ │ ├── necrosis-charge0.png │ │ │ ├── necrosis-charge1.png │ │ │ ├── necrosis-charge2.png │ │ │ ├── apoptosis-charge0.png │ │ │ ├── apoptosis-charge1.png │ │ │ └── apoptosis-charge2.png │ │ ├── power │ │ │ ├── converter.png │ │ │ ├── converter-top.png │ │ │ ├── converter-bottom.png │ │ │ ├── converter-top1.png │ │ │ ├── discharge-receptor.png │ │ │ ├── discharge-receptor-heat.png │ │ │ └── discharge-receptor-rod.png │ │ ├── units │ │ │ ├── incubator.png │ │ │ ├── incubator-out.png │ │ │ ├── incubator-top.png │ │ │ └── incubator-heat.png │ │ ├── crafting │ │ │ ├── bioreactor.png │ │ │ ├── carbonizer.png │ │ │ ├── carbonizer-heat.png │ │ │ ├── bioreactor-bottom.png │ │ │ ├── bioreactor-liquid.png │ │ │ ├── carbonizer-bottom.png │ │ │ ├── eggshell-printer.png │ │ │ ├── bioreactor-plasma-0.png │ │ │ ├── bioreactor-plasma-1.png │ │ │ ├── bioreactor-plasma-2.png │ │ │ ├── bioreactor-plasma-3.png │ │ │ ├── eggshell-printer-top.png │ │ │ ├── genetic-reconstructor.png │ │ │ └── genetic-reconstructor-bottom.png │ │ ├── environment │ │ │ ├── tree-0.png │ │ │ ├── tree-1.png │ │ │ ├── tree-2.png │ │ │ ├── tree-shadow-0.png │ │ │ └── tree-shadow-1.png │ │ ├── logic │ │ │ └── cataclysm-detector.png │ │ └── production │ │ │ ├── chlorophyll-panel.png │ │ │ ├── chlorophyll-panel-bloom.png │ │ │ ├── chlorophyll-synthesizer.png │ │ │ └── chlorophyll-synthesizer-bottom.png │ └── liquids │ │ └── nutritive-solution.png └── bundles │ ├── bundle_uk_UA.properties │ ├── bundle_pt_BR.properties │ ├── bundle.properties │ └── bundle_ru.properties ├── .gitattributes ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── src └── animalia │ ├── type │ ├── Adaption.java │ ├── Consequence.java │ ├── unit │ │ ├── ToadType.java │ │ ├── PoisonousFrogType.java │ │ ├── AnimalType.java │ │ └── FrogType.java │ ├── EggType.java │ ├── FrogWeapon.java │ ├── Cataclysm.java │ ├── GroupSpawner.java │ └── weather │ │ ├── StormCataclysm.java │ │ └── ParticleCataclysm.java │ ├── world │ ├── Season.java │ ├── environment │ │ ├── SeasonalBlock.java │ │ └── SeasonalTree.java │ ├── draw │ │ ├── DrawRegionDynamic.java │ │ ├── DrawConstruct.java │ │ ├── DrawItemIO.java │ │ └── DrawBuild.java │ ├── TemperatureHandler.java │ ├── WorldSetup.java │ ├── crafting │ │ └── GeneticReconstructor.java │ ├── power │ │ └── DischargeReceptor.java │ └── units │ │ └── Incubator.java │ ├── content │ ├── AniShaders.java │ ├── AniLiquids.java │ ├── AniStatuses.java │ ├── AniItems.java │ ├── Spawners.java │ ├── AniTechTree.java │ ├── AniWeathers.java │ ├── Consequences.java │ ├── AniFx.java │ ├── AniUnitTypes.java │ └── AniBlocks.java │ ├── ui │ ├── AniTex.java │ ├── AniLinks.java │ ├── fragments │ │ ├── TemperatureFragment.java │ │ └── CataclysmFragment.java │ ├── AniUI.java │ └── dialogs │ │ └── ReportDialog.java │ ├── sound │ └── AniSounds.java │ ├── Animalia.java │ ├── ai │ └── types │ │ └── FrogAI.java │ └── entities │ └── units │ └── FrogEntity.java ├── mod.hjson ├── settings.gradle.kts ├── README.md ├── .github └── workflows │ └── ci.yml ├── gradle.properties ├── .gitignore ├── gradlew.bat └── gradlew /animalia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/animalia.png -------------------------------------------------------------------------------- /assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/icon.png -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /assets/sounds/ribbit1.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sounds/ribbit1.mp3 -------------------------------------------------------------------------------- /assets/sounds/ribbit2.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sounds/ribbit2.mp3 -------------------------------------------------------------------------------- /assets/sounds/thunder1.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sounds/thunder1.ogg -------------------------------------------------------------------------------- /assets/sounds/thunder2.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sounds/thunder2.ogg -------------------------------------------------------------------------------- /assets/sprites/effects/graph1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/effects/graph1.png -------------------------------------------------------------------------------- /assets/sprites/effects/note-0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/effects/note-0.png -------------------------------------------------------------------------------- /assets/sprites/effects/note-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/effects/note-1.png -------------------------------------------------------------------------------- /assets/sprites/items/eggshell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/items/eggshell.png -------------------------------------------------------------------------------- /assets/sprites/items/frog-egg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/items/frog-egg.png -------------------------------------------------------------------------------- /assets/sprites/units/firefly.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/firefly.png -------------------------------------------------------------------------------- /assets/sprites/weathers/storm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/weathers/storm.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /assets/sprites/ui/pane-clear.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/ui/pane-clear.9.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/frog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/frog.png -------------------------------------------------------------------------------- /assets/sprites/items/carbon-fiber.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/items/carbon-fiber.png -------------------------------------------------------------------------------- /assets/sprites/items/chlorophyll.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/items/chlorophyll.png -------------------------------------------------------------------------------- /assets/sprites/items/eggshell-up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/items/eggshell-up.png -------------------------------------------------------------------------------- /assets/sprites/items/frog-egg-up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/items/frog-egg-up.png -------------------------------------------------------------------------------- /assets/sprites/statuses/poisoned.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/statuses/poisoned.png -------------------------------------------------------------------------------- /assets/sprites/ui/icons/icon-frog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/ui/icons/icon-frog.png -------------------------------------------------------------------------------- /assets/sprites/ui/sidebar-left.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/ui/sidebar-left.9.png -------------------------------------------------------------------------------- /assets/sprites/units/firefly-cell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/firefly-cell.png -------------------------------------------------------------------------------- /assets/sprites/units/firefly-full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/firefly-full.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/phroge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/phroge.png -------------------------------------------------------------------------------- /assets/sprites/blocks/turrets/lysis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/turrets/lysis.png -------------------------------------------------------------------------------- /assets/sprites/items/exotic-frog-egg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/items/exotic-frog-egg.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/frog-cell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/frog-cell.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/frog-full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/frog-full.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/frog-jump.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/frog-jump.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/frog-swim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/frog-swim.png -------------------------------------------------------------------------------- /assets/sprites/blocks/power/converter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/power/converter.png -------------------------------------------------------------------------------- /assets/sprites/blocks/turrets/apoptosis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/turrets/apoptosis.png -------------------------------------------------------------------------------- /assets/sprites/blocks/turrets/necrosis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/turrets/necrosis.png -------------------------------------------------------------------------------- /assets/sprites/blocks/units/incubator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/units/incubator.png -------------------------------------------------------------------------------- /assets/sprites/items/assault-frog-egg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/items/assault-frog-egg.png -------------------------------------------------------------------------------- /assets/sprites/items/exotic-frog-egg-up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/items/exotic-frog-egg-up.png -------------------------------------------------------------------------------- /assets/sprites/items/gliding-frog-egg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/items/gliding-frog-egg.png -------------------------------------------------------------------------------- /assets/sprites/items/leopard-frog-egg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/items/leopard-frog-egg.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/assault-frog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/assault-frog.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/exotic-frog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/exotic-frog.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/frog-outline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/frog-outline.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/gliding-frog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/gliding-frog.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/leopard-frog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/leopard-frog.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/phroge-full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/phroge-full.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/phroge-jump.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/phroge-jump.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/phroge-swim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/phroge-swim.png -------------------------------------------------------------------------------- /assets/sprites/weathers/tropical-storm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/weathers/tropical-storm.png -------------------------------------------------------------------------------- /assets/sprites/weathers/volcanic-ember.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/weathers/volcanic-ember.png -------------------------------------------------------------------------------- /src/animalia/type/Adaption.java: -------------------------------------------------------------------------------- 1 | package animalia.type; 2 | 3 | public enum Adaption { 4 | terrestrial, 5 | arboreal 6 | } 7 | -------------------------------------------------------------------------------- /assets/sprites/blocks/crafting/bioreactor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/crafting/bioreactor.png -------------------------------------------------------------------------------- /assets/sprites/blocks/crafting/carbonizer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/crafting/carbonizer.png -------------------------------------------------------------------------------- /assets/sprites/blocks/environment/tree-0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/environment/tree-0.png -------------------------------------------------------------------------------- /assets/sprites/blocks/environment/tree-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/environment/tree-1.png -------------------------------------------------------------------------------- /assets/sprites/blocks/environment/tree-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/environment/tree-2.png -------------------------------------------------------------------------------- /assets/sprites/blocks/power/converter-top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/power/converter-top.png -------------------------------------------------------------------------------- /assets/sprites/blocks/turrets/egg-thrower.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/turrets/egg-thrower.png -------------------------------------------------------------------------------- /assets/sprites/blocks/turrets/lysis-heat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/turrets/lysis-heat.png -------------------------------------------------------------------------------- /assets/sprites/blocks/units/incubator-out.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/units/incubator-out.png -------------------------------------------------------------------------------- /assets/sprites/blocks/units/incubator-top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/units/incubator-top.png -------------------------------------------------------------------------------- /assets/sprites/items/assault-frog-egg-up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/items/assault-frog-egg-up.png -------------------------------------------------------------------------------- /assets/sprites/items/gliding-frog-egg-up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/items/gliding-frog-egg-up.png -------------------------------------------------------------------------------- /assets/sprites/items/leopard-frog-egg-up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/items/leopard-frog-egg-up.png -------------------------------------------------------------------------------- /assets/sprites/liquids/nutritive-solution.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/liquids/nutritive-solution.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/phroge-outline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/phroge-outline.png -------------------------------------------------------------------------------- /assets/sprites/blocks/power/converter-bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/power/converter-bottom.png -------------------------------------------------------------------------------- /assets/sprites/blocks/power/converter-top1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/power/converter-top1.png -------------------------------------------------------------------------------- /assets/sprites/blocks/turrets/apoptosis-heat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/turrets/apoptosis-heat.png -------------------------------------------------------------------------------- /assets/sprites/blocks/turrets/lysis-charge0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/turrets/lysis-charge0.png -------------------------------------------------------------------------------- /assets/sprites/blocks/turrets/lysis-charge1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/turrets/lysis-charge1.png -------------------------------------------------------------------------------- /assets/sprites/blocks/turrets/lysis-charge2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/turrets/lysis-charge2.png -------------------------------------------------------------------------------- /assets/sprites/blocks/turrets/lysis-charge3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/turrets/lysis-charge3.png -------------------------------------------------------------------------------- /assets/sprites/blocks/turrets/necrosis-heat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/turrets/necrosis-heat.png -------------------------------------------------------------------------------- /assets/sprites/blocks/units/incubator-heat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/units/incubator-heat.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/assault-frog-cell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/assault-frog-cell.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/assault-frog-full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/assault-frog-full.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/assault-frog-jump.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/assault-frog-jump.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/assault-frog-swim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/assault-frog-swim.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/exotic-frog-cell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/exotic-frog-cell.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/exotic-frog-full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/exotic-frog-full.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/exotic-frog-jump.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/exotic-frog-jump.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/exotic-frog-swim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/exotic-frog-swim.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/frog-jump-outline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/frog-jump-outline.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/frog-swim-outline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/frog-swim-outline.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/gliding-frog-cell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/gliding-frog-cell.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/gliding-frog-full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/gliding-frog-full.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/gliding-frog-jump.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/gliding-frog-jump.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/gliding-frog-swim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/gliding-frog-swim.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/leopard-frog-full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/leopard-frog-full.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/leopard-frog-jump.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/leopard-frog-jump.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/leopard-frog-swim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/leopard-frog-swim.png -------------------------------------------------------------------------------- /assets/sprites/units/weapons/assault-cannon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/weapons/assault-cannon.png -------------------------------------------------------------------------------- /assets/sprites/blocks/crafting/carbonizer-heat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/crafting/carbonizer-heat.png -------------------------------------------------------------------------------- /assets/sprites/blocks/logic/cataclysm-detector.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/logic/cataclysm-detector.png -------------------------------------------------------------------------------- /assets/sprites/blocks/power/discharge-receptor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/power/discharge-receptor.png -------------------------------------------------------------------------------- /assets/sprites/blocks/turrets/necrosis-charge0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/turrets/necrosis-charge0.png -------------------------------------------------------------------------------- /assets/sprites/blocks/turrets/necrosis-charge1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/turrets/necrosis-charge1.png -------------------------------------------------------------------------------- /assets/sprites/blocks/turrets/necrosis-charge2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/turrets/necrosis-charge2.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/exotic-frog-outline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/exotic-frog-outline.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/phroge-jump-outline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/phroge-jump-outline.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/phroge-swim-outline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/phroge-swim-outline.png -------------------------------------------------------------------------------- /assets/sprites/blocks/crafting/bioreactor-bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/crafting/bioreactor-bottom.png -------------------------------------------------------------------------------- /assets/sprites/blocks/crafting/bioreactor-liquid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/crafting/bioreactor-liquid.png -------------------------------------------------------------------------------- /assets/sprites/blocks/crafting/carbonizer-bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/crafting/carbonizer-bottom.png -------------------------------------------------------------------------------- /assets/sprites/blocks/crafting/eggshell-printer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/crafting/eggshell-printer.png -------------------------------------------------------------------------------- /assets/sprites/blocks/environment/tree-shadow-0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/environment/tree-shadow-0.png -------------------------------------------------------------------------------- /assets/sprites/blocks/environment/tree-shadow-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/environment/tree-shadow-1.png -------------------------------------------------------------------------------- /assets/sprites/blocks/turrets/apoptosis-charge0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/turrets/apoptosis-charge0.png -------------------------------------------------------------------------------- /assets/sprites/blocks/turrets/apoptosis-charge1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/turrets/apoptosis-charge1.png -------------------------------------------------------------------------------- /assets/sprites/blocks/turrets/apoptosis-charge2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/turrets/apoptosis-charge2.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/assault-frog-outline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/assault-frog-outline.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/gliding-frog-outline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/gliding-frog-outline.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/leopard-frog-outline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/leopard-frog-outline.png -------------------------------------------------------------------------------- /assets/sprites/blocks/crafting/bioreactor-plasma-0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/crafting/bioreactor-plasma-0.png -------------------------------------------------------------------------------- /assets/sprites/blocks/crafting/bioreactor-plasma-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/crafting/bioreactor-plasma-1.png -------------------------------------------------------------------------------- /assets/sprites/blocks/crafting/bioreactor-plasma-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/crafting/bioreactor-plasma-2.png -------------------------------------------------------------------------------- /assets/sprites/blocks/crafting/bioreactor-plasma-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/crafting/bioreactor-plasma-3.png -------------------------------------------------------------------------------- /assets/sprites/blocks/crafting/eggshell-printer-top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/crafting/eggshell-printer-top.png -------------------------------------------------------------------------------- /assets/sprites/blocks/power/discharge-receptor-heat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/power/discharge-receptor-heat.png -------------------------------------------------------------------------------- /assets/sprites/blocks/power/discharge-receptor-rod.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/power/discharge-receptor-rod.png -------------------------------------------------------------------------------- /assets/sprites/blocks/production/chlorophyll-panel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/production/chlorophyll-panel.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/exotic-frog-jump-outline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/exotic-frog-jump-outline.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/exotic-frog-swim-outline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/exotic-frog-swim-outline.png -------------------------------------------------------------------------------- /assets/sprites/units/weapons/assault-cannon-outline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/weapons/assault-cannon-outline.png -------------------------------------------------------------------------------- /assets/sprites/blocks/crafting/genetic-reconstructor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/crafting/genetic-reconstructor.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/assault-frog-jump-outline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/assault-frog-jump-outline.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/assault-frog-swim-outline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/assault-frog-swim-outline.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/gliding-frog-jump-outline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/gliding-frog-jump-outline.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/gliding-frog-swim-outline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/gliding-frog-swim-outline.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/leopard-frog-jump-outline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/leopard-frog-jump-outline.png -------------------------------------------------------------------------------- /assets/sprites/units/frogs/leopard-frog-swim-outline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/units/frogs/leopard-frog-swim-outline.png -------------------------------------------------------------------------------- /assets/sprites/blocks/production/chlorophyll-panel-bloom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/production/chlorophyll-panel-bloom.png -------------------------------------------------------------------------------- /assets/sprites/blocks/production/chlorophyll-synthesizer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/production/chlorophyll-synthesizer.png -------------------------------------------------------------------------------- /assets/sprites/blocks/crafting/genetic-reconstructor-bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/crafting/genetic-reconstructor-bottom.png -------------------------------------------------------------------------------- /src/animalia/world/Season.java: -------------------------------------------------------------------------------- 1 | package animalia.world; 2 | 3 | public enum Season { 4 | none, 5 | spring, 6 | summer, 7 | fall, 8 | winter 9 | } 10 | -------------------------------------------------------------------------------- /assets/sprites/blocks/production/chlorophyll-synthesizer-bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlinTyX/Animalia/HEAD/assets/sprites/blocks/production/chlorophyll-synthesizer-bottom.png -------------------------------------------------------------------------------- /src/animalia/world/environment/SeasonalBlock.java: -------------------------------------------------------------------------------- 1 | package animalia.world.environment; 2 | 3 | import animalia.world.Season; 4 | 5 | public interface SeasonalBlock { 6 | Season season = Season.none; 7 | 8 | default Season season(){ 9 | return season; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists -------------------------------------------------------------------------------- /mod.hjson: -------------------------------------------------------------------------------- 1 | name: animalia 2 | displayName: "Animalia" 3 | description: "A fun mod that contains Animals, Plants, Natural disasters and a lot more!" 4 | author: "Flin" 5 | java: true 6 | main: "animalia.Animalia" 7 | repo: FlinTyX/Animalia 8 | keepOutlines: true 9 | version: "java 1.0" 10 | minGameVersion: 141 -------------------------------------------------------------------------------- /src/animalia/content/AniShaders.java: -------------------------------------------------------------------------------- 1 | package animalia.content; 2 | 3 | import static mindustry.graphics.Shaders.*; 4 | 5 | public class AniShaders { 6 | public static BuildBeamShader blockBuild; 7 | 8 | public static void load(){ 9 | blockBuild = new BuildBeamShader(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/animalia/ui/AniTex.java: -------------------------------------------------------------------------------- 1 | package animalia.ui; 2 | 3 | import arc.scene.style.Drawable; 4 | import static arc.Core.*; 5 | 6 | public class AniTex { 7 | public static Drawable frog; 8 | 9 | public static void load(){ 10 | app.post(() -> { 11 | frog = atlas.drawable("animalia-icon-frog"); 12 | }); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/animalia/sound/AniSounds.java: -------------------------------------------------------------------------------- 1 | package animalia.sound; 2 | 3 | import arc.audio.Sound; 4 | import mindustry.Vars; 5 | 6 | public class AniSounds { 7 | public static Sound 8 | thunder1 = Vars.tree.loadSound("thunder1"), 9 | thunder2 = Vars.tree.loadSound("thunder2"), 10 | ribbit1 = Vars.tree.loadSound("ribbit1"), //deep ribbit 11 | ribbit2 = Vars.tree.loadSound("ribbit2"); //normal ribbit 12 | } 13 | -------------------------------------------------------------------------------- /src/animalia/world/draw/DrawRegionDynamic.java: -------------------------------------------------------------------------------- 1 | package animalia.world.draw; 2 | 3 | import arc.func.Func; 4 | import arc.graphics.g2d.TextureRegion; 5 | import mindustry.gen.Building; 6 | import mindustry.world.draw.DrawBlock; 7 | 8 | public class DrawRegionDynamic extends DrawBlock { 9 | public Func run; 10 | 11 | public DrawRegionDynamic(Func run){ 12 | this.run = run; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/animalia/content/AniLiquids.java: -------------------------------------------------------------------------------- 1 | package animalia.content; 2 | 3 | import arc.graphics.Color; 4 | import mindustry.type.Liquid; 5 | 6 | public class AniLiquids { 7 | public static Liquid nutritiveSolution; 8 | 9 | public static void load(){ 10 | nutritiveSolution = new Liquid("nutritive-solution", Color.valueOf("8a73c6")){{ 11 | lightColor = Color.valueOf("a387ea"); 12 | heatCapacity = -1; 13 | }}; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/animalia/type/Consequence.java: -------------------------------------------------------------------------------- 1 | package animalia.type; 2 | 3 | import arc.Core; 4 | import mindustry.gen.WeatherState; 5 | 6 | public class Consequence { 7 | public String name; 8 | 9 | public Consequence(String name){ 10 | this.name = Core.bundle.get("consequence.animalia-" + name + ".name"); 11 | } 12 | 13 | public void update(WeatherState state){ 14 | 15 | } 16 | 17 | public void init(WeatherState state){ 18 | 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/animalia/type/unit/ToadType.java: -------------------------------------------------------------------------------- 1 | package animalia.type.unit; 2 | 3 | import arc.Core; 4 | import arc.graphics.g2d.TextureRegion; 5 | 6 | // TODO 7 | public class ToadType extends FrogType { 8 | public TextureRegion walkRegion; 9 | 10 | public ToadType(String name){ 11 | super(name); 12 | } 13 | 14 | @Override 15 | public void load(){ 16 | super.load(); 17 | walkRegion = Core.atlas.find(name + "-walk"); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /settings.gradle.kts: -------------------------------------------------------------------------------- 1 | //@author GlennFolker 2 | 3 | pluginManagement{ 4 | repositories{ 5 | gradlePluginPortal() 6 | maven("https://raw.githubusercontent.com/GlennFolker/EntityAnnoMaven/main") 7 | } 8 | 9 | plugins{ 10 | val entVersion: String by settings 11 | id("com.github.GlennFolker.EntityAnno") version(entVersion) 12 | } 13 | } 14 | 15 | if(JavaVersion.current().ordinal < JavaVersion.VERSION_17.ordinal){ 16 | throw IllegalStateException("JDK 17 is a required minimum version. Yours: ${System.getProperty("java.version")}") 17 | } 18 | 19 | val modName: String by settings 20 | rootProject.name = modName -------------------------------------------------------------------------------- /src/animalia/ui/AniLinks.java: -------------------------------------------------------------------------------- 1 | package animalia.ui; 2 | 3 | import arc.struct.Seq; 4 | import arc.util.Reflect; 5 | import mindustry.gen.Icon; 6 | import mindustry.graphics.Pal; 7 | import mindustry.ui.Links; 8 | 9 | public class AniLinks { 10 | public static Seq links = Seq.with( 11 | new Links.LinkEntry("animalia", "https://github.com/FlinTyX/Animalia/releases", AniTex.frog, Pal.heal), 12 | new Links.LinkEntry("report", AniUI.reportDialog.URL(), Icon.warning, Pal.remove) 13 | ); 14 | 15 | public static void load(){ 16 | links.add(Links.getLinks()); 17 | 18 | Reflect.set(Links.class, "links", links.toArray(Links.LinkEntry.class)); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/animalia/world/draw/DrawConstruct.java: -------------------------------------------------------------------------------- 1 | package animalia.world.draw; 2 | 3 | import arc.func.Func; 4 | import arc.graphics.g2d.Draw; 5 | import arc.graphics.g2d.TextureRegion; 6 | import mindustry.gen.Building; 7 | import mindustry.graphics.Drawf; 8 | import mindustry.graphics.Layer; 9 | 10 | public class DrawConstruct extends DrawRegionDynamic { 11 | public TextureRegion top; 12 | 13 | public DrawConstruct(Func run){ 14 | super(run); 15 | } 16 | 17 | @Override 18 | public void draw(Building build){ 19 | Draw.rect(build.block.region, build.x, build.y, build.block.rotate ? build.rotdeg() : 0); 20 | 21 | Draw.draw(Layer.blockOver, () -> { 22 | Draw.reset(); 23 | Drawf.construct(build, run.get(build), 0, build.progress(), build.warmup(), build.totalProgress()); 24 | }); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/animalia/world/TemperatureHandler.java: -------------------------------------------------------------------------------- 1 | package animalia.world; 2 | 3 | import mindustry.Vars; 4 | import mindustry.world.meta.Attribute; 5 | 6 | // TODO h. 7 | public class TemperatureHandler { 8 | public static Attribute temperature; 9 | public static int pointer = 0; 10 | 11 | public static void setup(){ 12 | Attribute.add("temperature"); 13 | temperature = Attribute.map.get("temperature"); 14 | } 15 | 16 | public static void init(){ 17 | 18 | } 19 | 20 | public static void update(){ 21 | 22 | } 23 | 24 | public static float get(){ 25 | return Vars.state.rules.attributes.get(temperature); 26 | } 27 | 28 | public static float set(float amount){ 29 | Vars.state.rules.attributes.set(temperature, Math.min(100, amount)); 30 | return get(); 31 | } 32 | 33 | public static float add(float amount){ 34 | return set(get() + amount); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ###### *Originally generated from Anuken/MindustryJavaModTemplate* 2 | 3 | ![logo](animalia.png) 4 | With the purpose of adding some biology to Mindustry, Animalia is a mod that contains unique _biological forms, blocks, machines and mechanics_ to discover the world of the Animalia Kingdom! 5 | 6 | ![image](https://user-images.githubusercontent.com/69006175/161407102-82b8b5cb-a633-4f4b-adb4-63f4474f4a11.png) 7 | 8 | # Download: 9 | Check out https://github.com/FlinTyX/Animalia/releases, open up the latest release and download `Animalia.jar` in the `mods` folder. 10 | 11 | You're ready to play now! 12 | 13 | # Compatibility: 14 | This mod is being ported to V7 and also being parsed to Java, glitches and crashes are "completely" normal in this situation. Not everything is compatible with mobile. 15 | 16 | Please report any issues here https://github.com/FlinTyX/Animalia/issues/new?assignees=&labels=bug 17 | 18 | # Content: 19 | See https://github.com/FlinTyX/Animalia/releases for more information! -------------------------------------------------------------------------------- /src/animalia/world/draw/DrawItemIO.java: -------------------------------------------------------------------------------- 1 | package animalia.world.draw; 2 | 3 | import arc.graphics.g2d.Draw; 4 | import mindustry.gen.Building; 5 | import mindustry.type.Item; 6 | import mindustry.world.draw.DrawBlock; 7 | 8 | public class DrawItemIO extends DrawBlock { 9 | public boolean drawOut = true; 10 | public float spriteSize = 6f; 11 | public Item in, out; 12 | 13 | public DrawItemIO(Item in, Item out){ 14 | this.in = in; 15 | this.out = out; 16 | } 17 | 18 | public DrawItemIO(Item in, Item out, float spriteSize){ 19 | this.in = in; 20 | this.out = out; 21 | this.spriteSize = spriteSize; 22 | } 23 | 24 | @Override 25 | public void draw(Building build){ 26 | if(build.items.has(in)){ 27 | Draw.alpha(1f - build.progress()); 28 | Draw.rect(in.fullIcon, build.x, build.y, spriteSize, spriteSize); 29 | } 30 | 31 | Draw.alpha(build.progress() * 1.3f); 32 | Draw.rect(out.fullIcon, build.x, build.y, spriteSize, spriteSize); 33 | Draw.reset(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/animalia/content/AniStatuses.java: -------------------------------------------------------------------------------- 1 | package animalia.content; 2 | 3 | import arc.graphics.g2d.Draw; 4 | import arc.math.Mathf; 5 | import mindustry.gen.Unit; 6 | import mindustry.graphics.Layer; 7 | import mindustry.graphics.Pal; 8 | import mindustry.type.StatusEffect; 9 | 10 | public class AniStatuses { 11 | public static StatusEffect poisoned; 12 | 13 | public static void load(){ 14 | poisoned = new StatusEffect("poisoned"){{ 15 | damage = 1.25f; 16 | color = Pal.accent; 17 | speedMultiplier = 0.85f; 18 | damageMultiplier = 0.65f; 19 | healthMultiplier = 0.85f; 20 | buildSpeedMultiplier = 0.8f; 21 | dragMultiplier = 0.8f; 22 | } 23 | 24 | @Override 25 | public void draw(Unit unit){ 26 | Draw.z(Layer.groundUnit + 1); 27 | Draw.mixcol(Pal.accent, Mathf.absin(2, 0.65f)); 28 | 29 | Draw.rect(unit.type.fullIcon, unit.x, unit.y, unit.rotation - 90); 30 | 31 | Draw.reset(); 32 | } 33 | }; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/animalia/content/AniItems.java: -------------------------------------------------------------------------------- 1 | package animalia.content; 2 | 3 | import animalia.type.EggType; 4 | import arc.graphics.Color; 5 | import mindustry.type.Item; 6 | 7 | import static animalia.content.AniUnitTypes.*; 8 | 9 | public class AniItems { 10 | public static EggType eggshell, frogEgg, assaultFrogEgg, exoticFrogEgg, leopardFrogEgg; 11 | public static Item carbonFiber, chlorophyll; 12 | 13 | public static void load(){ 14 | carbonFiber = new Item("carbon-fiber", Color.valueOf("404040")){{ 15 | cost = 1.2f; 16 | }}; 17 | 18 | chlorophyll = new Item("chlorophyll", Color.valueOf("4a4b53")){{ 19 | cost = 1.1f; 20 | }}; 21 | 22 | eggshell = new EggType("eggshell", Color.white); 23 | frogEgg = new EggType("frog-egg", frog, Color.valueOf("92dd7e"), 25); 24 | assaultFrogEgg = new EggType("assault-frog-egg", assaultFrog, Color.valueOf("deffdd"), 40); 25 | exoticFrogEgg = new EggType("exotic-frog-egg", exoticFrog, Color.valueOf("f3e979"), 30); 26 | leopardFrogEgg = new EggType("leopard-frog-egg", leopardFrog, Color.valueOf("edf3a9"), 30); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/animalia/type/unit/PoisonousFrogType.java: -------------------------------------------------------------------------------- 1 | package animalia.type.unit; 2 | 3 | import animalia.content.AniStatuses; 4 | import mindustry.entities.Units; 5 | import mindustry.gen.Unit; 6 | import mindustry.type.StatusEffect; 7 | import mindustry.world.meta.Stat; 8 | 9 | import static animalia.ui.AniUI.*; 10 | 11 | public class PoisonousFrogType extends FrogType { 12 | public StatusEffect effect = AniStatuses.poisoned; 13 | public float effectTime = 60 * 3.5f; 14 | 15 | public PoisonousFrogType(String name){ 16 | super(name); 17 | } 18 | 19 | @Override 20 | public void setStats(){ 21 | super.setStats(); 22 | 23 | addStats(stats, Stat.size, true, statValueBundle("stat.poisonous", "yes")); 24 | } 25 | 26 | @Override 27 | public void update(Unit unit){ 28 | super.update(unit); 29 | 30 | float r = unit.type.range; 31 | 32 | Units.nearby(unit.x - r, unit.y - r, r * 2, r * 2, u -> { 33 | if(u.within(unit.x, unit.y, r + u.hitSize / 2f) && !u.type.flying && !(u.type() instanceof PoisonousFrogType)){ 34 | u.apply(effect, effectTime); 35 | } 36 | }); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/animalia/type/EggType.java: -------------------------------------------------------------------------------- 1 | package animalia.type; 2 | 3 | import animalia.type.unit.AnimalType; 4 | import arc.Core; 5 | import arc.graphics.Color; 6 | import arc.graphics.g2d.TextureRegion; 7 | import arc.util.Nullable; 8 | import mindustry.type.Item; 9 | import mindustry.world.meta.Stat; 10 | 11 | import static animalia.ui.AniUI.*; 12 | 13 | public class EggType extends Item { 14 | public @Nullable AnimalType unit; 15 | public float time = 0; 16 | 17 | public TextureRegion upRegion; 18 | 19 | public EggType(String name, AnimalType unit, Color color, float time){ 20 | super(name, color); 21 | 22 | this.unit = unit; 23 | this.time = time * 60; 24 | 25 | if(unit != null) unit.egg = this; 26 | } 27 | 28 | public EggType(String name, Color color){ 29 | super(name, color); 30 | } 31 | 32 | @Override 33 | public void load(){ 34 | super.load(); 35 | upRegion = Core.atlas.find(name + "-up"); 36 | } 37 | 38 | @Override 39 | public void setStats(){ 40 | super.setStats(); 41 | 42 | addStats(stats, Stat.explosiveness, true, 43 | statValue("stat.hatch", (time / 60) + " " + Core.bundle.get("unit.seconds")) 44 | ); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/animalia/content/Spawners.java: -------------------------------------------------------------------------------- 1 | package animalia.content; 2 | 3 | import animalia.entities.units.FrogEntity; 4 | import animalia.type.GroupSpawner; 5 | import arc.struct.Seq; 6 | import mindustry.Vars; 7 | import mindustry.gen.Unit; 8 | import mindustry.world.Tile; 9 | 10 | public class Spawners { 11 | public static GroupSpawner 12 | 13 | frog = new GroupSpawner(){ 14 | @Override 15 | public void spawn(){ 16 | SpawnableAnimal s = sort(); 17 | 18 | if(s != null) { 19 | s.map.filter(e -> e.build == null && tileLinked8(e, tile -> !tile.solid() && !tile.floor().isLiquid).size > 0); 20 | 21 | if (s.map.size > 0) { 22 | Tile t = s.map.random(); 23 | Seq tiles = tileLinked8(t, tile -> !tile.solid() && !tile.floor().isLiquid); 24 | 25 | s.type.unlock(); 26 | 27 | Unit u = s.type.spawn(Vars.state.rules.defaultTeam, t.worldx(), t.worldy()); 28 | 29 | //look at a random tile around the liquid 30 | u.lookAt(tiles.random()); 31 | 32 | //make the frog jump on it 33 | ((FrogEntity) u).jump(0); 34 | } 35 | } 36 | } 37 | }; 38 | } 39 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: Java CI 2 | 3 | on: 4 | push: 5 | pull_request: 6 | release: 7 | types: 8 | - created 9 | 10 | permissions: 11 | contents: write 12 | 13 | jobs: 14 | buildJar: 15 | name: Build and Publish Jar 16 | runs-on: ubuntu-latest 17 | steps: 18 | - uses: actions/checkout@v4 19 | - name: Set up JDK 17 20 | uses: actions/setup-java@v4 21 | with: 22 | java-version: 17 23 | distribution: temurin 24 | - name: Setup Gradle 25 | uses: gradle/actions/setup-gradle@v4 26 | - name: Build mod artifact 27 | run: | 28 | chmod +x gradlew 29 | ./gradlew clean dex 30 | - name: Upload built mod artifact as a GitHub Action artifact 31 | uses: actions/upload-artifact@v4 32 | if: github.event_name == 'push' || github.event_name == 'pull_request' 33 | with: 34 | name: Confictura (zipped) 35 | path: build/libs/Animalia.jar 36 | if-no-files-found: error 37 | compression-level: 0 38 | - name: Upload built mod artifact into release 39 | uses: softprops/action-gh-release@v2 40 | if: github.event_name == 'release' && github.event.action == 'created' 41 | with: 42 | files: build/libs/Animalia.jar -------------------------------------------------------------------------------- /src/animalia/content/AniTechTree.java: -------------------------------------------------------------------------------- 1 | package animalia.content; 2 | 3 | import static mindustry.content.TechTree.*; 4 | import static animalia.content.AniBlocks.*; 5 | import static animalia.content.AniUnitTypes.*; 6 | import static animalia.content.AniItems.*; 7 | import static animalia.content.AniLiquids.*; 8 | 9 | public class AniTechTree { 10 | public static TechNode root; 11 | 12 | public static void load(){ 13 | root = nodeRoot("animalia", frog, () -> { 14 | node(leopardFrog, () -> {}); 15 | node(assaultFrog, () -> {}); 16 | node(exoticFrog, () -> {}); 17 | 18 | node(eggshellPrinter, () -> { 19 | node(carbonizer, () -> { 20 | node(dischargeReceptor, () -> {}); 21 | node(chlorophyllSynthesizer, () -> {}); 22 | }); 23 | 24 | node(bioreactor, () -> { 25 | node(geneticReconstructor, () -> { 26 | node(incubator, () -> {}); 27 | }); 28 | }); 29 | }); 30 | 31 | nodeProduce(eggshell, () -> { 32 | nodeProduce(nutritiveSolution, () -> {}); 33 | 34 | nodeProduce(carbonFiber, () -> { 35 | nodeProduce(chlorophyll, () -> {}); 36 | }); 37 | }); 38 | }); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/animalia/type/FrogWeapon.java: -------------------------------------------------------------------------------- 1 | package animalia.type; 2 | 3 | import animalia.entities.units.FrogEntity; 4 | import arc.graphics.g2d.Draw; 5 | import arc.math.Angles; 6 | import arc.math.Mathf; 7 | import mindustry.entities.units.WeaponMount; 8 | import mindustry.gen.Unit; 9 | import mindustry.type.Weapon; 10 | 11 | public class FrogWeapon extends Weapon { 12 | public FrogWeapon(String name){ 13 | super(name); 14 | } 15 | 16 | @Override 17 | public void draw(Unit unit, WeaponMount mount){ 18 | super.draw(unit, mount); 19 | 20 | FrogEntity u = (FrogEntity) unit; 21 | 22 | float 23 | z = Draw.z(), 24 | e = 9 * (u.onLiquid() ? 0 : u.slope()), 25 | rotation = unit.rotation - 90, 26 | realRecoil = Mathf.pow(mount.recoil, recoilPow) * recoil, 27 | weaponRotation = rotation + (rotate ? mount.rotation : baseRotation), 28 | wx = unit.x + Angles.trnsx(rotation, x, y) + Angles.trnsx(weaponRotation, 0, -realRecoil), 29 | wy = unit.y + Angles.trnsy(rotation, x, y) + Angles.trnsy(weaponRotation, 0, -realRecoil); 30 | 31 | Draw.z(z + layerOffset); 32 | 33 | if(e > 0){ 34 | Draw.rect(region, wx, wy, region.width * Draw.scl * Draw.xscl + e, region.height* Draw.scl * Draw.yscl + e, weaponRotation); 35 | Draw.rect(outlineRegion, wx, wy, region.width * Draw.scl * Draw.xscl + e, region.height* Draw.scl * Draw.yscl + e, weaponRotation); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/animalia/Animalia.java: -------------------------------------------------------------------------------- 1 | package animalia; 2 | 3 | import static mindustry.Vars.*; 4 | 5 | import animalia.content.*; 6 | import animalia.ui.AniTex; 7 | import animalia.world.WorldSetup; 8 | import arc.Core; 9 | import arc.Events; 10 | import arc.util.Time; 11 | import mindustry.game.EventType; 12 | import mindustry.game.EventType.*; 13 | import mindustry.mod.Mod; 14 | import animalia.ui.AniUI; 15 | 16 | public class Animalia extends Mod { 17 | public WorldSetup world; 18 | public AniUI ui = new AniUI(); 19 | 20 | public Animalia(){ 21 | super(); 22 | } 23 | 24 | @Override 25 | public void init(){ 26 | if(!headless) { 27 | AniTex.load(); 28 | 29 | Events.on(ClientLoadEvent.class, e -> ui.load()); 30 | Events.on(WorldLoadEvent.class, e -> Time.run(5, () -> world.onLoad())); 31 | Events.run(Trigger.newGame, () -> Time.run(3, () -> world.onCreate())); 32 | 33 | Events.run(Trigger.update, () -> { 34 | world.update(); 35 | }); 36 | } 37 | } 38 | 39 | @Override 40 | public void loadContent(){ 41 | AniLiquids.load(); 42 | AniStatuses.load(); 43 | AniUnitTypes.load(); 44 | AniItems.load(); 45 | AniBlocks.load(); 46 | AniWeathers.load(); 47 | AniShaders.load(); 48 | AniTechTree.load(); 49 | } 50 | 51 | public static float sfxvol(){ 52 | return 1f * Core.settings.getInt("sfxvol") / 100f; 53 | } 54 | 55 | public static float sfxvol(float vol){ 56 | return vol * 1f * Core.settings.getInt("sfxvol") / 100f; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/animalia/type/unit/AnimalType.java: -------------------------------------------------------------------------------- 1 | package animalia.type.unit; 2 | 3 | import animalia.type.Adaption; 4 | import animalia.type.EggType; 5 | import arc.audio.Sound; 6 | import arc.math.Mathf; 7 | import arc.struct.Seq; 8 | import arc.util.Nullable; 9 | import mindustry.Vars; 10 | import mindustry.core.GameState; 11 | import mindustry.gen.EntityMapping; 12 | import mindustry.gen.Unit; 13 | import mindustry.type.UnitType; 14 | import mindustry.world.Block; 15 | 16 | import static animalia.content.AniFx.animalSound; 17 | import static animalia.Animalia.sfxvol; 18 | 19 | //TODO add abilities & invisibility 20 | public class AnimalType extends UnitType { 21 | public Adaption adaption = Adaption.terrestrial; 22 | 23 | public @Nullable EggType egg; 24 | public @Nullable Sound ambientSound; 25 | public Seq spawnsOn = new Seq<>(); 26 | 27 | public float spawnChance = 1, ambientSoundVol = 0.2f, soundPlayChance = 0.0005f; 28 | public boolean sortTeam = false; 29 | 30 | public AnimalType(String name){ 31 | super(name); 32 | } 33 | 34 | @Override 35 | public void init() { 36 | super.init(); 37 | EntityMapping.nameMap.put(name, constructor); 38 | } 39 | 40 | @Override 41 | public void update(Unit unit){ 42 | super.update(unit); 43 | 44 | //TODO multiple ambient sounds? 45 | if(ambientSound != null && Mathf.chanceDelta(soundPlayChance)){ 46 | ambientSound.at(unit.x, unit.y, 0, sfxvol(ambientSoundVol)); 47 | 48 | if(Mathf.chance(0.5f)){ 49 | animalSound.at(unit.x, unit.y, unit.rotation); 50 | } 51 | } 52 | } 53 | 54 | public boolean isTerrestrial(){ 55 | return adaption == Adaption.terrestrial; 56 | } 57 | 58 | public boolean isArboreal(){ 59 | return adaption == Adaption.arboreal; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/animalia/ui/fragments/TemperatureFragment.java: -------------------------------------------------------------------------------- 1 | package animalia.ui.fragments; 2 | 3 | import arc.Core; 4 | import arc.scene.Element; 5 | import arc.scene.Group; 6 | import mindustry.Vars; 7 | import mindustry.ui.Styles; 8 | 9 | // TODO h. 10 | public class TemperatureFragment { 11 | private final int width = 80, height = 150; 12 | private static Element ele; 13 | 14 | public void build(Group parent){ 15 | parent.fill(t -> { 16 | t.top(); 17 | t.right(); 18 | t.visible = Vars.ui.hudfrag.shown; 19 | 20 | t.table(Styles.black3, tt -> { 21 | tt.collapser(v -> v.add().width(150), true, () -> Core.settings.getBool("minimap")).right().row(); 22 | }).right().fillX().fillY(); 23 | 24 | /* 25 | t.table(tt -> { 26 | ele = tt.fill((x, y, w, h) -> { 27 | TextureRegion 28 | reg = Core.atlas.find("weather-lord-thermometer"), 29 | bottom = Core.atlas.find("weather-lord-thermometer-bottom"); 30 | 31 | Draw.color(Pal.lancerLaser, Pal.bulletYellow, Pal.remove, get() / 100f); 32 | Draw.rect(bottom, x, y, reg.width, reg.height); 33 | 34 | Draw.reset(); 35 | Draw.rect(reg, x, y, reg.width, reg.height); 36 | }); 37 | 38 | ele.visible = Vars.ui.hudfrag.shown; 39 | ele.touchable = Touchable.enabled; 40 | 41 | ele.update(() -> { 42 | ele.setFillParent(true); 43 | ele.setBounds(0, 0, Core.camera.width, Core.camera.height); 44 | }); 45 | 46 | ele.clicked(() -> { 47 | Log.info("seggs"); 48 | }); 49 | }).fillX().padRight(5); 50 | */ 51 | }); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/animalia/ai/types/FrogAI.java: -------------------------------------------------------------------------------- 1 | package animalia.ai.types; 2 | 3 | import animalia.entities.units.FrogEntity; 4 | import animalia.type.unit.FrogType; 5 | import arc.math.Angles; 6 | import arc.math.Mathf; 7 | import arc.util.Time; 8 | import mindustry.Vars; 9 | import mindustry.core.World; 10 | import mindustry.entities.Units; 11 | import mindustry.entities.units.AIController; 12 | import mindustry.gen.Teamc; 13 | import mindustry.gen.Unit; 14 | 15 | public class FrogAI extends AIController { 16 | @Override 17 | public void updateMovement(){ 18 | FrogEntity u = (FrogEntity) unit; 19 | 20 | if(u.type().usesTongue){ 21 | faceTarget(); 22 | } 23 | 24 | if(u.over != null){ 25 | 26 | } else { 27 | if(Mathf.chance(u.type().swimChance) && u.onLiquid() && u.canSwim()) { 28 | u.swim(); 29 | return; 30 | } 31 | 32 | if (Mathf.chance(u.type().jumpChance) && u.canJump()) { 33 | u.jump(60); 34 | } 35 | } 36 | } 37 | 38 | @Override 39 | public void faceTarget(){ 40 | FrogEntity u = (FrogEntity) unit; 41 | 42 | if(target != null && !(u.jumping || u.swimming || u.gliding)){ 43 | unit.rotation = Angles.moveToward(unit.rotation, unit.angleTo(target), Time.delta * 4); 44 | } else if(unit.moving()){ 45 | unit.lookAt(unit.vel().angle()); 46 | } 47 | } 48 | 49 | @Override 50 | public boolean invalid(Teamc target){ 51 | return Units.invalidateTarget(target, unit.team, unit.x, unit.y) || 52 | !(target instanceof Unit u && (u.type.flying || u.hitSize <= ((FrogType) unit.type()).tongueMaxCap) && !World.raycast( 53 | World.toTile(unit.x), 54 | World.toTile(unit.y), 55 | World.toTile(u.x), 56 | World.toTile(u.y), 57 | (x, y) -> Vars.world.build(x, y) != null || Vars.world.tile(x, y).solid() 58 | )); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/animalia/world/draw/DrawBuild.java: -------------------------------------------------------------------------------- 1 | package animalia.world.draw; 2 | 3 | import arc.Core; 4 | import arc.func.Func; 5 | import arc.graphics.Color; 6 | import arc.graphics.g2d.Draw; 7 | import arc.graphics.g2d.Fill; 8 | import arc.graphics.g2d.Lines; 9 | import arc.graphics.g2d.TextureRegion; 10 | import arc.math.Mathf; 11 | import arc.util.Time; 12 | import mindustry.Vars; 13 | import mindustry.gen.Building; 14 | import mindustry.graphics.Drawf; 15 | import mindustry.graphics.Layer; 16 | import mindustry.world.Block; 17 | 18 | import static animalia.content.AniShaders.blockBuild; 19 | 20 | public class DrawBuild extends DrawRegionDynamic { 21 | public Color color; 22 | 23 | public DrawBuild(Color color, Func run){ 24 | super(run); 25 | this.color = color; 26 | } 27 | 28 | @Override 29 | public void draw(Building build){ 30 | TextureRegion region = run.get(build); 31 | 32 | if(region != null) { 33 | Draw.draw(Layer.block, () -> { 34 | Drawf.construct(build.x, build.y, region, color, 0, build.progress(), build.warmup(), build.totalProgress()); 35 | 36 | Draw.color(color); 37 | Draw.alpha(build.warmup()); 38 | Lines.lineAngleCenter(build.x + Mathf.sin(build.totalProgress(), 20, Vars.tilesize / 2 * build.block.size - 2), build.y, 90, build.block.size * Vars.tilesize - 4); 39 | Draw.reset(); 40 | 41 | Vars.renderer.effectBuffer.begin(Color.clear); 42 | 43 | Draw.color(color); 44 | Draw.alpha(build.warmup() * (0.85f + Mathf.sin(Time.time, 10, 0.08f))); 45 | Fill.square(build.x, build.y, build.block.size * Vars.tilesize / 2); 46 | 47 | Vars.renderer.effectBuffer.end(); 48 | Vars.renderer.effectBuffer.blit(blockBuild); 49 | }); 50 | } 51 | 52 | Draw.reset(); 53 | Draw.rect(build.block.region, build.x, build.y, build.block.rotate ? build.rotdeg() : 0); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/animalia/content/AniWeathers.java: -------------------------------------------------------------------------------- 1 | package animalia.content; 2 | 3 | import arc.struct.Seq; 4 | import arc.util.Time; 5 | import mindustry.content.Weathers; 6 | import mindustry.type.Weather; 7 | import mindustry.world.meta.Attribute; 8 | import animalia.type.Consequence; 9 | import animalia.type.weather.StormCataclysm; 10 | 11 | import static mindustry.Vars.*; 12 | 13 | public class AniWeathers { 14 | public static Weather 15 | tropicalStorm, 16 | storm; 17 | 18 | public static void load(){ 19 | tropicalStorm = new StormCataclysm("tropical-storm"){{ 20 | consequences = new Consequence[]{new Consequences.Thunder()}; 21 | 22 | rainDensity = 440f; 23 | rainSizeMin = 25f; 24 | rainSizeMax = 40f; 25 | 26 | xspeed = -10; 27 | yspeed = -16f; 28 | stroke = 0.8f; 29 | soundVol = 0.8f; 30 | duration = 6 * Time.toMinutes; 31 | padding = 40f; 32 | force = 0.6f; 33 | density = 10000f; 34 | 35 | attrs.set(Attribute.light, -0.6f); 36 | attrs.set(Attribute.water, 0.7f); 37 | }}; 38 | 39 | storm = new StormCataclysm("storm"){{ 40 | warns = false; 41 | updates = true; 42 | 43 | child = tropicalStorm; 44 | 45 | attrs.set(Attribute.light, -0.3f); 46 | attrs.set(Attribute.water, 0.4f); 47 | }}; 48 | } 49 | 50 | public static boolean hasWeather(Weather... all){ 51 | Seq copy = new Seq<>(all); 52 | 53 | return state.rules.weather.select(e -> copy.contains(e.weather)).size > 0; 54 | } 55 | 56 | public static void addWeather(Weather[] weather, boolean[] valid){ 57 | for(int i = 0; i < weather.length; i++){ 58 | if(valid[i] && !hasWeather(weather[i])){ 59 | state.rules.weather.add(new Weather.WeatherEntry(weather[i])); 60 | } 61 | } 62 | } 63 | 64 | public static void entry(){ 65 | addWeather( 66 | new Weather[]{ 67 | storm 68 | }, 69 | new boolean[]{ 70 | hasWeather(Weathers.rain, Weathers.snow) 71 | } 72 | ); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/animalia/world/WorldSetup.java: -------------------------------------------------------------------------------- 1 | package animalia.world; 2 | 3 | import animalia.content.AniBlocks; 4 | import animalia.content.AniWeathers; 5 | import animalia.type.GroupSpawner; 6 | import arc.Core; 7 | import arc.math.Mathf; 8 | import mindustry.game.Team; 9 | import mindustry.gen.Call; 10 | import mindustry.world.Tile; 11 | 12 | import static animalia.type.GroupSpawner.spawners; 13 | import static mindustry.Vars.*; 14 | import static mindustry.Vars.state; 15 | 16 | public class WorldSetup { 17 | public TemperatureHandler temperature; 18 | 19 | public static int mapTrees = 4, trees = 0; 20 | 21 | public static void onLoad(){ 22 | for(GroupSpawner spawner : spawners){ 23 | for(GroupSpawner.SpawnableAnimal s : spawner.types) s.map.clear(); 24 | } 25 | 26 | world.tiles.eachTile(t -> { 27 | for (GroupSpawner s : spawners) { 28 | s.update(t); 29 | } 30 | }); 31 | } 32 | 33 | public static void onCreate(){ 34 | if(Core.settings.getBool("entryweathers") || state.isCampaign()){ 35 | AniWeathers.entry(); 36 | } 37 | 38 | updateEnvironment(); 39 | 40 | world.tiles.eachTile(t -> { 41 | updateEnvironment(t); 42 | }); 43 | } 44 | 45 | public static void update() { 46 | spawners.each(s -> { 47 | if (s.types.size > 0 && state.isPlaying()) { 48 | if (Mathf.chanceDelta(s.spawnChance)) { 49 | s.spawn(); 50 | } 51 | } 52 | }); 53 | } 54 | 55 | public static void updateEnvironment(){ 56 | int q = 0, maxQ = Math.max(world.width(), world.height()); 57 | 58 | while(q++ <= maxQ && trees <= mapTrees){ 59 | int x = Math.round((float) Math.random() * world.width()), 60 | y = Math.round((float) Math.random() * world.height()); 61 | 62 | Tile t = world.tile(x, y); 63 | 64 | if(t != null && !t.solid()){ 65 | if(t.floor().name.contains("grass")){ 66 | Call.setTile(t, AniBlocks.tree, Team.derelict, 0); 67 | trees++; 68 | } 69 | } 70 | } 71 | 72 | trees = 0; 73 | } 74 | 75 | public static void updateEnvironment(Tile tile){ 76 | 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /src/animalia/type/Cataclysm.java: -------------------------------------------------------------------------------- 1 | package animalia.type; 2 | 3 | import arc.Core; 4 | import arc.math.Mathf; 5 | import arc.util.Log; 6 | import arc.util.Nullable; 7 | import mindustry.gen.WeatherState; 8 | import mindustry.type.Weather; 9 | import mindustry.world.meta.Stat; 10 | 11 | import static animalia.ui.AniUI.*; 12 | 13 | public class Cataclysm extends Weather { 14 | public Consequence[] consequences = {}; 15 | public @Nullable Weather child; 16 | 17 | public float warnDuration = 60 * 6, childSpawnChance = 0.3f; 18 | public boolean warns = true, updates = false; 19 | 20 | public Cataclysm(String name){ 21 | super(name); 22 | 23 | alwaysUnlocked = true; 24 | } 25 | 26 | @Override 27 | public void setStats(){ 28 | super.setStats(); 29 | 30 | String text = ""; 31 | 32 | if(consequences.length > 0){ 33 | for(Consequence c : consequences) text += c.name + ", "; 34 | text = text.substring(0, text.length() - 2); 35 | } else text += "[lightgray]" + Core.bundle.get("none"); 36 | 37 | addStats(stats, Stat.health, false, statValue("stat.consequence", text)); 38 | } 39 | 40 | @Override 41 | public WeatherState create(float intensity, float duration){ 42 | WeatherState state = super.create(intensity, duration); 43 | 44 | initConsequences(state); 45 | 46 | if(warns){ 47 | cataclysmFrag.collapse(build(), warnDuration, consequences); 48 | } 49 | 50 | return state; 51 | } 52 | 53 | @Override 54 | public void update(WeatherState state){ 55 | super.update(state); 56 | if(updates) updateConsequences(state); 57 | } 58 | 59 | @Override 60 | public void remove(){ 61 | if(child != null && Mathf.chanceDelta(childSpawnChance)){ 62 | child.create(); 63 | } 64 | 65 | super.remove(); 66 | } 67 | 68 | @Override 69 | public boolean isHidden(){ 70 | return false; 71 | } 72 | 73 | public String build(){ 74 | return Core.bundle.format("weather.animalia-warning", localizedName); 75 | } 76 | 77 | public void initConsequences(WeatherState state){ 78 | for(Consequence c : consequences){ 79 | c.init(state); 80 | } 81 | } 82 | 83 | public void updateConsequences(WeatherState state) { 84 | for (Consequence c : consequences) { 85 | c.update(state); 86 | } 87 | } 88 | } -------------------------------------------------------------------------------- /src/animalia/ui/fragments/CataclysmFragment.java: -------------------------------------------------------------------------------- 1 | package animalia.ui.fragments; 2 | 3 | import arc.Core; 4 | import arc.graphics.Color; 5 | import arc.math.Mathf; 6 | import arc.scene.Group; 7 | import arc.scene.event.Touchable; 8 | import arc.util.Time; 9 | import mindustry.Vars; 10 | import mindustry.ui.Styles; 11 | import animalia.type.Consequence; 12 | 13 | public class CataclysmFragment { 14 | public Consequence[] consequences = {}; 15 | public String title = "", text = ""; 16 | float duration = 0f; 17 | 18 | public void build(Group parent){ 19 | parent.fill(t -> { 20 | t.top(); 21 | t.visible = Vars.ui.hudfrag.shown; 22 | 23 | t.collapser(v -> v.add().height(38), () -> Vars.state.isPaused() || Core.settings.getBool("displayCoreItems")).row(); 24 | 25 | t.table(b -> { 26 | b.collapser(top -> top.table(m -> { 27 | m.table(tt -> { 28 | tt.background(Styles.black6).add("").pad(8).update(label -> { 29 | label.color.set(Color.orange).lerp(Color.scarlet, Mathf.absin(Time.time, 2, 1)); 30 | label.setText(title); 31 | }); 32 | }); 33 | m.row(); 34 | 35 | m.table(tt -> { 36 | tt.add("").pad(1).update(label -> { 37 | label.setText(text); 38 | label.setFontScale(0.83f); 39 | }); 40 | }); 41 | 42 | }), true, () -> { 43 | if(!Vars.ui.hudfrag.shown || Vars.state.isPaused()) return false; 44 | if(Vars.state.isMenu()){ 45 | duration = 0; 46 | return false; 47 | } 48 | return (duration -= Time.delta) > 0; 49 | }) 50 | .touchable(Touchable.disabled) 51 | .fillX().row(); 52 | }); 53 | }); 54 | } 55 | 56 | public void build(){ 57 | text = Core.bundle.get("stat.consequence") + ": "; 58 | 59 | if(consequences.length > 0){ 60 | for(Consequence c : consequences) text += c.name + ", "; 61 | text = text.substring(0, text.length() - 2); 62 | } else text += "[lightgray]" + Core.bundle.get("none"); 63 | } 64 | public void collapse(String title, float duration, Consequence[] consequences){ 65 | this.title = title; 66 | this.duration = duration; 67 | this.consequences = consequences; 68 | 69 | build(); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | ##### @author GlennFolker 2 | 3 | ##### Project configurations. 4 | # The mod's internal name, corresponds to `name` in `mod.json`. 5 | modName = animalia 6 | # The mod's fetched entity sources package. 7 | modFetch = animalia.fetched 8 | # The mod's input entity sources package. 9 | modGenSrc = animalia.entities.comp 10 | # The mod's generated sources package. 11 | modGen = animalia.gen 12 | # The mod's JAR file name. Desktop build is suffixed with `Desktop`. 13 | modArtifact = Animalia 14 | 15 | # EntityAnno version, for integrating syntax-downgrader and entity annotation processor. 16 | # The exact version you need should be looked up on the project's `README.md` 17 | # (see https://github.com/GlennFolker/EntityAnno?tab=readme-ov-file#version-compatibility). 18 | entVersion = v146.0.10 19 | # Set to `true` if the mod is compiled against Mindustry bleeding-edge build. 20 | # See documents on `mindustryVersion` and `mindustryBEVersion`. 21 | mindustryBE = false 22 | # Mindustry *release* version, e.g. `v145` or `v146`. 23 | # Leave empty if `mindustryBE = true`. 24 | mindustryVersion = v146 25 | # Mindustry *bleeding-edge* version, corresponds to commit hashes of Anuken/MindustryJitpack, e.g. `345ea0d54de0aee6953a664468556f4fea1a7c4f`. 26 | # Leave empty if `mindustryBE = false`. 27 | mindustryBEVersion = 28 | # Arc version, should either follow `mindustryVersion` for release or whatever hash bleeding-edge Mindustry uses. 29 | arcVersion = v146 30 | 31 | ##### Android SDK configuration for building Android artifacts. 32 | # Android platform SDK version. 33 | androidSdkVersion = 35 34 | # Android build-tools version. 35 | androidBuildVersion = 35.0.0 36 | # Android platform minimum API version. Should be left as 14, as that's what Mindustry officially supports. 37 | androidMinVersion = 14 38 | 39 | ##### Other stuff that should be left as-is. 40 | # Enable parallel compilation. 41 | org.gradle.parallel = true 42 | # Necessary internal API access for EntityAnno. 43 | org.gradle.jvmargs = \ 44 | -Dfile.encoding=UTF-8 \ 45 | --add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \ 46 | --add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED \ 47 | --add-opens=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED \ 48 | --add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED \ 49 | --add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \ 50 | --add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \ 51 | --add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \ 52 | --add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \ 53 | --add-opens=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED \ 54 | --add-opens=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED \ 55 | --add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED \ 56 | --add-opens=java.base/sun.reflect.annotation=ALL-UNNAMED -------------------------------------------------------------------------------- /src/animalia/type/GroupSpawner.java: -------------------------------------------------------------------------------- 1 | package animalia.type; 2 | 3 | import animalia.type.unit.AnimalType; 4 | import arc.func.Boolf; 5 | import arc.math.Mathf; 6 | import arc.struct.Seq; 7 | import mindustry.Vars; 8 | import mindustry.world.Tile; 9 | 10 | public class GroupSpawner { 11 | public static Seq spawners = new Seq<>(); 12 | public Seq types = new Seq<>(); 13 | public float spawnChance = 0.0001f; 14 | 15 | public GroupSpawner(){ 16 | spawners.add(this); 17 | } 18 | 19 | public void update(Tile t){ 20 | if(invalidateSpawn(t)) return; 21 | 22 | for(SpawnableAnimal s : types) { 23 | if (validateSpawn(t, s)) { 24 | s.map.add(t); 25 | } 26 | } 27 | } 28 | 29 | public Seq tileLinked8(Tile t, Boolf bool){ 30 | Seq tiles = new Seq<>(); 31 | 32 | for(int x = -1; x < 2; x++){ 33 | for(int y = -1; y < 2; y++){ 34 | Tile tile = Vars.world.tile(t.x + x, t.y + y); 35 | if(tile != null && tile != t && bool.get(tile)) tiles.add(tile); 36 | } 37 | } 38 | 39 | return tiles; 40 | } 41 | 42 | public SpawnableAnimal sort(){ 43 | Seq valids = types.select(s -> s.canSpawn()); 44 | Seq chances = new Seq<>(); 45 | 46 | if(valids.size < 1) return null; 47 | 48 | float total = 0; 49 | 50 | for(int i = 0; i < valids.size; i++){ 51 | float v = valids.get(i).type.spawnChance; 52 | 53 | chances.add(v); 54 | total += v; 55 | } 56 | 57 | float r = Mathf.random(total); 58 | int i = 0; 59 | 60 | while(r > chances.get(i)){ 61 | r -= chances.get(i); 62 | i++; 63 | } 64 | 65 | return valids.get(i); 66 | } 67 | 68 | public void spawn(){ 69 | 70 | } 71 | 72 | public void push(AnimalType type){ 73 | types.add(new SpawnableAnimal(type)); 74 | } 75 | 76 | public boolean invalidateSpawn(Tile t){ 77 | return t.solid() || !t.floor().isLiquid; 78 | } 79 | 80 | public boolean validateSpawn(Tile t, SpawnableAnimal s){ 81 | return s.type.spawnsOn.contains(t.floor()) && 82 | tileLinked8(t, tile -> !tile.solid() && !tile.floor().isLiquid).size > 0; 83 | } 84 | 85 | public static class SpawnableAnimal { 86 | public AnimalType type; 87 | public Seq map = new Seq<>(); 88 | 89 | public SpawnableAnimal(AnimalType type){ 90 | this.type = type; 91 | } 92 | 93 | public boolean canSpawn(){ 94 | return !Vars.state.isEditor() && Vars.state.isPlaying() && (type.unlocked() || !Vars.state.isCampaign()); 95 | } 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /src/animalia/content/Consequences.java: -------------------------------------------------------------------------------- 1 | package animalia.content; 2 | 3 | import arc.Core; 4 | import arc.audio.Sound; 5 | import arc.math.Mathf; 6 | import arc.math.geom.Geometry; 7 | import arc.struct.Seq; 8 | import arc.util.Tmp; 9 | import arc.graphics.Color; 10 | 11 | import mindustry.entities.Damage; 12 | import mindustry.entities.Effect; 13 | import mindustry.entities.Lightning; 14 | import mindustry.game.Team; 15 | import mindustry.gen.Building; 16 | import mindustry.gen.Groups; 17 | import mindustry.gen.WeatherState; 18 | import mindustry.graphics.Pal; 19 | import mindustry.world.blocks.storage.CoreBlock; 20 | 21 | import animalia.sound.AniSounds; 22 | import animalia.type.Consequence; 23 | import animalia.world.power.DischargeReceptor; 24 | import animalia.world.power.DischargeReceptor.*; 25 | 26 | public class Consequences { 27 | public static class Thunder extends Consequence { 28 | float damage = 500f, damageRadius = 200f; 29 | int thunders = 1, thunderShake = 20; 30 | 31 | Effect thunderEffect = AniFx.thunder; 32 | Sound thunderSound = AniSounds.thunder2; 33 | 34 | public Thunder(){ 35 | super("thunder"); 36 | } 37 | 38 | public void effects(float x, float y){ 39 | Effect.shake(thunderShake, thunderShake, x, y); 40 | thunderEffect.at(x, y); 41 | thunderSound.at(x, y); 42 | 43 | if(Tmp.r1.setCentered(x, y, Core.camera.width, Core.camera.height).overlaps(Core.camera.bounds(Tmp.r2))){ 44 | AniFx.lightning.at(x, y, 0, Color.white); 45 | } 46 | } 47 | 48 | @Override 49 | public void update(WeatherState state){ 50 | Seq builds = new Seq<>(); 51 | 52 | Groups.build.each(e -> { 53 | if(!(e.block instanceof CoreBlock)) builds.add(e); 54 | }); 55 | 56 | for(int i = 0; i < Math.max(1, Math.round(Math.random() * thunders)); i++){ 57 | Building build = builds.select(e -> e != null && e.isValid()).random(); 58 | 59 | if(build == null) return; 60 | 61 | ReceptorBuild closestReceptor = (ReceptorBuild) Geometry.findClosest(build.x, build.y, builds.select(e -> e.isValid() && e instanceof ReceptorBuild)); 62 | 63 | if(closestReceptor != null && closestReceptor.enabled && build.within(closestReceptor, ((DischargeReceptor) closestReceptor.block).range)){ 64 | closestReceptor.charge(damage); 65 | effects(closestReceptor.x, closestReceptor.y + closestReceptor.offsetY() * 2.2f); 66 | 67 | return; 68 | } 69 | 70 | effects(build.x, build.y); 71 | Damage.damage(build.x, build.y, damageRadius, damage); 72 | 73 | for(int e = 0; e < Math.random() * 20; e++){ 74 | Lightning.create(Team.derelict, Pal.lancerLaser, damage / 20, build.x, build.y, Mathf.random() * 360, 35); 75 | } 76 | } 77 | } 78 | } 79 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | logs/ 2 | /core/assets/mindustry-saves/ 3 | /core/assets/mindustry-maps/ 4 | /core/assets/bundles/output/ 5 | /core/assets/.gifimages/ 6 | /deploy/ 7 | /desktop/packr-out/ 8 | /desktop/packr-export/ 9 | /desktop/mindustry-saves/ 10 | /desktop/mindustry-maps/ 11 | /desktop/gifexport/ 12 | /core/lib/ 13 | /ios/assets/ 14 | /core/assets-raw/sprites/generated/ 15 | /core/assets-raw/sprites_out/ 16 | /annotations/build/ 17 | /annotations/out/ 18 | /net/build/ 19 | /tools/build/ 20 | /tests/build/ 21 | /server/build/ 22 | /test_files/ 23 | /annotations/build/ 24 | /desktop-sdl/build/ 25 | desktop-sdl/build/ 26 | /android/assets/mindustry-maps/ 27 | /android/assets/mindustry-saves/ 28 | /core/assets/gifexport/ 29 | /core/assets/version.properties 30 | /core/assets/locales 31 | /ios/src/io/anuke/mindustry/gen/ 32 | /core/src/io/anuke/mindustry/gen/ 33 | ios/robovm.properties 34 | packr-out/ 35 | config/ 36 | *.gif 37 | 38 | version.properties 39 | 40 | .attach_* 41 | ## Java 42 | 43 | *.class 44 | *.war 45 | *.ear 46 | hs_err_pid* 47 | crash-report-* 48 | 49 | ## Robovm 50 | /ios/robovm-build/ 51 | 52 | ## GWT 53 | /html/war/ 54 | /html/gwt-unitCache/ 55 | .apt_generated/ 56 | .gwt/ 57 | gwt-unitCache/ 58 | www-test/ 59 | .gwt-tmp/ 60 | 61 | ## Android Studio and Intellij and Android in general 62 | /android/libs/armeabi/ 63 | /android/libs/armeabi-v7a/ 64 | /android/libs/arm64-v8a/ 65 | /android/libs/x86/ 66 | /android/libs/x86_64/ 67 | /android/gen/ 68 | .idea/ 69 | *.ipr 70 | *.iws 71 | *.iml 72 | /android/out/ 73 | com_crashlytics_export_strings.xml 74 | 75 | ## Eclipse 76 | 77 | .classpath 78 | .project 79 | .metadata/ 80 | /android/bin/ 81 | /core/bin/ 82 | /desktop/bin/ 83 | /html/bin/ 84 | /ios/bin/ 85 | /ios-moe/bin/ 86 | *.tmp 87 | *.bak 88 | *.swp 89 | *~.nib 90 | .settings/ 91 | .loadpath 92 | .externalToolBuilders/ 93 | *.launch 94 | 95 | ## NetBeans 96 | 97 | /nbproject/private/ 98 | /android/nbproject/private/ 99 | /core/nbproject/private/ 100 | /desktop/nbproject/private/ 101 | /html/nbproject/private/ 102 | /ios/nbproject/private/ 103 | /ios-moe/nbproject/private/ 104 | 105 | /build/ 106 | /android/build/ 107 | /core/build/ 108 | /desktop/build/ 109 | /html/build/ 110 | /ios/build/ 111 | /ios-moe/build/ 112 | 113 | /nbbuild/ 114 | /android/nbbuild/ 115 | /core/nbbuild/ 116 | /desktop/nbbuild/ 117 | /html/nbbuild/ 118 | /ios/nbbuild/ 119 | /ios-moe/nbbuild/ 120 | 121 | /dist/ 122 | /android/dist/ 123 | /core/dist/ 124 | /desktop/dist/ 125 | /html/dist/ 126 | /ios/dist/ 127 | /ios-moe/dist/ 128 | 129 | /nbdist/ 130 | /android/nbdist/ 131 | /core/nbdist/ 132 | /desktop/nbdist/ 133 | /html/nbdist/ 134 | /ios/nbdist/ 135 | /ios-moe/nbdist/ 136 | 137 | nbactions.xml 138 | nb-configuration.xml 139 | 140 | ## Gradle 141 | 142 | /local.properties 143 | .gradle/ 144 | gradle-app.setting 145 | /build/ 146 | /android/build/ 147 | /core/build/ 148 | /desktop/build/ 149 | /html/build/ 150 | /ios/build/ 151 | /ios-moe/build/ 152 | 153 | ## OS Specific 154 | .DS_Store 155 | Thumbs.db 156 | android/libs/ 157 | -------------------------------------------------------------------------------- /src/animalia/ui/AniUI.java: -------------------------------------------------------------------------------- 1 | package animalia.ui; 2 | 3 | import animalia.ui.dialogs.ReportDialog; 4 | import arc.Core; 5 | import arc.struct.Seq; 6 | import mindustry.Vars; 7 | import animalia.ui.fragments.CataclysmFragment; 8 | import animalia.ui.fragments.TemperatureFragment; 9 | import mindustry.world.meta.Stat; 10 | import mindustry.world.meta.StatValue; 11 | import mindustry.world.meta.Stats; 12 | 13 | public class AniUI { 14 | public static CataclysmFragment cataclysmFrag; 15 | public static TemperatureFragment tempFrag; 16 | 17 | public static ReportDialog reportDialog; 18 | 19 | public AniUI(){ 20 | 21 | } 22 | 23 | public static void load(){ 24 | cataclysmFrag = new CataclysmFragment(); 25 | tempFrag = new TemperatureFragment(); 26 | reportDialog = new ReportDialog(); 27 | 28 | cataclysmFrag.build(Vars.ui.hudGroup); 29 | tempFrag.build(Vars.ui.hudGroup); 30 | 31 | reportDialog.load(); 32 | 33 | AniLinks.load(); 34 | 35 | if(!Core.settings.has("reportcrash")) Core.settings.put("reportcrash", true); 36 | if(!Core.settings.has("entryweathers")) Core.settings.put("entryweathers", true); 37 | 38 | Vars.ui.settings.game.checkPref( 39 | "reportcrash", 40 | Core.settings.getBool("reportcrash"), 41 | bool -> Core.settings.put("reportcrash", bool) 42 | ); 43 | 44 | Vars.ui.settings.game.checkPref( 45 | "entryweathers", 46 | Core.settings.getBool("entryweathers"), 47 | bool -> Core.settings.put("entryweathers", bool) 48 | ); 49 | } 50 | 51 | public static void addStats(Stats stats, Stat main, boolean keepStat, String... values){ 52 | stats.add(main, table -> { 53 | table.clear(); 54 | table.left(); 55 | 56 | table.table(t -> { 57 | for(String e : values) { 58 | t.add(e).left(); 59 | t.row(); 60 | } 61 | 62 | if (keepStat) { 63 | t.row(); 64 | t.table(tt -> { 65 | Seq stat = stats.toMap().get(main.category).get(main); 66 | 67 | tt.add("[lightgray]" + main.localized() + (main.localized().endsWith(":") ? " " : ":[] ")); 68 | 69 | if (stat.size < 2) { 70 | t.add(values[0]).left(); 71 | } else { 72 | stat.get(0).display(tt); 73 | tt.left(); 74 | } 75 | 76 | tt.pack(); 77 | }).growX().left(); 78 | } 79 | }).fillX(); 80 | }); 81 | } 82 | 83 | public static String statValue(String stat, String value){ 84 | return "[lightgray]" + Core.bundle.get(stat) + (stat.endsWith(":") ? " " : ":[] ") + value; 85 | } 86 | 87 | public static String statValueBundle(String stat, String value){ 88 | return statValue(stat, Core.bundle.get(value)); 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /src/animalia/type/weather/StormCataclysm.java: -------------------------------------------------------------------------------- 1 | package animalia.type.weather; 2 | 3 | import arc.Core; 4 | import arc.audio.Sound; 5 | import arc.graphics.Color; 6 | import arc.graphics.g2d.TextureRegion; 7 | import arc.math.Mathf; 8 | import arc.util.Time; 9 | import mindustry.Vars; 10 | import mindustry.content.Liquids; 11 | import mindustry.content.StatusEffects; 12 | import mindustry.gen.Sounds; 13 | import mindustry.gen.WeatherState; 14 | import mindustry.graphics.Pal; 15 | import mindustry.type.Liquid; 16 | import animalia.content.AniFx; 17 | import animalia.sound.AniSounds; 18 | 19 | import static animalia.Animalia.sfxvol; 20 | 21 | public class StormCataclysm extends ParticleCataclysm { 22 | public float lightningChance = 0.012f, rainSizeMin = 18f, rainSizeMax = 40f, rainDensity = 900f, stroke = 0.8f; 23 | public Liquid liquid = Liquids.water; 24 | public TextureRegion[] splashes = new TextureRegion[12]; 25 | public Color rainColor = Color.valueOf("7a95eaff"); 26 | public Sound lightningSound = AniSounds.thunder1; 27 | 28 | public StormCataclysm(String name){ 29 | super(name); 30 | 31 | yspeed = -9f; 32 | xspeed = -10f; 33 | density = 20000f; 34 | minAlpha = 0.02f; 35 | maxAlpha = 0.12f; 36 | sizeMin = 75f; 37 | sizeMax = 100f; 38 | 39 | baseSpeed = 6.2f; 40 | force = 0.3f; 41 | soundVol = 0.9f; 42 | padding = 18f; 43 | duration = 9f * Time.toMinutes; 44 | 45 | particleRegion = "particle"; 46 | color = Color.valueOf("a1b1d0ff"); 47 | drawNoise = false; 48 | useWindVector = true; 49 | status = StatusEffects.wet; 50 | sound = Sounds.rain; 51 | } 52 | 53 | @Override 54 | public void load(){ 55 | super.load(); 56 | 57 | for(int i = 0; i < splashes.length; i++) { 58 | splashes[i] = Core.atlas.find("splash-" + i); 59 | } 60 | } 61 | 62 | @Override 63 | public void update(WeatherState state){ 64 | super.update(state); 65 | 66 | if(Mathf.chanceDelta(lightningChance * state.opacity * state.intensity / 2)){ 67 | AniFx.lightning.at(Core.camera.position.x, Core.camera.position.y, Pal.lancerLaser); 68 | 69 | if(Mathf.chanceDelta(1 - (lightningChance * 10))){ 70 | float mag = (float) Math.random() * 5; 71 | 72 | if(mag > 1f && !Vars.headless) Vars.renderer.shake(mag, mag * 2); 73 | 74 | if(mag > 3.5f){ 75 | lightningSound.play(sfxvol(mag / 5), 0.6f + (float) Math.random() * 0.5f, Mathf.random(-0.5f, 0.5f)); 76 | 77 | if(Mathf.chanceDelta(0.5f)) updateConsequences(state); 78 | } 79 | } 80 | } 81 | } 82 | 83 | @Override 84 | public void drawOver(WeatherState state){ 85 | drawRain(rainSizeMin, rainSizeMax, -xspeed, -yspeed, rainDensity, state.intensity, stroke, rainColor); 86 | super.drawOver(state); 87 | } 88 | 89 | @Override 90 | public void drawUnder(WeatherState state){ 91 | drawSplashes(splashes, sizeMax, rainDensity * 1.15f, state.intensity, state.opacity, padding, stroke, rainColor, liquid); 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | @rem SPDX-License-Identifier: Apache-2.0 17 | @rem 18 | 19 | @if "%DEBUG%"=="" @echo off 20 | @rem ########################################################################## 21 | @rem 22 | @rem Gradle startup script for Windows 23 | @rem 24 | @rem ########################################################################## 25 | 26 | @rem Set local scope for the variables with windows NT shell 27 | if "%OS%"=="Windows_NT" setlocal 28 | 29 | set DIRNAME=%~dp0 30 | if "%DIRNAME%"=="" set DIRNAME=. 31 | @rem This is normally unused 32 | set APP_BASE_NAME=%~n0 33 | set APP_HOME=%DIRNAME% 34 | 35 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 36 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 37 | 38 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 39 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 40 | 41 | @rem Find java.exe 42 | if defined JAVA_HOME goto findJavaFromJavaHome 43 | 44 | set JAVA_EXE=java.exe 45 | %JAVA_EXE% -version >NUL 2>&1 46 | if %ERRORLEVEL% equ 0 goto execute 47 | 48 | echo. 1>&2 49 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 50 | echo. 1>&2 51 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2 52 | echo location of your Java installation. 1>&2 53 | 54 | goto fail 55 | 56 | :findJavaFromJavaHome 57 | set JAVA_HOME=%JAVA_HOME:"=% 58 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 59 | 60 | if exist "%JAVA_EXE%" goto execute 61 | 62 | echo. 1>&2 63 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 64 | echo. 1>&2 65 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2 66 | echo location of your Java installation. 1>&2 67 | 68 | goto fail 69 | 70 | :execute 71 | @rem Setup the command line 72 | 73 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 74 | 75 | 76 | @rem Execute Gradle 77 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 78 | 79 | :end 80 | @rem End local scope for the variables with windows NT shell 81 | if %ERRORLEVEL% equ 0 goto mainEnd 82 | 83 | :fail 84 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 85 | rem the _cmd.exe /c_ return code! 86 | set EXIT_CODE=%ERRORLEVEL% 87 | if %EXIT_CODE% equ 0 set EXIT_CODE=1 88 | if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% 89 | exit /b %EXIT_CODE% 90 | 91 | :mainEnd 92 | if "%OS%"=="Windows_NT" endlocal 93 | 94 | :omega -------------------------------------------------------------------------------- /src/animalia/world/crafting/GeneticReconstructor.java: -------------------------------------------------------------------------------- 1 | package animalia.world.crafting; 2 | 3 | import animalia.type.unit.AnimalType; 4 | import arc.graphics.g2d.Draw; 5 | import arc.scene.ui.layout.Table; 6 | import arc.util.Nullable; 7 | import arc.util.Tmp; 8 | import arc.util.io.Reads; 9 | import arc.util.io.Writes; 10 | import mindustry.Vars; 11 | import mindustry.gen.Building; 12 | import mindustry.type.Item; 13 | import mindustry.type.UnitType; 14 | import mindustry.world.blocks.ItemSelection; 15 | import mindustry.world.blocks.production.GenericCrafter; 16 | 17 | public class GeneticReconstructor extends GenericCrafter { 18 | public GeneticReconstructor(String name){ 19 | super(name); 20 | 21 | configurable = true; 22 | allowConfigInventory = true; 23 | saveConfig = true; 24 | 25 | configClear(b -> ((GeneticBuild) b).type = null); 26 | 27 | config(UnitType.class, (build, unit) -> { 28 | if(unitValid(unit)){ 29 | ((GeneticBuild) build).type = (AnimalType) unit; 30 | } 31 | }); 32 | } 33 | 34 | public boolean unitValid(UnitType u){ 35 | return (u instanceof AnimalType a) && a.egg != null && !a.isHidden() && !a.isBanned(); 36 | } 37 | 38 | public class GeneticBuild extends GenericCrafter.GenericCrafterBuild { 39 | public @Nullable AnimalType type; 40 | 41 | @Override 42 | public boolean shouldConsume(){ 43 | return type != null && !items.has(type.egg); 44 | } 45 | 46 | @Override 47 | public void updateTile(){ 48 | super.updateTile(); 49 | dump(); 50 | } 51 | 52 | @Override 53 | public void craft(){ 54 | consume(); 55 | 56 | if(type != null){ 57 | offload(type.egg); 58 | } 59 | 60 | if(wasVisible){ 61 | craftEffect.at(x, y); 62 | } 63 | 64 | progress %= 1; 65 | } 66 | 67 | @Override 68 | public void buildConfiguration(Table table){ 69 | ItemSelection.buildTable(block, table, Vars.content.units().select(u -> unitValid(u)), this::config, i -> { 70 | configure(i); 71 | progress = 0; 72 | }, false); 73 | } 74 | 75 | @Override 76 | public void drawConfigure(){ 77 | super.drawConfigure(); 78 | 79 | if(type != null) { 80 | Tmp.v1.trns(rotdeg(), (block.size / 2 * Vars.tilesize) + Vars.tilesize / 2 + (type.fullIcon.width * Draw.scl * Draw.xscl / 2)).add(x, y); 81 | Draw.rect(type.fullIcon, Tmp.v1.x, Tmp.v1.y); 82 | } 83 | } 84 | 85 | @Override 86 | public boolean canDump(Building to, Item item){ 87 | return !block.consumesItem(item); 88 | } 89 | 90 | @Override 91 | public AnimalType config(){ 92 | return type; 93 | } 94 | 95 | @Override 96 | public void write(Writes write){ 97 | super.write(write); 98 | write.s(type != null ? type.id : -1); 99 | } 100 | 101 | @Override 102 | public void read(Reads read, byte revision){ 103 | super.read(read, revision); 104 | type = (AnimalType) Vars.content.unit(read.s()); 105 | } 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /assets/bundles/bundle_uk_UA.properties: -------------------------------------------------------------------------------- 1 | # Blocks 2 | ## Crafting 3 | block.animalia-bioreactor.name = Біореактор 4 | block.animalia-bioreactor.description = Перетворює речовини, що містяться в спорах, у розчин, багатий хімічними речовинами. 5 | block.animalia-carbonizer.name = Карбонізатор 6 | block.animalia-carbonizer.description = Карбонізує нитку органічного матеріалу, перетворюючись на нитку з вуглецевого волокна. 7 | block.animalia-eggshell-printer.name = Принтер яєчної шкарлупи 8 | block.animalia-eggshell-printer.description = Своєрідний 3D-принтер, який створює яєчну шкаралупу. 9 | block.animalia-genetic-reconstructor.name = Генетичний реконструктор 10 | block.animalia-genetic-reconstructor.description = Виконує генетичний синтез за допомогою передової інженерії, модифікує та створює гени для створення певного яйця. 11 | 12 | ## Power 13 | block.animalia-converter.name = Конвертер 14 | block.animalia-converter.description = Перетворює хімічну енергію, вироблену хлорофіловим реактором, в енергію. Треба доторкнутися до хлорофілового реактора для початку роботи. 15 | 16 | ## Production 17 | block.animalia-chlorophyll-panel.name = Хлорофіловий реактор 18 | block.animalia-chlorophyll-panel.description = Виробляє хімічну енергію шляхом штучного фотосинтезу для перетворення в енергію за допомогою конвертера. 19 | block.animalia-chlorophyll-synthesizer.name = Синтезатор хлорофілу 20 | block.animalia-chlorophyll-synthesizer.description = Використовує хімічні речовини живильного розчину для створення зеленої органічної сполуки, відомої як хлорофіл. 21 | 22 | # Turrets 23 | block.animalia-egg-thrower.name = Яйцеметник 24 | block.animalia-egg-thrower.description = Швидко кидає яєчну шкаралупу у найближчих ворогів. 25 | 26 | # Liquids 27 | liquid.animalia-nutritive-solution.name = Живильний розчин 28 | liquid.anumalia-nutritive-solution.description = Багатий мінералами та поживними речовинами. Використовується для синтезу ДНК кожного яйця. 29 | 30 | ## Units 31 | block.animalia-incubator.name = Інкубатор 32 | block.animalia-incubator.description = Використовує енергію, щоби зберегти яйце теплим, поки воно не вилупиться. Може висиджувати лише одне яйце за раз. 33 | 34 | # Items 35 | ## General 36 | item.animalia-carbon-fiber.name = Вуглецеве волокно 37 | item.animalia-carbon-fiber.description = 38 | item.animalia-chlorophyll.name = Хлорофіл 39 | item.animalia-chlorophyll.description = Зелена органічна сполука, здатна поглинати світло, перетворюючи його в хімічну енергію. 40 | 41 | ## Eggs 42 | item.animalia-eggshell.name = Яєчна шкаралупа 43 | item.animalia-eggshell.description = Тільки яєчна шкаралупа. Використовується в виготовленні кожного яйця. 44 | item.animalia-frog-egg.name = Жаб'яче яйце 45 | item.animalia-frog-egg.description = Своєрідне синтетичне яйце, яке не відповідає шляху, яким народжуються деякі тварини, але використовує передові технології для імітації середовища, де тварина найкраще розвивається. 46 | 47 | # Liquids 48 | liquid.animalia-nutritive-solution.name = Живильний розчин 49 | liquid.anumalia-nutritive-solution.description = Багатий мінералами та поживними речовинами. Використовується для синтезу ДНК кожної яйцеклітини. 50 | 51 | # Animals 52 | ## Ground 53 | unit.animalia-frog.name = Жаба 54 | unit.animalia-frog.description = Високо стрибає. Також є шанс появи жаби на березі. Вам пощастить, якщо жаба буде доброзичловою. Якщо це станеться, то ви зможете керувати нею.\Але вони не люблять, щоб ними керували... 55 | unit.animalia-frog.details = Жабка 56 | 57 | # UI 58 | stat.swim = Плаває 59 | stat.jump = Плигає 60 | 61 | bar.hatch = Прогрес вилуплення 62 | bar.chemicalEnergy = Хімічна енергія -------------------------------------------------------------------------------- /src/animalia/type/weather/ParticleCataclysm.java: -------------------------------------------------------------------------------- 1 | package animalia.type.weather; 2 | 3 | import arc.Core; 4 | import arc.graphics.Color; 5 | import arc.graphics.Texture; 6 | import arc.graphics.g2d.TextureRegion; 7 | import arc.util.Nullable; 8 | import arc.util.Time; 9 | import arc.util.Tmp; 10 | import mindustry.gen.Groups; 11 | import mindustry.gen.Unit; 12 | import mindustry.gen.WeatherState; 13 | import animalia.type.Cataclysm; 14 | 15 | /* 16 | * Stole from source code obviously 17 | */ 18 | 19 | public class ParticleCataclysm extends Cataclysm { 20 | public String particleRegion = "circle-shadow"; 21 | public Color color = Color.white.cpy(); 22 | public TextureRegion region; 23 | public float yspeed = -2f, xspeed = 0.25f, padding = 16f, sizeMin = 2.4f, sizeMax = 12f, density = 1200f, minAlpha = 1f, maxAlpha = 1f, force = 0, noiseScale = 2000f, baseSpeed = 6.1f; 24 | public float sinSclMin = 30f, sinSclMax = 80f, sinMagMin = 1f, sinMagMax = 7f; 25 | 26 | public Color noiseColor = color; 27 | public boolean drawNoise = false, drawParticles = true, useWindVector = false, randomParticleRotation = false; 28 | public int noiseLayers = 1; 29 | public float noiseLayerSpeedM = 1.1f, noiseLayerAlphaM = 0.8f, noiseLayerSclM = 0.99f, noiseLayerColorM = 1f; 30 | public String noisePath = "noiseAlpha"; 31 | public @Nullable Texture noise; 32 | 33 | ParticleCataclysm(String name) { 34 | super(name); 35 | } 36 | 37 | @Override 38 | public void load(){ 39 | super.load(); 40 | 41 | region = Core.atlas.find(particleRegion); 42 | 43 | //load noise texture 44 | if(drawNoise && Core.assets != null){ 45 | Core.assets.load("sprites/" + noisePath + ".png", Texture.class); 46 | } 47 | } 48 | 49 | @Override 50 | public void update(WeatherState state){ 51 | super.update(state); 52 | 53 | float speed = force * state.intensity * Time.delta; 54 | if(speed > 0.001f){ 55 | float windx = state.windVector.x * speed, windy = state.windVector.y * speed; 56 | 57 | for(Unit unit : Groups.unit){ 58 | unit.impulse(windx, windy); 59 | } 60 | } 61 | } 62 | 63 | @Override 64 | public void drawOver(WeatherState state){ 65 | 66 | float windx, windy; 67 | if(useWindVector){ 68 | float speed = baseSpeed * state.intensity; 69 | windx = state.windVector.x * speed; 70 | windy = state.windVector.y * speed; 71 | }else{ 72 | windx = this.xspeed; 73 | windy = this.yspeed; 74 | } 75 | 76 | if(drawNoise){ 77 | if(noise == null){ 78 | noise = Core.assets.get("sprites/" + noisePath + ".png", Texture.class); 79 | noise.setWrap(Texture.TextureWrap.repeat); 80 | noise.setFilter(Texture.TextureFilter.linear); 81 | } 82 | 83 | float sspeed = 1f, sscl = 1f, salpha = 1f, offset = 0f; 84 | Color col = Tmp.c1.set(noiseColor); 85 | for(int i = 0; i < noiseLayers; i++){ 86 | drawNoise(noise, noiseColor, noiseScale * sscl, state.opacity * salpha * opacityMultiplier, sspeed * (useWindVector ? 1f : baseSpeed), state.intensity, windx, windy, offset); 87 | sspeed *= noiseLayerSpeedM; 88 | salpha *= noiseLayerAlphaM; 89 | sscl *= noiseLayerSclM; 90 | offset += 0.29f; 91 | col.mul(noiseLayerColorM); 92 | } 93 | } 94 | 95 | if(drawParticles){ 96 | drawParticles(region, color, sizeMin, sizeMax, density, state.intensity, state.opacity, windx, windy, minAlpha, maxAlpha, sinSclMin, sinSclMax, sinMagMin, sinMagMax, randomParticleRotation); 97 | } 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /src/animalia/ui/dialogs/ReportDialog.java: -------------------------------------------------------------------------------- 1 | package animalia.ui.dialogs; 2 | 3 | import arc.Core; 4 | import arc.files.Fi; 5 | import arc.scene.ui.Dialog; 6 | import arc.struct.Seq; 7 | import arc.util.Align; 8 | import arc.util.Strings; 9 | import arc.util.Structs; 10 | import mindustry.gen.Icon; 11 | import mindustry.gen.Tex; 12 | import mindustry.graphics.Pal; 13 | import mindustry.ui.Styles; 14 | 15 | public class ReportDialog extends Dialog { 16 | private static String latest = ""; 17 | 18 | public ReportDialog(){ 19 | super(""); 20 | 21 | cont.add("@dialog.animalia-report.name", Styles.defaultLabel, 1).padLeft(4).center(); 22 | cont.row(); 23 | cont.image(Tex.whiteui, Pal.heal).growX().height(5).pad(5).padTop(8).width(500).align(Align.center); 24 | cont.row(); 25 | cont.add("@dialog.animalia-report.description").width(500).wrap().pad(10).get().setAlignment(Align.center, Align.center); 26 | cont.row(); 27 | 28 | cont.table(t -> { 29 | t.button("@back", Icon.left, this::hide).size(200, 54).pad(8).padTop(6).align(Align.center); 30 | 31 | t.button("@report", Icon.link, () -> { 32 | 33 | Core.app.openURI(URL()); 34 | 35 | }).size(200, 54).pad(8).padTop(6).align(Align.center); 36 | }); 37 | } 38 | 39 | public void load(){ 40 | int length = 0; 41 | 42 | try { 43 | length = Core.settings.getDataDirectory().child("crashes").file().listFiles().length; 44 | } catch(Throwable ignore) {} 45 | 46 | if(!Core.settings.has("crashcounter")){ 47 | Core.settings.put("crashcounter", length); 48 | } 49 | 50 | if( 51 | Core.settings.getInt("crashcounter") < length && 52 | Core.settings.getBool("reportcrash") && 53 | (latest = latestCrash()).contains("animalia.") 54 | ){ 55 | show(); 56 | Core.settings.put("crashcounter", length); 57 | }; 58 | } 59 | 60 | public static String URL(){ 61 | return "https://github.com/FlinTyX/Animalia/issues/new?assignees=&labels=bug&body=" + 62 | Strings.encode(Strings.format( 63 | """ 64 | ###### @FlinTyX , the guy that will try to fix your issue 65 | 66 | --- 67 | 68 | **Issue**: *Explain your issue in detail.* 69 | 70 | **Steps to reproduce**: *How you happened across the issue, and what exactly you did to make the bug happen.* 71 | 72 | --- 73 | 74 | *Place an X (no spaces) between the brackets to confirm that you have read the line below.* 75 | - [ ] **I have updated to the latest release (https://github.com/FlinTyX/Animalia/releases) to make sure my issue has not been fixed.** 76 | - [ ] **I have searched the closed and open issues to make sure that this problem has not already been reported.** 77 | 78 | ###### Latest crash found: 79 | ``` 80 | @ 81 | ``` 82 | """, "@", latest 83 | ) 84 | ); 85 | } 86 | 87 | public long parseDate(Fi fi){ 88 | return Strings.parseLong(fi.name().replaceAll("[^0-9]", ""), 0); 89 | } 90 | 91 | public String latestCrash(){ 92 | try { 93 | Seq files = Core.settings.getDataDirectory().child("crashes").seq(); 94 | 95 | Fi first = files.max(Structs.comparingLong(e -> parseDate(e))); 96 | 97 | return "Crash: " + first.toString().substring(62) + "\n\n".concat(first.readString()); 98 | } catch(Exception e){ 99 | return "Failed Loading Crashes: " + e.toString(); 100 | } 101 | } 102 | } -------------------------------------------------------------------------------- /src/animalia/content/AniFx.java: -------------------------------------------------------------------------------- 1 | package animalia.content; 2 | 3 | import arc.*; 4 | import arc.graphics.*; 5 | import arc.graphics.g2d.*; 6 | import arc.math.*; 7 | import arc.util.Time; 8 | import arc.util.Tmp; 9 | import mindustry.entities.*; 10 | import mindustry.gen.Unit; 11 | import mindustry.graphics.*; 12 | 13 | public class AniFx { 14 | public static final Effect 15 | 16 | unitRemove = new Effect(10f, e -> { 17 | if(!(e.data instanceof Unit u)) return; 18 | 19 | float m = e.fout() * Draw.scl, 20 | w = u.type.fullIcon.width * m * Draw.scl, 21 | h = u.type.fullIcon.height * m * Draw.scl; 22 | 23 | Tmp.v1.trns(u.rotation, e.fin(Interp.fade) * Math.max(w, h) * 0.6f).add(e.x, e.y); 24 | 25 | Draw.rect(u.type.fullIcon, Tmp.v1.x, Tmp.v1.y, w, h, u.rotation - 90); 26 | }).layer(Layer.groundUnit), 27 | 28 | landSmoke = new Effect(25f, e -> { 29 | Draw.color(Pal.gray, Pal.lightishGray, e.finpow()); 30 | 31 | Angles.randLenVectors(e.id, 4, 10 * e.fin(), (x, y) -> { 32 | Fill.circle(e.x + x, e.y + y, 1.2f * e.fslope()); 33 | }); 34 | }).layer(Layer.groundUnit - 1), 35 | 36 | animalSound = new Effect(60f, e -> { 37 | Draw.color(Pal.darkestMetal); 38 | Draw.alpha(e.fout(Interp.pow10In)); 39 | Draw.rect("animalia-note-" + Mathf.floor(Mathf.randomSeed(e.id, 2)), e.x + Mathf.sin(Time.time, 6), 6 + e.y + (16 * e.fin())); 40 | }).layer(Layer.groundUnit + 0.01f), 41 | 42 | bioreactor = new Effect(75f, 80, e -> { 43 | Draw.color(Color.valueOf("9c88c3"), Color.valueOf("a387ea"), e.fin()); 44 | 45 | float fin = e.fin() * 1.1f * e.fout(Interp.pow10Out); 46 | 47 | Angles.randLenVectors(e.id, 15, 25 * e.fout(), (x, y) -> { 48 | Fill.circle(e.x + x, e.y + y, 1.2f * fin); 49 | Fill.circle(e.x + x/3, e.y + y/3, fin * 0.8f); 50 | }); 51 | }), 52 | 53 | hatchSmoke = new Effect(20f, e -> { 54 | Draw.color(e.color, Pal.lightishGray, e.fin()); 55 | 56 | Angles.randLenVectors(e.id, 8, 6 * e.finpow(), (x, y) -> { 57 | Fill.circle(e.x + x, e.y + y, 1.15f * e.fslope()); 58 | }); 59 | }).layer(Layer.block + 0.001f), 60 | 61 | thunder = new Effect(40f, 500, e -> { 62 | float 63 | w = 15 * e.fout(), 64 | w2 = w / 2, 65 | w3 = w2 * 0.7f, 66 | h = 130, 67 | r = Mathf.randomSeed(e.id, -2, 2) * e.fin(), 68 | ox = Core.camera.width / 2; 69 | 70 | 71 | Draw.color(Pal.lancerLaser, Color.purple, e.fin()); 72 | Drawf.tri(e.x, e.y, w, h, r); 73 | Drawf.tri(e.x, e.y, w, h, r + 180); 74 | 75 | Fill.circle(e.x, e.y, 14 * e.fout()); 76 | Fill.quad(e.x + w2, e.y, e.x - w2, e.y, e.x - w2 * 3, e.y + ox, e.x + w2 * 3, e.y + ox); 77 | 78 | Draw.color(); 79 | Fill.quad(e.x + w3, e.y, e.x - w3, e.y, e.x - w3 * 3, e.y + ox, e.x + w3 * 3, e.y + ox); 80 | Draw.color(Pal.meltdownHit, Pal.spore, e.fin()); 81 | 82 | Angles.randLenVectors(e.id, 15, 40 + 40 * e.finpow(), (x, y) -> { 83 | Fill.circle(e.x + x, e.y + y, 0.8f * e.fout()); 84 | }); 85 | 86 | Angles.randLenVectors(e.id, 15, 60 + (40 * e.fin()), (x, y) -> { 87 | Fill.circle(e.x + x, e.y + y, e.fout()); 88 | }); 89 | 90 | e.scaled(10, i -> { 91 | Lines.stroke(4 * i.fout()); 92 | Lines.circle(i.x, i.y, 90 * i.fin()); 93 | Lines.circle(i.x, i.y, 50 * e.fout()); 94 | }); 95 | }), 96 | 97 | lightning = new Effect(30f, e -> { 98 | e.scaled(15 + Mathf.randomSeed(e.id, 10), i -> { 99 | Draw.color(e.color, Pal.spore, i.fin()); 100 | Draw.alpha(Mathf.randomSeed(i.id, 0.8f) * i.fout()); 101 | Fill.square(i.x, i.y, Core.camera.width, Core.camera.height); 102 | }); 103 | }).layer(Layer.end); 104 | } 105 | -------------------------------------------------------------------------------- /src/animalia/world/power/DischargeReceptor.java: -------------------------------------------------------------------------------- 1 | package animalia.world.power; 2 | 3 | import arc.Core; 4 | import arc.graphics.Blending; 5 | import arc.graphics.g2d.Draw; 6 | import arc.graphics.g2d.TextureRegion; 7 | import arc.math.Mathf; 8 | import mindustry.Vars; 9 | import mindustry.gen.Building; 10 | import mindustry.gen.Call; 11 | import mindustry.graphics.Drawf; 12 | import mindustry.graphics.Layer; 13 | import mindustry.graphics.Pal; 14 | import mindustry.type.Category; 15 | import mindustry.world.blocks.power.PowerBlock; 16 | import mindustry.world.meta.Stat; 17 | 18 | public class DischargeReceptor extends PowerBlock { 19 | public float range = 180f, offsetY = 4.4f; 20 | public TextureRegion softShadowRegion, heatRegion, rodRegion; 21 | 22 | public DischargeReceptor(String name){ 23 | super(name); 24 | 25 | category = Category.power; 26 | sync = true; 27 | hasPower = true; 28 | consumesPower = false; 29 | } 30 | 31 | @Override 32 | public void load(){ 33 | super.load(); 34 | 35 | softShadowRegion = Core.atlas.find("circle-shadow"); 36 | heatRegion = Core.atlas.find(name + "-heat"); 37 | rodRegion = Core.atlas.find(name + "-rod"); 38 | } 39 | 40 | @Override 41 | public void setStats(){ 42 | super.setStats(); 43 | stats.remove(Stat.powerUse); 44 | } 45 | 46 | @Override 47 | public void drawPlace(int x, int y, int rotation, boolean valid){ 48 | super.drawPlace(x, y, rotation, valid); 49 | Drawf.dashCircle((x * Vars.tilesize) + offset, (y * Vars.tilesize) + offset, range, Pal.power); 50 | } 51 | 52 | public class ReceptorBuild extends Building { 53 | public float heat = 0; 54 | 55 | public float offsetY(){ 56 | return offsetY; 57 | } 58 | 59 | public void charge(float amount){ 60 | if(power != null){ 61 | power.graph.chargeBatteries(amount * 60); 62 | heat = 1f; 63 | 64 | if(power.graph.getBatteryStored() / power.graph.getTotalBatteryCapacity() == 1f){ 65 | power.graph.all.each(build -> { 66 | if(build.block instanceof PowerBlock){ 67 | Call.buildDestroyed(build); 68 | } 69 | }); 70 | } else if(Mathf.chanceDelta(0.2f)){ 71 | damage(20f); 72 | } 73 | } 74 | } 75 | 76 | @Override 77 | public void updateTile(){ 78 | super.updateTile(); 79 | 80 | if(power != null){ 81 | enabled = power.graph.batteries.size > 0f; 82 | heat = Mathf.lerpDelta(heat, 0f, 0.005f); 83 | } 84 | } 85 | 86 | @Override 87 | public void draw(){ 88 | super.draw(); 89 | float rad = 1.6f, size = 22 * Draw.scl; 90 | 91 | Draw.z(Layer.turret + 0.001f); 92 | Draw.color(0f, 0f, 0f, 0.34f); 93 | 94 | Draw.rect(softShadowRegion, this, size * rad * Draw.xscl, size * rad * Draw.yscl, rotdeg()); 95 | Draw.color(); 96 | 97 | Drawf.shadow( 98 | rodRegion, 99 | x - offsetY * 0.8f, 100 | y - offsetY * 0.8f, 101 | rodRegion.width * 0.8f * Draw.scl * Draw.xscl, 102 | rodRegion.height * 1.3f * Draw.scl * Draw.xscl, 103 | 130 104 | ); 105 | 106 | Draw.rect(rodRegion, x, y + offsetY / 2, 2.5f); 107 | 108 | if(heat > 0.0001f){ 109 | Draw.color(Pal.meltdownHit, heat); 110 | Draw.blend(Blending.additive); 111 | Draw.rect(heatRegion, x, y + offsetY / 2, 2.5f); 112 | Draw.blend(); 113 | Draw.color(); 114 | } 115 | } 116 | 117 | @Override 118 | public void drawSelect(){ 119 | Drawf.dashCircle(x, y, range, Pal.power); 120 | } 121 | } 122 | } -------------------------------------------------------------------------------- /src/animalia/world/environment/SeasonalTree.java: -------------------------------------------------------------------------------- 1 | package animalia.world.environment; 2 | 3 | import arc.Core; 4 | import arc.graphics.g2d.Draw; 5 | import arc.graphics.g2d.TextureRegion; 6 | import arc.math.Mathf; 7 | import arc.math.geom.Point3; 8 | import arc.struct.Seq; 9 | import arc.util.Time; 10 | import mindustry.Vars; 11 | import mindustry.gen.Building; 12 | import mindustry.graphics.Layer; 13 | import mindustry.world.Block; 14 | import mindustry.world.Tile; 15 | import mindustry.world.meta.BuildVisibility; 16 | 17 | public class SeasonalTree extends Block{ 18 | public int layers = 3; 19 | 20 | public TextureRegion[] 21 | regions = new TextureRegion[layers], 22 | shadows = new TextureRegion[layers]; 23 | 24 | public TextureRegion shadowRegion; 25 | 26 | public Seq branches = Seq.with( 27 | new Point3(6, 0, 0), new Point3(14, 0, 0), 28 | new Point3(19, -1, 0), new Point3(23, -5, 0), 29 | new Point3(22, -11, 0), new Point3(19, -19, 0), 30 | new Point3(30, -5, 0), new Point3(33, 2, 0), 31 | new Point3(-6, 5, 0), new Point3(-8, 12, 0), 32 | new Point3(-10, 18, 0), new Point3(-18, 22, 0) 33 | ); 34 | 35 | 36 | public SeasonalTree(String name){ 37 | super(name); 38 | 39 | solid = true; 40 | update = true; 41 | replaceable = false; 42 | destructible = false; 43 | targetable = false; 44 | clipSize = 500 * Draw.scl; 45 | 46 | buildVisibility = BuildVisibility.editorOnly; 47 | } 48 | 49 | @Override 50 | public TextureRegion[] icons(){ 51 | return regions; 52 | } 53 | 54 | @Override 55 | public void load(){ 56 | super.load(); 57 | 58 | for(int i = 0; i < layers; i++){ 59 | regions[i] = Core.atlas.find(name + "-" + i); 60 | shadows[i] = Core.atlas.find(name + "-shadow-" + i); 61 | } 62 | 63 | shadowRegion = Core.atlas.find("circle-shadow"); 64 | region = regions[0]; 65 | } 66 | 67 | @Override 68 | public boolean canBreak(Tile tile){ 69 | return Vars.state.isEditor(); 70 | } 71 | 72 | public class SeasonalTreeBuild extends Building implements SeasonalBlock { 73 | public Seq occupied = new Seq<>(); 74 | 75 | @Override 76 | public void draw(){ 77 | float fin = 1 - Core.camera.width / Core.graphics.getWidth(), 78 | f = Math.max(1, fin + 0.35f), 79 | scl = 40f, mag = 0.35f; 80 | 81 | for(int i = 0; i < layers; i++){ 82 | TextureRegion region = regions[i], shadow = shadows[i]; 83 | 84 | float w = region.width * region.scl() * f, 85 | h = region.height * region.scl() * f, 86 | step = 0.4f + (i + 1) / layers; 87 | 88 | //real shadow 89 | Draw.z(Layer.power + 0.5f); 90 | Draw.rect(shadow, x, y); 91 | 92 | //circle shadows & regions 93 | Draw.z(Layer.power + 1); 94 | Draw.color(0f, 0f, 0f, 0.3f - (fin * 0.35f)); 95 | Draw.rect(shadowRegion, x, y, 100, 100); 96 | Draw.color(); 97 | 98 | Draw.alpha(1 - (fin - (i < 1 ? 1 : step))); 99 | Draw.rectv(region, x, y, w, h, 0, vec -> vec.add( 100 | Mathf.sin(vec.y * 3 + Time.time, scl, mag) + Mathf.sin(vec.x * 3 - Time.time, 70, 0.8f), 101 | Mathf.cos(vec.x * 3 + Time.time + 8, scl + 6f, mag * 1.1f) + Mathf.sin(vec.y * 3 - Time.time, 50, 0.2f) 102 | )); 103 | } 104 | } 105 | 106 | public Point3 closestBranch(float x, float y){ 107 | Point3 branch = null; 108 | 109 | float dst = -1; 110 | 111 | for(Point3 pos : branches){ 112 | if(occupied.contains(pos)) continue; 113 | 114 | float dst2 = Mathf.dst2(x + pos.x, y + pos.y, x, y); 115 | 116 | if(dst < 0 || dst2 < dst){ 117 | dst = dst2; 118 | branch = pos; 119 | } 120 | } 121 | 122 | return branch; 123 | } 124 | } 125 | } 126 | -------------------------------------------------------------------------------- /src/animalia/entities/units/FrogEntity.java: -------------------------------------------------------------------------------- 1 | package animalia.entities.units; 2 | 3 | import static animalia.content.AniFx.landSmoke; 4 | 5 | import animalia.content.AniUnitTypes; 6 | import animalia.type.unit.FrogType; 7 | import arc.graphics.g2d.Draw; 8 | import arc.graphics.g2d.TextureRegion; 9 | import arc.math.Angles; 10 | import arc.math.Mathf; 11 | import arc.math.geom.Vec2; 12 | import arc.util.*; 13 | import mindustry.gen.Building; 14 | import mindustry.gen.MechUnit; 15 | import mindustry.gen.Unit; 16 | import mindustry.world.blocks.environment.Floor; 17 | 18 | public class FrogEntity extends MechUnit { 19 | protected Interval timer = new Interval(); 20 | 21 | public Vec2 target = new Vec2(); 22 | public @Nullable Building over; //block or tree this frog is on 23 | 24 | public boolean jumping, swimming, gliding; 25 | public float time = 0, extension = 0, step = 0; 26 | 27 | public void jump(float angle){ 28 | lookAt(rotation + Mathf.range(angle)); 29 | 30 | landSmoke.at(x, y); 31 | target.trns(rotation, type().jumpSize).add(x, y); 32 | 33 | jumping = true; 34 | extension = type().jumpTime; 35 | step = dst(target) * 1.5f / type().jumpSize; 36 | } 37 | 38 | public void swim(){ 39 | swimming = true; 40 | extension = type().swimTime + Mathf.range(3.65f); 41 | } 42 | 43 | public void idle(){ 44 | if(jumping || gliding){ 45 | landSmoke.at(x, y); 46 | } 47 | 48 | jumping = swimming = gliding = false; 49 | time = extension = step = 0; 50 | } 51 | 52 | public boolean onLiquid(){ 53 | Floor f = floorOn(); 54 | return f != null && !f.solid && f.isLiquid && !jumping; 55 | } 56 | 57 | public float slope(){ 58 | return extension > 0 ? Math.abs((0.5f - Math.abs((time / extension) - 0.5f)) * 2) : 0; 59 | } 60 | 61 | public boolean canSwim(){ 62 | return !swimming; 63 | } 64 | 65 | public boolean canJump(){ 66 | return timer.get(0, type().jumpSize * 1.7f) && 67 | !jumping && !swimming && !onLiquid() && 68 | !(isShooting && type().usesTongue); 69 | } 70 | 71 | public float rotateSpeed(){ 72 | return onLiquid() ? type().rotateSpeed : 360f; 73 | } 74 | 75 | @Override 76 | public boolean canShoot(){ 77 | return !moving() && (!type().usesTongue || ( 78 | !(swimming || jumping || gliding) && 79 | mounts[0].target != null && 80 | mounts[0].target instanceof Unit u && 81 | Math.abs(rotation - angleTo(u)) < 3.6f 82 | )); 83 | } 84 | 85 | @Override 86 | public float floorSpeedMultiplier(){ 87 | return 1; 88 | } 89 | 90 | @Override 91 | public void update(){ 92 | super.update(); 93 | 94 | if(time < extension){ 95 | time += Time.delta; 96 | } else idle(); 97 | 98 | if(jumping || gliding || (swimming && onLiquid())){ 99 | if(onLiquid()){ 100 | lookAt(Mathf.randomSeed((long) extension, 360)); 101 | moveAt(Tmp.v1.trns(rotation, speed())); 102 | } else { 103 | vel.trns(rotation, step * slope()); 104 | } 105 | } 106 | } 107 | 108 | public void drawOutlineRegion(TextureRegion region, float width, float height){ 109 | Draw.rect(region, x, y, width * Draw.scl * Draw.xscl, height * Draw.scl * Draw.yscl, rotation - 90); 110 | } 111 | 112 | @Override 113 | public void rotateMove(Vec2 vec){ 114 | moveAt(Tmp.v2.trns(rotation, vec.len())); 115 | if(!vec.isZero()) lookAt(vec.angle()); 116 | } 117 | 118 | @Override 119 | public void lookAt(float angle){ 120 | rotation = Angles.moveToward(rotation, angle, rotateSpeed() * Time.delta); 121 | } 122 | 123 | @Override 124 | public void movePref(Vec2 movement){ 125 | rotateMove(movement); 126 | } 127 | 128 | @Override 129 | public void moveAt(Vec2 vector, float acceleration){ 130 | if(!vector.isZero()){ 131 | lookAt(vector.angle()); 132 | 133 | if(canJump()){ 134 | jump(0); 135 | } else if(onLiquid()){ 136 | super.moveAt(vector, acceleration); 137 | } 138 | } 139 | } 140 | 141 | @Override 142 | public void wobble(){ 143 | //no 144 | } 145 | 146 | @Override 147 | public FrogType type(){ 148 | return (FrogType) this.type; 149 | } 150 | 151 | @Override 152 | public int classId(){ 153 | return AniUnitTypes.classID(FrogEntity.class); 154 | } 155 | } 156 | -------------------------------------------------------------------------------- /src/animalia/content/AniUnitTypes.java: -------------------------------------------------------------------------------- 1 | package animalia.content; 2 | 3 | import animalia.entities.units.FrogEntity; 4 | import animalia.type.FrogWeapon; 5 | import animalia.type.unit.*; 6 | import arc.func.*; 7 | import arc.graphics.Color; 8 | import arc.graphics.g2d.Draw; 9 | import arc.math.Mathf; 10 | import arc.struct.*; 11 | import arc.struct.ObjectMap.*; 12 | import arc.util.Time; 13 | import arc.util.Tmp; 14 | import mindustry.content.Blocks; 15 | import mindustry.entities.bullet.BasicBulletType; 16 | import mindustry.gen.*; 17 | 18 | import static animalia.sound.AniSounds.*; 19 | 20 | @SuppressWarnings("unchecked") 21 | public class AniUnitTypes { 22 | //Stolen from prog-mats, which Meep originally stole from Endless Rusting and BM 23 | 24 | private static final Entry, Prov>[] types = new Entry[]{ 25 | prov(FrogEntity.class, FrogEntity::new) 26 | }; 27 | 28 | private static final ObjectIntMap> idMap = new ObjectIntMap<>(); 29 | 30 | /** 31 | * Internal function to flatmap {@code Class -> Prov} into an {@link Entry}. 32 | * @author GlennFolker 33 | */ 34 | private static Entry, Prov> prov(Class type, Prov prov){ 35 | Entry, Prov> entry = new Entry<>(); 36 | entry.key = type; 37 | entry.value = prov; 38 | return entry; 39 | } 40 | 41 | /** 42 | * Setups all entity IDs and maps them into {@link EntityMapping}. 43 | * @author GlennFolker 44 | */ 45 | 46 | private static void setupID(){ 47 | for( 48 | int i = 0, 49 | j = 0, 50 | len = EntityMapping.idMap.length; 51 | 52 | i < len; 53 | 54 | i++ 55 | ){ 56 | if(EntityMapping.idMap[i] == null){ 57 | idMap.put(types[j].key, i); 58 | EntityMapping.idMap[i] = types[j].value; 59 | 60 | if(++j >= types.length) break; 61 | } 62 | } 63 | } 64 | 65 | /** 66 | * Retrieves the class ID for a certain entity type. 67 | * @author GlennFolker 68 | */ 69 | public static int classID(Class type){ 70 | return idMap.get(type, -1); 71 | } 72 | 73 | public static FrogType 74 | frog, assaultFrog, leopardFrog, exoticFrog, glidingFrog, phroge; 75 | 76 | public static void load(){ 77 | setupID(); 78 | 79 | frog = new FrogType("frog"){{ 80 | alwaysUnlocked = true; 81 | ambientSound = ribbit1; 82 | targetAir = true; 83 | usesTongue = true; 84 | health = 100; 85 | 86 | spawnsOn.add(Blocks.water, Blocks.darksandWater); 87 | }}; 88 | 89 | assaultFrog = new FrogType("assault-frog"){{ 90 | ambientSound = ribbit2; 91 | targetAir = true; 92 | targetGround = true; 93 | mineRange = 40; 94 | health = 115; 95 | armor = 2; 96 | 97 | spawnsOn.add(Blocks.water, Blocks.darksandWater); 98 | 99 | weapons.add(new FrogWeapon("animalia-assault-cannon"){{ 100 | x = 0; 101 | y = -0.2f; 102 | 103 | recoil = 0.5f; 104 | recoilTime = 5; 105 | shootY = 3.3f; 106 | reload = 8; 107 | mirror = false; 108 | rotate = true; 109 | ignoreRotation = true; 110 | 111 | bullet = new BasicBulletType(2.5f, 6) {{ 112 | width = 6; 113 | height = 7; 114 | lifetime = 60; 115 | }}; 116 | }}); 117 | }}; 118 | 119 | leopardFrog = new FrogType("leopard-frog"){{ 120 | ambientSound = ribbit2; 121 | targetAir = true; 122 | targetGround = true; 123 | usesTongue = true; 124 | health = 100; 125 | armor = 2; 126 | speed = 0.65f; 127 | 128 | jumpTime = 35; 129 | jumpSize = 6.5f; 130 | jumpChance = 0.004f; 131 | swimTime = 120; 132 | spawnChance = 0.8f; 133 | 134 | spawnsOn.add(Blocks.water, Blocks.darksandWater); 135 | }}; 136 | 137 | exoticFrog = new PoisonousFrogType("exotic-frog"){{ 138 | ambientSound = ribbit1; 139 | mineRange = 10; 140 | 141 | spawnsOn.add(Blocks.taintedWater, Blocks.darksandTaintedWater, Blocks.darksandWater); 142 | }}; 143 | 144 | /* 145 | glidingFrog = new FrogType("gliding-frog"){{ 146 | ambientSound = ribbit1; 147 | targetAir = true; 148 | targetGround = true; 149 | usesTongue = true; 150 | glideTime = 220; 151 | health = 100; 152 | 153 | spawnsOn.add(Blocks.water, Blocks.darksandWater); 154 | }}; 155 | */ 156 | 157 | phroge = new FrogType("phroge"){{ 158 | spawnChance = 0.002f; 159 | health = 230; 160 | 161 | spawnsOn.add(Blocks.water, Blocks.darksandWater); 162 | } 163 | @Override 164 | public void applyColor(Unit unit){ 165 | super.applyColor(unit); 166 | Draw.color(Tmp.c1.set(Color.pink).shiftHue(Time.time * (3f + Mathf.randomSeed(unit.id, 1))), 1f); 167 | } 168 | }; 169 | } 170 | } 171 | -------------------------------------------------------------------------------- /src/animalia/type/unit/FrogType.java: -------------------------------------------------------------------------------- 1 | package animalia.type.unit; 2 | 3 | import animalia.ai.types.FrogAI; 4 | import animalia.content.AniFx; 5 | import animalia.content.Spawners; 6 | import animalia.entities.units.FrogEntity; 7 | import animalia.type.Adaption; 8 | import arc.Core; 9 | import arc.graphics.Color; 10 | import arc.graphics.g2d.Draw; 11 | import arc.graphics.g2d.Fill; 12 | import arc.graphics.g2d.Lines; 13 | import arc.graphics.g2d.TextureRegion; 14 | import arc.util.Tmp; 15 | import mindustry.entities.units.WeaponMount; 16 | import mindustry.gen.Mechc; 17 | import mindustry.gen.Unit; 18 | import mindustry.graphics.Layer; 19 | import mindustry.type.Weapon; 20 | import mindustry.world.Block; 21 | import mindustry.world.meta.Stat; 22 | 23 | import static animalia.ui.AniUI.*; 24 | 25 | public class FrogType extends AnimalType { 26 | public boolean usesTongue = false; 27 | 28 | public float 29 | tongueReload = 120, 30 | tongueMaxCap = 13, 31 | 32 | swimTime = 150, 33 | swimChance = 0.003f, 34 | 35 | jumpTime = 40, 36 | jumpSize = 5, 37 | jumpChance = 0.003f, 38 | 39 | glideTime = -1, 40 | glideSize = 9, 41 | glideChance = 0.001f; 42 | 43 | public TextureRegion 44 | swimRegion, 45 | swimOutlineRegion, 46 | jumpRegion, 47 | jumpOutlineRegion; 48 | 49 | public FrogType(String name){ 50 | super(name); 51 | 52 | isEnemy = false; 53 | canDrown = false; 54 | flying = false; 55 | drawBody = true; 56 | drawCell = false; 57 | useUnitCap = false; 58 | outlines = false; 59 | alwaysCreateOutline = false; 60 | playerControllable = true; 61 | rotateMoveFirst = true; 62 | omniMovement = false; 63 | rotateSpeed = 4f; 64 | baseRotateSpeed = 360f; 65 | mechStepParticles = false; 66 | mechFrontSway = 0; 67 | mechSideSway = 0; 68 | mechLandShake = 0; 69 | itemCapacity = 0; 70 | speed = 0.5f; 71 | accel = 0.08f; 72 | drag = 0.05f; 73 | hitSize = 10; 74 | 75 | controller = u -> new FrogAI(); 76 | constructor = FrogEntity::new; 77 | 78 | Spawners.frog.push(this); 79 | } 80 | 81 | public void init(){ 82 | super.init(); 83 | 84 | if(glideTime > 0){ 85 | adaption = Adaption.arboreal; 86 | shadowRegion = jumpRegion; 87 | } 88 | 89 | if(usesTongue){ 90 | weapons.add(new Weapon(){{ 91 | x = 0; 92 | y = 0; 93 | reload = tongueReload; 94 | controllable = false; 95 | rotate = false; 96 | shootCone = 3.6f; 97 | } 98 | 99 | @Override 100 | protected void shoot(Unit unit, WeaponMount mount, float shootX, float shootY, float rotation){} 101 | 102 | @Override 103 | public void draw(Unit unit, WeaponMount mount){ 104 | super.draw(unit, mount); 105 | 106 | if(mount.target != null && mount.shoot && mount.reload > 0){ 107 | Unit u = (Unit) mount.target; 108 | 109 | u.vel.set(0, 0); 110 | u.impulse(Tmp.v1.trns(u.angleTo(unit), unit.dst2(u) * 0.6f)); 111 | 112 | if (u.within(unit.x, unit.y, unit.hitSize + (u.hitSize / 2))) { 113 | AniFx.unitRemove.at(u.x, u.y, u.angleTo(unit), u); 114 | u.remove(); 115 | } 116 | 117 | Draw.z(Layer.groundUnit - 1); 118 | Lines.stroke(1.4f, Color.valueOf("c45f5f")); 119 | Lines.line(unit.x, unit.y, u.x, u.y); 120 | Fill.circle(u.x, u.y, 1.6f); 121 | } 122 | } 123 | }); 124 | } 125 | } 126 | 127 | @Override 128 | public void load(){ 129 | super.load(); 130 | 131 | jumpRegion = Core.atlas.find(name + "-jump"); 132 | swimRegion = Core.atlas.find(name + "-swim"); 133 | 134 | swimOutlineRegion = Core.atlas.find(name + "-swim-outline"); 135 | jumpOutlineRegion = Core.atlas.find(name + "-jump-outline"); 136 | } 137 | 138 | @Override 139 | public void drawSoftShadow(Unit unit){ 140 | FrogEntity u = (FrogEntity) unit; 141 | 142 | if(u.onLiquid()) drawSoftShadow(unit, 1f); 143 | 144 | drawSoftShadow(unit, 1f - u.slope()); 145 | } 146 | 147 | @Override 148 | public void setStats(){ 149 | super.setStats(); 150 | stats.remove(Stat.speed); 151 | 152 | if(usesTongue) stats.remove(Stat.weapons); 153 | 154 | String floors = "[]"; 155 | 156 | for(Block b : spawnsOn){ 157 | floors += b.localizedName + (spawnsOn.indexOf(b) < spawnsOn.size - 1 ? ", " : ""); 158 | } 159 | 160 | addStats(stats, Stat.flying, true, 161 | statValueBundle("stat.swim", "yes"), 162 | statValueBundle("stat.jump", "yes"), 163 | statValueBundle("stat.glide", isArboreal() ? "yes" : "no"), 164 | statValue("stat.spawns", floors) 165 | ); 166 | } 167 | 168 | @Override 169 | public void drawBody(Unit u){ 170 | FrogEntity unit = (FrogEntity) u; 171 | 172 | applyColor(u); 173 | 174 | if(!unit.jumping && !unit.gliding){ 175 | if(!unit.onLiquid()){ 176 | 177 | unit.drawOutlineRegion(outlineRegion, outlineRegion.width, outlineRegion.height); 178 | Draw.rect(region, unit.x, unit.y, unit.rotation - 90); 179 | 180 | } else { 181 | 182 | unit.drawOutlineRegion(swimOutlineRegion, swimOutlineRegion.width, swimOutlineRegion.height); 183 | Draw.rect(swimRegion, unit.x, unit.y, unit.rotation - 90); 184 | 185 | } 186 | } else { 187 | float elevation = 8 * unit.slope(); 188 | 189 | Draw.rect( 190 | jumpOutlineRegion, unit.x, unit.y, 191 | jumpOutlineRegion.width * Draw.scl * Draw.xscl + elevation, 192 | jumpOutlineRegion.height * Draw.scl * Draw.yscl + elevation, unit.rotation - 90 193 | ); 194 | 195 | Draw.rect( 196 | jumpRegion, unit.x, unit.y, 197 | jumpRegion.width * Draw.scl + elevation, 198 | jumpRegion.height * Draw.scl + elevation, unit.rotation - 90 199 | ); 200 | } 201 | } 202 | 203 | @Override 204 | public void drawCell(Unit unit){ 205 | //no 206 | } 207 | 208 | @Override 209 | public void drawMech(Mechc mech){ 210 | //no 211 | } 212 | 213 | @Override 214 | public void drawEngines(Unit unit){ 215 | //no 216 | } 217 | 218 | @Override 219 | public void drawOutline(Unit unit){ 220 | //no 221 | } 222 | 223 | } 224 | -------------------------------------------------------------------------------- /src/animalia/content/AniBlocks.java: -------------------------------------------------------------------------------- 1 | package animalia.content; 2 | 3 | import animalia.type.unit.AnimalType; 4 | import animalia.world.crafting.GeneticReconstructor; 5 | import animalia.world.draw.DrawBuild; 6 | import animalia.world.draw.DrawConstruct; 7 | import animalia.world.draw.DrawItemIO; 8 | import animalia.world.environment.*; 9 | import animalia.world.units.*; 10 | import animalia.world.power.*; 11 | import arc.graphics.Color; 12 | import mindustry.content.Items; 13 | import mindustry.content.Liquids; 14 | import mindustry.gen.Building; 15 | import mindustry.graphics.Pal; 16 | import mindustry.type.Category; 17 | import mindustry.type.ItemStack; 18 | import mindustry.type.LiquidStack; 19 | import mindustry.world.*; 20 | import mindustry.world.blocks.production.GenericCrafter; 21 | import mindustry.world.draw.*; 22 | 23 | import static mindustry.type.ItemStack.*; 24 | import static mindustry.content.Fx.*; 25 | 26 | public class AniBlocks { 27 | public static Block 28 | //environment 29 | tree, 30 | //crafting 31 | bioreactor, carbonizer, eggshellPrinter, geneticReconstructor, 32 | //production 33 | chlorophyllSynthesizer, 34 | //units 35 | incubator, 36 | //power 37 | dischargeReceptor; 38 | 39 | public static void load(){ 40 | //region environment 41 | 42 | tree = new SeasonalTree("tree"){{ 43 | size = 2; 44 | }}; 45 | 46 | //endregion environment 47 | //region crafting 48 | 49 | bioreactor = new GenericCrafter("bioreactor"){{ 50 | updateEffect = AniFx.bioreactor; 51 | updateEffectChance = 0f; 52 | warmupSpeed = 0.01f; 53 | itemCapacity = 16; 54 | craftTime = 480; 55 | size = 3; 56 | 57 | hasItems = true; 58 | hasLiquids = true; 59 | outputLiquid = new LiquidStack(AniLiquids.nutritiveSolution, 0.2f); 60 | 61 | drawer = new DrawMulti( 62 | new DrawRegion("-bottom"), 63 | new DrawPlasma(){{ 64 | plasma1 = Color.valueOf("5d50a4"); 65 | plasma2 = Color.valueOf("5c5e9f"); 66 | } 67 | 68 | @Override 69 | public void draw(Building build){ 70 | super.draw(build); 71 | 72 | if(build.efficiency > 0f && build.timer.get(0, 20)){ 73 | updateEffect.at(build); 74 | } 75 | } 76 | }, 77 | new DrawLiquidRegion(AniLiquids.nutritiveSolution), 78 | new DrawDefault() 79 | ); 80 | 81 | requirements(Category.crafting, with(Items.lead, 80, Items.silicon, 80, Items.metaglass, 60)); 82 | 83 | consumePower(4f); 84 | consumeItem(Items.sporePod, 4); 85 | consumeLiquid(Liquids.water, 0.2f); 86 | }}; 87 | 88 | carbonizer = new GenericCrafter("carbonizer"){{ 89 | size = 2; 90 | hasItems = true; 91 | hasLiquids = false; 92 | 93 | craftTime = 135f; 94 | 95 | craftEffect = smeltsmoke; 96 | updateEffect = pulverizeSmall; 97 | updateEffectChance = 0.008f; 98 | 99 | outputItem = new ItemStack(AniItems.carbonFiber, 1); 100 | 101 | drawer = new DrawMulti( 102 | new DrawRegion("-bottom"), 103 | new DrawItemIO(Items.sporePod, AniItems.carbonFiber), 104 | new DrawGlowRegion("-heat"){{ 105 | color = Pal.meltdownHit; 106 | alpha = 0.7f; 107 | }}, 108 | new DrawDefault() 109 | ); 110 | 111 | consumePower(3f); 112 | consumeItem(Items.sporePod, 2); 113 | requirements(Category.crafting, with(Items.silicon, 90, Items.titanium, 120)); 114 | }}; 115 | 116 | eggshellPrinter = new GenericCrafter("eggshell-printer"){{ 117 | size = 2; 118 | hasItems = true; 119 | hasLiquids = true; 120 | itemCapacity = 8; 121 | 122 | craftTime = 360f; 123 | liquidCapacity = 12f; 124 | craftEffect = smeltsmoke; 125 | updateEffect = pulverizeSmall; 126 | updateEffectChance = 0.008f; 127 | 128 | outputItem = new ItemStack(AniItems.eggshell, 1); 129 | 130 | drawer = new DrawMulti( 131 | new DrawDefault(), 132 | new DrawConstruct(b -> outputItem.item.fullIcon), 133 | new DrawRegion("-top") 134 | ); 135 | 136 | consumePower(0.6f); 137 | consumeItem(Items.sand, 4); 138 | consumeLiquid(Liquids.water, 0.1f); 139 | requirements(Category.crafting, with(Items.copper, 90, Items.lead, 90, Items.silicon, 15)); 140 | }}; 141 | 142 | geneticReconstructor = new GeneticReconstructor("genetic-reconstructor"){{ 143 | size = 3; 144 | itemCapacity = 1; 145 | hasItems = true; 146 | hasLiquids = true; 147 | 148 | craftTime = 1000f; 149 | liquidCapacity = 32f; 150 | craftEffect = smeltsmoke; 151 | 152 | drawer = new DrawMulti( 153 | new DrawRegion("-bottom"), 154 | new DrawBuild(Color.valueOf("a387ea"), b -> b.config() != null ? ((AnimalType) b.config()).egg.fullIcon : null), 155 | new DrawDefault() 156 | ); 157 | 158 | consumePower(4f); 159 | consumeItem(AniItems.eggshell, 1); 160 | consumeLiquid(AniLiquids.nutritiveSolution, 0.2f); 161 | requirements(Category.crafting, with(Items.silicon, 100, Items.graphite, 140, Items.metaglass, 140)); 162 | }}; 163 | 164 | //endregion crafting 165 | //region production 166 | 167 | chlorophyllSynthesizer = new GenericCrafter("chlorophyll-synthesizer"){{ 168 | size = 2; 169 | itemCapacity = 8; 170 | hasItems = true; 171 | hasLiquids = false; 172 | 173 | craftTime = 200f; 174 | craftEffect = smeltsmoke; 175 | updateEffect = pulverizeSmall; 176 | updateEffectChance = 0.006f; 177 | 178 | outputItem = new ItemStack(AniItems.chlorophyll, 2); 179 | 180 | drawer = new DrawMulti( 181 | new DrawRegion("-bottom"), 182 | new DrawBuild(Pal.heal, b -> outputItem.item.fullIcon), 183 | new DrawDefault() 184 | ); 185 | 186 | consumePower(1.2f); 187 | consumeLiquid(AniLiquids.nutritiveSolution, 0.1f); 188 | requirements(Category.production, with(AniItems.carbonFiber, 45, Items.silicon, 45, Items.metaglass, 45)); 189 | }}; 190 | 191 | //endregion production 192 | //region units 193 | 194 | incubator = new Incubator("incubator"){{ 195 | size = 3; 196 | 197 | consumePower(7f); 198 | requirements(Category.units, with(Items.silicon, 200, Items.metaglass, 140, Items.titanium, 90, AniItems.carbonFiber, 90)); 199 | }}; 200 | 201 | //endregion units 202 | //region power 203 | 204 | dischargeReceptor = new DischargeReceptor("discharge-receptor"){{ 205 | size = 2; 206 | 207 | requirements(Category.power, with(Items.graphite, 60, Items.copper, 60)); 208 | }}; 209 | 210 | //endregion power 211 | } 212 | } 213 | -------------------------------------------------------------------------------- /assets/bundles/bundle_pt_BR.properties: -------------------------------------------------------------------------------- 1 | # Blocks 2 | ## Crafting 3 | block.animalia-bioreactor.name = Biorreator 4 | block.animalia-bioreactor.description = Transforma as substâncias contidas nos Esporos em uma solução rica em produtos químicos. 5 | block.animalia-carbonizer.name = Carbonizador 6 | block.animalia-carbonizer.description = Carboniza um filamento de matéria orgânica, transformando-se em um filamento de fibra de carbono. 7 | block.animalia-eggshell-printer.name = Impressora de Casca de Ovo 8 | block.animalia-eggshell-printer.description = Uma espécie de impressora 3D que faz cascas de ovos. 9 | block.animalia-genetic-reconstructor.name = Reconstrutor Genético 10 | block.animalia-genetic-reconstructor.description = Faz síntese genética usando engenharia avançada, modifica e cria genes para fazer um Ovo específico. 11 | 12 | ## Effect 13 | block.animalia-unit-container.name = Contêiner da Unidade 14 | block.animalia-unit-bunker.description = Uma estrutura usada para armazenar pequenas unidades. 15 | block.animalia-unit-silo.name = Silo de Unidades 16 | block.animalia-unit-silo.description = Uma torre que armazena unidades. 17 | 18 | ## Power 19 | block.animalia-converter.name = Conversor 20 | block.animalia-converter.description = Converte a energia química produzida por um Reator de Clorofila em energia. Deve estar tocando em um Reator de Clorofila para funcionar. 21 | block.animalia-discharge-receptor.name = Receptor de Descarga 22 | block.animalia-discharge-receptor.description = Uma espécie de para-raios. Ele pode parar relâmpagos em sua área e absorver um pouco de energia. Ele só funciona se houver uma bateria conectada a ele, caso contrário, ele será desativado e não interromperá nada. Se as baterias conectadas ficarem totalmente carregadas, [red] todo o gráfico de energia será destruído[], por isso é importante ter uma estratégia para sobreviver a tempestades. 23 | 24 | ## Production 25 | block.animalia-chlorophyll-panel.name = Reator de Clorofila 26 | block.animalia-chlorophyll-panel.description = Produz Energia Química através da fotossíntese artificial para ser convertida em energia através de um Conversor. 27 | block.animalia-chlorophyll-synthesizer.name = Sintetizador de Clorofila 28 | block.animalia-chlorophyll-synthesizer.description = Usa substâncias químicas de uma solução nutritiva para criar um composto orgânico verde conhecido como clorofila. 29 | 30 | ## Turrets 31 | block.animalia-apoptosis.name = Apoptosis 32 | block.animalia-apoptosis.description = Drena a vida de um alvo e cria poderosos projéteis. 33 | block.animalia-egg-thrower.name = Lançador de Ovo 34 | block.animalia-egg-thrower.description = Lança cascas de ovos em alta velocidade em inimigos próximos. 35 | block.animalia-lysis.name = Lysis 36 | block.animalia-lysis.description = Um tipo de torre de drenagem de vida. Drena a vida de um alvo e dispara um poderoso laser. 37 | block.animalia-necrosis.name = Necrosis 38 | block.animalia-necrosis.description = Um tipo misterioso de torre, pode drenar a vida de um alvo e usar isso para criar projéteis poderosos e especiais. 39 | 40 | ## Units 41 | block.animalia-incubator.name = Incubadora 42 | block.animalia-incubator.description = Usa energia para manter o ovo aquecido até a eclosão. Só pode chocar um ovo de cada vez. 43 | 44 | ## Logic 45 | block.animalia-cataclysm-detector.name = Detector de Cataclismo 46 | block.animalia-cataclysm-detector.description = Retorna o nome do último cataclismo ocorrido por meio do sensor [accent]@config[]. 47 | 48 | # Liquids 49 | liquid.animalia-nutritive-solution.name = Solução Nutritiva 50 | liquid.anumalia-nutritive-solution.description = Rica em minerais e nutrientes. Usada para sintetizar o DNA de cada ovo. 51 | 52 | # Items 53 | ## General 54 | item.animalia-carbon-fiber.name = Fibra de Carbono 55 | item.animalia-carbon-fiber.description = 56 | item.animalia-chlorophyll.name = Clorofila 57 | item.animalia-chlorophyll.description = Um composto orgânico verde capaz de absorver a luz para convertê-la em Energia Química. 58 | 59 | ## Eggs 60 | item.animalia-eggshell.name = Casca de Ovo 61 | item.animalia-eggshell.description = Apenas uma casca de ovo. Usado para criar cada ovo. 62 | item.animalia-assault-frog-egg.name = Ovo de Sapo de Assalto 63 | item.animalia-assault-frog-egg.description = Uma espécie de ovo sintético que não segue a forma como alguns animais nascem, mas usa tecnologia avançada para simular o ambiente onde o animal melhor evolui. 64 | item.animalia-exotic-frog-egg.name = Ovo de Sapo Exótico 65 | item.animalia-exotic-frog-egg.description = Uma espécie de ovo sintético que não segue a forma como alguns animais nascem, mas usa tecnologia avançada para simular o ambiente onde o animal melhor evolui. 66 | item.animalia-frog-egg.name = Ovo de Sapo 67 | item.animalia-frog-egg.description = Uma espécie de ovo sintético que não segue a forma como alguns animais nascem, mas usa tecnologia avançada para simular o ambiente onde o animal melhor evolui. 68 | 69 | # Liquids 70 | liquid.animalia-nutritive-solution.name = Solução Nutritiva 71 | liquid.anumalia-nutritive-solution.description = Rica em minerais e nutrientes. Usada para sintetizar o DNA de cada ovo. 72 | 73 | # Animals 74 | ## Ground 75 | unit.animalia-assault-frog.name = Sapo de Assalto 76 | unit.animalia-assault-frog.description = Um tipo de sapo ofensivo. Tem uma pequena minigun nas costas, só pode mirar nos inimigos. 77 | unit.animalia-exotic-frog.name = Sapo Exótico 78 | unit.animalia-exotic-frog.description = Um sapo venenoso aplica veneno em todas as unidades terrestres em um determinado alcance, incluindo aliados. Pode matar Daggers e Maces facilmente. 79 | unit.animalia-frog.name = Sapo 80 | unit.animalia-frog.description = Pula alto. Há uma chance de um sapo aparecer na costa, você tem sorte, o sapo pode ser amigável. Se sim, você pode controlá-lo.\nMas eles não gostam de ser controlados... 81 | 82 | # Weathers 83 | weather.animalia-warning = Uma {0}[] está sendo formada agora 84 | weather.animalia-storm.name = Tempestade 85 | weather.animalia-storm.description = De onde vêm esses relâmpagos? 86 | weather.animalia-tropical-storm.name = Tempestade Tropical 87 | weather.animalia-tropical-storm.description = Prepare-se para alguns trovões. 88 | weather.animalia-volcanic-ember.name = Brasa Vulcânica 89 | weather.animalia-volcanic-ember.description = Espere, por que meu núcleo está pegando fogo? 90 | 91 | ## Consequences 92 | consequence.animalia-thunder.name = Tempestade de Raios 93 | consequence.animalia-fire.name = Fogo 94 | 95 | # Status Effects 96 | status.animalia-dart-poisoned.name = Dardo Envenenado 97 | 98 | # Content 99 | content.weather.name = Climas 100 | 101 | # UI 102 | setting.crashreport.name = Mostrar a caixa de diálogo do relatório de falhas 103 | 104 | link.animalia.description = Veja mais sobre Animalia! 105 | 106 | dialog.animalia-report.name = Relatório de Falha 107 | dialog.animalia-report.description = Parece que você está tendo problemas com Animalia...\nVocê gostaria de denunciá-lo? 108 | 109 | bar.chemicalEnergy = Energia Química 110 | bar.drained = Vida Drenada 111 | bar.hatch = Progresso da Eclosão 112 | 113 | exit = Sair 114 | report = Relatar 115 | start = Começar 116 | 117 | minigame.firefly = O Segredo do Vaga-lume 118 | 119 | reward.animalia-item = Recompensa de Itens 120 | reward.animalia-unit = Recompensa de Unidade 121 | reward.animalia-block = Recompensa de Bloco 122 | 123 | stat.consequence = Consequências 124 | stat.drain = Drenagem 125 | stat.draincapacity = Capacidade de Drenagem 126 | stat.hatch = Tempo de Eclosão 127 | stat.poisonous = Venenoso 128 | stat.spawns = Nasce em 129 | stat.swim = Nada 130 | stat.swimsize = Tamanho da Natação 131 | stat.jump = Pula 132 | stat.jumpsize = Tamanho do Pulo 133 | -------------------------------------------------------------------------------- /assets/bundles/bundle.properties: -------------------------------------------------------------------------------- 1 | # Blocks 2 | ## Crafting 3 | block.animalia-bioreactor.name = Bioreactor 4 | block.animalia-bioreactor.description = Transforms the substances contained in Spores into a Solution rich in chemicals. 5 | block.animalia-carbonizer.name = Carbonizer 6 | block.animalia-carbonizer.description = Carbonizes a filament of organic material, transforming into a carbon fiber filament. 7 | block.animalia-eggshell-printer.name = Eggshell Printer 8 | block.animalia-eggshell-printer.description = A kind of 3D Printer that crafts eggshells. 9 | block.animalia-genetic-reconstructor.name = Genetic Reconstructor 10 | block.animalia-genetic-reconstructor.description = Does genetic synthesis using advanced engineering, modifies and creates genes to make a specific Egg. 11 | 12 | ## Effect 13 | block.animalia-unit-container.name = Unit Container 14 | block.animalia-unit-bunker.description = A structure used to store small units. 15 | block.animalia-unit-silo.name = Unit Silo 16 | block.animalia-unit-silo.description = A tower that stores units. 17 | 18 | ## Power 19 | block.animalia-converter.name = Converter 20 | block.animalia-converter.description = Converts Chemical Energy produced by a Chlorophyll Reactor into Power. Should be touching a Chlorophyll Reactor to work. 21 | block.animalia-discharge-receptor.name = Discharge Receptor 22 | block.animalia-discharge-receptor.description = A kind of lighting rod. It can stop thunders in its area, and absorb some power. It only works if there is a battery connected to it, otherwise it will be disabled and it will not stop anything. If the batteries connected get fully charged, [red]the entire power graph will get destroyed[], so it is important to have a strategy to survive thunderstorms. 23 | 24 | ## Production 25 | block.animalia-chlorophyll-panel.name = Chlorophyll Reactor 26 | block.animalia-chlorophyll-panel.description = Produces Chemical Energy through artificial photosynthesis to be converted into power through a Converter. 27 | block.animalia-chlorophyll-synthesizer.name = Chlorophyll Synthesizer 28 | block.animalia-chlorophyll-synthesizer.description = Uses chemicals substances of a Nutritive Solution to create a green organic compound known as Chlorophyll. 29 | 30 | ## Turrets 31 | block.animalia-apoptosis.name = Apoptosis 32 | block.animalia-apoptosis.description = Drains the life of a target and creates powerful projectiles. 33 | block.animalia-egg-thrower.name = Egg Thrower 34 | block.animalia-egg-thrower.description = Throws eggshells at a high-velocity on nearby enemies. 35 | block.animalia-lysis.name = Lysis 36 | block.animalia-lysis.description = A life drain turret type. Drains the life of a target and shoots a powerful beam. 37 | block.animalia-necrosis.name = Necrosis 38 | block.animalia-necrosis.description = A mysterious kind of turret, it can drain life of a target and use that to create powerful and special projectiles. 39 | 40 | ## Units 41 | block.animalia-incubator.name = Incubator 42 | block.animalia-incubator.description = Uses power to keep the egg warm until it hatches. Can only hatch one egg at a time. 43 | 44 | ## Logic 45 | block.animalia-cataclysm-detector.name = Cataclysm Detector 46 | block.animalia-cataclysm-detector.description = Returns the latest cataclysm occurring name through [accent]@config[] sensor. 47 | 48 | ## Environment 49 | block.animalia-tree.name = Tree 50 | block.animalia-tree.description = Do not destroy, it may have animals on it. 51 | 52 | # Items 53 | ## General 54 | item.animalia-carbon-fiber.name = Carbon Fiber 55 | item.animalia-chlorophyll.name = Chlorophyll 56 | item.animalia-chlorophyll.description = A green organic compound capable of absorbing light to convert it into Chemical Energy. 57 | 58 | ## Eggs 59 | item.animalia-eggshell.name = Eggshell 60 | item.animalia-eggshell.description = Only an eggshell. Used in the craft of every Egg. 61 | item.animalia-assault-frog-egg.name = Assault Frog Egg 62 | item.animalia-assault-frog-egg.description = A kind of synthetic egg that doesn't follow the way that some animals are born, but uses advanced technology to simulate the environment where the animal best evolves. 63 | item.animalia-exotic-frog-egg.name = Exotic Frog Egg 64 | item.animalia-exotic-frog-egg.description = A kind of synthetic egg that doesn't follow the way that some animals are born, but uses advanced technology to simulate the environment where the animal best evolves. 65 | item.animalia-frog-egg.name = Frog Egg 66 | item.animalia-frog-egg.description = A kind of synthetic egg that doesn't follow the way that some animals are born, but uses advanced technology to simulate the environment where the animal best evolves. 67 | item.animalia-leopard-frog-egg.name = Leopard Frog Egg 68 | item.animalia-leopard-frog-egg.description = A kind of synthetic egg that doesn't follow the way that some animals are born, but uses advanced technology to simulate the environment where the animal best evolves. 69 | item.animalia-gliding-frog.name = Gliding Frog Egg 70 | item.animalia-gliding-frog.description = A kind of synthetic egg that doesn't follow the way that some animals are born, but uses advanced technology to simulate the environment where the animal best evolves. 71 | 72 | # Liquids 73 | liquid.animalia-nutritive-solution.name = Nutritive Solution 74 | liquid.animalia-nutritive-solution.description = Rich in minerals and nutrients. Used to synthesize the DNA of every egg. 75 | 76 | # Animals 77 | ## Ground 78 | unit.animalia-assault-frog.name = Assault Frog 79 | unit.animalia-assault-frog.description = An offensive frog type. Has a small minigun on its back, can only target enemies. 80 | unit.animalia-exotic-frog.name = Exotic Frog 81 | unit.animalia-exotic-frog.description = A poisonous frog, applies poison to every ground units in a certain range, including allies. Can kill daggers and maces easily. 82 | unit.animalia-frog.name = Frog 83 | unit.animalia-frog.description = It jumps high. There's a chance of a frog spawn on a coast, you are lucky, the frog can be friendly. If so, you can control it.\nBut they don't like to be controlled... 84 | unit.animalia-leopard-frog.name = Leopard Frog 85 | unit.animalia-leopard-frog.description = A little faster frog... 86 | unit.animalia-gliding-frog.name = Gliding Frog 87 | unit.animalia-gliding-frog.description = An arboreal frog type. It's always looking for a tree. 88 | unit.animalia-phroge.name = Phroge 89 | unit.animalia-phroge.description = A very rare frog... 90 | 91 | # Weathers 92 | weather.animalia-warning = A {0}[] is being formed now 93 | weather.animalia-storm.name = Storm 94 | weather.animalia-storm.description = Where do those lightnings come from? 95 | weather.animalia-tropical-storm.name = Tropical Storm 96 | weather.animalia-tropical-storm.description = Get ready for some thunders. 97 | weather.animalia-volcanic-ember.name = Volcanic Ember 98 | weather.animalia-volcanic-ember.description = Wait, why is my core on fire? 99 | 100 | ## Consequences 101 | consequence.animalia-thunder.name = Thunderstorm 102 | consequence.animalia-fire.name = Fire 103 | 104 | # Status Effects 105 | status.animalia-poisoned.name = Dart Poisoned 106 | 107 | # Content 108 | content.weather.name = Weathers 109 | 110 | # Tech Tree 111 | techtree.animalia = Animalia 112 | 113 | # UI 114 | setting.reportcrash.name = Show Crash Report Dialog 115 | setting.entryweathers.name = Animalia Weathers on Custom Maps 116 | 117 | link.animalia.description = See more about Animalia! 118 | link.report.description = Create a new issue in FlinTyX/Animalia 119 | 120 | dialog.animalia-report.name = Crash Report 121 | dialog.animalia-report.description = Looks like you are having issues with Animalia...\nWould you like to report it? 122 | 123 | bar.chemicalEnergy = Chemical Energy 124 | bar.drained = Life Drained 125 | bar.hatch = Hatch Progress 126 | 127 | exit = Exit 128 | report = Report 129 | start = Start 130 | 131 | minigame.firefly = Firefly's Secret 132 | 133 | reward.animalia-item = Item Reward 134 | reward.animalia-unit = Unit Reward 135 | reward.animalia-block = Block Reward 136 | 137 | stat.consequence = Consequences 138 | stat.drain = Drain 139 | stat.draincapacity = Drain Capacity 140 | stat.hatch = Hatch Time 141 | stat.poisonous = Poisonous 142 | stat.spawns = Spawns At 143 | stat.swim = Swims 144 | stat.swimsize = Swim Size 145 | stat.jump = Jumps 146 | stat.jumpsize = Jump Size 147 | stat.glide = Glides -------------------------------------------------------------------------------- /assets/bundles/bundle_ru.properties: -------------------------------------------------------------------------------- 1 | # Blocks 2 | ## Crafting 3 | block.animalia-bioreactor.name = Биореактор 4 | block.animalia-bioreactor.description = Преобразует вещества, содержащиеся в спорах, в раствор, богатый химическими веществами. 5 | block.animalia-carbonizer.name = Карбонизатор 6 | block.animalia-carbonizer.description = Карбонизирует нить органического материала, превращая ее в нить углеродного волокна. 7 | block.animalia-eggshell-printer.name = Принтер яичной скорлупы 8 | block.animalia-eggshell-printer.description = Разновидность 3D-принтера, который обрабатывает яичную скорлупу. 9 | block.animalia-genetic-reconstructor.name = Генетический реконструктор 10 | block.animalia-genetic-reconstructor.description = Осуществляет генетический синтез с использованием передовой инженерии, изменяет и создает гены для создания определенного яйца. 11 | 12 | ## Effect 13 | block.animalia-unit-container.name = Контейнер единиц 14 | block.animalia-unit-bunker.description = Структура, используемая для хранения небольших единиц. 15 | block.animalia-unit-silo.name = Силос единиц 16 | block.animalia-unit-silo.description = Вышка, в которой хранятся единицы. 17 | 18 | ## Power 19 | block.animalia-converter.name = Преобразователь 20 | block.animalia-converter.description = Преобразует химическую энергию, производимую хлорофилловым реактором, в энергию. Для работы должен касаться хлорофиллового реактора. 21 | block.animalia-discharge-receptor.name = Молниеприемный стержень 22 | block.animalia-discharge-receptor.description = Разновидность молниеприемного стержня. Он может останавливать грозовые разряды в своей области и поглощать некоторую энергию. Он работает только в том случае, если к нему подключена батарея, иначе он будет отключен и не будет останавливать ничего. Если подключенные батареи будут полностью заряжены, [red]весь график мощности будет утерян[], поэтому важно иметь стратегию, чтобы пережить грозу. 23 | 24 | ## Production 25 | block.animalia-chlorophyll-panel.name = Хлорофилловый реактор 26 | block.animalia-chlorophyll-panel.description = Производит химическую энергию посредством искусственного фотосинтеза, которая преобразуется в энергию через преобразователь. 27 | block.animalia-chlorophyll-synthesizer.name = Синтезатор хлорофилла 28 | block.animalia-chlorophyll-synthesizer.description = Использует химические вещества питательного раствора для создания зеленого органического соединения, известного как хлорофилл. 29 | 30 | ## Turrets 31 | block.animalia-apoptosis.name = Апоптоз 32 | block.animalia-apoptosis.description = Истощает цель и создает мощные снаряды. 33 | block.animalia-egg-thrower.name = Метатель яиц 34 | block.animalia-egg-thrower.description = Бросает яичную скорлупу с большой скоростью на ближайших врагов. 35 | block.animalia-lysis.name = Лизис 36 | block.animalia-lysis.description = Тип турели, поглощающий жизнь. Истощает цель и стреляет мощным лучом. 37 | block.animalia-necrosis.name = Некроз 38 | block.animalia-necrosis.description = Таинственный тип турели, он может поглощать жизнь из цели и использовать ее для создания мощных и особых снарядов. 39 | 40 | ## Units 41 | block.animalia-incubator.name = Инкубатор 42 | block.animalia-incubator.description = Использует энергию для поддержания тепла в яйце, пока оно не вылупится. Одновременно может вылупляться только одно яйцо. 43 | 44 | ## Logic 45 | block.animalia-cataclysm-detector.name = Детектор катаклизмов 46 | block.animalia-cataclysm-detector.description = Возвращает название последнего катаклизма с помощью параметра [accent]@config[]. 47 | 48 | ## Environment 49 | block.animalia-tree.name = Дерево 50 | block.animalia-tree.description = Не уничтожайте, на нем могут быть животные. 51 | 52 | # Items 53 | ## General 54 | item.animalia-carbon-fiber.name = Углеродное волокно 55 | item.animalia-chlorophyll.name = Хлорофилл 56 | item.animalia-chlorophyll.description = Зеленое органическое соединение, способное поглощать свет и преобразовывать его в химическую энергию. 57 | 58 | ## Eggs 59 | item.animalia-eggshell.name = Яичная скорлупа 60 | item.animalia-eggshell.description = Только яичная скорлупа. Используется при изготовлении каждого яйца. 61 | item.animalia-assault-frog-egg.name = Яйцо штурмовой лягушки 62 | item.animalia-assault-frog-egg.description = Вид синтетического яйца, которое не следует тому, как рождаются некоторые животные, а использует передовые технологии для имитации среды, в которой животное лучше всего развивается. 63 | item.animalia-exotic-frog-egg.name = Яйцо экзотической лягушки 64 | item.animalia-exotic-frog-egg.description = Вид синтетического яйца, которое не следует тому, как рождаются некоторые животные, но использует передовые технологии для имитации среды, в которой животное лучше всего развивается. 65 | item.animalia-frog-egg.name = Яйцо лягушки 66 | item.animalia-frog-egg.description = Вид синтетического яйца, которое не следует тому, как рождаются некоторые животные, но использует передовые технологии для имитации среды, в которой животное лучше всего развивается. 67 | item.animalia-leopard-frog-egg.name = Яйцо леопардовой лягушки 68 | item.animalia-leopard-frog-egg.description = Вид синтетического яйца, которое не следует тому, как рождаются некоторые животные, но использует передовые технологии для имитации среды, в которой животное лучше всего развивается. 69 | item.animalia-gliding-frog.name = Яйцо летающей лягушки 70 | item.animalia-gliding-frog.description = Вид синтетического яйца, которое не следует тому, как рождаются некоторые животные, но использует передовые технологии для имитации среды, в которой животное лучше всего развивается. 71 | 72 | # Liquids 73 | liquid.animalia-nutritive-solution.name = Питательный раствор 74 | liquid.animalia-nutritive-solution.description = Богатый минералами и питательными веществами. Используется для синтеза ДНК каждого яйца. 75 | 76 | # Animals 77 | ## Ground 78 | unit.animalia-assault-frog.name = Штурмовая лягушка 79 | unit.animalia-assault-frog.description = Наступательный тип лягушки. Имеет небольшую минипушку на спине, может целиться только во врагов. 80 | unit.animalia-exotic-frog.name = Экзотическая лягушка 81 | unit.animalia-exotic-frog.description = Ядовитая лягушка, наносит яд всем наземным единицам в определенном диапазоне, включая союзников. Может легко убивать единицы типа Кинажал и Булава. 82 | unit.animalia-frog.name = Лягушка 83 | unit.animalia-frog.description = Высоко прыгает. Есть шанс, что лягушка спаунится на побережье, если вам повезет, лягушка может быть дружелюбной. Если да, то вы можете управлять ею.\nНо они не любят, когда ими управляют... 84 | unit.animalia-leopard-frog.name = Леопардовая лягушка 85 | unit.animalia-leopard-frog.description = Немного более быстрая лягушка... 86 | unit.animalia-gliding-frog.name = Летающая лягушка 87 | unit.animalia-gliding-frog.description = Дендроидный вид лягушек. Она всегда ищет дерево. 88 | unit.animalia-phroge.name = Фрог 89 | unit.animalia-phroge.description = Очень редкая лягушка... 90 | 91 | # Weathers 92 | weather.animalia-warning = Сейчас в воздухе формируется {0}[] 93 | weather.animalia-storm.name = Шторм 94 | weather.animalia-storm.description = Откуда берутся эти молнии? 95 | weather.animalia-tropical-storm.name = Тропический шторм 96 | weather.animalia-tropical-storm.description = Приготовьтесь к громам. 97 | weather.animalia-volcanic-ember.name = Извержение вулкана 98 | weather.animalia-volcanic-ember.description = Подождите, почему моё ядро горит? 99 | 100 | ## Consequences 101 | consequence.animalia-thunder.name = Гроза 102 | consequence.animalia-fire.name = Пожар 103 | 104 | # Status Effects 105 | status.animalia-poisoned.name = Отравленный дротик 106 | 107 | # Content 108 | content.weather.name = Погода 109 | 110 | # Tech Tree 111 | techtree.animalia = Животные (Animalia) 112 | 113 | # UI 114 | setting.reportcrash.name = Отображать диалог о сбое 115 | setting.entryweathers.name = Погода из мода на пользовательских картах 116 | 117 | link.animalia.description = Узнайте больше об Животные (Animalia)! 118 | link.report.description = Сообщить о проблеме в FlinTyX/Animalia 119 | 120 | dialog.animalia-report.name = Отчёт о сбое 121 | dialog.animalia-report.description = Похоже, что у вас произошёл сбой в Животные (Animalia)...\n Хотите сообщить об этом? 122 | 123 | bar.chemicalEnergy = Химическая энергия 124 | bar.drained = Жизней истрачено 125 | bar.hatch = Прогресс вылупления 126 | 127 | exit = Выход 128 | report = Отчет 129 | start = Старт 130 | 131 | minigame.firefly = Секрет светлячка 132 | 133 | reward.animalia-item = Награда за предмет 134 | reward.animalia-unit = Награда за блок 135 | reward.animalia-block = Награда за блок 136 | 137 | stat.consequence = Последствия 138 | stat.drain = Дренаж 139 | stat.draincapacity = Мощность дренажа 140 | stat.hatch = Время вылупления 141 | stat.poisonous = Ядовитый 142 | stat.spawns = Размножается в 143 | stat.swim = Плавает 144 | stat.swimsize = Размер заплыва 145 | stat.jump = Прыжки 146 | stat.jumpsize = Размер прыжка 147 | stat.glide = Летит 148 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # Copyright © 2015-2021 the original authors. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # https://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | # SPDX-License-Identifier: Apache-2.0 19 | # 20 | 21 | ############################################################################## 22 | # 23 | # Gradle start up script for POSIX generated by Gradle. 24 | # 25 | # Important for running: 26 | # 27 | # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is 28 | # noncompliant, but you have some other compliant shell such as ksh or 29 | # bash, then to run this script, type that shell name before the whole 30 | # command line, like: 31 | # 32 | # ksh Gradle 33 | # 34 | # Busybox and similar reduced shells will NOT work, because this script 35 | # requires all of these POSIX shell features: 36 | # * functions; 37 | # * expansions «$var», «${var}», «${var:-default}», «${var+SET}», 38 | # «${var#prefix}», «${var%suffix}», and «$( cmd )»; 39 | # * compound commands having a testable exit status, especially «case»; 40 | # * various built-in commands including «command», «set», and «ulimit». 41 | # 42 | # Important for patching: 43 | # 44 | # (2) This script targets any POSIX shell, so it avoids extensions provided 45 | # by Bash, Ksh, etc; in particular arrays are avoided. 46 | # 47 | # The "traditional" practice of packing multiple parameters into a 48 | # space-separated string is a well documented source of bugs and security 49 | # problems, so this is (mostly) avoided, by progressively accumulating 50 | # options in "$@", and eventually passing that to Java. 51 | # 52 | # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, 53 | # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; 54 | # see the in-line comments for details. 55 | # 56 | # There are tweaks for specific operating systems such as AIX, CygWin, 57 | # Darwin, MinGW, and NonStop. 58 | # 59 | # (3) This script is generated from the Groovy template 60 | # https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt 61 | # within the Gradle project. 62 | # 63 | # You can find Gradle at https://github.com/gradle/gradle/. 64 | # 65 | ############################################################################## 66 | 67 | # Attempt to set APP_HOME 68 | 69 | # Resolve links: $0 may be a link 70 | app_path=$0 71 | 72 | # Need this for daisy-chained symlinks. 73 | while 74 | APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path 75 | [ -h "$app_path" ] 76 | do 77 | ls=$( ls -ld "$app_path" ) 78 | link=${ls#*' -> '} 79 | case $link in #( 80 | /*) app_path=$link ;; #( 81 | *) app_path=$APP_HOME$link ;; 82 | esac 83 | done 84 | 85 | # This is normally unused 86 | # shellcheck disable=SC2034 87 | APP_BASE_NAME=${0##*/} 88 | # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) 89 | APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s 90 | ' "$PWD" ) || exit 91 | 92 | # Use the maximum available, or set MAX_FD != -1 to use that value. 93 | MAX_FD=maximum 94 | 95 | warn () { 96 | echo "$*" 97 | } >&2 98 | 99 | die () { 100 | echo 101 | echo "$*" 102 | echo 103 | exit 1 104 | } >&2 105 | 106 | # OS specific support (must be 'true' or 'false'). 107 | cygwin=false 108 | msys=false 109 | darwin=false 110 | nonstop=false 111 | case "$( uname )" in #( 112 | CYGWIN* ) cygwin=true ;; #( 113 | Darwin* ) darwin=true ;; #( 114 | MSYS* | MINGW* ) msys=true ;; #( 115 | NONSTOP* ) nonstop=true ;; 116 | esac 117 | 118 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 119 | 120 | 121 | # Determine the Java command to use to start the JVM. 122 | if [ -n "$JAVA_HOME" ] ; then 123 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 124 | # IBM's JDK on AIX uses strange locations for the executables 125 | JAVACMD=$JAVA_HOME/jre/sh/java 126 | else 127 | JAVACMD=$JAVA_HOME/bin/java 128 | fi 129 | if [ ! -x "$JAVACMD" ] ; then 130 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 131 | 132 | Please set the JAVA_HOME variable in your environment to match the 133 | location of your Java installation." 134 | fi 135 | else 136 | JAVACMD=java 137 | if ! command -v java >/dev/null 2>&1 138 | then 139 | die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 140 | 141 | Please set the JAVA_HOME variable in your environment to match the 142 | location of your Java installation." 143 | fi 144 | fi 145 | 146 | # Increase the maximum file descriptors if we can. 147 | if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then 148 | case $MAX_FD in #( 149 | max*) 150 | # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. 151 | # shellcheck disable=SC2039,SC3045 152 | MAX_FD=$( ulimit -H -n ) || 153 | warn "Could not query maximum file descriptor limit" 154 | esac 155 | case $MAX_FD in #( 156 | '' | soft) :;; #( 157 | *) 158 | # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. 159 | # shellcheck disable=SC2039,SC3045 160 | ulimit -n "$MAX_FD" || 161 | warn "Could not set maximum file descriptor limit to $MAX_FD" 162 | esac 163 | fi 164 | 165 | # Collect all arguments for the java command, stacking in reverse order: 166 | # * args from the command line 167 | # * the main class name 168 | # * -classpath 169 | # * -D...appname settings 170 | # * --module-path (only if needed) 171 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. 172 | 173 | # For Cygwin or MSYS, switch paths to Windows format before running java 174 | if "$cygwin" || "$msys" ; then 175 | APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) 176 | CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) 177 | 178 | JAVACMD=$( cygpath --unix "$JAVACMD" ) 179 | 180 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 181 | for arg do 182 | if 183 | case $arg in #( 184 | -*) false ;; # don't mess with options #( 185 | /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath 186 | [ -e "$t" ] ;; #( 187 | *) false ;; 188 | esac 189 | then 190 | arg=$( cygpath --path --ignore --mixed "$arg" ) 191 | fi 192 | # Roll the args list around exactly as many times as the number of 193 | # args, so each arg winds up back in the position where it started, but 194 | # possibly modified. 195 | # 196 | # NB: a `for` loop captures its iteration list before it begins, so 197 | # changing the positional parameters here affects neither the number of 198 | # iterations, nor the values presented in `arg`. 199 | shift # remove old arg 200 | set -- "$@" "$arg" # push replacement arg 201 | done 202 | fi 203 | 204 | 205 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 206 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 207 | 208 | # Collect all arguments for the java command: 209 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, 210 | # and any embedded shellness will be escaped. 211 | # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be 212 | # treated as '${Hostname}' itself on the command line. 213 | 214 | set -- \ 215 | "-Dorg.gradle.appname=$APP_BASE_NAME" \ 216 | -classpath "$CLASSPATH" \ 217 | org.gradle.wrapper.GradleWrapperMain \ 218 | "$@" 219 | 220 | # Stop when "xargs" is not available. 221 | if ! command -v xargs >/dev/null 2>&1 222 | then 223 | die "xargs is not available" 224 | fi 225 | 226 | # Use "xargs" to parse quoted args. 227 | # 228 | # With -n1 it outputs one arg per line, with the quotes and backslashes removed. 229 | # 230 | # In Bash we could simply go: 231 | # 232 | # readarray ARGS < <( xargs -n1 <<<"$var" ) && 233 | # set -- "${ARGS[@]}" "$@" 234 | # 235 | # but POSIX shell has neither arrays nor command substitution, so instead we 236 | # post-process each arg (as a line of input to sed) to backslash-escape any 237 | # character that might be a shell metacharacter, then use eval to reverse 238 | # that process (while maintaining the separation between arguments), and wrap 239 | # the whole thing up as a single "set" statement. 240 | # 241 | # This will of course break if any of these variables contains a newline or 242 | # an unmatched quote. 243 | # 244 | 245 | eval "set -- $( 246 | printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | 247 | xargs -n1 | 248 | sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | 249 | tr '\n' ' ' 250 | )" '"$@"' 251 | 252 | exec "$JAVACMD" "$@" -------------------------------------------------------------------------------- /src/animalia/world/units/Incubator.java: -------------------------------------------------------------------------------- 1 | package animalia.world.units; 2 | 3 | import animalia.type.EggType; 4 | import arc.Core; 5 | import arc.graphics.Blending; 6 | import arc.graphics.Color; 7 | import arc.graphics.g2d.Draw; 8 | import arc.graphics.g2d.TextureRegion; 9 | import arc.math.Angles; 10 | import arc.math.Mathf; 11 | import arc.math.geom.Vec2; 12 | import arc.scene.ui.Image; 13 | import arc.scene.ui.Label; 14 | import arc.scene.ui.layout.Table; 15 | import arc.struct.Seq; 16 | import arc.util.Eachable; 17 | import arc.util.Nullable; 18 | import arc.util.Time; 19 | import arc.util.Tmp; 20 | import arc.util.io.Reads; 21 | import arc.util.io.Writes; 22 | import mindustry.entities.units.BuildPlan; 23 | import mindustry.gen.Building; 24 | import mindustry.gen.Icon; 25 | import mindustry.graphics.Layer; 26 | import mindustry.graphics.Pal; 27 | import mindustry.type.Category; 28 | import mindustry.type.Item; 29 | import mindustry.ui.Bar; 30 | import mindustry.ui.ItemImage; 31 | import mindustry.world.blocks.payloads.Payload; 32 | import mindustry.world.blocks.payloads.PayloadBlock; 33 | import mindustry.world.blocks.payloads.UnitPayload; 34 | import mindustry.world.meta.Stat; 35 | 36 | import static animalia.content.AniFx.hatchSmoke; 37 | import static mindustry.Vars.*; 38 | 39 | public class Incubator extends PayloadBlock { 40 | public TextureRegion heatRegion, softShadowRegion; 41 | 42 | public Incubator(String name){ 43 | super(name); 44 | 45 | outputsPayload = true; 46 | rotate = true; 47 | solid = true; 48 | update = true; 49 | hasItems = true; 50 | sync = true; 51 | 52 | itemCapacity = 1; 53 | category = Category.units; 54 | } 55 | 56 | @Override 57 | public void load(){ 58 | super.load(); 59 | 60 | heatRegion = Core.atlas.find(name + "-heat"); 61 | softShadowRegion = Core.atlas.find("circle-shadow"); 62 | } 63 | 64 | @Override 65 | public TextureRegion[] icons(){ 66 | return new TextureRegion[]{region, topRegion}; 67 | } 68 | 69 | public boolean eggValid(Item i){ 70 | return i instanceof EggType && ((EggType) i).unit != null; 71 | } 72 | 73 | @Override 74 | public void setBars(){ 75 | super.setBars(); 76 | 77 | addBar("hatch", b -> new Bar("stat.hatch", Pal.accent, ((IncubatorBuild) b)::fraction)); 78 | } 79 | 80 | @Override 81 | public void drawPlanRegion(BuildPlan plan, Eachable list){ 82 | Draw.rect(region, plan.drawx(), plan.drawy()); 83 | Draw.rect(outRegion, plan.drawx(), plan.drawy(), plan.rotation * 90); 84 | Draw.rect(topRegion, plan.drawx(), plan.drawy()); 85 | } 86 | 87 | @Override 88 | public void setStats(){ 89 | super.setStats(); 90 | 91 | Seq eggs = content.items().select(this::eggValid); 92 | 93 | stats.add(Stat.input, table -> { 94 | table.clear(); 95 | table.row(); 96 | table.center().bottom(); 97 | 98 | table.table(t -> { 99 | t.row(); 100 | 101 | for(int j = 0; j < eggs.size; j++) { 102 | EggType i = (EggType) eggs.get(j); 103 | 104 | if ((!i.unit.unlocked() && state.isCampaign())) continue; 105 | 106 | t.row(); 107 | t.table(a -> { 108 | a.row(); 109 | a.add(i.unit.localizedName); 110 | a.row(); 111 | a.image().width(400).color(Pal.power).pad(5); 112 | a.row(); 113 | 114 | a.table(e -> { 115 | //input 116 | e.add(Core.bundle.get("stat.input") + ":"); 117 | e.add(new ItemImage(i.upRegion, 1)).pad(5); 118 | e.add("[lightgray]" + i.localizedName); 119 | e.row(); 120 | 121 | //output 122 | e.add(Core.bundle.get("stat.output") + ":"); 123 | e.add(new ItemImage(i.unit.shadowRegion, 1)).padLeft(5); 124 | e.add("[lightgray]" + i.unit.localizedName); 125 | e.row(); 126 | }); 127 | }).width(400).padLeft(-10).padTop(15); 128 | } 129 | }); 130 | }); 131 | } 132 | 133 | public class IncubatorBuild extends PayloadBlockBuild { 134 | UnitPayload payload; 135 | 136 | public @Nullable EggType egg; 137 | public float warmup = 0, progress = 0; 138 | 139 | public float fraction(){ 140 | return progress; 141 | } 142 | 143 | public void hatch(){ 144 | egg.unit.unlock(); 145 | 146 | payload = new UnitPayload(egg.unit.create(team)); 147 | payload.set(x, y, rotdeg()); 148 | 149 | hatchSmoke.at(x, y, Pal.meltdownHit); 150 | 151 | items.remove(egg, 1); 152 | egg = null; 153 | 154 | progress %= 1; 155 | } 156 | 157 | public void moveOutPayload(){ 158 | if(payload == null) return; 159 | 160 | updatePayload(); 161 | 162 | Vec2 dest = Tmp.v1.trns(rotdeg(), size * tilesize/2f); 163 | 164 | payRotation = Angles.moveToward(payRotation, rotdeg(), payloadRotateSpeed * delta()); 165 | payVector.approach(dest, payloadSpeed * delta()); 166 | 167 | Building front = front(); 168 | boolean canDump = front == null || !front.tile().solid(); 169 | boolean canMove = front != null && (front.block.outputsPayload || front.block.acceptsPayload); 170 | 171 | if(canDump && !canMove){ 172 | pushOutput(payload, 1f - (payVector.dst(dest) / (size * tilesize / 2f))); 173 | } 174 | 175 | if(payVector.within(dest, 0.001f)){ 176 | payVector.clamp(-size * tilesize / 2f, -size * tilesize / 2f, size * tilesize / 2f, size * tilesize / 2f); 177 | 178 | if(canMove){ 179 | if(movePayload(payload)){ 180 | hatchSmoke.at(x, y, Color.gray); 181 | payload = null; 182 | } 183 | } 184 | } 185 | } 186 | 187 | @Override 188 | public void updateTile(){ 189 | super.updateTile(); 190 | 191 | warmup = Mathf.approachDelta(warmup, Mathf.num(hasEgg()) * power.status, 0.006f); 192 | 193 | if(shouldOutputPayload()){ 194 | moveOutPayload(); 195 | } 196 | 197 | if(items.any() && egg == null){ 198 | egg = (EggType) items.first(); 199 | } 200 | 201 | if(hasEgg()){ 202 | progress += getProgressIncrease(egg.time) * power.status; 203 | 204 | if(progress >= 1){ 205 | hatch(); 206 | } 207 | } else progress = progress * warmup; 208 | } 209 | 210 | @Override 211 | public void draw(){ 212 | super.draw(); 213 | 214 | Draw.rect(region, x, y); 215 | Draw.rect(outRegion, x, y, rotdeg()); 216 | 217 | if(warmup > 0.0001f){ 218 | Draw.color(Color.orange, Color.yellow, Pal.accent, Mathf.absin(Time.time, 8, 1)); 219 | Draw.alpha(warmup * (0.55f + Mathf.absin(Time.time, 10, 0.2f))); 220 | Draw.blend(Blending.additive); 221 | Draw.rect(heatRegion, x, y); 222 | 223 | Draw.blend(); 224 | Draw.color(); 225 | Draw.reset(); 226 | } 227 | 228 | if(hasEgg()){ 229 | 230 | Draw.rect(egg.upRegion, x, y); 231 | 232 | } else if(payload != null){ 233 | TextureRegion reg = payload.icon(); 234 | 235 | float m = 1 + Mathf.sin(Time.time, 25, 0.1f), 236 | w = reg.width * Draw.scl * Draw.xscl * m, 237 | h = reg.height * Draw.scl * Draw.xscl * m; 238 | 239 | w /= 1.7f; 240 | h /= 1.7f; 241 | 242 | Draw.rect(reg, x, y, w, h, rotdeg() - 90); 243 | } 244 | 245 | float size = 30 * Draw.scl; 246 | Draw.color(0, 0, 0, 0.3f); 247 | Draw.rect(softShadowRegion, this, size * 1.6f * Draw.xscl, size * 1.6f * Draw.yscl, rotdeg()); 248 | Draw.color(); 249 | 250 | Draw.z(Layer.block + 0.002f); 251 | Draw.rect(topRegion, x, y); 252 | } 253 | 254 | @Override 255 | public void display(Table table){ 256 | super.display(table); 257 | 258 | table.row(); 259 | table.table(t -> { 260 | t.add(new Image()).size(24).pad(5).update(i -> i.setDrawable( 261 | hasEgg() ? egg.upRegion : payload != null ? payload.unit.type.fullIcon : Icon.warning.getRegion() 262 | )); 263 | 264 | t.add(new Label("")).update(l -> l.setText( 265 | hasEgg() ? egg.localizedName : payload != null ? payload.unit.type.localizedName : "[gray]" + Core.bundle.get("empty") 266 | )); 267 | }).left().pad(5); 268 | } 269 | 270 | public boolean hasEgg(){ 271 | return egg != null && payload == null && enabled; 272 | } 273 | 274 | public boolean shouldOutputPayload(){ 275 | Building front = front(); 276 | return payload != null && front != null && (front.block.outputsPayload || front.block.acceptsPayload); 277 | } 278 | 279 | @Override 280 | public void handleItem(Building source, Item item){ 281 | super.handleItem(source, item); 282 | if(egg == null) egg = (EggType) items.first(); 283 | } 284 | 285 | @Override 286 | public boolean acceptItem(Building source, Item item){ 287 | return eggValid(item) && payload == null && items.get(item) < itemCapacity && source.team.equals(team); 288 | } 289 | 290 | @Override 291 | public boolean acceptPayload(Building source, Payload payload){ 292 | return false; 293 | } 294 | 295 | @Override 296 | public void write(Writes write){ 297 | super.write(write); 298 | write.f(progress); 299 | } 300 | 301 | @Override 302 | public void read(Reads read, byte revision){ 303 | super.read(read, revision); 304 | progress = read.f(); 305 | } 306 | } 307 | } 308 | --------------------------------------------------------------------------------