├── res ├── bundles │ ├── bundle.properties │ └── bundle_ru.properties ├── data │ └── builder ├── icon.png ├── sprites │ ├── sh1.png │ ├── sh2.png │ ├── tst.png │ ├── 1-num.png │ ├── 2-num.png │ ├── 3-num.png │ ├── 4-num.png │ ├── 5-num.png │ ├── 6-num.png │ ├── 7-num.png │ ├── 8-num.png │ ├── 9-num.png │ ├── frog.png │ ├── glow.png │ ├── tri1.png │ ├── tri2.png │ ├── 10-num.png │ ├── 11-num.png │ ├── 12-num.png │ ├── black75.png │ ├── circle.png │ ├── gear-big.png │ ├── spaace.png │ ├── summon.png │ ├── cartridges.png │ ├── gear-small.png │ ├── laarge-orb.png │ ├── large-orb.png │ ├── satellite.png │ ├── sun-bullet.png │ ├── bullets │ │ └── knife.png │ ├── sueno-white.png │ ├── sun-bullet2.png │ ├── white-cub2-50.png │ ├── white-cube50.png │ ├── white-point50.png │ ├── blocks │ │ ├── walls │ │ │ ├── ts.png │ │ │ ├── mita.png │ │ │ ├── ts1.png │ │ │ ├── ts2.png │ │ │ └── undestroyable.png │ │ ├── storage │ │ │ ├── n1.png │ │ │ ├── n2.png │ │ │ ├── demand.png │ │ │ ├── demand-pre.png │ │ │ ├── demand-normal.png │ │ │ ├── demand-orig.png │ │ │ ├── demand-team.png │ │ │ ├── demand-normal0.png │ │ │ ├── demand-normal10.png │ │ │ ├── demand-normal11.png │ │ │ ├── demand-normal12.png │ │ │ ├── demand-normal13.png │ │ │ ├── demand-normal14.png │ │ │ ├── demand-normal15.png │ │ │ ├── demand-normal2.png │ │ │ ├── demand-normal3.png │ │ │ ├── demand-normal4.png │ │ │ ├── demand-normal5.png │ │ │ ├── demand-normal6.png │ │ │ ├── demand-normal7.png │ │ │ ├── demand-normal8.png │ │ │ ├── demand-normal9.png │ │ │ └── demand-team-orig.png │ │ ├── company │ │ │ └── core.png │ │ ├── drills │ │ │ ├── WaDR-22.png │ │ │ ├── WaDR-22-top.png │ │ │ ├── WaDR-22-rotator.png │ │ │ └── WaDR-22-rotator-bottom.png │ │ ├── defense │ │ │ └── turrets │ │ │ │ ├── slash.png │ │ │ │ ├── slice.png │ │ │ │ ├── violence-bullet.png │ │ │ │ └── 291_20240820011023.png │ │ ├── distribution │ │ │ └── monorail.png │ │ ├── environment │ │ │ ├── floor │ │ │ │ ├── i1.png │ │ │ │ ├── i2.png │ │ │ │ ├── s1.png │ │ │ │ ├── s2.png │ │ │ │ ├── t1.png │ │ │ │ ├── t2.png │ │ │ │ ├── t3.png │ │ │ │ ├── w1.png │ │ │ │ ├── w2.png │ │ │ │ ├── dev1.png │ │ │ │ ├── dev2.png │ │ │ │ ├── dev3.png │ │ │ │ ├── dev4.png │ │ │ │ ├── dev5.png │ │ │ │ ├── none1.png │ │ │ │ ├── test1.png │ │ │ │ ├── corite1.png │ │ │ │ ├── corite2.png │ │ │ │ ├── corite3.png │ │ │ │ ├── phosphor.png │ │ │ │ ├── Femmanite1.png │ │ │ │ ├── Femmanite2.png │ │ │ │ ├── Femmanite3.png │ │ │ │ ├── Femmanite-ice1.png │ │ │ │ ├── Femmanite-ice2.png │ │ │ │ └── Femmanite-ice3.png │ │ │ └── walls │ │ │ │ ├── corite-wall1.png │ │ │ │ ├── corite-wall2.png │ │ │ │ ├── Femmanite-wall1.png │ │ │ │ ├── Femmanite-wall2.png │ │ │ │ ├── Femmanite-boulder1.png │ │ │ │ ├── Femmanite-boulder2.png │ │ │ │ ├── corite-wall-large.png │ │ │ │ ├── Femmanite-ice-wall1.png │ │ │ │ ├── Femmanite-ice-wall2.png │ │ │ │ ├── Femmanite-wall-large.png │ │ │ │ └── Femmanite-ice-wall-large.png │ │ └── production │ │ │ ├── void_extractor.png │ │ │ ├── void_extractor_1.png │ │ │ ├── void_extractor_2.png │ │ │ ├── void_extractor_3.png │ │ │ ├── void_extractor_4.png │ │ │ ├── void_extractor-old.png │ │ │ ├── void_extractor_left_top.png │ │ │ ├── void_extractor_right_top.png │ │ │ ├── void_extractor_left_bottom.png │ │ │ └── void_extractor_right_bottom.png │ ├── non-cartridges.png │ ├── units │ │ ├── tanks │ │ │ ├── sun.png │ │ │ ├── sear.png │ │ │ ├── singe.png │ │ │ ├── spark.png │ │ │ ├── sun-cell.png │ │ │ ├── sun-full.png │ │ │ ├── sun-gun.png │ │ │ ├── sear-cell.png │ │ │ ├── sear-full.png │ │ │ ├── sear-treads.png │ │ │ ├── singe-cell.png │ │ │ ├── singe-full.png │ │ │ ├── spark-cell.png │ │ │ ├── spark-full.png │ │ │ ├── sun-treads.png │ │ │ ├── sear-gatling.png │ │ │ ├── singe-treads.png │ │ │ ├── singe-weapon.png │ │ │ ├── spark-treads.png │ │ │ ├── sun-gun-blade.png │ │ │ ├── sun-gun-cell.png │ │ │ ├── sun-gun-coil.png │ │ │ ├── sear-gatling-barrel-l.png │ │ │ ├── sear-gatling-barrel-r.png │ │ │ └── sear-gatling-barrel-center.png │ │ ├── hovers │ │ │ ├── space.png │ │ │ ├── vial.png │ │ │ ├── engross.png │ │ │ ├── vessel.png │ │ │ ├── space-cell.png │ │ │ ├── space-full.png │ │ │ ├── vial-cell.png │ │ │ ├── vial-full.png │ │ │ ├── engross-cell.png │ │ │ ├── engross-full.png │ │ │ ├── engross-gun.png │ │ │ ├── vessel-cell.png │ │ │ ├── vessel-full.png │ │ │ ├── vial-weapon.png │ │ │ └── vessel-weapon.png │ │ ├── missles │ │ │ ├── bomb.png │ │ │ └── bomb-cell.png │ │ ├── core │ │ │ ├── believer.png │ │ │ ├── believer-cell.png │ │ │ └── believer-full.png │ │ └── spiders │ │ │ ├── void-strider.png │ │ │ ├── void-strider-leg.png │ │ │ ├── void-strider-cell.png │ │ │ ├── void-strider-full.png │ │ │ ├── void-strider-vessel.png │ │ │ ├── void-strider-wing.png │ │ │ └── void-strider-leg-base.png │ ├── spaaaaaaaaaaaaaace.png │ ├── void-strider-collapse-effect.png │ └── void-strider-collapse-effect1.png ├── models │ ├── mita │ │ ├── Body.png │ │ ├── Face.png │ │ ├── Hair.png │ │ ├── cloth.png │ │ └── mita.mtl │ ├── cube │ │ ├── router.png │ │ ├── cube.mtl │ │ └── cube.obj │ └── router │ │ ├── router.png │ │ ├── router.mtl │ │ └── router.obj ├── fonts │ └── JetBrainsMono-Regular.ttf └── shaders │ ├── void-strider-collapse-effect.vert │ ├── black-hole.vert │ ├── black-hole.frag │ ├── 4d.frag │ ├── void-space.vert │ ├── 3d.vert │ ├── void-strider-collapse-effect.frag │ ├── normal.vert │ ├── blade.frag │ ├── ice.frag │ ├── dead.frag │ ├── 3d.frag │ ├── normal.frag │ ├── 4d.vert │ ├── void-space.frag │ ├── contraction.frag │ └── sun.frag ├── jitpack.yml ├── settings.gradle ├── annotations ├── build │ ├── tmp │ │ ├── jar │ │ │ └── MANIFEST.MF │ │ └── compileJava │ │ │ └── previous-compilation-data.bin │ ├── libs │ │ └── annotations.jar │ └── classes │ │ └── java │ │ └── main │ │ └── org │ │ └── durmiendo │ │ └── sap │ │ ├── SuenoSettings.class │ │ ├── SuenoSettingsProcessor$1.class │ │ └── SuenoSettingsProcessor.class ├── src │ └── org │ │ └── durmiendo │ │ └── sap │ │ └── SuenoSettings.java └── build.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── src └── org │ └── durmiendo │ └── sueno │ ├── world │ ├── blocks │ │ ├── build │ │ │ └── Heated.java │ │ ├── environment │ │ │ └── Ice.java │ │ ├── walls │ │ │ └── WallThatDestroysBullets.java │ │ ├── distribution │ │ │ └── Monorail.java │ │ ├── storage │ │ │ └── SCoreBlock.java │ │ ├── defense │ │ │ ├── turrets │ │ │ │ └── MachineGunTurret.java │ │ │ └── TriShield.java │ │ └── Heater.java │ └── units │ │ ├── comps │ │ ├── TimedDestroyComp.java │ │ └── VoidStriderComp.java │ │ └── types │ │ └── VoidStriderUnitType.java │ ├── math │ ├── area │ │ ├── Area.java │ │ ├── CArea.java │ │ └── RArea.java │ ├── SInterp.java │ ├── Maths.java │ ├── Vec4.java │ ├── ColorGradient.java │ └── Colorated.java │ ├── content │ ├── SStatusEffects.java │ ├── SLiquids.java │ ├── SItems.java │ ├── SGraphics.java │ ├── SLoader.java │ └── SPlanets.java │ ├── satellites │ ├── CelestialBase.java │ ├── CharSatellite.java │ ├── Satellite.java │ └── CelestialBody.java │ ├── game │ └── SRules.java │ ├── entities │ ├── bullet │ │ ├── SubSunBulletType.java │ │ ├── AreaLaserBullet.java │ │ └── SunBulletType.java │ ├── units │ │ └── RevolverWeaponMount.java │ ├── VEffect.java │ ├── part │ │ └── SHoverPart.java │ └── abilities │ │ └── DeathZoneAbility.java │ ├── io │ └── STypeIO.java │ ├── graphics │ ├── SLayers.java │ ├── NTexture.java │ ├── RegionsTextures.java │ ├── DrawRequest.java │ ├── g3d │ │ ├── Model.java │ │ ├── Lights.java │ │ └── wobj │ │ │ └── Obj.java │ ├── SCEffect.java │ ├── Q.java │ ├── SEffect.java │ ├── VoidStriderCollapseEffectController.java │ ├── SDraw.java │ └── DynamicTexture.java │ ├── statuses │ ├── StatusEffectBullet.java │ ├── StatusEffectEntry.java │ ├── SStatusEffect.java │ └── StatusEffectsController.java │ ├── utils │ ├── SInterp.java │ ├── SMath.java │ └── SStrings.java │ ├── meta │ ├── SAttributes.java │ └── SStat.java │ ├── ui │ ├── dialogs │ │ ├── SPausedDialog.java │ │ ├── SPlanetDialog.java │ │ ├── SliderSetting.java │ │ ├── SatelliteDialog.java │ │ ├── DynTexVisible.java │ │ └── ShadersEditor.java │ ├── scene │ │ └── BufferRegionDrawable.java │ └── elements │ │ └── Switch.java │ ├── temperature │ ├── FreezingData.java │ ├── FreezingAbility.java │ ├── HeatData.java │ └── HeatAbility.java │ ├── events │ └── SEvents.java │ ├── files │ └── InternalFileTree.java │ ├── net │ └── RemoteMethods.java │ ├── controllers │ └── GenericController.java │ ├── maps │ └── planet │ │ └── HieloPlanetGenerator.java │ ├── core │ ├── SVars.java │ └── Sueno.java │ ├── type │ └── weapon │ │ └── MultiBulletWeapon.java │ ├── spacestations │ └── SpaceStations.java │ └── processors │ └── SuenoInputProcessor.java ├── README.md ├── .gitignore ├── mod.json ├── extensions ├── zelaux-entity-anno-comp │ └── core.gradle ├── durmiendo-builder-tasks │ └── core.gradle └── mindustry-mod │ └── core.gradle ├── settings └── settings.json ├── gradle.properties ├── .github └── workflows │ ├── workflow-build.yml │ ├── updateBuildScripts.yml │ └── discordPublication.yml ├── LICENSE ├── docs └── buildSystem.md └── gradlew.bat /res/bundles/bundle.properties: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /res/bundles/bundle_ru.properties: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /res/data/builder: -------------------------------------------------------------------------------- 1 | durmiendo/1706 -------------------------------------------------------------------------------- /jitpack.yml: -------------------------------------------------------------------------------- 1 | jdk: 2 | - openjdk20 3 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include 'annotations' -------------------------------------------------------------------------------- /annotations/build/tmp/jar/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | 3 | -------------------------------------------------------------------------------- /res/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/icon.png -------------------------------------------------------------------------------- /res/sprites/sh1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/sh1.png -------------------------------------------------------------------------------- /res/sprites/sh2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/sh2.png -------------------------------------------------------------------------------- /res/sprites/tst.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/tst.png -------------------------------------------------------------------------------- /res/sprites/1-num.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/1-num.png -------------------------------------------------------------------------------- /res/sprites/2-num.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/2-num.png -------------------------------------------------------------------------------- /res/sprites/3-num.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/3-num.png -------------------------------------------------------------------------------- /res/sprites/4-num.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/4-num.png -------------------------------------------------------------------------------- /res/sprites/5-num.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/5-num.png -------------------------------------------------------------------------------- /res/sprites/6-num.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/6-num.png -------------------------------------------------------------------------------- /res/sprites/7-num.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/7-num.png -------------------------------------------------------------------------------- /res/sprites/8-num.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/8-num.png -------------------------------------------------------------------------------- /res/sprites/9-num.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/9-num.png -------------------------------------------------------------------------------- /res/sprites/frog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/frog.png -------------------------------------------------------------------------------- /res/sprites/glow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/glow.png -------------------------------------------------------------------------------- /res/sprites/tri1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/tri1.png -------------------------------------------------------------------------------- /res/sprites/tri2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/tri2.png -------------------------------------------------------------------------------- /res/models/mita/Body.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/models/mita/Body.png -------------------------------------------------------------------------------- /res/models/mita/Face.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/models/mita/Face.png -------------------------------------------------------------------------------- /res/models/mita/Hair.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/models/mita/Hair.png -------------------------------------------------------------------------------- /res/sprites/10-num.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/10-num.png -------------------------------------------------------------------------------- /res/sprites/11-num.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/11-num.png -------------------------------------------------------------------------------- /res/sprites/12-num.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/12-num.png -------------------------------------------------------------------------------- /res/sprites/black75.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/black75.png -------------------------------------------------------------------------------- /res/sprites/circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/circle.png -------------------------------------------------------------------------------- /res/sprites/gear-big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/gear-big.png -------------------------------------------------------------------------------- /res/sprites/spaace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/spaace.png -------------------------------------------------------------------------------- /res/sprites/summon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/summon.png -------------------------------------------------------------------------------- /res/models/cube/router.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/models/cube/router.png -------------------------------------------------------------------------------- /res/models/mita/cloth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/models/mita/cloth.png -------------------------------------------------------------------------------- /res/sprites/cartridges.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/cartridges.png -------------------------------------------------------------------------------- /res/sprites/gear-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/gear-small.png -------------------------------------------------------------------------------- /res/sprites/laarge-orb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/laarge-orb.png -------------------------------------------------------------------------------- /res/sprites/large-orb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/large-orb.png -------------------------------------------------------------------------------- /res/sprites/satellite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/satellite.png -------------------------------------------------------------------------------- /res/sprites/sun-bullet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/sun-bullet.png -------------------------------------------------------------------------------- /res/models/router/router.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/models/router/router.png -------------------------------------------------------------------------------- /res/sprites/bullets/knife.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/bullets/knife.png -------------------------------------------------------------------------------- /res/sprites/sueno-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/sueno-white.png -------------------------------------------------------------------------------- /res/sprites/sun-bullet2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/sun-bullet2.png -------------------------------------------------------------------------------- /res/sprites/white-cub2-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/white-cub2-50.png -------------------------------------------------------------------------------- /res/sprites/white-cube50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/white-cube50.png -------------------------------------------------------------------------------- /res/sprites/white-point50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/white-point50.png -------------------------------------------------------------------------------- /res/sprites/blocks/walls/ts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/walls/ts.png -------------------------------------------------------------------------------- /res/sprites/non-cartridges.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/non-cartridges.png -------------------------------------------------------------------------------- /res/sprites/units/tanks/sun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/tanks/sun.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /res/sprites/blocks/storage/n1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/storage/n1.png -------------------------------------------------------------------------------- /res/sprites/blocks/storage/n2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/storage/n2.png -------------------------------------------------------------------------------- /res/sprites/blocks/walls/mita.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/walls/mita.png -------------------------------------------------------------------------------- /res/sprites/blocks/walls/ts1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/walls/ts1.png -------------------------------------------------------------------------------- /res/sprites/blocks/walls/ts2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/walls/ts2.png -------------------------------------------------------------------------------- /res/sprites/spaaaaaaaaaaaaaace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/spaaaaaaaaaaaaaace.png -------------------------------------------------------------------------------- /res/sprites/units/hovers/space.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/hovers/space.png -------------------------------------------------------------------------------- /res/sprites/units/hovers/vial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/hovers/vial.png -------------------------------------------------------------------------------- /res/sprites/units/missles/bomb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/missles/bomb.png -------------------------------------------------------------------------------- /res/sprites/units/tanks/sear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/tanks/sear.png -------------------------------------------------------------------------------- /res/sprites/units/tanks/singe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/tanks/singe.png -------------------------------------------------------------------------------- /res/sprites/units/tanks/spark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/tanks/spark.png -------------------------------------------------------------------------------- /res/fonts/JetBrainsMono-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/fonts/JetBrainsMono-Regular.ttf -------------------------------------------------------------------------------- /res/sprites/blocks/company/core.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/company/core.png -------------------------------------------------------------------------------- /res/sprites/units/core/believer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/core/believer.png -------------------------------------------------------------------------------- /res/sprites/units/hovers/engross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/hovers/engross.png -------------------------------------------------------------------------------- /res/sprites/units/hovers/vessel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/hovers/vessel.png -------------------------------------------------------------------------------- /res/sprites/units/tanks/sun-cell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/tanks/sun-cell.png -------------------------------------------------------------------------------- /res/sprites/units/tanks/sun-full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/tanks/sun-full.png -------------------------------------------------------------------------------- /res/sprites/units/tanks/sun-gun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/tanks/sun-gun.png -------------------------------------------------------------------------------- /annotations/build/libs/annotations.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/annotations/build/libs/annotations.jar -------------------------------------------------------------------------------- /res/sprites/blocks/drills/WaDR-22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/drills/WaDR-22.png -------------------------------------------------------------------------------- /res/sprites/blocks/storage/demand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/storage/demand.png -------------------------------------------------------------------------------- /res/sprites/units/hovers/space-cell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/hovers/space-cell.png -------------------------------------------------------------------------------- /res/sprites/units/hovers/space-full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/hovers/space-full.png -------------------------------------------------------------------------------- /res/sprites/units/hovers/vial-cell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/hovers/vial-cell.png -------------------------------------------------------------------------------- /res/sprites/units/hovers/vial-full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/hovers/vial-full.png -------------------------------------------------------------------------------- /res/sprites/units/missles/bomb-cell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/missles/bomb-cell.png -------------------------------------------------------------------------------- /res/sprites/units/tanks/sear-cell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/tanks/sear-cell.png -------------------------------------------------------------------------------- /res/sprites/units/tanks/sear-full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/tanks/sear-full.png -------------------------------------------------------------------------------- /res/sprites/units/tanks/sear-treads.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/tanks/sear-treads.png -------------------------------------------------------------------------------- /res/sprites/units/tanks/singe-cell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/tanks/singe-cell.png -------------------------------------------------------------------------------- /res/sprites/units/tanks/singe-full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/tanks/singe-full.png -------------------------------------------------------------------------------- /res/sprites/units/tanks/spark-cell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/tanks/spark-cell.png -------------------------------------------------------------------------------- /res/sprites/units/tanks/spark-full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/tanks/spark-full.png -------------------------------------------------------------------------------- /res/sprites/units/tanks/sun-treads.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/tanks/sun-treads.png -------------------------------------------------------------------------------- /res/sprites/blocks/drills/WaDR-22-top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/drills/WaDR-22-top.png -------------------------------------------------------------------------------- /res/sprites/blocks/storage/demand-pre.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/storage/demand-pre.png -------------------------------------------------------------------------------- /res/sprites/units/core/believer-cell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/core/believer-cell.png -------------------------------------------------------------------------------- /res/sprites/units/core/believer-full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/core/believer-full.png -------------------------------------------------------------------------------- /res/sprites/units/hovers/engross-cell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/hovers/engross-cell.png -------------------------------------------------------------------------------- /res/sprites/units/hovers/engross-full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/hovers/engross-full.png -------------------------------------------------------------------------------- /res/sprites/units/hovers/engross-gun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/hovers/engross-gun.png -------------------------------------------------------------------------------- /res/sprites/units/hovers/vessel-cell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/hovers/vessel-cell.png -------------------------------------------------------------------------------- /res/sprites/units/hovers/vessel-full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/hovers/vessel-full.png -------------------------------------------------------------------------------- /res/sprites/units/hovers/vial-weapon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/hovers/vial-weapon.png -------------------------------------------------------------------------------- /res/sprites/units/tanks/sear-gatling.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/tanks/sear-gatling.png -------------------------------------------------------------------------------- /res/sprites/units/tanks/singe-treads.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/tanks/singe-treads.png -------------------------------------------------------------------------------- /res/sprites/units/tanks/singe-weapon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/tanks/singe-weapon.png -------------------------------------------------------------------------------- /res/sprites/units/tanks/spark-treads.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/tanks/spark-treads.png -------------------------------------------------------------------------------- /res/sprites/units/tanks/sun-gun-blade.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/tanks/sun-gun-blade.png -------------------------------------------------------------------------------- /res/sprites/units/tanks/sun-gun-cell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/tanks/sun-gun-cell.png -------------------------------------------------------------------------------- /res/sprites/units/tanks/sun-gun-coil.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/tanks/sun-gun-coil.png -------------------------------------------------------------------------------- /res/sprites/blocks/defense/turrets/slash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/defense/turrets/slash.png -------------------------------------------------------------------------------- /res/sprites/blocks/defense/turrets/slice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/defense/turrets/slice.png -------------------------------------------------------------------------------- /res/sprites/blocks/distribution/monorail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/distribution/monorail.png -------------------------------------------------------------------------------- /res/sprites/blocks/environment/floor/i1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/environment/floor/i1.png -------------------------------------------------------------------------------- /res/sprites/blocks/environment/floor/i2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/environment/floor/i2.png -------------------------------------------------------------------------------- /res/sprites/blocks/environment/floor/s1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/environment/floor/s1.png -------------------------------------------------------------------------------- /res/sprites/blocks/environment/floor/s2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/environment/floor/s2.png -------------------------------------------------------------------------------- /res/sprites/blocks/environment/floor/t1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/environment/floor/t1.png -------------------------------------------------------------------------------- /res/sprites/blocks/environment/floor/t2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/environment/floor/t2.png -------------------------------------------------------------------------------- /res/sprites/blocks/environment/floor/t3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/environment/floor/t3.png -------------------------------------------------------------------------------- /res/sprites/blocks/environment/floor/w1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/environment/floor/w1.png -------------------------------------------------------------------------------- /res/sprites/blocks/environment/floor/w2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/environment/floor/w2.png -------------------------------------------------------------------------------- /res/sprites/blocks/storage/demand-normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/storage/demand-normal.png -------------------------------------------------------------------------------- /res/sprites/blocks/storage/demand-orig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/storage/demand-orig.png -------------------------------------------------------------------------------- /res/sprites/blocks/storage/demand-team.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/storage/demand-team.png -------------------------------------------------------------------------------- /res/sprites/blocks/walls/undestroyable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/walls/undestroyable.png -------------------------------------------------------------------------------- /res/sprites/units/hovers/vessel-weapon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/hovers/vessel-weapon.png -------------------------------------------------------------------------------- /res/sprites/units/spiders/void-strider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/spiders/void-strider.png -------------------------------------------------------------------------------- /res/sprites/void-strider-collapse-effect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/void-strider-collapse-effect.png -------------------------------------------------------------------------------- /res/sprites/blocks/drills/WaDR-22-rotator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/drills/WaDR-22-rotator.png -------------------------------------------------------------------------------- /res/sprites/blocks/environment/floor/dev1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/environment/floor/dev1.png -------------------------------------------------------------------------------- /res/sprites/blocks/environment/floor/dev2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/environment/floor/dev2.png -------------------------------------------------------------------------------- /res/sprites/blocks/environment/floor/dev3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/environment/floor/dev3.png -------------------------------------------------------------------------------- /res/sprites/blocks/environment/floor/dev4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/environment/floor/dev4.png -------------------------------------------------------------------------------- /res/sprites/blocks/environment/floor/dev5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/environment/floor/dev5.png -------------------------------------------------------------------------------- /res/sprites/blocks/environment/floor/none1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/environment/floor/none1.png -------------------------------------------------------------------------------- /res/sprites/blocks/environment/floor/test1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/environment/floor/test1.png -------------------------------------------------------------------------------- /res/sprites/blocks/storage/demand-normal0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/storage/demand-normal0.png -------------------------------------------------------------------------------- /res/sprites/blocks/storage/demand-normal10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/storage/demand-normal10.png -------------------------------------------------------------------------------- /res/sprites/blocks/storage/demand-normal11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/storage/demand-normal11.png -------------------------------------------------------------------------------- /res/sprites/blocks/storage/demand-normal12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/storage/demand-normal12.png -------------------------------------------------------------------------------- /res/sprites/blocks/storage/demand-normal13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/storage/demand-normal13.png -------------------------------------------------------------------------------- /res/sprites/blocks/storage/demand-normal14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/storage/demand-normal14.png -------------------------------------------------------------------------------- /res/sprites/blocks/storage/demand-normal15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/storage/demand-normal15.png -------------------------------------------------------------------------------- /res/sprites/blocks/storage/demand-normal2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/storage/demand-normal2.png -------------------------------------------------------------------------------- /res/sprites/blocks/storage/demand-normal3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/storage/demand-normal3.png -------------------------------------------------------------------------------- /res/sprites/blocks/storage/demand-normal4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/storage/demand-normal4.png -------------------------------------------------------------------------------- /res/sprites/blocks/storage/demand-normal5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/storage/demand-normal5.png -------------------------------------------------------------------------------- /res/sprites/blocks/storage/demand-normal6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/storage/demand-normal6.png -------------------------------------------------------------------------------- /res/sprites/blocks/storage/demand-normal7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/storage/demand-normal7.png -------------------------------------------------------------------------------- /res/sprites/blocks/storage/demand-normal8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/storage/demand-normal8.png -------------------------------------------------------------------------------- /res/sprites/blocks/storage/demand-normal9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/storage/demand-normal9.png -------------------------------------------------------------------------------- /res/sprites/units/spiders/void-strider-leg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/spiders/void-strider-leg.png -------------------------------------------------------------------------------- /res/sprites/void-strider-collapse-effect1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/void-strider-collapse-effect1.png -------------------------------------------------------------------------------- /res/sprites/blocks/environment/floor/corite1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/environment/floor/corite1.png -------------------------------------------------------------------------------- /res/sprites/blocks/environment/floor/corite2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/environment/floor/corite2.png -------------------------------------------------------------------------------- /res/sprites/blocks/environment/floor/corite3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/environment/floor/corite3.png -------------------------------------------------------------------------------- /res/sprites/blocks/environment/floor/phosphor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/environment/floor/phosphor.png -------------------------------------------------------------------------------- /res/sprites/blocks/production/void_extractor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/production/void_extractor.png -------------------------------------------------------------------------------- /res/sprites/blocks/storage/demand-team-orig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/storage/demand-team-orig.png -------------------------------------------------------------------------------- /res/sprites/units/spiders/void-strider-cell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/spiders/void-strider-cell.png -------------------------------------------------------------------------------- /res/sprites/units/spiders/void-strider-full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/spiders/void-strider-full.png -------------------------------------------------------------------------------- /res/sprites/units/spiders/void-strider-vessel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/spiders/void-strider-vessel.png -------------------------------------------------------------------------------- /res/sprites/units/spiders/void-strider-wing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/spiders/void-strider-wing.png -------------------------------------------------------------------------------- /res/sprites/units/tanks/sear-gatling-barrel-l.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/tanks/sear-gatling-barrel-l.png -------------------------------------------------------------------------------- /res/sprites/units/tanks/sear-gatling-barrel-r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/tanks/sear-gatling-barrel-r.png -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/world/blocks/build/Heated.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.world.blocks.build; 2 | 3 | public interface Heated { 4 | } 5 | -------------------------------------------------------------------------------- /res/sprites/blocks/environment/floor/Femmanite1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/environment/floor/Femmanite1.png -------------------------------------------------------------------------------- /res/sprites/blocks/environment/floor/Femmanite2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/environment/floor/Femmanite2.png -------------------------------------------------------------------------------- /res/sprites/blocks/environment/floor/Femmanite3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/environment/floor/Femmanite3.png -------------------------------------------------------------------------------- /res/sprites/blocks/production/void_extractor_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/production/void_extractor_1.png -------------------------------------------------------------------------------- /res/sprites/blocks/production/void_extractor_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/production/void_extractor_2.png -------------------------------------------------------------------------------- /res/sprites/blocks/production/void_extractor_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/production/void_extractor_3.png -------------------------------------------------------------------------------- /res/sprites/blocks/production/void_extractor_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/production/void_extractor_4.png -------------------------------------------------------------------------------- /res/sprites/units/spiders/void-strider-leg-base.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/spiders/void-strider-leg-base.png -------------------------------------------------------------------------------- /res/sprites/blocks/defense/turrets/violence-bullet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/defense/turrets/violence-bullet.png -------------------------------------------------------------------------------- /res/sprites/blocks/drills/WaDR-22-rotator-bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/drills/WaDR-22-rotator-bottom.png -------------------------------------------------------------------------------- /res/sprites/blocks/environment/walls/corite-wall1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/environment/walls/corite-wall1.png -------------------------------------------------------------------------------- /res/sprites/blocks/environment/walls/corite-wall2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/environment/walls/corite-wall2.png -------------------------------------------------------------------------------- /res/sprites/blocks/production/void_extractor-old.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/production/void_extractor-old.png -------------------------------------------------------------------------------- /res/sprites/units/tanks/sear-gatling-barrel-center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/units/tanks/sear-gatling-barrel-center.png -------------------------------------------------------------------------------- /res/sprites/blocks/environment/floor/Femmanite-ice1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/environment/floor/Femmanite-ice1.png -------------------------------------------------------------------------------- /res/sprites/blocks/environment/floor/Femmanite-ice2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/environment/floor/Femmanite-ice2.png -------------------------------------------------------------------------------- /res/sprites/blocks/environment/floor/Femmanite-ice3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/environment/floor/Femmanite-ice3.png -------------------------------------------------------------------------------- /res/sprites/blocks/environment/walls/Femmanite-wall1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/environment/walls/Femmanite-wall1.png -------------------------------------------------------------------------------- /res/sprites/blocks/environment/walls/Femmanite-wall2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/environment/walls/Femmanite-wall2.png -------------------------------------------------------------------------------- /res/sprites/blocks/defense/turrets/291_20240820011023.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/defense/turrets/291_20240820011023.png -------------------------------------------------------------------------------- /res/sprites/blocks/environment/walls/Femmanite-boulder1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/environment/walls/Femmanite-boulder1.png -------------------------------------------------------------------------------- /res/sprites/blocks/environment/walls/Femmanite-boulder2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/environment/walls/Femmanite-boulder2.png -------------------------------------------------------------------------------- /res/sprites/blocks/environment/walls/corite-wall-large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/environment/walls/corite-wall-large.png -------------------------------------------------------------------------------- /res/sprites/blocks/production/void_extractor_left_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/production/void_extractor_left_top.png -------------------------------------------------------------------------------- /res/sprites/blocks/production/void_extractor_right_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/production/void_extractor_right_top.png -------------------------------------------------------------------------------- /res/sprites/blocks/environment/walls/Femmanite-ice-wall1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/environment/walls/Femmanite-ice-wall1.png -------------------------------------------------------------------------------- /res/sprites/blocks/environment/walls/Femmanite-ice-wall2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/environment/walls/Femmanite-ice-wall2.png -------------------------------------------------------------------------------- /res/sprites/blocks/environment/walls/Femmanite-wall-large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/environment/walls/Femmanite-wall-large.png -------------------------------------------------------------------------------- /res/sprites/blocks/production/void_extractor_left_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/production/void_extractor_left_bottom.png -------------------------------------------------------------------------------- /res/sprites/blocks/production/void_extractor_right_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/production/void_extractor_right_bottom.png -------------------------------------------------------------------------------- /annotations/build/tmp/compileJava/previous-compilation-data.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/annotations/build/tmp/compileJava/previous-compilation-data.bin -------------------------------------------------------------------------------- /res/sprites/blocks/environment/walls/Femmanite-ice-wall-large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/res/sprites/blocks/environment/walls/Femmanite-ice-wall-large.png -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/math/area/Area.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.math.area; 2 | 3 | public interface Area { 4 | public boolean insidePoint(float a, float b); 5 | } 6 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/content/SStatusEffects.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.content; 2 | 3 | public class SStatusEffects { 4 | 5 | 6 | public static void load() { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/satellites/CelestialBase.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.satellites; 2 | 3 | public class CelestialBase { 4 | public CelestialBase() { 5 | 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /annotations/build/classes/java/main/org/durmiendo/sap/SuenoSettings.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/annotations/build/classes/java/main/org/durmiendo/sap/SuenoSettings.class -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/game/SRules.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.game; 2 | 3 | import mindustry.game.Rules; 4 | 5 | public class SRules extends Rules { 6 | public boolean temperature = false; 7 | } 8 | -------------------------------------------------------------------------------- /annotations/build/classes/java/main/org/durmiendo/sap/SuenoSettingsProcessor$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/annotations/build/classes/java/main/org/durmiendo/sap/SuenoSettingsProcessor$1.class -------------------------------------------------------------------------------- /annotations/build/classes/java/main/org/durmiendo/sap/SuenoSettingsProcessor.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuenoDev/Sueno/HEAD/annotations/build/classes/java/main/org/durmiendo/sap/SuenoSettingsProcessor.class -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/entities/bullet/SubSunBulletType.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.entities.bullet; 2 | 3 | import mindustry.entities.bullet.BasicBulletType; 4 | 5 | public class SubSunBulletType extends BasicBulletType { 6 | } -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/io/STypeIO.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.io; 2 | 3 | import mindustry.annotations.Annotations; 4 | import mindustry.io.TypeIO; 5 | 6 | @Annotations.TypeIOHandler 7 | public class STypeIO extends TypeIO { 8 | } 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Sueno 2 | 3 | ## How to build 4 | Run `buildRelease` task, the compiled mod file will appear in `artifacts` directory 5 | 6 | Briefly about the build system [here](https://github.com/SuenoDev/Sueno/tree/master/docs/buildSystem.md) 7 | -------------------------------------------------------------------------------- /res/shaders/void-strider-collapse-effect.vert: -------------------------------------------------------------------------------- 1 | attribute vec4 a_position; 2 | attribute vec2 a_texCoord0; 3 | 4 | varying vec2 v_texCoords; 5 | 6 | void main(){ 7 | v_texCoords = a_texCoord0; 8 | gl_Position = a_position; 9 | } 10 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip 4 | networkTimeout=10000 5 | zipStoreBase=GRADLE_USER_HOME 6 | zipStorePath=wrapper/dists 7 | -------------------------------------------------------------------------------- /res/shaders/black-hole.vert: -------------------------------------------------------------------------------- 1 | attribute vec4 a_position; 2 | attribute vec2 a_texCoord0; 3 | 4 | varying vec2 v_texCoords; 5 | 6 | varying vec4 v_pos; 7 | 8 | void main() { 9 | gl_Position = a_position; 10 | v_pos = a_position; 11 | v_texCoords = a_texCoord0; 12 | } -------------------------------------------------------------------------------- /res/shaders/black-hole.frag: -------------------------------------------------------------------------------- 1 | uniform sampler2D u_texture; 2 | 3 | varying vec2 v_texCoords; 4 | varying vec4 v_pos; 5 | 6 | void main() { 7 | vec2 T = v_texCoords.xy; 8 | vec4 pos = vec4(T,T); 9 | gl_FragColor = vec4(pos.x, pos.y, 1., texture2D(u_texture, T).a); 10 | } -------------------------------------------------------------------------------- /res/shaders/4d.frag: -------------------------------------------------------------------------------- 1 | 2 | // Цвет, который будет использоваться для отрисовки объекта 3 | uniform vec3 u_Color; // RGB-цвет 4 | 5 | void main() 6 | { 7 | // Присваиваем выходной цвет фрагменту. Альфа-канал установлен в 1.0 (полностью непрозрачный). 8 | gl_FragColor = vec4(.6, .6, .6, 1.0); 9 | } -------------------------------------------------------------------------------- /res/models/cube/cube.mtl: -------------------------------------------------------------------------------- 1 | # Blender 4.4.3 MTL File: 'None' 2 | # www.blender.org 3 | 4 | newmtl Материал 5 | Ns 250.000000 6 | Ka 1.000000 1.000000 1.000000 7 | Ks 0.500000 0.500000 0.500000 8 | Ke 0.500000 0.500000 0.500000 9 | Ni 1.500000 10 | d 1.000000 11 | illum 2 12 | map_Kd cube/router.png -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/content/SLiquids.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.content; 2 | 3 | import mindustry.type.Liquid; 4 | 5 | public class SLiquids { 6 | public static Liquid voidl; 7 | 8 | public static void load() { 9 | voidl = new Liquid("voidl"); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /res/models/router/router.mtl: -------------------------------------------------------------------------------- 1 | # Blender 4.1.1 MTL File: 'quit.blend' 2 | # www.blender.org 3 | 4 | newmtl router 5 | Ns 0.000000 6 | Ka 1.000000 1.000000 1.000000 7 | Ks 0.500000 0.500000 0.500000 8 | Ke 0.000000 0.000000 0.000000 9 | Ni 1.500000 10 | d 1.000000 11 | illum 2 12 | map_Kd router/router.png -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/graphics/SLayers.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.graphics; 2 | 3 | import mindustry.graphics.Layer; 4 | 5 | public class SLayers { 6 | public static final float 7 | voidspace = Layer.groundUnit+3f, 8 | deadZone = Layer.flyingUnit+3f, 9 | blades = 60f; 10 | } 11 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/statuses/StatusEffectBullet.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.statuses; 2 | 3 | public class StatusEffectBullet { 4 | public SStatusEffect effect; 5 | public float power; 6 | 7 | public StatusEffectBullet(SStatusEffect effect, float power) { 8 | this.effect = effect; 9 | this.power = power; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/utils/SInterp.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.utils; 2 | 3 | import arc.math.Interp; 4 | import arc.math.Mathf; 5 | 6 | import static arc.math.Mathf.*; 7 | 8 | public class SInterp { 9 | public static Interp old = x -> { 10 | if (x < 0.1f) return sin(5f*pi*x)/2f; 11 | else return sqr(x-0.1f)/1.6f+0.5f; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/meta/SAttributes.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.meta; 2 | 3 | 4 | import mindustry.world.meta.Attribute; 5 | 6 | public class SAttributes { 7 | public static final Attribute 8 | temperature = Attribute.add("temperature"), 9 | temperatureMax = Attribute.add("temperatureMax"), 10 | temperatureMin = Attribute.add("temperatureMin"); 11 | } 12 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/graphics/NTexture.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.graphics; 2 | 3 | import arc.graphics.Texture; 4 | 5 | public class NTexture extends Texture { 6 | public Texture normal; 7 | public Texture base; 8 | 9 | public NTexture(Texture base, Texture normal) { 10 | super(); 11 | this.normal = normal; 12 | this.base = base; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/math/SInterp.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.math; 2 | 3 | import arc.math.Interp; 4 | import arc.math.Mathf; 5 | 6 | public interface SInterp { 7 | Interp recession = a -> a<1 && a>0 ? (Mathf.cos(a*Mathf.PI) + 1f) / 2f : a>1 ? 1f : 0f; 8 | Interp arecession = a -> 1f-recession.apply(a); 9 | Interp wave = a -> a<1 && a>0 ? (Mathf.cos(-a*Mathf.PI/2f) + 1f) / 2f : 0f; 10 | } 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ### Gradle files 2 | /.gradle/ 3 | /gradle/ 4 | /build/ 5 | cache/ 6 | javax.annotation.processing.Processor 7 | artifacts/ 8 | 9 | 10 | ### Local files 11 | /settings/local.json 12 | 13 | ### Generated files 14 | /gen/ 15 | 16 | 17 | /run/ 18 | 19 | ### IntelliJ IDEA files 20 | /.idea/ 21 | 22 | ### Aseprite files 23 | *.aseprite 24 | *.ase 25 | 26 | *.jar 27 | *.bin 28 | 29 | /annotations/build/ 30 | s.sh -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/ui/dialogs/SPausedDialog.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.ui.dialogs; 2 | 3 | import arc.Events; 4 | import mindustry.ui.dialogs.PausedDialog; 5 | import org.durmiendo.sueno.events.SEvents; 6 | 7 | 8 | public class SPausedDialog extends PausedDialog { 9 | public void runExitSave(){ 10 | Events.fire(new SEvents.CampaignCloseEvent()); 11 | super.runExitSave(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/temperature/FreezingData.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.temperature; 2 | 3 | public class FreezingData { 4 | public float tmrGenCapacity; 5 | public float tmrGenSpeed; 6 | public float tmrGenRadiusFP; 7 | public float tmrGenPowerFP; 8 | public float tmrGenCapacityFP; 9 | public float unitSpeedConstant; 10 | public float unitSpeedConstantTmrCondition; 11 | public float unitHeal; 12 | } 13 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/world/units/comps/TimedDestroyComp.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.world.units.comps; 2 | 3 | import arc.util.Time; 4 | import mindustry.annotations.Annotations; 5 | import mindustry.gen.Unitc; 6 | 7 | @Annotations.Component 8 | public abstract class TimedDestroyComp implements Unitc{ 9 | @Override 10 | public void update() { 11 | damage(maxHealth() / 3.5f * 0.005f * Time.delta, false); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /mod.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": "org.durmiendo.sueno.core.Sueno", 3 | "name": "sueno", 4 | "displayName": "Sueno", 5 | "author": "// TODO authors", 6 | "repo": "SuenoDev/Sueno", 7 | "subtitle": "Content mod", 8 | "description": "Sueno is a modification that allows you to go to a new planet with unique temperature mechanics", 9 | "version": "0.21", 10 | "minGameVersion": "146", 11 | "java": true, 12 | "hidden": false, 13 | "hideBrowser": false 14 | } 15 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/meta/SStat.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.meta; 2 | 3 | 4 | import mindustry.world.meta.Stat; 5 | import mindustry.world.meta.StatCat; 6 | 7 | public class SStat extends Stat { 8 | // public static final Seq all = new Seq<>(); not used 9 | public static final Stat 10 | 11 | temperature = new Stat("temperature", StatCat.general); 12 | 13 | public SStat(String name) { 14 | super(name); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/temperature/FreezingAbility.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.temperature; 2 | 3 | import mindustry.entities.abilities.Ability; 4 | import mindustry.gen.Unit; 5 | 6 | public class FreezingAbility extends Ability { 7 | 8 | public FreezingData fd; 9 | public FreezingAbility(FreezingData fd) { 10 | this.fd = fd; 11 | } 12 | 13 | @Override 14 | public void update(Unit unit) { 15 | super.update(unit); 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/world/blocks/environment/Ice.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.world.blocks.environment; 2 | 3 | import mindustry.world.blocks.environment.Floor; 4 | 5 | public class Ice extends Floor { 6 | 7 | 8 | public Ice(String name) { 9 | super(name); 10 | 11 | // cacheLayer = new CacheLayer.ShaderLayer(SShaders.iceShader); 12 | albedo = 0.9f; 13 | supportsOverlay = true; 14 | // CacheLayer.addLast(cacheLayer); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/statuses/StatusEffectEntry.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.statuses; 2 | 3 | public class StatusEffectEntry { 4 | public SStatusEffect effect; 5 | public float progress; 6 | public float immunity; 7 | public boolean active; 8 | 9 | public StatusEffectEntry(SStatusEffect effect, float immunity) { 10 | this.effect = effect; 11 | this.progress = 0f; 12 | this.immunity = immunity; 13 | this.active = false; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/graphics/RegionsTextures.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.graphics; 2 | 3 | import arc.graphics.g2d.TextureAtlas; 4 | import arc.graphics.g2d.TextureRegion; 5 | 6 | public class RegionsTextures extends TextureAtlas.AtlasRegion { 7 | public TextureRegion norm; 8 | public TextureRegion region; 9 | public RegionsTextures(TextureRegion region, TextureRegion norm) { 10 | super(region); 11 | this.norm = norm; 12 | this.region = region; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/events/SEvents.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.events; 2 | 3 | import arc.util.Log; 4 | import org.durmiendo.sueno.core.SVars; 5 | 6 | public class SEvents { 7 | public static class CampaignOpenEvent { 8 | public CampaignOpenEvent() { 9 | SVars.onCampaign = true; 10 | } 11 | } 12 | 13 | public static class CampaignCloseEvent { 14 | public CampaignCloseEvent() { 15 | SVars.onCampaign = false; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /res/shaders/void-space.vert: -------------------------------------------------------------------------------- 1 | attribute vec4 a_position; 2 | attribute vec4 a_color; 3 | attribute vec2 a_texCoord0; 4 | attribute vec4 a_mix_color; 5 | uniform mat4 u_projTrans; 6 | varying vec4 v_color; 7 | varying vec4 v_mix_color; 8 | varying vec2 v_texCoords; 9 | 10 | void main() { 11 | v_color = a_color; 12 | v_color.a = v_color.a * (255.0/254.0); 13 | v_mix_color = a_mix_color; 14 | v_mix_color.a *= (255.0/254.0); 15 | v_texCoords = a_texCoord0; 16 | gl_Position = u_projTrans * a_position; 17 | } -------------------------------------------------------------------------------- /res/shaders/3d.vert: -------------------------------------------------------------------------------- 1 | //vert 2 | uniform mat4 u_proj; 3 | uniform mat4 u_view; 4 | uniform mat4 u_worldTrans; 5 | 6 | attribute vec4 a_position; 7 | attribute vec3 a_normal; 8 | attribute vec2 a_texCoord0; 9 | 10 | varying vec2 v_texcoord; 11 | varying vec3 v_normal; 12 | varying vec3 v_worldPos; 13 | 14 | void main() { 15 | vec4 worldPos4 = u_worldTrans * a_position; 16 | v_worldPos = worldPos4.xyz; 17 | v_normal = normalize(mat3(u_worldTrans) * a_normal); 18 | v_texcoord = a_texCoord0; 19 | gl_Position = u_proj * u_view * worldPos4; 20 | } -------------------------------------------------------------------------------- /extensions/zelaux-entity-anno-comp/core.gradle: -------------------------------------------------------------------------------- 1 | project.tasks.compileJava { JavaCompile task -> 2 | task.doFirst { 3 | project.copy { CopySpec spec -> 4 | spec.from project.file("mod.json") 5 | spec.into project.sourceSets.main.resources.srcDirs.first() 6 | } 7 | } 8 | 9 | task.doLast { 10 | project.sourceSets.main.resources.srcDirs.each { File dir -> 11 | var file = project.ext.child(dir, "mod.json") 12 | if (file.exists()) 13 | project.delete file 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /annotations/src/org/durmiendo/sap/SuenoSettings.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sap; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | 9 | @Retention(RetentionPolicy.SOURCE) 10 | @Target(ElementType.FIELD) 11 | public @interface SuenoSettings { 12 | float min() default 0f; 13 | float max() default 1f; 14 | float steep() default 0.1f; 15 | float def() default 0; 16 | int accuracy() default 4; 17 | int priority() default -1; 18 | } -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/entities/units/RevolverWeaponMount.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.entities.units; 2 | 3 | import mindustry.entities.units.WeaponMount; 4 | import mindustry.type.Weapon; 5 | import org.durmiendo.sueno.type.weapon.RevolverWeapon; 6 | 7 | public class RevolverWeaponMount extends WeaponMount { 8 | public int cartridges = 1; 9 | public float reloadCartridges = 1; 10 | public RevolverWeapon revolverWeapon; 11 | 12 | public RevolverWeaponMount(Weapon weapon) { 13 | super(weapon); 14 | revolverWeapon = (RevolverWeapon) weapon; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/utils/SMath.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.utils; 2 | 3 | import arc.math.Mathf; 4 | import arc.math.geom.Vec2; 5 | 6 | public class SMath { 7 | public static Vec2 circlePointer(float x1, float y1, float r, float x2, float y2, Vec2 result) { 8 | float dx = x2 - x1; 9 | float dy = y2 - y1; 10 | 11 | float len = Mathf.sqrt(Mathf.sqr(dx) + Mathf.sqr(dy)); 12 | 13 | dx = dx / len; 14 | dy = dy / len; 15 | 16 | result.x = dx * r + x1; 17 | result.y = dy * r + y1; 18 | 19 | return result; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /res/shaders/void-strider-collapse-effect.frag: -------------------------------------------------------------------------------- 1 | varying vec2 v_texCoords; 2 | 3 | uniform sampler2D u_effects; 4 | uniform sampler2D u_screen; 5 | 6 | const vec3 COLOR = vec3(0.08, 0.1, 0.6); 7 | const vec3 COLOR_SCALE = vec3(0.3, 0.3, 0.7); 8 | 9 | void main(){ 10 | vec4 effect_color = texture2D(u_effects, v_texCoords); 11 | 12 | vec4 sc = texture2D(u_screen, v_texCoords); 13 | 14 | sc.rgb = mix(sc.rgb, (vec3(1.0) - sc.rgb) * COLOR_SCALE, effect_color.a * 3.0); 15 | sc.rgb = mix(sc.rgb, COLOR, effect_color.a * 0.8); 16 | 17 | vec4 screen_color = sc; 18 | 19 | gl_FragColor = screen_color; 20 | } -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/graphics/DrawRequest.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.graphics; 2 | 3 | import arc.graphics.Blending; 4 | import arc.graphics.Texture; 5 | import arc.graphics.g2d.TextureRegion; 6 | 7 | class DrawRequest implements Comparable{ 8 | TextureRegion region = new TextureRegion(); 9 | float x, y, z, originX, originY, width, height, rotation, color, mixColor; 10 | float[] vertices = new float[24]; 11 | Texture texture; 12 | Blending blending; 13 | Runnable run; 14 | 15 | @Override 16 | public int compareTo(DrawRequest o){ 17 | return Float.compare(z, o.z); 18 | } 19 | } -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/utils/SStrings.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.utils; 2 | 3 | import arc.util.Strings; 4 | 5 | public class SStrings { 6 | 7 | public static StringBuilder fixed(float value, int decimals) { 8 | StringBuilder sb = Strings.fixedBuilder(value, decimals); 9 | for (int i = sb.length() - 1; i >= 1; i--) { 10 | if (sb.charAt(i) == '.') { 11 | sb.deleteCharAt(i); 12 | break; 13 | } 14 | if (sb.charAt(i) != '0') { 15 | break; 16 | } 17 | sb.deleteCharAt(i); 18 | } 19 | return sb; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/content/SItems.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.content; 2 | 3 | import mindustry.type.Item; 4 | 5 | public class SItems { 6 | 7 | public static Item 8 | nickel, 9 | magnetite, 10 | 11 | invar, 12 | vanadium, 13 | kalite, 14 | nitium, 15 | realite, 16 | phosphor; 17 | 18 | 19 | 20 | public static void load() { 21 | nickel = new Item("nickel"); 22 | magnetite = new Item("magnetite"); 23 | invar = new Item("invar"); 24 | kalite = new Item("kalite"); 25 | nitium = new Item("nitium"); 26 | realite = new Item("realite"); 27 | phosphor = new Item("phosphor"); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/math/Maths.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.math; 2 | 3 | public class Maths { 4 | 5 | public static boolean isAngleInSector(float slen, float scenter, float angle) { 6 | slen = (slen + 360) % 360; 7 | scenter = (scenter + 360) % 360; 8 | angle = (angle + 360) % 360; 9 | 10 | float startAngle = scenter - slen / 2; 11 | float endAngle = scenter + slen / 2; 12 | 13 | if (startAngle <= endAngle) { 14 | return startAngle <= angle && angle <= endAngle; 15 | } else { 16 | return (startAngle <= angle && angle <= 360f) || (0f <= angle && angle <= endAngle); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /res/shaders/normal.vert: -------------------------------------------------------------------------------- 1 | attribute vec4 a_position; 2 | attribute vec4 a_color; 3 | attribute vec2 a_texCoord0; 4 | attribute vec2 a_texCoord1; 5 | attribute float a_rotation; 6 | attribute vec4 a_mix_color; 7 | uniform mat4 u_projTrans; 8 | 9 | varying vec4 v_color; 10 | varying vec4 v_mix_color; 11 | varying vec2 v_texCoords; 12 | varying vec2 v_texCoords1; 13 | varying float v_rotation; 14 | 15 | void main(){ 16 | v_color = a_color; 17 | v_color.a = v_color.a * (255.0/254.0); 18 | v_mix_color = a_mix_color; 19 | v_mix_color.a *= (255.0/254.0); 20 | v_texCoords = a_texCoord0; 21 | v_texCoords1 = a_texCoord1; 22 | v_rotation = a_rotation; 23 | gl_Position = u_projTrans * a_position; 24 | } -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/graphics/g3d/Model.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.graphics.g3d; 2 | 3 | import arc.graphics.Camera; 4 | import arc.graphics.g3d.Camera3D; 5 | import arc.math.geom.Mat3D; 6 | import arc.math.geom.Vec3; 7 | import org.durmiendo.sueno.graphics.g3d.wobj.Obj; 8 | 9 | public class Model { 10 | public Obj obj; 11 | public Vec3 pos; 12 | public Vec3 rotation; 13 | 14 | public Model() {} 15 | 16 | public Model(Obj obj, Vec3 pos, Vec3 rotation) { 17 | this.obj = obj; 18 | this.pos = pos; 19 | this.rotation = rotation; 20 | } 21 | 22 | public void render(Mat3D projection, Mat3D view, Camera3D camera, Vec3 light) { 23 | obj.render(pos, rotation, projection, view, camera, light); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/math/area/CArea.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.math.area; 2 | 3 | import arc.math.Mathf; 4 | 5 | import java.util.Objects; 6 | 7 | public class CArea implements Area{ 8 | public float x, y, r; 9 | 10 | public CArea(float x, float y, float r) { 11 | this.x = x; 12 | this.y = y; 13 | this.r = r; 14 | } 15 | 16 | public boolean insidePoint(float a, float b) { 17 | return Mathf.dst(x, y, a, b) <= r; 18 | } 19 | 20 | @Override 21 | public int hashCode() { 22 | return Objects.hash(x, y, r); 23 | } 24 | 25 | @Override 26 | public boolean equals(Object obj) { 27 | if (!(obj instanceof CArea d)) return false; 28 | return x == d.x && y == d.y && r == d.r; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/math/area/RArea.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.math.area; 2 | 3 | 4 | import java.util.Objects; 5 | 6 | public class RArea implements Area { 7 | public float x, y; 8 | public float w, h; 9 | 10 | public RArea(float x, float y, float w, float h) { 11 | this.x = x; 12 | this.y = y; 13 | this.w = w; 14 | this.h = h; 15 | } 16 | 17 | public boolean insidePoint(float a, float b) { 18 | return a >= x && a <= w && b >= y && b <= h; 19 | } 20 | 21 | @Override 22 | public int hashCode() { 23 | return Objects.hash(x, y, w, h); 24 | } 25 | 26 | @Override 27 | public boolean equals(Object obj) { 28 | if (!(obj instanceof RArea d)) return false; 29 | return x == d.x && y == d.y && w == d.w && h == d.h; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/graphics/SCEffect.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.graphics; 2 | 3 | import arc.graphics.Color; 4 | import mindustry.entities.Effect; 5 | import mindustry.gen.Bullet; 6 | 7 | public class SCEffect extends Effect { 8 | @Override 9 | public float render(int id, Color color, float life, float lifetime, float rotation, float x, float y, Object data) { 10 | 11 | return super.render(id, color, life, lifetime, rotation, x, y, data); 12 | } 13 | 14 | public static class EffectContainer extends Effect.EffectContainer { 15 | public Bullet b; 16 | 17 | @Override 18 | public void set(int id, Color color, float life, float lifetime, float rotation, float x, float y, Object data) { 19 | super.set(id, color, life, lifetime, rotation, x, y, data); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/satellites/CharSatellite.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.satellites; 2 | 3 | import arc.math.Mathf; 4 | import arc.math.geom.Vec3; 5 | import arc.util.Log; 6 | import arc.util.Time; 7 | import mindustry.Vars; 8 | import mindustry.type.Planet; 9 | import mindustry.ui.Fonts; 10 | 11 | public class CharSatellite extends CelestialBody{ 12 | public char name; 13 | public CharSatellite(float r, float pitch, float yaw, Planet planet, char name) { 14 | super(r, pitch, yaw, planet); 15 | 16 | this.name = name; 17 | } 18 | 19 | @Override 20 | public void draw() { 21 | angle += speed * Time.delta; 22 | angle %= 2 * Mathf.pi; 23 | 24 | position = newPos(); 25 | Vec3 e = Vars.renderer.planets.cam.project(new Vec3(position)); 26 | Fonts.def.draw(String.valueOf(name), e.x, e.y); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /settings/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "projectSettings": { 3 | "version": "v0.21", 4 | "group": "SuenoDev/Sueno" 5 | }, 6 | 7 | "dependencies": { 8 | "useJitpackForMindustryDependency": false, 9 | "mindustryVersion": "v146", 10 | 11 | "list": [ 12 | { "mindustry-mod-core-anno": "com.github.Zelaux.MindustryModCore:annotations:repo-test7" } 13 | ], 14 | 15 | "deps": { 16 | "compileOnly": [ 17 | "list:mindustry-mod-core-anno", 18 | "project:annotations" 19 | ], 20 | "annotationProcessor": [ 21 | "list:mindustry-mod-core-anno", 22 | "project:annotations" 23 | ] 24 | } 25 | }, 26 | 27 | "extensions":[ 28 | "mindustry-mod", 29 | "zelaux-entity-anno-comp", 30 | "durmiendo-builder-tasks" 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/entities/VEffect.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.entities; 2 | 3 | import arc.func.Cons; 4 | import arc.graphics.Color; 5 | import arc.graphics.g2d.Draw; 6 | import mindustry.entities.Effect; 7 | import org.durmiendo.sueno.graphics.SLayers; 8 | 9 | public class VEffect extends Effect { 10 | private static final EffectContainer container = new EffectContainer(); 11 | public VEffect(float life, Cons r) { 12 | super(life, r); 13 | layer = SLayers.voidspace; 14 | } 15 | 16 | public float render(int id, Color color, float life, float lifetime, float rotation, float x, float y, Object data) { 17 | container.set(id, color, life, lifetime, rotation, x, y, data); 18 | Draw.z(SLayers.voidspace); 19 | Draw.reset(); 20 | this.render(container); 21 | Draw.reset(); 22 | return container.lifetime; 23 | } 24 | } -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.daemon=true 2 | android.useAndroidX=true 3 | 4 | org.gradle.jvmargs=-Xms256m -Xmx1024m --illegal-access=permit \ 5 | --add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \ 6 | --add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED \ 7 | --add-opens=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED \ 8 | --add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED \ 9 | --add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \ 10 | --add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \ 11 | --add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \ 12 | --add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \ 13 | --add-opens=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED \ 14 | --add-opens=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED \ 15 | --add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED \ 16 | --add-opens=java.base/sun.reflect.annotation=ALL-UNNAMED -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/ui/dialogs/SPlanetDialog.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.ui.dialogs; 2 | 3 | 4 | import arc.Events; 5 | import arc.scene.ui.Dialog; 6 | import mindustry.ui.dialogs.PlanetDialog; 7 | import org.durmiendo.sueno.events.SEvents; 8 | 9 | import static arc.Core.settings; 10 | 11 | public class SPlanetDialog extends PlanetDialog { 12 | @Override 13 | public Dialog show() { 14 | settings.put("campaignselect", true); 15 | Events.fire(new SEvents.CampaignOpenEvent()); 16 | return super.show(); 17 | } 18 | 19 | @Override 20 | public void closeOnBack(Runnable callback) { 21 | Events.fire(new SEvents.CampaignCloseEvent()); 22 | super.closeOnBack(callback); 23 | } 24 | 25 | public void draw() { 26 | super.draw(); 27 | // SVars.celestialBodyController.draw(); 28 | } 29 | 30 | public SPlanetDialog() { 31 | super(); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/content/SGraphics.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.content; 2 | 3 | import arc.Core; 4 | import arc.Events; 5 | import arc.graphics.g2d.Draw; 6 | import arc.graphics.gl.Shader; 7 | import arc.math.Mathf; 8 | import arc.util.Time; 9 | import mindustry.Vars; 10 | import mindustry.game.EventType; 11 | import mindustry.graphics.Layer; 12 | import mindustry.graphics.Shaders; 13 | import org.durmiendo.sueno.core.SVars; 14 | import org.durmiendo.sueno.graphics.DynamicTexture; 15 | 16 | public class SGraphics { 17 | public static DynamicTexture sun; 18 | 19 | public static void load() { 20 | sun = DynamicTexture.create( 21 | 100, 100, "shaders/sun.frag", 22 | shader -> { 23 | shader.setUniformf("u_resolution", sun.realWidth, sun.realHeight); 24 | shader.setUniformf("u_time", Time.time/100f); 25 | } 26 | ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /res/models/mita/mita.mtl: -------------------------------------------------------------------------------- 1 | # Blender 4.3.2 MTL File: 'None' 2 | # www.blender.org 3 | 4 | newmtl Body.004 5 | Ns 200.000000 6 | Ka 1.000000 1.000000 1.000000 7 | Ks 1.000000 1.000000 1.000000 8 | Ke 0.000000 0.000000 0.000000 9 | Ni 1.500000 10 | illum 3 11 | map_Kd mita/Body.png 12 | map_d mita/Body.png 13 | 14 | newmtl Cloth.004 15 | Ns 200.000000 16 | Ka 1.000000 1.000000 1.000000 17 | Ks 1.000000 1.000000 1.000000 18 | Ke 0.000000 0.000000 0.000000 19 | Ni 1.500000 20 | illum 3 21 | map_Kd mita/cloth.png 22 | map_d mita/cloth.png 23 | 24 | newmtl Face.004 25 | Ns 200.000000 26 | Ka 1.000000 1.000000 1.000000 27 | Ks 1.000000 1.000000 1.000000 28 | Ke 0.000000 0.000000 0.000000 29 | Ni 1.500000 30 | illum 3 31 | map_Kd mita/Face.png 32 | map_d mita/Face.png 33 | 34 | newmtl Hairs.004 35 | Ns 200.000000 36 | Ka 1.000000 1.000000 1.000000 37 | Ks 1.000000 1.000000 1.000000 38 | Ke 0.000000 0.000000 0.000000 39 | Ni 1.500000 40 | illum 3 41 | map_Kd mita/Hair.png 42 | map_d mita/Hair.png 43 | -------------------------------------------------------------------------------- /extensions/durmiendo-builder-tasks/core.gradle: -------------------------------------------------------------------------------- 1 | project.tasks.create("runBuildRelease") 2 | project.tasks.create("run") 3 | project.tasks.create("firstRun") 4 | 5 | project.tasks.runBuildRelease { Task task -> 6 | task.dependsOn 'copyBuildRelease' 7 | task.dependsOn 'run' 8 | } 9 | 10 | project.tasks.run { Task task -> 11 | task.doLast { 12 | if (project.ext.local?.dbt.run != null) { 13 | project.ext.local?.dbt.run?.each { 14 | r -> 15 | String[] command = r.split(" "); 16 | new ProcessBuilder(command).start(); 17 | } 18 | } 19 | 20 | } 21 | } 22 | 23 | project.tasks.firstRun { Task task -> 24 | task.doLast { 25 | if (project.ext.local?.dbt.frun != null) { 26 | project.ext.local?.dbt.frun?.each { 27 | r -> 28 | String[] command = r.split(" "); 29 | new ProcessBuilder(command).start(); 30 | } 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /.github/workflows/workflow-build.yml: -------------------------------------------------------------------------------- 1 | name: Building 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | buildJar: 7 | runs-on: ubuntu-latest 8 | 9 | steps: 10 | - uses: actions/checkout@v4 11 | - name: Set up JDK 20 12 | uses: actions/setup-java@v1 13 | with: 14 | java-version: 20 15 | - name: Build mod jars 16 | run: | 17 | chmod +x gradlew 18 | ./gradlew copyBuildRelease --stacktrace 19 | - name: Get mod version 20 | id: get-version 21 | run: | 22 | VERSION=$(cat mod.json | jq -r '.version') 23 | echo "::set-output name=version::$VERSION" 24 | - name: Rename jar 25 | run: | 26 | mv artifacts/Sueno.jar artifacts/Sueno-${{ steps.get-version.outputs.version }}.${{ github.run_number }}.jar 27 | - name: Upload built jar file 28 | uses: actions/upload-artifact@v4 29 | with: 30 | name: ${{ github.event.repository.name }} 31 | path: artifacts/*.jar -------------------------------------------------------------------------------- /.github/workflows/updateBuildScripts.yml: -------------------------------------------------------------------------------- 1 | name: Update build scripts 2 | 3 | on: 4 | workflow_dispatch: 5 | 6 | jobs: 7 | update-build-script: 8 | runs-on: ubuntu-latest 9 | 10 | steps: 11 | - uses: actions/checkout@v2 12 | - name: Set up PATH 13 | run: | 14 | echo "${ANDROID_HOME}/build-tools/30.0.1" >> $GITHUB_PATH 15 | - name: Set up JDK 16 16 | uses: actions/setup-java@v1 17 | with: 18 | java-version: 16 19 | - name: Update build script 20 | run: | 21 | java -jar simpleupdater.jar -Rnekit508/mindustry-mod-template 22 | - name: Commit changes 23 | run: | 24 | git config --global user.email "no-reply@github.com" 25 | git config --global user.name "GitHub Actions" 26 | git add --all 27 | git commit -m "[AUTO] Update build script" 28 | git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} 29 | git push 30 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/world/blocks/walls/WallThatDestroysBullets.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.world.blocks.walls; 2 | 3 | import arc.util.io.Reads; 4 | import arc.util.io.Writes; 5 | import mindustry.world.blocks.defense.Wall; 6 | 7 | public class WallThatDestroysBullets extends Wall { 8 | public WallThatDestroysBullets(String name) { 9 | super(name); 10 | update = true; 11 | } 12 | 13 | public class WallThatDestroysBulletsBuild extends WallBuild { 14 | public boolean initialized; 15 | 16 | @Override 17 | public void updateTile() { 18 | initialized = true; 19 | 20 | super.updateTile(); 21 | } 22 | 23 | @Override 24 | public void read(Reads read, byte revision) { 25 | super.read(read, revision); 26 | initialized = read.bool(); 27 | } 28 | 29 | @Override 30 | public void write(Writes write) { 31 | super.write(write); 32 | write.bool(initialized); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /extensions/mindustry-mod/core.gradle: -------------------------------------------------------------------------------- 1 | project.ext { 2 | mindustryVersion = project.ext.settings?.dependencies?.mindustryVersion ?: "v146" 3 | useJitpackForMindustryDependency = project.ext.settings?.dependencies?.useJitpackForMindustryDependency ?: "" 4 | 5 | mindustryDependence = "com.github.Anuken.Mindustry${project.ext.useJitpackForMindustryDependency ? "Jitpack" : ""}:core:$project.ext.mindustryVersion" 6 | } 7 | 8 | dependencies { 9 | compileOnly project.ext.mindustryDependence 10 | } 11 | 12 | project.tasks.jar { Jar jar -> 13 | jar.from(project.projectDir) { CopySpec copys -> 14 | copys.include("mod.json") 15 | copys.include("icon.png") 16 | } 17 | } 18 | 19 | allprojects.each { Project project -> 20 | project.configurations.all { 21 | resolutionStrategy.eachDependency { details -> 22 | if(details.requested.group == "com.github.Anuken.Arc" && details.requested.name != "flabel"){ 23 | details.useVersion "${rootProject.ext.mindustryVersion}" 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/entities/bullet/AreaLaserBullet.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.entities.bullet; 2 | 3 | import arc.graphics.Color; 4 | import arc.graphics.g2d.Draw; 5 | import arc.math.Mathf; 6 | import mindustry.entities.Effect; 7 | import mindustry.entities.bullet.PointLaserBulletType; 8 | import mindustry.gen.Bullet; 9 | 10 | import static arc.graphics.g2d.Draw.color; 11 | import static arc.graphics.g2d.Lines.lineAngle; 12 | import static arc.graphics.g2d.Lines.stroke; 13 | import static arc.math.Angles.randLenVectors; 14 | 15 | public class AreaLaserBullet extends PointLaserBulletType { 16 | 17 | public Effect effect = new Effect(60f, e -> { 18 | stroke(3f); 19 | color(Color.white); 20 | randLenVectors(e.id+1, 11, 5f, 8f, (x, y) -> { 21 | lineAngle(x, y, Mathf.angle(x, y), 12f, 12f); 22 | }); 23 | }); 24 | 25 | @Override 26 | public void draw(Bullet b){ 27 | //Draw.color(color); 28 | //Drawf.laser(laser, laserEnd, b.x, b.y, b.aimX, b.aimY, 4f); 29 | 30 | Draw.reset(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/files/InternalFileTree.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.files; 2 | 3 | import arc.files.*; 4 | import arc.util.OS; 5 | 6 | /** 7 | * Use for JAR internal navigation 8 | * @author nekit508 9 | **/ 10 | public class InternalFileTree { 11 | public Class anchorClass; 12 | 13 | public ZipFi root; 14 | 15 | /** 16 | * @param owner navigation anchor 17 | **/ 18 | public InternalFileTree(Class owner) { 19 | anchorClass = owner; 20 | 21 | String classPath = owner.getResource("").getFile().replaceAll("%20", " "); 22 | classPath = classPath.substring(classPath.indexOf(":")+2); 23 | String jarPath = classPath.substring(0, classPath.indexOf("!")); 24 | if (OS.isLinux) jarPath = "/" + jarPath; 25 | 26 | root = new ZipFi(new Fi(jarPath)); 27 | } 28 | 29 | public Fi child(String childPath) { 30 | Fi out = root; 31 | for (String s : childPath.split("/")) { 32 | if (!"".equals(s)) 33 | out = out.child(s); 34 | } 35 | return out; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/math/Vec4.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.math; 2 | 3 | import java.util.Objects; // Для удобства в equals/hashCode 4 | 5 | public class Vec4 { 6 | public float x, y, z, w; 7 | 8 | public Vec4(float x, float y, float z, float w) { 9 | this.x = x; 10 | this.y = y; 11 | this.z = z; 12 | this.w = w; 13 | } 14 | 15 | @Override 16 | public boolean equals(Object o) { 17 | if (this == o) return true; 18 | if (o == null || getClass() != o.getClass()) return false; 19 | Vec4 vec4 = (Vec4) o; 20 | float epsilon = 0.00001f; 21 | return Math.abs(vec4.x - x) < epsilon && 22 | Math.abs(vec4.y - y) < epsilon && 23 | Math.abs(vec4.z - z) < epsilon && 24 | Math.abs(vec4.w - w) < epsilon; 25 | } 26 | 27 | @Override 28 | public int hashCode() { 29 | return Objects.hash(x, y, z, w); 30 | } 31 | 32 | @Override 33 | public String toString() { 34 | return "(" + x + ", " + y + ", " + z + ", " + w + ")"; 35 | } 36 | } -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/ui/scene/BufferRegionDrawable.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.ui.scene; 2 | 3 | import arc.graphics.g2d.TextureRegion; 4 | import arc.graphics.gl.FrameBuffer; 5 | import arc.scene.style.TextureRegionDrawable; 6 | 7 | public class BufferRegionDrawable extends TextureRegionDrawable { 8 | public FrameBuffer frameBuffer; 9 | 10 | int bw = -1, bh = -1; 11 | 12 | public BufferRegionDrawable(FrameBuffer buffer) { 13 | frameBuffer = buffer; 14 | 15 | bufferSizeChanged(); 16 | } 17 | 18 | public void bufferSizeChanged() { 19 | if (region == null) { 20 | set(new TextureRegion(frameBuffer.getTexture())); 21 | region.flip(false, true); 22 | } if (bw != frameBuffer.getWidth() || bh != frameBuffer.getHeight()) { 23 | bw = frameBuffer.getWidth(); 24 | bh = frameBuffer.getHeight(); 25 | 26 | region.set(frameBuffer.getTexture(), 0, 0, frameBuffer.getWidth(), frameBuffer.getHeight()); 27 | region.flip(false, true); 28 | set(region); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /res/models/cube/cube.obj: -------------------------------------------------------------------------------- 1 | # Blender 4.4.3 2 | # www.blender.org 3 | mtllib cube.mtl 4 | o Cube 5 | v 1.000000 1.000000 -1.000000 6 | v 1.000000 -1.000000 -1.000000 7 | v 1.000000 1.000000 1.000000 8 | v 1.000000 -1.000000 1.000000 9 | v -1.000000 1.000000 -1.000000 10 | v -1.000000 -1.000000 -1.000000 11 | v -1.000000 1.000000 1.000000 12 | v -1.000000 -1.000000 1.000000 13 | vn -0.0000 1.0000 -0.0000 14 | vn -0.0000 -0.0000 1.0000 15 | vn -1.0000 -0.0000 -0.0000 16 | vn -0.0000 -1.0000 -0.0000 17 | vn 1.0000 -0.0000 -0.0000 18 | vn -0.0000 -0.0000 -1.0000 19 | vt 0.667654 0.500000 20 | vt 1.000090 0.500000 21 | vt 1.000090 0.750000 22 | vt 0.667654 0.750000 23 | vt 0.333661 0.750000 24 | vt 0.667654 1.000000 25 | vt 0.333661 1.000000 26 | vt 0.333661 0.000000 27 | vt 0.667654 0.000000 28 | vt 0.667654 0.250000 29 | vt 0.333661 0.250000 30 | vt 0.000328 0.500000 31 | vt 0.333661 0.500000 32 | vt 0.000328 0.750000 33 | s 0 34 | usemtl Материал 35 | f 1/1/1 5/2/1 7/3/1 3/4/1 36 | f 4/5/2 3/4/2 7/6/2 8/7/2 37 | f 8/8/3 7/9/3 5/10/3 6/11/3 38 | f 6/12/4 2/13/4 4/5/4 8/14/4 39 | f 2/13/5 1/1/5 3/4/5 4/5/5 40 | f 6/11/6 5/10/6 1/1/6 2/13/6 -------------------------------------------------------------------------------- /res/models/router/router.obj: -------------------------------------------------------------------------------- 1 | # Blender 4.1.1 2 | # www.blender.org 3 | mtllib router.mtl 4 | o router 5 | v -1.137650 -3.256937 0.882546 6 | v -1.602723 0.123048 3.177564 7 | v -2.310747 -1.154843 -2.451032 8 | v -2.775820 2.225142 -0.156014 9 | v 2.775820 -2.225142 0.156014 10 | v 2.310747 1.154843 2.451032 11 | v 1.602723 -0.123048 -3.177564 12 | v 1.137650 3.256937 -0.882546 13 | vn -0.9517 -0.2509 0.1767 14 | vn -0.2853 0.5112 -0.8107 15 | vn 0.9517 0.2509 -0.1767 16 | vn 0.2853 -0.5112 0.8107 17 | vn 0.1131 -0.8220 -0.5581 18 | vn -0.1131 0.8220 0.5581 19 | vt -0.002718 -2.010034 20 | vt 1.002718 -2.010034 21 | vt 1.002718 -1.004599 22 | vt -0.002718 -1.004599 23 | vt 1.002718 0.000837 24 | vt -0.002718 0.000837 25 | vt 1.002718 1.006272 26 | vt -0.002718 1.006272 27 | vt 1.002718 2.011708 28 | vt -0.002718 2.011708 29 | vt -1.008153 0.000837 30 | vt -1.008153 1.006272 31 | vt 2.008153 0.000837 32 | vt 2.008153 1.006272 33 | s 0 34 | usemtl router 35 | f 1/1/1 2/2/1 4/3/1 3/4/1 36 | f 3/4/2 4/3/2 8/5/2 7/6/2 37 | f 7/6/3 8/5/3 6/7/3 5/8/3 38 | f 5/8/4 6/7/4 2/9/4 1/10/4 39 | f 3/11/5 7/6/5 5/8/5 1/12/5 40 | f 8/5/6 4/13/6 2/14/6 6/7/6 41 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2024 Durmiendo 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge , publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | It is prohibited to use images in this software without permission from the author. 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/statuses/SStatusEffect.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.statuses; 2 | 3 | import arc.util.Time; 4 | import mindustry.ctype.Content; 5 | import mindustry.ctype.ContentType; 6 | import mindustry.gen.Unit; 7 | import org.durmiendo.sueno.core.SVars; 8 | 9 | public class SStatusEffect extends Content { 10 | @Override 11 | public ContentType getContentType() { 12 | return ContentType.status; 13 | } 14 | 15 | public void work(StatusEffectEntry entry) { 16 | 17 | } 18 | 19 | public void update(StatusEffectEntry entry) { 20 | if (entry.active) { 21 | if (entry.progress == 0) entry.active = false; 22 | else work(entry); 23 | } 24 | else if (entry.progress >= entry.immunity) { 25 | entry.active = true; 26 | work(entry); 27 | } 28 | 29 | if (entry.progress > 0) entry.progress = Math.min(0, entry.progress - 1.5f * Time.delta); 30 | } 31 | 32 | public void apply(Unit u) { 33 | float i = SVars.statusEffectsController.immunity(u.type); 34 | StatusEffectEntry entry = new StatusEffectEntry(this, i); 35 | SVars.statusEffectsController.apply(entry, u); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /res/shaders/blade.frag: -------------------------------------------------------------------------------- 1 | #define HIGHP 2 | 3 | #define ALPHA 0.18 4 | #define step 3.0 5 | 6 | uniform sampler2D u_texture; 7 | uniform vec2 u_texsize; 8 | uniform vec2 u_invsize; 9 | uniform float u_time; 10 | uniform float u_dp; 11 | uniform vec2 u_offset; 12 | 13 | varying vec2 v_texCoords; 14 | 15 | 16 | 17 | void main() { 18 | vec2 T = v_texCoords.xy; 19 | vec2 coords = (T * u_texsize); 20 | 21 | T.x += sin(coords.y / 3.0 + u_time / 20.0) / u_texsize.x; 22 | T.y += cos(coords.x / 3.0 + u_time / 20.0) / u_texsize.y; 23 | 24 | float blurAmount = 2.0; 25 | vec4 color = vec4(0.0); 26 | float totalWeight = 0.0; 27 | 28 | 29 | for (float i = -blurAmount; i <= blurAmount; i++) { 30 | vec2 offset = vec2(0.0, i * u_invsize.y * 0.4); 31 | vec4 sampleColor = texture2D(u_texture, T + offset); 32 | float weight = 0.2; 33 | 34 | color += sampleColor * weight; 35 | totalWeight += weight; 36 | } 37 | 38 | color /= totalWeight; 39 | 40 | gl_FragColor = color; 41 | 42 | vec4 maxed = texture2D(u_texture, T); 43 | 44 | if(texture2D(u_texture, T).a < 0.9 && maxed.a > 0.9){ 45 | gl_FragColor = vec4(maxed.rgb, maxed.a * 100.0); 46 | } 47 | } -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/graphics/Q.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.graphics; 2 | 3 | 4 | import arc.graphics.g2d.Draw; 5 | import org.durmiendo.sueno.core.SVars; 6 | 7 | public class Q { 8 | public static byte getCurrent() { 9 | return (byte) SVars.qval; 10 | } 11 | 12 | public static byte 13 | LOW = 1, MEDIUM = 2, HIGH = 3; 14 | 15 | 16 | public static boolean is(byte quality) { 17 | return quality == getCurrent(); 18 | } 19 | 20 | public static void run(Runnable r) { 21 | float z = Draw.z(); 22 | r.run(); 23 | Draw.z(z); 24 | } 25 | 26 | public static void low(Runnable r) { 27 | if ( is(LOW) ) run(r); 28 | } 29 | 30 | public static void medium(Runnable r) { 31 | if ( is(MEDIUM) ) run(r); 32 | } 33 | 34 | public static void high(Runnable r) { 35 | if ( is(HIGH) ) run(r); 36 | } 37 | 38 | public static void multi(Runnable low, Runnable medium, Runnable high) { 39 | low(low); 40 | medium(medium); 41 | high(high); 42 | } 43 | 44 | public static void multi(Runnable low, Runnable high) { 45 | multi(low, low, high); 46 | } 47 | } -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/net/RemoteMethods.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.net; 2 | 3 | public class RemoteMethods { 4 | //@Annotations.Remote(targets = Annotations.Loc.server, called = Annotations.Loc.both) 5 | // public static void voidStriderCollapse(VoidStriderc voidStriderc) { 6 | // float x = voidStriderc.x(); 7 | // float y = voidStriderc.y(); 8 | // float radius = 0; 9 | // 10 | // if (voidStriderc.type() instanceof VoidStriderUnitType voidStriderUnitType) { 11 | // radius = voidStriderUnitType.collapseRadius; 12 | // VoidStriderCollapseEffectController.at(x, y, voidStriderUnitType.collapseEffect); 13 | // } else 14 | // Log.err("Type of @ must be VoidStriderUnitType (not @) for correct collapsing effects.\nCollapses with this unitType will be incorrect.", 15 | // voidStriderc, voidStriderc.type()); 16 | // 17 | // Vars.indexer.allBuildings(x, y, radius, tile -> { 18 | // tile.tile().setBlock(Blocks.air); 19 | // }); 20 | // final float finalRange = radius; 21 | // Units.nearby(x - radius, y - radius, radius * 2f, radius * 2f, u -> { 22 | // if (u != voidStriderc && u.within(x, y, finalRange + u.hitSize/2f)) 23 | // u.destroy(); 24 | // }); 25 | // } 26 | } 27 | 28 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/graphics/SEffect.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.graphics; 2 | 3 | import arc.func.Cons; 4 | import arc.util.Time; 5 | import mindustry.Vars; 6 | 7 | public class SEffect { 8 | public Cons renderer; 9 | public float lifeTime; 10 | 11 | public SEffect(float lifeTime, Cons renderer) { 12 | this.renderer = renderer; 13 | this.lifeTime = lifeTime; 14 | } 15 | 16 | public Container at(float x, float y) { 17 | Container container = new Container(); 18 | container.x = x; 19 | container.y = y; 20 | container.effect = this; 21 | return container; 22 | } 23 | 24 | public Container at(float x, float y, float r) { 25 | Container container = new Container(); 26 | container.x = x; 27 | container.y = y; 28 | container.effect = this; 29 | container.rad = r; 30 | return container; 31 | } 32 | 33 | public class Container { 34 | public float life = 0f; 35 | public SEffect effect; 36 | public float x = 0, y = 0; 37 | public float rad = 1f; 38 | 39 | public boolean render() { 40 | renderer.get(this); 41 | 42 | if (Vars.state.isPlaying()) 43 | life += Time.delta; 44 | return life > lifeTime; 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/world/units/comps/VoidStriderComp.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.world.units.comps; 2 | 3 | import arc.util.ArcRuntimeException; 4 | import arc.util.io.Reads; 5 | import arc.util.io.Writes; 6 | import mindustry.annotations.Annotations; 7 | import mindustry.gen.Unitc; 8 | import mindustry.type.UnitType; 9 | import org.durmiendo.sueno.utils.SLog; 10 | import org.durmiendo.sueno.world.units.types.VoidStriderUnitType; 11 | 12 | @Annotations.Component 13 | public abstract class VoidStriderComp implements Unitc { 14 | public boolean destroyed = false; 15 | public float voidSubstance; 16 | 17 | @Override 18 | public void setType(UnitType type) { 19 | if (!(type instanceof VoidStriderUnitType)) 20 | throw new ArcRuntimeException("VoidStriderc units must be attached to the VoidStriderUnitType, not " 21 | + type.getClass() + " (" + type.name + ")."); 22 | 23 | if (voidSubstance == 0) voidSubstance = ((VoidStriderUnitType) type).voidSubstance; 24 | } 25 | 26 | @Override 27 | public void destroy() { 28 | if (destroyed) return; 29 | destroyed = true; 30 | } 31 | 32 | @Override 33 | public void write(Writes write) { 34 | write.f(voidSubstance); 35 | } 36 | 37 | @Override 38 | public void read(Reads read) { 39 | voidSubstance = read.f(); 40 | SLog.info("read " + voidSubstance); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/satellites/Satellite.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.satellites; 2 | 3 | import arc.Core; 4 | import mindustry.type.Planet; 5 | import mindustry.ui.Styles; 6 | import org.durmiendo.sueno.ui.dialogs.SatelliteDialog; 7 | 8 | 9 | public class Satellite extends CelestialBody { 10 | CelestialBase i; 11 | public SatelliteDialog sd = new SatelliteDialog(Styles.fullDialog); 12 | public Satellite( CelestialBase b, float r, float pitch, float yaw, Planet planet) { 13 | 14 | super(r, pitch, yaw, planet); 15 | health = 375; 16 | 17 | 18 | button.image(Core.atlas.find("sueno-satellite")); 19 | button.clicked(() -> { 20 | sd.put(this); 21 | sd.show(); 22 | }); 23 | i = b; 24 | } 25 | 26 | @Override 27 | public void update() { 28 | super.update(); 29 | 30 | } 31 | 32 | public void upds() { 33 | if (orbitRadius < planet.radius) this.destroy(); 34 | if (orbitRadius < planet.radius+1) { 35 | down(); 36 | damage(0.01f); 37 | } 38 | } 39 | 40 | public void up() { 41 | orbitRadius+=0.001f; 42 | sd.upd(this); 43 | upds(); 44 | } 45 | 46 | public void down() { 47 | orbitRadius-=0.001f; 48 | sd.upd(this); 49 | upds(); 50 | } 51 | 52 | @Override 53 | public void destroy() { 54 | super.destroy(); 55 | sd.hide(); 56 | } 57 | } -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/statuses/StatusEffectsController.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.statuses; 2 | 3 | import arc.Events; 4 | import arc.struct.ObjectMap; 5 | import arc.util.Time; 6 | import mindustry.game.EventType; 7 | import mindustry.gen.Bullet; 8 | import mindustry.gen.Unit; 9 | import mindustry.type.UnitType; 10 | 11 | public class StatusEffectsController { 12 | public ObjectMap bullets = new ObjectMap<>(); 13 | public ObjectMap effects = new ObjectMap<>(); 14 | public ObjectMap immunities = new ObjectMap<>(); 15 | public float time; 16 | 17 | public StatusEffectsController() { 18 | Events.run(EventType.Trigger.update, this::update); 19 | Events.on(EventType.UnitBulletDestroyEvent.class, e -> { 20 | StatusEffectBullet entry = bullets.get(e.bullet); 21 | if (entry != null) { 22 | entry.effect.apply(e.unit); 23 | } 24 | }); 25 | } 26 | 27 | public void init() { 28 | 29 | } 30 | 31 | 32 | public void update() { 33 | long startTime = Time.millis(); 34 | 35 | time = Time.timeSinceMillis(startTime); 36 | } 37 | 38 | public float immunity(UnitType type) { 39 | if (!immunities.containsKey(type)) return type.health; 40 | return immunities.get(type); 41 | } 42 | 43 | public void apply(StatusEffectEntry entry, Unit u) { 44 | effects.put(u, entry); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/content/SLoader.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.content; 2 | 3 | import arc.Core; 4 | import arc.graphics.gl.Shader; 5 | import arc.math.Mathf; 6 | import mindustry.gen.EntityMapping; 7 | //import org.durmiendo.sueno.gen.SCall; 8 | import mindustry.graphics.Shaders; 9 | import org.durmiendo.sueno.core.SVars; 10 | import org.durmiendo.sueno.core.Setter; 11 | import org.durmiendo.sueno.gen.SEntityMapping; 12 | import org.durmiendo.sueno.graphics.DynamicTexture; 13 | import org.durmiendo.sueno.utils.SLog; 14 | 15 | public class SLoader { 16 | public static void load() { 17 | SLog.mark(); 18 | 19 | // no packet in this mod 20 | // SLog.mark(); 21 | //SCall.registerPackets(); 22 | // SLog.elapsedInfo("packets"); 23 | 24 | 25 | SLog.mark(); 26 | 27 | SLog.loadTime(SGraphics::load, "graphics"); 28 | 29 | 30 | SEntityMapping.init(); 31 | EntityMapping.nameMap.keys().toSeq().each(s -> { 32 | EntityMapping.nameMap.put("sueno-" + s, EntityMapping.nameMap.get(s)); 33 | }); 34 | SLog.elapsedInfo("entity mapping"); 35 | 36 | SLog.loadTime(SItems::load, "items"); 37 | SLog.loadTime(SLiquids::load, "liquids"); 38 | SLog.loadTime(SStatusEffects::load, "effects"); 39 | SLog.loadTime(SUnits::load, "units"); 40 | SLog.loadTime(SBlocks::load, "blocks"); 41 | SLog.loadTime(SPlanets::load, "planets"); 42 | 43 | 44 | SLog.elapsedInfo("load content finished"); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /res/shaders/ice.frag: -------------------------------------------------------------------------------- 1 | uniform sampler2D u_texture; 2 | uniform vec2 u_texsize; 3 | uniform vec2 u_offset; 4 | uniform float u_time; 5 | 6 | 7 | 8 | varying vec2 v_texCoords; 9 | 10 | 11 | 12 | vec3 hash3( vec2 p ){ 13 | vec3 q = vec3( dot(p,vec2(127.1,311.7)), 14 | dot(p,vec2(269.5,183.3)), 15 | dot(p,vec2(419.2,371.9)) ); 16 | return fract(sin(q)*43758.5453); 17 | } 18 | 19 | float iqnoise(in vec2 x){ 20 | vec2 p = floor(x); 21 | vec2 f = fract(x); 22 | 23 | float k = 44.; 24 | 25 | float va = 0.0; 26 | float wt = 0.0; 27 | for( int j=-3; j<=3; j++ ) 28 | for( int i=-3; i<=3; i++ ) 29 | { 30 | vec2 g = vec2( float(i),float(j) ); 31 | vec3 o = hash3( p + g )*vec3(1.,1.,1.0); 32 | vec2 r = g - f + o.xy; 33 | float d = dot(r,r); 34 | float ww = pow( 1.0-smoothstep(0.0,1.414,sqrt(d)), k ); 35 | va += o.z*ww; 36 | wt += ww; 37 | } 38 | 39 | return va/wt; 40 | } 41 | 42 | vec3 m(vec3 a, vec3 b, float c) { 43 | float d = 1.-c; 44 | return vec3((a.x*c+b.x*d)/2., (a.y*c+b.y*d)/2., (a.z*c+b.z*d)/2.); 45 | } 46 | 47 | void main(){ 48 | vec2 T = v_texCoords.xy; 49 | vec2 coords = (T * u_texsize) + u_offset; 50 | 51 | float b = pow(iqnoise(coords/9.)+1.,2.)/4.; 52 | float time = u_time/180.; 53 | 54 | // float f = clamp((pow(sin(time*2.+2.),2.) + sin(time/62.-155.)+pow(sin(1.2*time-2.),3.) + sin(3.*time+3.))/4., 0, 1); 55 | vec3 r = vec3(0.6896078431372549,1,0.9907843137254902)*b; 56 | 57 | gl_FragColor = vec4(r.x,r.y,r.z,texture2D(u_texture, T).a); 58 | } -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/controllers/GenericController.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.controllers; 2 | 3 | import arc.math.Mathf; 4 | import arc.util.Log; 5 | import arc.util.Threads; 6 | import arc.util.Time; 7 | 8 | @Deprecated 9 | public abstract class GenericController { 10 | public Thread updateThread; 11 | 12 | private long prevUpd; 13 | private final long delay; 14 | public final long frequency; 15 | 16 | private volatile boolean run = false; 17 | 18 | public volatile float delayDelta; 19 | 20 | public GenericController(long f) { 21 | frequency = f; 22 | delay = Mathf.ceil(1000000f / frequency); 23 | 24 | updateThread = Threads.daemon(() -> { 25 | try { 26 | prevUpd = Time.nanos(); 27 | while (true) { 28 | while (!run) { 29 | Thread.sleep(delay / 1000, (int) (delay % 1000)); 30 | } 31 | long delta = Time.nanos() - prevUpd; 32 | if (delta < delay) { 33 | Thread.sleep(delta / 1000, (int) (delta % 1000)); 34 | } 35 | delayDelta = (float) delta / (float) delay; 36 | prevUpd = Time.nanos(); 37 | update(); 38 | } 39 | } catch (Exception e) { 40 | Log.err(e); 41 | } 42 | }); 43 | } 44 | 45 | public abstract void update(); 46 | 47 | public void stop() { 48 | run = false; 49 | } 50 | 51 | public void start() { 52 | run = true; 53 | } 54 | } -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/temperature/HeatData.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.temperature; 2 | 3 | public class HeatData { 4 | /** 5 | * generate n temperature of second 6 | */ 7 | public float 8 | 9 | generateTemperature, 10 | 11 | 12 | /** 13 | * maximum amount of temperature per unit 14 | */ 15 | capacity, 16 | 17 | /** 18 | * minimum temperature to cause damage 19 | */ 20 | minSafeTemperature, 21 | 22 | /** 23 | * n damage per second within a certain radius 24 | */ 25 | damageRange, 26 | 27 | /** 28 | * dps over temperature, when overheated, 29 | * a unit begins to deal n damage per second within a certain radius 30 | */ 31 | dpsOverTemperature, 32 | 33 | /** 34 | * damage of units into radius 35 | */ 36 | damage, 37 | 38 | /** 39 | * damage from excess temperature, 40 | * calculated according to the formula if temperature is over minSafeTemperature: 41 | * 42 | * (temperature - minSafeTemperature) * overDamage + damage 43 | */ 44 | overDamage, 45 | 46 | /** 47 | * n hp regen of sec 48 | */ 49 | regeneration, 50 | 51 | /** 52 | * adds regeneration to a unit if its temperature is above n 53 | */ 54 | overRegeneration, 55 | 56 | /** 57 | * adds armor to a unit if its temperature is above n 58 | */ 59 | overArmor; 60 | 61 | /** 62 | * determines whether the unit will heat up 63 | */ 64 | public boolean isHeat = false; 65 | 66 | public HeatData(boolean isHeat) { 67 | this.isHeat = isHeat; 68 | } 69 | 70 | public HeatData() {} 71 | } 72 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/math/ColorGradient.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.math; 2 | 3 | import arc.graphics.Color; 4 | 5 | public class ColorGradient { 6 | public static Color[] gradient(float value, Color... colors) { 7 | int numColors = colors.length; 8 | 9 | // Если передан только один цвет, возвращаем его без изменений 10 | if (numColors == 1) { 11 | return colors; 12 | } 13 | 14 | // Если передано два или более цвета, создаем массивы для хранения цветов 15 | Color[] color1 = new Color[numColors - 1]; 16 | Color[] color2 = new Color[numColors - 1]; 17 | 18 | // Заполняем массивы color1 и color2 значениями переданных цветов 19 | for (int i = 0; i < numColors - 1; i++) { 20 | color1[i] = colors[i]; 21 | color2[i] = colors[i + 1]; 22 | } 23 | 24 | int[] red = new int[numColors - 1]; 25 | int[] green = new int[numColors - 1]; 26 | int[] blue = new int[numColors - 1]; 27 | 28 | // Рассчитываем значения red, green и blue для каждой пары цветов 29 | for (int i = 0; i < numColors - 1; i++) { 30 | red[i] = (int) (color1[i].r * (1 - value) + color2[i].r * value); 31 | green[i] = (int) (color1[i].g * (1 - value) + color2[i].g * value); 32 | blue[i] = (int) (color1[i].b * (1 - value) + color2[i].b * value); 33 | } 34 | 35 | // Создаем и возвращаем массив градиентных цветов 36 | Color[] gradientColors = new Color[numColors - 1]; 37 | for (int i = 0; i < numColors - 1; i++) { 38 | gradientColors[i] = new Color(red[i], green[i], blue[i]); 39 | } 40 | return gradientColors; 41 | } 42 | } -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/maps/planet/HieloPlanetGenerator.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.maps.planet; 2 | 3 | import arc.graphics.Color; 4 | import arc.math.Mathf; 5 | import arc.math.geom.Geometry; 6 | import arc.math.geom.Point2; 7 | import arc.math.geom.Vec3; 8 | import mindustry.Vars; 9 | import mindustry.content.Loadouts; 10 | import mindustry.game.Schematics; 11 | import mindustry.maps.generators.PlanetGenerator; 12 | import mindustry.world.TileGen; 13 | import org.durmiendo.sueno.content.SBlocks; 14 | 15 | public class HieloPlanetGenerator extends PlanetGenerator {{ 16 | baseSeed = 2; 17 | defaultLoadout = Loadouts.basicBastion; 18 | } 19 | 20 | @Override 21 | public float getSizeScl() { 22 | return 3000f; 23 | } 24 | 25 | @Override 26 | public float getHeight(Vec3 vec3) { 27 | return 0; 28 | } 29 | 30 | @Override 31 | public Color getColor(Vec3 vec3) { 32 | float r = Mathf.randomSeed(Mathf.round(vec3.y * 1000),0.084375f); 33 | return new Color(0.6f - r, 0.671875f - r, 0.75f + Mathf.randomSeed(Mathf.round(vec3.y * 1000), 0.01f)); 34 | } 35 | 36 | @Override 37 | public void genTile(Vec3 position, TileGen tile){ 38 | tile.floor = SBlocks.devNone; 39 | } 40 | 41 | @Override 42 | protected void generate(){ 43 | pass((x, y) -> { 44 | float max = 0; 45 | for(Point2 p : Geometry.d8edge){ 46 | max = Math.max(0, Vars.world.getDarkness(x + p.x, y + p.y)); 47 | } 48 | if(max > 0){ 49 | block = floor.asFloor().wall; 50 | } 51 | }); 52 | 53 | Schematics.placeLaunchLoadout(width / 2, height / 2); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /res/shaders/dead.frag: -------------------------------------------------------------------------------- 1 | #define HIGHP 2 | 3 | #define ALPHA 0.18 4 | #define step 3.0 5 | 6 | uniform sampler2D u_texture; 7 | uniform vec2 u_texsize; 8 | uniform vec2 u_invsize; 9 | uniform float u_time; 10 | uniform float u_dp; // Distance from camera, use this for zoom level 11 | uniform vec2 u_offset; 12 | 13 | varying vec2 v_texCoords; 14 | 15 | void main() { 16 | vec2 T = v_texCoords.xy; 17 | vec2 coords = (T * u_texsize) + u_offset; // Added offset like in your reference shader 18 | 19 | T.x += sin(coords.y / 3.0 + u_time / 20.0) / u_texsize.x; 20 | T.y += cos(coords.x / 3.0 + u_time / 20.0) / u_texsize.y; 21 | 22 | float blurAmount = 2.0; 23 | vec4 color = vec4(0.0); 24 | float totalWeight = 0.0; 25 | 26 | // Adjust blurAmount based on u_dp (camera distance) 27 | float dynamicBlurAmount = blurAmount * (1.0 + u_dp * 0.5); // Example: more blur as camera moves further 28 | 29 | for (float i = -dynamicBlurAmount; i <= dynamicBlurAmount; i++) { 30 | vec2 offset = vec2(0.0, i * u_invsize.y * 0.4); 31 | vec4 sampleColor = texture2D(u_texture, T + offset); 32 | float weight = 0.2; 33 | 34 | color += sampleColor * weight; 35 | totalWeight += weight; 36 | } 37 | 38 | color /= totalWeight; 39 | 40 | gl_FragColor = color; 41 | 42 | // Use step value from your other shader, scaled by camera distance 43 | float dynamicStep = step * (1.0 + u_dp * 0.5); 44 | 45 | vec4 maxed = max(texture2D(u_texture, T + vec2(-dynamicStep, 1.) * u_invsize), texture2D(u_texture, T + vec2(dynamicStep, -1.) * u_invsize)); 46 | 47 | if(texture2D(u_texture, T).a < 0.9 && maxed.a > 0.9){ 48 | gl_FragColor = vec4(maxed.rgb, maxed.a * 100.0); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/graphics/g3d/Lights.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.graphics.g3d; 2 | 3 | import arc.func.Cons; 4 | import arc.graphics.Color; 5 | import arc.math.Mathf; 6 | import arc.math.geom.Vec2; 7 | import arc.math.geom.Vec3; 8 | import arc.struct.ObjectMap; 9 | import arc.struct.ObjectSet; 10 | import mindustry.gen.Building; 11 | import mindustry.gen.Unit; 12 | 13 | public class Lights { 14 | public static ObjectSet lights = new ObjectSet<>(); 15 | public static ObjectMap buildings = new ObjectMap<>(); 16 | public static ObjectMap units = new ObjectMap<>(); 17 | 18 | 19 | public static void each(Cons lc) { 20 | for (Light l : lights) { 21 | Building b = buildings.get(l); 22 | if (b != null) { 23 | l.pos.set(b.x + Mathf.cos(b.rotdeg()-180f) * l.relPos.x, l.pos.y, b.y + Mathf.sin(b.rotdeg()-180f) * l.relPos.y); 24 | if (!b.isAdded()) { 25 | lights.remove(l); 26 | continue; 27 | } 28 | } 29 | 30 | Unit u = units.get(l); 31 | if (u != null) { 32 | if (!u.isAdded()) { 33 | lights.remove(l); 34 | continue; 35 | } 36 | l.pos.set(u.x + Mathf.cos(u.rotation-180f) * l.relPos.x, l.pos.y, u.y + Mathf.sin(u.rotation-180f) * l.relPos.y); 37 | } 38 | 39 | lc.get(l); 40 | } 41 | } 42 | 43 | public static class Light { 44 | public Vec2 relPos = new Vec2(0, 0); 45 | public Vec3 pos = new Vec3(0, 0, 0); 46 | public float scale = 1f; 47 | public Color color = Color.white; 48 | } 49 | } -------------------------------------------------------------------------------- /.github/workflows/discordPublication.yml: -------------------------------------------------------------------------------- 1 | name: DiscordPub 2 | 3 | on: 4 | workflow_dispatch: 5 | 6 | jobs: 7 | buildJar: 8 | runs-on: ubuntu-latest 9 | 10 | steps: 11 | - uses: actions/checkout@v4 12 | - name: Set up JDK 20 13 | uses: actions/setup-java@v1 14 | with: 15 | java-version: 20 16 | - name: Build mod jars 17 | run: | 18 | chmod +x gradlew 19 | ./gradlew copyBuildRelease --stacktrace 20 | - name: Get mod version 21 | id: get-version 22 | run: | 23 | VERSION=$(cat mod.json | jq -r '.version') 24 | echo "::set-output name=version::$VERSION" 25 | - name: Rename jar 26 | run: | 27 | mv artifacts/Sueno.jar artifacts/Sueno-${{ steps.get-version.outputs.version }}.${{ github.run_number }}.jar 28 | - name: Upload built jar file 29 | uses: actions/upload-artifact@v4 30 | with: 31 | name: ${{ github.event.repository.name }} 32 | path: artifacts/*.jar 33 | - name: Discord Webhook Action 1 34 | uses: tsickert/discord-webhook@v5.3.0 35 | with: 36 | webhook-url: ${{ secrets.DISCORD_WEBHOOK }} 37 | embed-title: "Сборка Sueno #${{ github.run_number }}" 38 | embed-description: "### ${{ github.event.commits[0].message }} " 39 | embed-color: 15386701 40 | embed-url: ${{ github.event.commits[0].url }} 41 | embed-image-url: "https://raw.githubusercontent.com/SuenoDev/Sueno/${{ github.event.commits[0].id }}/.screenshot/img.png" 42 | embed-footer-text: "Версия модификации: ${{ steps.get-version.outputs.version }}" 43 | filename: artifacts/Sueno-${{ steps.get-version.outputs.version }}.${{ github.run_number }}.jar 44 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/math/Colorated.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.math; 2 | 3 | import arc.graphics.Color; 4 | import arc.math.Interp; 5 | 6 | public class Colorated { 7 | public static Color gradient(Color start, Color end, float v) { 8 | return applyToColor(Interp.linear, start, end, v); 9 | } 10 | 11 | public static Color applyToColor(Interp interpolation, Color start, Color end, float v) { 12 | return new Color( 13 | interpolation.apply(start.r, end.r, v), 14 | interpolation.apply(start.g, end.g, v), 15 | interpolation.apply(start.b, end.b, v), 16 | interpolation.apply(start.a, end.a, v) 17 | ); 18 | } 19 | 20 | public static Color applyToColor(Interp interpolation, Color start, Color end, float v, Color res) { 21 | return res.set( 22 | interpolation.apply(start.r, end.r, v), 23 | interpolation.apply(start.g, end.g, v), 24 | interpolation.apply(start.b, end.b, v), 25 | interpolation.apply(start.a, end.a, v) 26 | ); 27 | } 28 | 29 | public static Color applyToColor2(Interp interpolation, Color start, Color center, Color end, float v, Color res) { 30 | if (v >= 0.5f) { 31 | return applyToColor(interpolation, center, end, v, res); 32 | } else { 33 | return applyToColor(interpolation, start, center, v, res); 34 | } 35 | } 36 | 37 | 38 | public static Color applyToColor2(Interp interpolation, Color start, Color center, Color end, float v) { 39 | if (v >= 0.5f) { 40 | return applyToColor(interpolation, center, end, v); 41 | } else { 42 | return applyToColor(interpolation, start, center, v); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /res/shaders/3d.frag: -------------------------------------------------------------------------------- 1 | varying vec2 v_texcoord; 2 | varying vec3 v_normal; 3 | varying vec3 v_worldPos; 4 | 5 | uniform sampler2D u_texture; 6 | uniform vec3 u_lightdir; // Направление света norm(light - objpos) 7 | uniform vec3 u_campos; // Позиция камеры 8 | 9 | uniform vec3 u_ambientColor; // Цвет эмбиентного света 10 | uniform vec3 u_diffuseColor; // Цвет диффузного света 11 | uniform vec3 u_specularColor; // Цвет отражённого света 12 | uniform float u_shininess; // Блеск материала 13 | uniform int u_illum; // Режим освещения: 0 = только текстура/базовый цвет, 1 = эмбиент+диффуз, 2 = эмбиент+диффуз+спекуляр 14 | 15 | void main() { 16 | vec4 texColor = texture2D(u_texture, v_texcoord); 17 | vec3 normal = normalize(v_normal); // Нормаль интерполируется, поэтому нужно нормализовать ещё раз 18 | 19 | // Базовый цвет (только текстура) 20 | vec3 finalColor = texColor.rgb; 21 | 22 | if (u_illum == 1 || u_illum == 2) { 23 | // Эмбиентная компонента 24 | vec3 ambient = u_ambientColor * texColor.rgb; 25 | finalColor = ambient; 26 | 27 | // Диффузная компонента 28 | float diff = max(dot(normal, -u_lightdir), 0.0); 29 | vec3 diffuse = u_diffuseColor * diff * texColor.rgb; 30 | finalColor += diffuse; 31 | 32 | if (u_illum == 2) { 33 | // Спекулярная компонента 34 | vec3 viewDir = normalize(u_campos - v_worldPos); 35 | vec3 reflectDir = normalize(reflect(u_lightdir, normal)); // Note: reflect expects incident vector, not light direction 36 | float spec = pow(max(dot(viewDir, reflectDir), 0.0), u_shininess); 37 | vec3 specular = u_specularColor * spec; 38 | finalColor += specular; 39 | } 40 | } 41 | 42 | gl_FragColor = vec4(finalColor, texColor.a); 43 | } -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/ui/dialogs/SliderSetting.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.ui.dialogs; 2 | 3 | import arc.Core; 4 | import arc.scene.Element; 5 | import arc.scene.event.Touchable; 6 | import arc.scene.ui.Label; 7 | import arc.scene.ui.Slider; 8 | import arc.scene.ui.layout.Table; 9 | import mindustry.ui.Styles; 10 | import mindustry.ui.dialogs.SettingsMenuDialog; 11 | 12 | 13 | public class SliderSetting extends SettingsMenuDialog.SettingsTable.Setting { 14 | float def; 15 | float min; 16 | float max; 17 | float step; 18 | StringProcessorf sp; 19 | 20 | public SliderSetting(String name, float def, float min, float max, float step, StringProcessorf s) { 21 | super(name); 22 | this.def = def; 23 | this.min = min; 24 | this.max = max; 25 | this.step = step; 26 | this.sp = s; 27 | } 28 | 29 | public void add(SettingsMenuDialog.SettingsTable table) { 30 | Slider slider = new Slider(min, max, step, false); 31 | slider.setValue(Core.settings.getFloat(name)); 32 | Label value = new Label("", Styles.outlineLabel); 33 | Table content = new Table(); 34 | content.add(title, Styles.outlineLabel).left().growX().wrap(); 35 | content.add(value).padLeft(10.0F).right(); 36 | content.margin(3.0F, 33.0F, 3.0F, 33.0F); 37 | content.touchable = Touchable.disabled; 38 | slider.changed(() -> { 39 | Core.settings.put(name, slider.getValue()); 40 | value.setText(sp.get(slider.getValue())); 41 | }); 42 | slider.change(); 43 | addDesc(table.stack(new Element[]{slider, content}).width(Math.min(Core.graphics.getWidth() / 1.2F, 460.0F)).left().padTop(4.0F).get()); 44 | table.row(); 45 | 46 | Core.settings.defaults(name, def); 47 | } 48 | public interface StringProcessorf { 49 | String get(float var1); 50 | } 51 | } 52 | 53 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/ui/dialogs/SatelliteDialog.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.ui.dialogs; 2 | 3 | import arc.scene.ui.ImageButton; 4 | import arc.scene.ui.Label; 5 | import arc.scene.ui.TextButton; 6 | import arc.scene.ui.layout.Table; 7 | import mindustry.gen.Icon; 8 | import mindustry.ui.dialogs.BaseDialog; 9 | import org.durmiendo.sueno.satellites.Satellite; 10 | 11 | public class SatelliteDialog extends BaseDialog { 12 | Satellite s; 13 | 14 | public SatelliteDialog(DialogStyle style) { 15 | super("@stellitedialog", style); 16 | 17 | addCloseButton(); 18 | 19 | hidden(this::destroy); 20 | shown(this::build); 21 | } 22 | 23 | public void build() { 24 | 25 | cont.pane(p -> { 26 | 27 | Table info = new Table(); 28 | info.add(new Label("Высота: " + s.orbitRadius*15000 + " м\nСкорость: " + s.speed + " ю/кадр\nПрочность: " + s.health)); 29 | p.add(info); 30 | p.row(); 31 | Table control = new Table(); 32 | ImageButton up = new ImageButton(Icon.up); 33 | up.clicked(() -> { 34 | s.up(); 35 | }); 36 | ImageButton down = new ImageButton(Icon.down); 37 | down.clicked(() -> { 38 | s.down(); 39 | }); 40 | TextButton d = new TextButton("destroy"); 41 | d.clicked(() -> { 42 | s.destroy(); 43 | }); 44 | control.add(up); 45 | control.add(down); 46 | control.row(); 47 | control.add(d); 48 | p.add(control); 49 | }); 50 | 51 | } 52 | 53 | public void destroy() { 54 | cont.clear(); 55 | } 56 | public void put(Satellite ss) { 57 | s = ss; 58 | } 59 | 60 | public void upd(Satellite s) { 61 | destroy(); 62 | put(s); 63 | build(); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/entities/part/SHoverPart.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.entities.part; 2 | 3 | import arc.graphics.Color; 4 | import arc.graphics.g2d.Draw; 5 | import arc.graphics.g2d.Lines; 6 | import arc.util.Time; 7 | import arc.util.Tmp; 8 | import mindustry.entities.part.DrawPart; 9 | 10 | public class SHoverPart extends DrawPart { 11 | public float radius = 4f; 12 | public float x, y, rotation, phase = 50f, stroke = 3f, minStroke = 0.12f, speed = 0.3f; 13 | public int circles = 2, sides = 4; 14 | public Color color = Color.white; 15 | public boolean mirror = false; 16 | public float layer = -1f, layerOffset = 0f; 17 | 18 | @Override 19 | public void draw(PartParams params){ 20 | float z = Draw.z(); 21 | if(layer > 0) Draw.z(layer); 22 | if(under && turretShading) Draw.z(z - 0.0001f); 23 | 24 | Draw.z(Draw.z() + layerOffset); 25 | 26 | int len = mirror && params.sideOverride == -1 ? 2 : 1; 27 | 28 | Draw.color(color); 29 | 30 | for(int c = 0; c < circles; c++){ 31 | float fin = ((Time.time / phase + (float)c / circles) % 1f); 32 | Lines.stroke((1f-fin) * stroke + minStroke); 33 | 34 | for(int s = 0; s < len; s++){ 35 | //use specific side if necessary 36 | int i = params.sideOverride == -1 ? s : params.sideOverride; 37 | 38 | float sign = (i == 0 ? 1 : -1) * params.sideMultiplier; 39 | Tmp.v1.set((x) * sign, y).rotate(params.rotation - 90); 40 | 41 | float 42 | rx = params.x + Tmp.v1.x, 43 | ry = params.y + Tmp.v1.y; 44 | 45 | Lines.poly(rx, ry, sides, radius * fin, (params.rotation + fin*360f*speed)*sign); 46 | } 47 | } 48 | 49 | Draw.reset(); 50 | 51 | Draw.z(z); 52 | } 53 | 54 | @Override 55 | public void load(String name){ 56 | 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/graphics/VoidStriderCollapseEffectController.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.graphics; 2 | 3 | import arc.Core; 4 | import arc.Events; 5 | import arc.graphics.Color; 6 | import arc.graphics.g2d.Draw; 7 | import arc.graphics.gl.FrameBuffer; 8 | import arc.struct.Seq; 9 | import mindustry.game.EventType; 10 | import org.durmiendo.sueno.ui.scene.BufferRegionDrawable; 11 | 12 | public class VoidStriderCollapseEffectController { 13 | public static FrameBuffer effectsBuffer = new FrameBuffer(); 14 | public static FrameBuffer screenBuffer = new FrameBuffer(); 15 | 16 | public static Seq containers = new Seq<>(); 17 | public static BufferRegionDrawable uiDrawable; 18 | 19 | 20 | public static void init() { 21 | Events.run(EventType.Trigger.preDraw, () -> { 22 | screenBuffer.resize(Core.graphics.getWidth(), Core.graphics.getHeight()); 23 | screenBuffer.begin(Color.clear); 24 | }); 25 | Events.run(EventType.Trigger.postDraw, () -> { 26 | screenBuffer.end(); 27 | draw(); 28 | }); 29 | } 30 | 31 | public static void at(float x, float y, SEffect effect, float rad) { 32 | containers.add(effect.at(x, y, rad)); 33 | } 34 | 35 | public static void draw() { 36 | Draw.sort(false); 37 | Draw.proj(Core.camera); 38 | 39 | effectsBuffer.resize(Core.graphics.getWidth(), Core.graphics.getHeight()); 40 | if (uiDrawable != null) 41 | uiDrawable.bufferSizeChanged(); 42 | effectsBuffer.begin(Color.clear); 43 | 44 | for (int i = 0; i < containers.size; i++) { 45 | if (containers.get(i).render()) { 46 | containers.remove(i); 47 | i--; 48 | } 49 | } 50 | 51 | Draw.reset(); 52 | Draw.flush(); 53 | effectsBuffer.end(); 54 | 55 | Draw.blit(SShaders.voidStriderCollapseEffectShader); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/ui/dialogs/DynTexVisible.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.ui.dialogs; 2 | 3 | import arc.Core; 4 | import arc.util.Scaling; 5 | import mindustry.gen.Icon; 6 | import mindustry.gen.Tex; 7 | import mindustry.graphics.Pal; 8 | import mindustry.ui.BorderImage; 9 | import mindustry.ui.Styles; 10 | import mindustry.ui.dialogs.BaseDialog; 11 | import org.durmiendo.sueno.graphics.DynamicTexture; 12 | import org.durmiendo.sueno.utils.SLog; 13 | 14 | public class DynTexVisible extends BaseDialog { 15 | 16 | public DynTexVisible() { 17 | super("DynTexVisible"); 18 | 19 | titleTable.clear(); 20 | titleTable.table(t -> { 21 | t.table(l -> { 22 | l.add(new BorderImage(){{ 23 | setDrawable(Icon.settingsSmall); 24 | border(Pal.gray); 25 | thickness = 0f; 26 | }}).size(32f); 27 | l.label(() -> "DynTexVisible").padLeft(12f).growX().center(); 28 | }).right().growX().padLeft(6f); 29 | t.table(b -> t.button("@back", Styles.flatt, this::hide) 30 | .size(120f, 32f).right().padRight(4f).padLeft(4f)).right(); 31 | }).growX(); 32 | 33 | titleTable.row(); 34 | titleTable.image(Tex.whiteui, Pal.gray).growX().height(3f).pad(0f); 35 | 36 | hidden(this::destroy); 37 | shown(this::build); 38 | resized(this::build); 39 | 40 | addCloseListener(); 41 | } 42 | 43 | private DynamicTexture dynTex; 44 | 45 | public void show(DynamicTexture dynTex) { 46 | this.dynTex = dynTex; 47 | show(); 48 | } 49 | 50 | private void build() { 51 | cont.clear(); 52 | cont.table(all -> { 53 | all.image( 54 | dynTex.getTextureRegion() 55 | ).update(i -> dynTex.forceDraw()).scaling(Scaling.fit).grow(); 56 | }).grow(); 57 | } 58 | 59 | private void destroy() { 60 | 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/core/SVars.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.core; 2 | 3 | import arc.files.Fi; 4 | import arc.graphics.Texture; 5 | import arc.graphics.g2d.TextureRegion; 6 | import arc.struct.ObjectMap; 7 | import mindustry.Vars; 8 | import mindustry.mod.Mods; 9 | import org.durmiendo.sap.SuenoSettings; 10 | import org.durmiendo.sueno.files.InternalFileTree; 11 | import org.durmiendo.sueno.processors.SuenoInputProcessor; 12 | import org.durmiendo.sueno.spacestations.SpaceStations; 13 | import org.durmiendo.sueno.statuses.StatusEffectsController; 14 | import org.durmiendo.sueno.temperature.TemperatureController; 15 | import org.durmiendo.sueno.ui.SUI; 16 | 17 | public class SVars { 18 | /** Mod core object. **/ 19 | public static Sueno core; 20 | /** Mod data container. **/ 21 | public static Mods.LoadedMod sueno; 22 | /** All mod UI there. **/ 23 | public static SUI ui = new SUI(); 24 | /** JAR files accessor. **/ 25 | public static InternalFileTree internalFileTree = new InternalFileTree(Sueno.class); 26 | 27 | //controllers 28 | public static SpaceStations spaceStations; 29 | public static TemperatureController temperatureController; 30 | public static StatusEffectsController statusEffectsController; 31 | 32 | 33 | public static SuenoInputProcessor input; 34 | 35 | public static boolean onCampaign; 36 | public static Fi mainDir = Vars.dataDirectory.child("sueno"); 37 | public static Fi dumpDir = mainDir.child("dump"); 38 | 39 | @SuenoSettings(def = 1) 40 | public static boolean extendedLogs = true; 41 | 42 | @SuenoSettings(def = 1) 43 | public static boolean dataVisible = true; 44 | 45 | @SuenoSettings(def = 1) 46 | public static boolean versionWarning = true; 47 | 48 | @SuenoSettings(def = 1, steep = .1f, min = 1, max = 6, accuracy = 1) 49 | public static float quality = 1.0f; 50 | 51 | @SuenoSettings(def = 1, steep = 1f, min = 1, max = 3, accuracy = 1) 52 | public static float qval; 53 | 54 | public static float getQuality() { 55 | return quality * quality; 56 | } 57 | } -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/type/weapon/MultiBulletWeapon.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.type.weapon; 2 | 3 | import arc.math.Mathf; 4 | import arc.scene.ui.layout.Table; 5 | import arc.struct.Seq; 6 | import mindustry.entities.bullet.BulletType; 7 | import mindustry.entities.units.WeaponMount; 8 | import mindustry.gen.Unit; 9 | import mindustry.type.UnitType; 10 | import mindustry.type.Weapon; 11 | 12 | import java.util.Comparator; 13 | 14 | public class MultiBulletWeapon extends Weapon { 15 | public Seq bulletTypes = new Seq<>(); 16 | 17 | public void addStats(UnitType u, Table t){ 18 | for (BulletType b : bulletTypes) { 19 | bullet = b; 20 | super.addStats(u, t); 21 | } 22 | } 23 | 24 | public float dps(){ 25 | float d = 0; 26 | for (BulletType b : bulletTypes) { 27 | bullet = b; 28 | d += super.dps(); 29 | } 30 | return d; 31 | } 32 | 33 | public float shotsPerSec(){ 34 | float s = 0; 35 | for (BulletType b : bulletTypes) { 36 | bullet = b; 37 | s += super.shotsPerSec(); 38 | } 39 | return s; 40 | } 41 | 42 | public float range(){ 43 | float r = 0; 44 | for (BulletType b : bulletTypes) { 45 | if (b.range > r) r = b.range; 46 | } 47 | return r; 48 | } 49 | 50 | public void add(BulletType b){ 51 | bulletTypes.add(b); 52 | bulletTypes.sort(Comparator.comparing((a) -> a.range)); 53 | } 54 | 55 | @Override 56 | protected void shoot(Unit unit, WeaponMount mount, float shootX, float shootY, float rotation) { 57 | float x = mount.target.x(); 58 | float y = mount.target.y(); 59 | float d = Mathf.dst(x, y, shootX, shootY); 60 | BulletType b; 61 | 62 | for (int i = 0; i < bulletTypes.size; i++) { 63 | b = bulletTypes.get(i); 64 | if (b.range > d) { 65 | bullet = b; 66 | break; 67 | } 68 | } 69 | super.shoot(unit, mount, shootX, shootY, rotation); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/ui/elements/Switch.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.ui.elements; 2 | 3 | import arc.func.Boolc; 4 | import arc.graphics.Color; 5 | import arc.scene.style.Drawable; 6 | import arc.scene.ui.Image; 7 | import arc.scene.ui.ImageButton; 8 | import arc.util.Scaling; 9 | 10 | import static mindustry.ui.Styles.*; 11 | 12 | public class Switch extends ImageButton { 13 | private SwitchStyle style; 14 | private boolean enabled = false; 15 | public Boolc listener; 16 | public Image image; 17 | 18 | public Switch(Drawable icon){ 19 | this(icon, styleDefault); 20 | } 21 | 22 | public Switch(Drawable icon, boolean enabled){ 23 | this(icon, styleDefault); 24 | this.enabled = enabled; 25 | } 26 | 27 | public boolean isPressed(){ 28 | return enabled; 29 | } 30 | 31 | public Switch(Drawable icon, SwitchStyle style){ 32 | super(icon, style); 33 | clearChildren(); 34 | table(i -> { 35 | 36 | }); 37 | add(image = new Image(icon, Scaling.stretch)).pad(4f); 38 | setSize(getPrefWidth(), getPrefHeight()); 39 | clicked(() -> { 40 | enabled = !enabled; 41 | listener.get(enabled); 42 | }); 43 | } 44 | 45 | public void click(Boolc l){ 46 | listener = l; 47 | } 48 | 49 | @Override 50 | public SwitchStyle getStyle(){ 51 | return style; 52 | } 53 | 54 | @Override 55 | public void setStyle(ButtonStyle style){ 56 | if(!(style instanceof SwitchStyle)) style = styleDefault; 57 | super.setStyle(style); 58 | this.style = (SwitchStyle) style; 59 | } 60 | 61 | @Override 62 | public void draw() { 63 | super.draw(); 64 | 65 | } 66 | 67 | public static class SwitchStyle extends ImageButton.ImageButtonStyle{ 68 | 69 | } 70 | 71 | public static SwitchStyle styleDefault = new SwitchStyle(){{ 72 | down = flatDown; 73 | up = none; 74 | over = flatOver; 75 | disabled = none; 76 | imageDisabledColor = Color.gray; 77 | imageUpColor = Color.white; 78 | }}; 79 | } -------------------------------------------------------------------------------- /docs/buildSystem.md: -------------------------------------------------------------------------------- 1 | # Configuring the Build System 2 | 3 | To improve the build process, it's recommended to create a `local.json` file in the `settings` directory. This file allows you to customize various aspects of the build system. Here's an example configuration: 4 | ```json 5 | { 6 | "copy": [ 7 | "path/to/directory" 8 | ], 9 | "build": { 10 | "buildAndroid": false 11 | }, 12 | "dbt": { 13 | "run": [ 14 | "run command" 15 | ], 16 | "frun": [ 17 | "first run command" 18 | ] 19 | } 20 | } 21 | ``` 22 | 23 | 24 | ## copy field 25 | This section specifies the paths where the compiled mod will be copied when running `copyBuildRelease` or `runBuildRelease`. These commands ensure that the mod is automatically deployed to the appropriate location after the build process. 26 | 27 | ## build.buildAndroid field 28 | This flag determines whether the mod should be compiled for the Android platform. Set it to true to enable Android build, or false to skip it. 29 | 30 | ## dbt.run field 31 | This section defines the commands that will be executed when `run` or `runBuildRelease` is invoked. These commands typically perform the same tasks as copyBuildRelease, but also launch the application after the build and copy operations are completed. 32 | 33 | ## dbt.frun field 34 | This section specifies the commands that will be executed when `firstRun` is launched. These commands are typically used for initial setup or configuration tasks. 35 | 36 | ## Example configuration: 37 | ```json 38 | { 39 | "copy": [ 40 | "/home/durmiendo/.local/share/Mindustry/mods" 41 | ], 42 | "build": { 43 | "buildAndroid": false 44 | }, 45 | "dbt": { 46 | "run": [ 47 | "java -jar /home/durmiendo/mindustry/Mindustry.jar" 48 | ], 49 | "frun": [ 50 | "nautilus /home/durmiendo/.local/share/Mindustry" 51 | ] 52 | } 53 | } 54 | ``` 55 | 56 | In this example, the compiled mod will be copied to the `/home/durmiendo/.local/share/Mindustry/mods` directory. The build process will not include an Android build, and the `run` command will launch the Mindustry application, while the `frun` command will open the Mindustry directory in the file manager. 57 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/spacestations/SpaceStations.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.spacestations; 2 | 3 | import arc.Events; 4 | import arc.graphics.Color; 5 | import arc.graphics.Gl; 6 | import arc.graphics.Mesh; 7 | import arc.graphics.VertexAttribute; 8 | import arc.graphics.g3d.Camera3D; 9 | import arc.graphics.gl.Shader; 10 | import arc.math.Mat; 11 | import arc.math.Mathf; 12 | import arc.math.geom.Mat3D; 13 | import arc.math.geom.Vec3; 14 | import arc.struct.IntSeq; 15 | import arc.struct.Seq; 16 | import arc.struct.ShortSeq; 17 | import arc.util.Time; 18 | import mindustry.Vars; 19 | import mindustry.content.Planets; 20 | import mindustry.game.EventType; 21 | import mindustry.type.Planet; 22 | import org.durmiendo.sueno.content.SPlanets; 23 | import org.durmiendo.sueno.graphics.SShaders; 24 | import org.durmiendo.sueno.graphics.g3d.Model; 25 | import org.durmiendo.sueno.graphics.g3d.wobj.Obj; 26 | import org.durmiendo.sueno.graphics.g3d.wobj.ObjParser; 27 | import org.durmiendo.sueno.math.Vec4; 28 | import org.durmiendo.sueno.utils.SLog; 29 | 30 | import java.nio.FloatBuffer; 31 | import java.util.ArrayList; 32 | import java.util.List; 33 | 34 | public class SpaceStations { 35 | public static Obj cube; 36 | public Seq models = new Seq<>(); 37 | 38 | 39 | public SpaceStations() { 40 | cube = ObjParser.loadObj("router/router", new Vec3(0.1f,0.1f,0.1f)); 41 | SLog.info(cube.materials.first().mtl.name); 42 | SLog.info(cube.materials.first().mtl.texture.toString()); 43 | 44 | for (int i = 0; i < 10; i++) { 45 | float r1 = Mathf.random(-5, +5); 46 | float r2 = Mathf.random(-5, +5); 47 | float r3 = Mathf.random(-5, +5); 48 | models.add( 49 | new Model(cube, new Vec3(r1, r2, r3), Vec3.Zero.cpy()) 50 | ); 51 | } 52 | 53 | } 54 | 55 | 56 | Vec3 tmp = new Vec3(); 57 | public void render(Mat3D projection, Mat3D view) { 58 | Camera3D cam = Vars.renderer.planets.cam; 59 | models.each(m -> { 60 | tmp.set(Planets.sun.position).sub(m.pos).nor(); 61 | m.render(projection, view, cam, tmp); 62 | }); 63 | } 64 | } -------------------------------------------------------------------------------- /res/shaders/normal.frag: -------------------------------------------------------------------------------- 1 | #define HIGHP 2 | 3 | uniform sampler2D u_normal; 4 | uniform sampler2D u_texture; 5 | //uniform sampler2D u_textures; 6 | uniform float u_norm; 7 | //uniform vec2 u_offset; 8 | //uniform vec2 u_lightPos; 9 | //uniform vec4 u_lightColor; 10 | 11 | varying float v_rotation; 12 | varying vec2 v_texCoords; 13 | varying vec2 v_texCoords1; 14 | varying lowp vec4 v_color; 15 | varying lowp vec4 v_mix_color; 16 | 17 | //void main(){ 18 | // gl_FragColor = v_color * mix(c, vec4(v_mix_color.rgb, c.a), v_mix_color.a); 19 | // gl_FragColor.r = 1.; 20 | //} 21 | 22 | 23 | void main() { 24 | // gl_FragColor = vec4(v_texCoords1.x, v_texCoords1.y, 0.0, 0.7); 25 | 26 | if (u_norm != 2.0) { 27 | vec4 c = texture2D(u_texture, v_texCoords); 28 | gl_FragColor = v_color * mix(c, vec4(v_mix_color.rgb, c.a), v_mix_color.a); 29 | } else { 30 | // gl_FragColor = vec4(1.0, 0.0, 0.0, 0.7); 31 | vec4 c = texture2D(u_texture, v_texCoords1); 32 | gl_FragColor = v_color * mix(c, vec4(v_mix_color.rgb, c.a), v_mix_color.a); 33 | } 34 | // if (true) { 35 | // 36 | // } else { 37 | // vec2 T = v_texCoords1.xy; 38 | // vec2 T1 = v_texCoords.xy; 39 | // vec2 coords = (T * u_texsize) + u_offset; 40 | // vec3 normal = vec3(texture2D(u_normal, T).r*2.-1.,(texture2D(u_normal, T).b*2.-1.),texture2D(u_normal, T).g); 41 | // 42 | // 43 | // vec3 lightPos = vec3(u_lightPos.x, u_lightPos.y, 24.); 44 | // vec3 surfacePos = vec3(coords.x, coords.y, 8.); 45 | // 46 | // 47 | // vec3 N = normalize(normal); 48 | // vec3 LightDir = lightPos.xyz-surfacePos.xyz; 49 | // float D = length(LightDir)/1024.; 50 | // vec3 L = normalize(LightDir); 51 | // 52 | // vec3 Diffuse = (u_lightColor.rgb * u_lightColor.a) * max(dot(N, L), 0.0); 53 | // vec3 Ambient = vec3(0.22, 0.22, 0.3); 54 | // float Attenuation = 1.0 / (.4 + 3.*D + 20.*D*D); 55 | // 56 | // vec3 Intensity = Ambient + Diffuse * Attenuation; 57 | // 58 | // vec4 c = texture2D(u_texture, T1); 59 | // 60 | // vec4 rc = v_color * mix(c, vec4(v_mix_color.rgb, c.a), v_mix_color.a); 61 | // 62 | // vec3 FinalColor = rc.rgb * Intensity; 63 | // gl_FragColor = texture2D(u_normal, T); 64 | // } 65 | } 66 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/entities/bullet/SunBulletType.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.entities.bullet; 2 | 3 | import arc.graphics.g2d.Draw; 4 | import arc.math.Mathf; 5 | import arc.math.geom.Vec2; 6 | import arc.util.Time; 7 | import mindustry.entities.bullet.BasicBulletType; 8 | import mindustry.gen.Bullet; 9 | import mindustry.gen.Groups; 10 | import mindustry.gen.Posc; 11 | import mindustry.graphics.Layer; 12 | import org.durmiendo.sueno.content.SGraphics; 13 | import org.durmiendo.sueno.graphics.Q; 14 | 15 | public class SunBulletType extends BasicBulletType { 16 | public static float damageAbsorption = 0.35f; 17 | public static float damageLimit = 800f; 18 | public void update(Bullet b) { 19 | super.update(b); 20 | Groups.bullet.each(bb -> { 21 | boolean ins = bb.type instanceof SubSunBulletType; 22 | if (bb.team != b.team || ins) { 23 | float d = Mathf.dst(bb.x, bb.y, b.x, b.y); 24 | if (d < 96f && ins) { 25 | float a = Mathf.atan2(b.x - bb.x, b.y - bb.y); 26 | d += 1.2f; 27 | bb.vel.add(Mathf.cos(a) / (d / 16f) / 2.4f * Time.delta, Mathf.sin(a) / (d / 16f) / 2.4f * Time.delta); 28 | } else if (d < 40f) { 29 | if (b.owner() instanceof Posc o) { 30 | float a = Mathf.atan2(o.x() - bb.x, o.y() - bb.y); 31 | d += 1.2f; 32 | bb.vel.add(Mathf.cos(a) / (d / 12f) / 2.4f * Time.delta, Mathf.sin(a) / (d / 12f) / 2.4f * Time.delta); 33 | } 34 | } 35 | if (d < 4f && b.damage < damageLimit && !ins) { 36 | b.damage += bb.damage * damageAbsorption; 37 | bb.remove(); 38 | } 39 | } 40 | }); 41 | } 42 | 43 | @Override 44 | public void draw(Bullet b) { 45 | Q.multi( 46 | () -> super.draw(b), 47 | () -> { 48 | Draw.z(115f); 49 | Draw.rect(SGraphics.sun.getTextureRegion(), b.x, b.y, 64f, 64f); 50 | Draw.reset(); 51 | } 52 | ); 53 | } 54 | } 55 | 56 | class Temp { 57 | public static Vec2 v1 = new Vec2(); 58 | } 59 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/world/blocks/distribution/Monorail.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.world.blocks.distribution; 2 | 3 | import arc.util.Nullable; 4 | import mindustry.gen.Building; 5 | import mindustry.world.Block; 6 | import mindustry.world.meta.BlockGroup; 7 | 8 | public class Monorail extends Block { 9 | 10 | 11 | 12 | public @Nullable MonorailBuild lastBuild; 13 | public Monorail(String name) { 14 | super(name); 15 | this.update = true; 16 | this.solid = true; 17 | this.underBullets = true; 18 | this.hasPower = true; 19 | this.itemCapacity = 10; 20 | this.configurable = true; 21 | this.hasItems = true; 22 | this.unloadable = false; 23 | this.group = BlockGroup.transportation; 24 | this.noUpdateDisabled = true; 25 | this.copyConfig = false; 26 | this.allowConfigInventory = false; 27 | this.priority = -1.0F; 28 | rotate = true; 29 | } 30 | 31 | public boolean outputsItems() { 32 | return true; 33 | } 34 | 35 | public class MonorailBuild extends Building { 36 | public @Nullable MonorailBuild p0; 37 | public @Nullable MonorailBuild p1; 38 | public @Nullable MonorailBuild p2; 39 | 40 | float d = 0; 41 | 42 | 43 | public MonorailBuild() { 44 | 45 | } 46 | 47 | @Override 48 | public void pickedUp(){ 49 | 50 | } 51 | 52 | 53 | @Override 54 | public boolean onConfigureBuildTapped(Building other){ 55 | if(other instanceof MonorailBuild b){ 56 | // setEnd(b); 57 | return true; 58 | } 59 | 60 | return true; 61 | } 62 | 63 | 64 | @Override 65 | public void draw() { 66 | super.draw(); 67 | 68 | // if (endx != 1 && endy != 1) { 69 | // Draw.z(Layer.power); 70 | // 71 | // Draw.color(Color.blue); 72 | // SDraw.curve(x, y, px, py, ppx, ppy, endx, endy, 20); 73 | // 74 | // } 75 | // 76 | // 77 | // } 78 | // 79 | // public void setEnd(MonorailBuild b){ 80 | // endx = x; 81 | // endy = y; 82 | // 83 | // d = Mathf.dst(this.x, this.y, x, y); 84 | } 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /res/shaders/4d.vert: -------------------------------------------------------------------------------- 1 | attribute vec4 aPos4D; // 4D position (x, y, z, w) 2 | 3 | // Матрицы для 4D преобразований 4 | uniform vec4 u_ModelView4D_col0; 5 | uniform vec4 u_ModelView4D_col1; 6 | uniform vec4 u_ModelView4D_col2; 7 | uniform vec4 u_ModelView4D_col3; 8 | 9 | uniform vec4 u_Projection4Dto3D_col0; 10 | uniform vec4 u_Projection4Dto3D_col1; 11 | uniform vec4 u_Projection4Dto3D_col2; 12 | uniform vec4 u_Projection4Dto3D_col3; 13 | 14 | // Матрицы для 3D преобразований 15 | uniform vec4 u_View3D_col0; 16 | uniform vec4 u_View3D_col1; 17 | uniform vec4 u_View3D_col2; 18 | uniform vec4 u_View3D_col3; 19 | 20 | uniform vec4 u_Projection3D_col0; 21 | uniform vec4 u_Projection3D_col1; 22 | uniform vec4 u_Projection3D_col2; 23 | uniform vec4 u_Projection3D_col3; 24 | 25 | // НОВАЯ UNIFORM: 3D смещение объекта (в мировых 3D-координатах) 26 | uniform vec3 u_ObjectOffset3D; 27 | 28 | void main() 29 | { 30 | // Реконструкция 4x4 матриц (без изменений) 31 | mat4 u_ModelView4D_reconstructed = mat4( 32 | u_ModelView4D_col0, u_ModelView4D_col1, u_ModelView4D_col2, u_ModelView4D_col3 33 | ); 34 | mat4 u_Projection4Dto3D_reconstructed = mat4( 35 | u_Projection4Dto3D_col0, u_Projection4Dto3D_col1, u_Projection4Dto3D_col2, u_Projection4Dto3D_col3 36 | ); 37 | mat4 u_View3D_reconstructed = mat4( 38 | u_View3D_col0, u_View3D_col1, u_View3D_col2, u_View3D_col3 39 | ); 40 | mat4 u_Projection3D_reconstructed = mat4( 41 | u_Projection3D_col0, u_Projection3D_col1, u_Projection3D_col2, u_Projection3D_col3 42 | ); 43 | 44 | // Шаг 1: Применяем 4D-трансформации к нашей 4D-позиции. 45 | vec4 transformedPos4D = u_ModelView4D_reconstructed * aPos4D; 46 | 47 | // Шаг 2: Проецируем 4D-координаты в 3D-пространство (W-перспектива). 48 | float distanceToWPlane = 3.5; // ПОДСТРОЙТЕ ЭТО ЗНАЧЕНИЕ! 49 | float wFactor = 1.0 / (distanceToWPlane - transformedPos4D.w); 50 | vec3 projected3DPos = transformedPos4D.xyz * wFactor; 51 | 52 | // НОВЫЙ ШАГ: Применяем 3D-смещение к спроецированной позиции 53 | projected3DPos += u_ObjectOffset3D; 54 | projected3DPos *= vec3(15.); 55 | 56 | // Шаг 3: Применяем 3D-видовую и 3D-проекционную матрицы. 57 | vec4 viewSpacePos = u_View3D_reconstructed * vec4(projected3DPos, 1.0); 58 | gl_Position = u_Projection3D_reconstructed * viewSpacePos; 59 | } -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/graphics/SDraw.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.graphics; 2 | 3 | import arc.graphics.Color; 4 | import arc.graphics.g2d.Draw; 5 | import arc.graphics.g2d.Fill; 6 | import arc.math.Angles; 7 | import arc.util.Tmp; 8 | 9 | public class SDraw { 10 | 11 | 12 | 13 | public static void curve(float x1, float y1, float cx1, float cy1, float cx2, float cy2, float x2, float y2, int segments) { 14 | 15 | // Algorithm shamelessly stolen from shaperenderer class 16 | float subdiv_step = 1f / segments; 17 | float subdiv_step2 = subdiv_step * subdiv_step; 18 | float subdiv_step3 = subdiv_step * subdiv_step * subdiv_step; 19 | 20 | float pre1 = 3 * subdiv_step; 21 | float pre2 = 3 * subdiv_step2; 22 | float pre4 = 6 * subdiv_step2; 23 | float pre5 = 6 * subdiv_step3; 24 | 25 | float tmp1x = x1 - cx1 * 2 + cx2; 26 | float tmp1y = y1 - cy1 * 2 + cy2; 27 | 28 | float tmp2x = (cx1 - cx2) * 3 - x1 + x2; 29 | float tmp2y = (cy1 - cy2) * 3 - y1 + y2; 30 | 31 | float fx = x1; 32 | float fy = y1; 33 | 34 | float dfx = (cx1 - x1) * pre1 + tmp1x * pre2 + tmp2x * subdiv_step3; 35 | float dfy = (cy1 - y1) * pre1 + tmp1y * pre2 + tmp2y * subdiv_step3; 36 | 37 | float ddfx = tmp1x * pre4 + tmp2x * pre5; 38 | float ddfy = tmp1y * pre4 + tmp2y * pre5; 39 | 40 | float dddfx = tmp2x * pre5; 41 | float dddfy = tmp2y * pre5; 42 | 43 | // Lines.beginLine(); 44 | 45 | while(segments-- > 0){ 46 | // Lines.linePoint(fx, fy); 47 | 48 | arrow(fx, fy, x2, y2, 1f, 1f, Color.red); 49 | 50 | fx += dfx; 51 | fy += dfy; 52 | dfx += ddfx; 53 | dfy += ddfy; 54 | ddfx += dddfx; 55 | ddfy += dddfy; 56 | 57 | 58 | 59 | } 60 | 61 | 62 | // Lines.linePoint(x2, y2); 63 | // 64 | // Lines.endLine(); 65 | } 66 | 67 | 68 | public static void arrow(float x, float y, float x2, float y2, float length, float radius, Color color) { 69 | float angle = Angles.angle(x, y, x2, y2); 70 | Tmp.v1.set(x2, y2).sub(x, y).limit(length); 71 | float vx = Tmp.v1.x + x, vy = Tmp.v1.y + y; 72 | 73 | Draw.color(color); 74 | Fill.poly(vx, vy, 3, radius, angle); 75 | Draw.color(); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/core/Sueno.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.core; 2 | 3 | import arc.Core; 4 | import arc.graphics.g2d.TextureRegion; 5 | import arc.struct.Seq; 6 | import arc.util.Log; 7 | import mindustry.Vars; 8 | import mindustry.mod.Mod; 9 | import mmc.annotations.ModAnnotations; 10 | import org.durmiendo.sueno.content.SLoader; 11 | import org.durmiendo.sueno.settings.SettingsBuilder; 12 | import org.durmiendo.sueno.utils.SLog; 13 | 14 | 15 | @ModAnnotations.AnnotationSettings( 16 | rootPackage = "org.durmiendo.sueno", 17 | modInfoPath = "res/mod.json", 18 | classPrefix = "S" 19 | ) 20 | public class Sueno extends Mod { 21 | 22 | public Sueno() { 23 | SLog.init(); 24 | SLog.info("Sueno new instance!"); 25 | 26 | SVars.core = this; 27 | } 28 | 29 | @Override 30 | public void loadContent() { 31 | // Vars.renderer = new SRenderer(); 32 | 33 | 34 | // SLog.loadTime(() -> { 35 | // final int[] loaded = {0}; 36 | // Core.atlas.getRegionMap().each((s, atlasRegion) -> { 37 | // SVars.regions.put(atlasRegion.texture, s); 38 | // TextureRegion n = Core.atlas.find(s + "-normal"); 39 | // if (Core.atlas.isFound(n)) { 40 | // loaded[0]++; 41 | // SLog.load("normal texture, founded: " + s); 42 | // Core.atlas.getRegionMap().put(s, new RegionsTextures(atlasRegion, n)); 43 | // } 44 | // }); 45 | // SLog.info(loaded[0] + " normal textures loaded!"); 46 | // 47 | // try { 48 | // Draw.flush(); 49 | // Core.batch = new SSortedSpriteBatch(); 50 | // } catch (Exception e) { 51 | // throw new RuntimeException(e); 52 | // } 53 | // }, "normal texture load"); 54 | SVars.sueno = Vars.mods.getMod(getClass()); 55 | Log.info("load Sueno content"); 56 | 57 | SettingsBuilder.load(); 58 | 59 | SLoader.load(); 60 | } 61 | 62 | @Override 63 | public void init() { 64 | Log.info("extended logs: " + SVars.extendedLogs); 65 | Log.info("load Sueno settings"); 66 | 67 | Setter.load(); 68 | 69 | } 70 | 71 | public TextureRegion getRegion(String nameWithoutPrefix) { 72 | return Core.atlas.find(SVars.sueno.name + '-' + nameWithoutPrefix); 73 | } 74 | } -------------------------------------------------------------------------------- /res/shaders/void-space.frag: -------------------------------------------------------------------------------- 1 | uniform sampler2D u_texture; 2 | uniform float u_time; 3 | uniform vec2 u_texsize; 4 | uniform vec2 u_offset; 5 | 6 | varying vec2 v_texCoords; 7 | 8 | float random(in vec2 st) { 9 | return fract(sin(dot(st.xy, 10 | vec2(12.9898,78.233))) 11 | * 43758.5453123); 12 | } 13 | 14 | 15 | 16 | 17 | float len(vec3 a) { 18 | return sqrt(a.x*a.x + a.y*a.y + a.z*a.z); 19 | } 20 | 21 | // 2D Noise based on Morgan McGuire @morgan3d 22 | // https://www.shadertoy.com/view/4dS3Wd 23 | float dvnoise (in vec2 st) { 24 | vec2 i = floor(st); 25 | vec2 f = fract(st); 26 | 27 | // Four corners in 2D of a tile 28 | float a = random(i); 29 | float b = random(i + vec2(1.0, 0.0)); 30 | float c = random(i + vec2(0.0, 1.0)); 31 | float d = random(i + vec2(1.0, 1.0)); 32 | 33 | // Smooth Interpolation 34 | 35 | // Cubic Hermine Curve. Same as SmoothStep() 36 | vec2 u = f*f*(3.0-2.0*f); 37 | // u = smoothstep(0.,1.,f); 38 | 39 | // Mix 4 coorners percentages 40 | return mix(a, b, u.x) + 41 | (c - a)* u.y * (1.0 - u.x) + 42 | (d - b) * u.x * u.y; 43 | } 44 | 45 | float fbm1(vec2 x) { 46 | float v = 0.0; 47 | float a = 0.5; 48 | vec2 shift = vec2(1300); 49 | for (int i = 0; i < 6; ++i) { 50 | v += a * dvnoise(x); 51 | x = x * 2.0 + shift; 52 | a *= 0.5; 53 | } 54 | return v; 55 | } 56 | 57 | float fbm2(vec2 x) { 58 | float v = 0.0; 59 | float a = 0.5; 60 | vec2 shift = vec2(100); 61 | for (int i = 0; i < 5; ++i) { 62 | v += a * dvnoise(x); 63 | x = x * 2.0 + shift; 64 | a *= 0.5; 65 | } 66 | return v; 67 | } 68 | 69 | 70 | 71 | 72 | void main(){ 73 | vec2 T = v_texCoords.xy; 74 | vec2 coords = (T * u_texsize) + u_offset; 75 | 76 | vec4 color = texture2D(u_texture, T); 77 | if (color.a > 0.) { 78 | float noise = (fbm1(vec2(coords / 5.6 + vec2(u_time/150.0))) + 1.12) / 2.0; 79 | float cnoise = (fbm2(vec2(coords / 3.4 + vec2(u_time/65.0)) + 12.0) + 1.0) / 2.0; 80 | 81 | vec3 c1 = vec3(0, 0.086274509803, 0.086274509803); 82 | vec3 c2 = vec3(0.83921568627, 0.27843137254, 1.); 83 | 84 | vec3 ctmp = mix(c1, c2, cnoise); 85 | 86 | color.rgb *= noise * ctmp; 87 | float l = len((vec3(noise)*cnoise + vec3(noise))/2.0)/1.2; 88 | color.rgb *= 0.75*l*l; 89 | color.a = pow(.4, l/5.) * (color.r + color.b + color.g); 90 | } 91 | 92 | gl_FragColor = color; 93 | } 94 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/world/blocks/storage/SCoreBlock.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.world.blocks.storage; 2 | 3 | import arc.Core; 4 | import arc.graphics.g2d.Draw; 5 | import arc.graphics.gl.Shader; 6 | import arc.math.Mathf; 7 | import arc.util.Log; 8 | import arc.util.Time; 9 | import mindustry.world.Tile; 10 | import mindustry.world.blocks.storage.CoreBlock; 11 | import mindustry.world.meta.Env; 12 | import org.durmiendo.sueno.core.SVars; 13 | import org.durmiendo.sueno.graphics.RegionsTextures; 14 | import org.durmiendo.sueno.graphics.SShaders; 15 | import org.durmiendo.sueno.temperature.TemperatureController; 16 | import org.durmiendo.sueno.world.blocks.build.Heated; 17 | 18 | public class SCoreBlock extends CoreBlock { 19 | public float heatPower = 0.3f; 20 | public float range = 60; 21 | RegionsTextures rt; 22 | 23 | public SCoreBlock(String name) { 24 | super(name); 25 | update = true; 26 | emitLight = true; 27 | lightRadius = range / 4 * heatPower; 28 | suppressable = true; 29 | envEnabled |= Env.space; 30 | solid = true; 31 | } 32 | 33 | @Override 34 | public void load() { 35 | super.load(); 36 | rt = new RegionsTextures( 37 | Core.atlas.find("sueno-demand-normal"), 38 | Core.atlas.find("sueno-demand") 39 | ); 40 | } 41 | 42 | @Override 43 | public void drawBase(Tile tile) { 44 | super.drawBase(tile); 45 | // Draw.draw(Draw.z(), () -> { 46 | // Shader b = Draw.getShader(); 47 | // Draw.shader(SShaders.normalShader, true); 48 | // Log.info("b " + Core.batch.getClass().getSimpleName()); 49 | // Draw.rect(rt, tile.x, tile.y); 50 | // Draw.shader(b); 51 | // }); 52 | // Draw.flush(); 53 | // SShaders.normalShader.bind(); 54 | // SShaders.normalShader.apply(); 55 | // Draw.rect("sueno-demand-normal17", tile.drawx(), tile.drawy()+12); 56 | // Draw.flush(); 57 | } 58 | 59 | public class CoreBuild extends CoreBlock.CoreBuild implements Heated { 60 | @Override 61 | public void updateTile() { 62 | if (!TemperatureController.simulationPaused) { 63 | for (int x = tileX()-Mathf.floor(size/2f); x < tileX()-Mathf.floor(size/2f)+size; x++) { 64 | for (int y = tileY()-Mathf.floor(size/2f); y < tileY()-Mathf.floor(size/2f)+size; y++) { 65 | SVars.temperatureController.setRelativeTemperatureAt(x, y, heatPower * Time.delta); 66 | } 67 | } 68 | } 69 | super.updateTile(); 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/world/units/types/VoidStriderUnitType.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.world.units.types; 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.Geometry; 8 | import mindustry.Vars; 9 | import mindustry.gen.Building; 10 | import mindustry.gen.Groups; 11 | import mindustry.gen.Unit; 12 | import mindustry.gen.Unitc; 13 | import mindustry.type.UnitType; 14 | import org.durmiendo.sueno.gen.VoidStriderc; 15 | import org.durmiendo.sueno.graphics.SEffect; 16 | import org.durmiendo.sueno.graphics.SFx; 17 | import org.durmiendo.sueno.graphics.SLayers; 18 | import org.durmiendo.sueno.graphics.VoidStriderCollapseEffectController; 19 | 20 | public class VoidStriderUnitType extends UnitType { 21 | public SEffect collapseEffect = SFx.voidStriderCollapseEffect; 22 | public float collapseRadius = 80f; 23 | public float priority = -1; 24 | public float cost = -1; 25 | public TextureRegion vessel; 26 | public float voidSubstance = 100f; 27 | 28 | public VoidStriderUnitType(String name) { 29 | super(name); 30 | } 31 | 32 | @Override 33 | public void load() { 34 | super.load(); 35 | vessel = Core.atlas.find(name + "-vessel"); 36 | } 37 | 38 | @Override 39 | public void drawCell(Unit unit) { 40 | super.drawCell(unit); 41 | 42 | Draw.z(SLayers.voidspace); 43 | if (unit instanceof VoidStriderc u) { 44 | float s = u.voidSubstance() / voidSubstance; 45 | Draw.rect(vessel, unit.x, unit.y, vessel.width * vessel.scl() * Draw.xscl * s, vessel.height * vessel.scl() * Draw.yscl, unit.rotation - 90f); 46 | } 47 | 48 | } 49 | 50 | @Override 51 | public void update(Unit unit) { 52 | super.update(unit); 53 | if (unit instanceof VoidStriderc u) { 54 | if (u.voidSubstance() <= 0) u.destroy(); 55 | } 56 | } 57 | 58 | @Override 59 | public void killed(Unit unit) { 60 | super.killed(unit); 61 | if (unit instanceof VoidStriderc u && u.voidSubstance() > 0) { 62 | float rad = u.voidSubstance() / voidSubstance; 63 | VoidStriderCollapseEffectController.at(unit.x, unit.y, collapseEffect, rad); 64 | Geometry.circle(Mathf.round(unit.x / 8f), Mathf.round(unit.y / 8f), Mathf.round(collapseRadius/8f/rad), (x, y) -> { 65 | Building b = Vars.world.build(x, y); 66 | if (b != null) { 67 | b.kill(); 68 | } 69 | }); 70 | Groups.unit.each(un -> un.dst(unit.x, unit.y) < collapseRadius * rad, Unitc::remove); 71 | } 72 | 73 | } 74 | 75 | } 76 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/processors/SuenoInputProcessor.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.processors; 2 | 3 | import arc.Core; 4 | import arc.input.InputProcessor; 5 | import arc.input.KeyCode; 6 | import arc.math.geom.Vec2; 7 | import arc.struct.ObjectMap; 8 | import arc.struct.ObjectSet; 9 | import mindustry.Vars; 10 | import org.durmiendo.sueno.math.area.Area; 11 | 12 | 13 | public class SuenoInputProcessor implements InputProcessor { 14 | public ObjectMap listeners = new ObjectMap<>(); 15 | public ObjectSet active = new ObjectSet<>(); 16 | public Vec2 tmp = new Vec2(); 17 | 18 | public void addListener(Area area, WorldListener listener) { 19 | listeners.put(area, listener); 20 | } 21 | 22 | public void removeListener(Area area) { 23 | listeners.remove(area); 24 | } 25 | 26 | 27 | @Override 28 | public boolean touchDown(int screenX, int screenY, int pointer, KeyCode button) { 29 | tmp = Core.input.mouseWorld(screenX, screenY); 30 | // SLog.info("down x: " + tmp.x + " y: " + tmp.y); 31 | if (!active.isEmpty()) { 32 | Vars.player.shooting(false); 33 | } 34 | for (ObjectMap.Entry l : listeners) { 35 | if (l.key.insidePoint(tmp.x, tmp.y)) { 36 | active.add(l.value); 37 | l.value.apply(tmp.x, tmp.y, (byte) 1); 38 | } 39 | } 40 | return InputProcessor.super.touchDown(screenX, screenY, pointer, button); 41 | } 42 | 43 | @Override 44 | public boolean touchUp(int screenX, int screenY, int pointer, KeyCode button) { 45 | tmp = Core.input.mouseWorld(screenX, screenY); 46 | // SLog.info("up x: " + tmp.x + " y: " + tmp.y); 47 | active.each(l -> { 48 | l.apply(tmp.x, tmp.y, (byte) 2); 49 | }); 50 | active.clear(); 51 | return InputProcessor.super.touchUp(screenX, screenY, pointer, button); 52 | } 53 | 54 | @Override 55 | public boolean touchDragged(int screenX, int screenY, int pointer) { 56 | tmp = Core.input.mouseWorld(screenX, screenY); 57 | // SLog.info("moved x: " + tmp.x + " y: " + tmp.y); 58 | 59 | if (!active.isEmpty()) { 60 | Vars.player.shooting(false); 61 | } 62 | 63 | active.each(listener -> { 64 | listener.apply(tmp.x, tmp.y, (byte) 0); 65 | }); 66 | return InputProcessor.super.touchDragged(screenX, screenY, pointer); 67 | } 68 | 69 | @FunctionalInterface 70 | public interface WorldListener { 71 | void apply(float x, float y, byte state); 72 | // state 0 = move 73 | // state 1 = press 74 | // state 2 = unpress 75 | } 76 | } 77 | 78 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/world/blocks/defense/turrets/MachineGunTurret.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.world.blocks.defense.turrets; 2 | 3 | import arc.graphics.Color; 4 | import arc.math.Mathf; 5 | import arc.util.Align; 6 | import arc.util.Nullable; 7 | import arc.util.Time; 8 | import arc.util.io.Reads; 9 | import arc.util.io.Writes; 10 | import mindustry.entities.bullet.BulletType; 11 | import mindustry.gen.Bullet; 12 | import mindustry.ui.Fonts; 13 | import mindustry.world.blocks.defense.turrets.ItemTurret; 14 | import org.durmiendo.sueno.core.SVars; 15 | import org.durmiendo.sueno.utils.SStrings; 16 | 17 | public class MachineGunTurret extends ItemTurret { 18 | public float minReload = 6f; 19 | private float reloadBuff = 4.2f; 20 | private float reloadDEBuff = 1.2f / 60f; 21 | 22 | public MachineGunTurret(String name) { 23 | super(name); 24 | } 25 | 26 | public class MachineGunTurretBuild extends ItemTurretBuild { 27 | public float a = reload; 28 | 29 | protected void updateShooting(){ 30 | if(reloadCounter >= a && !charging() && shootWarmup >= minWarmup){ 31 | BulletType type = peekAmmo(); 32 | 33 | shoot(type); 34 | 35 | reloadCounter %= a; 36 | a -= reloadBuff; 37 | a = Math.max(a, minReload); 38 | } 39 | } 40 | 41 | @Override 42 | public void update() { 43 | super.update(); 44 | if (!isShooting()) { 45 | if (SVars.temperatureController.getRelativeTemperatureAt(tileX(), tileY()) < 0.5f) a += reloadDEBuff * Time.delta; 46 | else a += reloadDEBuff * Time.delta / 2f; 47 | a = Math.min(a, reload); 48 | } 49 | } 50 | 51 | @Override 52 | public float range() { 53 | return 34.72f * 8f; 54 | } 55 | 56 | public void draw() { 57 | super.draw(); 58 | Fonts.def.draw(SStrings.fixed(a, 2), x, y + 32, Color.red, 0.4f, true, Align.left); 59 | } 60 | 61 | protected void handleBullet(@Nullable Bullet bullet, float offsetX, float offsetY, float angleOffset){ 62 | super.handleBullet(bullet, offsetX, offsetY, angleOffset); 63 | float r = 45f / a; 64 | bullet.lifetime += Mathf.random(r, r * 0.9f); 65 | bullet.lifetime *= Mathf.random(0.95f, 1.1f); 66 | } 67 | 68 | @Override 69 | public void readBase(Reads read) { 70 | super.readBase(read); 71 | a = read.f(); 72 | } 73 | 74 | @Override 75 | public void writeBase(Writes write) { 76 | super.writeBase(write); 77 | write.f(a); 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/satellites/CelestialBody.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.satellites; 2 | 3 | import arc.Core; 4 | import arc.graphics.Color; 5 | import arc.graphics.g2d.TextureRegion; 6 | import arc.math.Mat; 7 | import arc.math.Mathf; 8 | import arc.math.geom.Vec3; 9 | import arc.scene.ui.ImageButton; 10 | import arc.util.Log; 11 | import arc.util.Time; 12 | import mindustry.Vars; 13 | import mindustry.graphics.Drawf; 14 | import mindustry.type.Planet; 15 | import org.durmiendo.sueno.content.SPlanets; 16 | import org.durmiendo.sueno.core.SVars; 17 | 18 | public abstract class CelestialBody { 19 | public float angle; 20 | public Planet planet = SPlanets.hielo; 21 | public float orbitRadius; 22 | public float speed; 23 | public Mat rotation; 24 | 25 | public Vec3 position; 26 | public float health; 27 | public ImageButton button; 28 | public TextureRegion r; 29 | 30 | public CelestialBody(float r, float pitch, float yaw, Planet planet) { 31 | this.orbitRadius = r; 32 | this.planet = planet; 33 | this.r = Core.atlas.find("sueno-satellite"); 34 | 35 | 36 | 37 | position = new Vec3(); 38 | button = new ImageButton(); 39 | button.setSize(25); 40 | this.r.scale=2f; 41 | rotation = mathRotation(pitch, yaw); 42 | } 43 | 44 | public Mat mathRotation(float pitch, float yaw) { 45 | Mat o = new Mat(new float[]{ 46 | Mathf.cos(pitch), 0, -Mathf.sin(pitch), 47 | 0, 1, 0, 48 | Mathf.sin(pitch), 0, Mathf.cos(pitch) 49 | }); 50 | Mat t = new Mat(new float[]{ 51 | 1, 0, 0, 52 | 0, Mathf.cos(yaw), -Mathf.sin(yaw), 53 | 0, Mathf.sin(yaw), Mathf.cos(yaw), 54 | 55 | }); 56 | 57 | return t.mul(o); 58 | } 59 | 60 | 61 | public Vec3 newPos() { 62 | return new Vec3(Mathf.sin(angle) * orbitRadius, Mathf.cos(angle) * orbitRadius, 0).mul(rotation).add(planet.position); 63 | } 64 | 65 | public void draw() { 66 | angle += speed * Time.delta; 67 | angle %= 2 * Mathf.pi; 68 | 69 | position = newPos(); 70 | Vec3 e = Vars.renderer.planets.cam.project(new Vec3(position)); 71 | Drawf.additive(r, Color.lightGray, e.x, e.y); 72 | } 73 | 74 | 75 | public void update() { 76 | } 77 | 78 | public void damage(float d) { 79 | if ((health - d) < 0) { 80 | destroy(); 81 | } else { 82 | health-=d; 83 | } 84 | } 85 | 86 | public void collision(CelestialBody o) { 87 | if (speed < o.speed) { 88 | damage(o.speed - speed + 30); 89 | } else { 90 | damage(speed - o.speed + 30); 91 | } 92 | } 93 | 94 | public void destroy() { 95 | // SVars.celestialBodyController.removeCB(this); 96 | }; 97 | } 98 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/world/blocks/defense/TriShield.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.world.blocks.defense; 2 | 3 | import arc.graphics.Color; 4 | import arc.graphics.g2d.Draw; 5 | import arc.math.Mathf; 6 | import arc.struct.Seq; 7 | import arc.util.Log; 8 | import com.google.errorprone.annotations.Var; 9 | import mindustry.Vars; 10 | import mindustry.content.Fx; 11 | import mindustry.entities.Effect; 12 | import mindustry.game.Team; 13 | import mindustry.gen.Building; 14 | import mindustry.graphics.Layer; 15 | import mindustry.world.Block; 16 | import mindustry.world.Build; 17 | import mindustry.world.Tile; 18 | import mindustry.world.meta.BlockGroup; 19 | import mindustry.world.meta.Env; 20 | import org.durmiendo.sueno.utils.SLog; 21 | 22 | import java.util.ArrayList; 23 | import java.util.List; 24 | 25 | import static mindustry.Vars.indexer; 26 | 27 | public class TriShield extends Block { 28 | public TriShield(String name) { 29 | super(name); 30 | update = true; 31 | solid = true; 32 | group = BlockGroup.projectors; 33 | envEnabled |= Env.space; 34 | } 35 | 36 | 37 | public class TriShieldBuild extends Building { 38 | public Seq points; 39 | 40 | @Override 41 | public Building init(Tile tile, Team team, boolean shouldAdd, int rotation) { 42 | Building b = super.init(tile, team, shouldAdd, rotation); 43 | 44 | points = gen(200); 45 | 46 | return b; 47 | } 48 | 49 | @Override 50 | public void update() { 51 | super.update(); 52 | 53 | } 54 | 55 | @Override 56 | public void draw() { 57 | super.draw(); 58 | 59 | // Log.info(points); 60 | // Draw.z(Layer.effect); 61 | for (Tri tri : points) { 62 | Draw.rect("sueno-tri1", x + tri.x, y + tri.y, 8f, 8f, 0f); 63 | } 64 | } 65 | } 66 | 67 | public static Seq gen(int count) { 68 | Seq shieldPoints = new Seq<>(); 69 | 70 | float angle = 190f / 2f; 71 | float len = 100; 72 | for (int i = 0; i < count; i++) { 73 | float d = Mathf.random(48, len); 74 | float dc = d / 100f* 1.54f; 75 | float a = Mathf.random(-angle*dc, angle*dc); 76 | 77 | float x = Mathf.cosDeg(a) * d; 78 | float y = Mathf.sinDeg(a) * d; 79 | Tri tri = new Tri(x, y, angle); 80 | shieldPoints.add(tri); 81 | 82 | } 83 | 84 | return shieldPoints; 85 | } 86 | 87 | public static class Tri { 88 | public float x, y; 89 | public float angle; 90 | public Tri(float x, float y, float angle) { 91 | this.x = x; 92 | this.y = y; 93 | this.angle = angle; 94 | } 95 | } 96 | } -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/temperature/HeatAbility.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.temperature; 2 | 3 | import arc.math.Mathf; 4 | import arc.math.geom.Geometry; 5 | import arc.scene.ui.layout.Table; 6 | import arc.util.Time; 7 | import mindustry.Vars; 8 | import mindustry.gen.Building; 9 | import mindustry.gen.Groups; 10 | import mindustry.gen.Unit; 11 | import org.durmiendo.sueno.core.SVars; 12 | 13 | public class HeatAbility extends mindustry.entities.abilities.Ability { 14 | public final HeatData hd; 15 | @Override 16 | public void displayBars(Unit unit, Table bars){ 17 | 18 | } 19 | @Override 20 | public void draw(Unit unit) { 21 | super.draw(unit); 22 | } 23 | 24 | @Override 25 | public void update(Unit unit) { 26 | super.update(unit); 27 | 28 | if (hd.isHeat) { 29 | unit.heal(hd.regeneration / 8f / 3.5f * Time.delta); 30 | if (SVars.temperatureController.getAbsoluteTemperatureOf(unit) > hd.minSafeTemperature) { 31 | unit.heal(hd.overRegeneration / 8f / 3.5f /*(SVars.tempTemperatureController.at(unit) - hd.minSafeTemperature)*/ * Time.delta); 32 | } 33 | 34 | if (SVars.temperatureController.getAbsoluteTemperatureOf(unit) > hd.minSafeTemperature) { 35 | float dam = hd.damage / 8f + hd.overDamage * 36 | (SVars.temperatureController.getAbsoluteTemperatureOf(unit) - hd.minSafeTemperature) / 3.5f * Time.delta; 37 | Groups.unit.each(u -> { 38 | if (u.team != unit.team && u.dst(unit) / 8f < hd.damageRange) { 39 | u.health -= dam; 40 | if (u.health <= 0) u.destroy(); 41 | } 42 | }); 43 | Geometry.circle(unit.tileX(), unit.tileY(), Mathf.round(hd.damageRange/1f), (x, y) -> { 44 | Building b = Vars.world.build(x, y); 45 | if (b != null && b.team != unit.team) { 46 | b.health -= dam; 47 | if (b.health <= 0) b.damage(1); 48 | } 49 | }); 50 | } 51 | 52 | 53 | if (hd.overArmor > 0 && SVars.temperatureController.getAbsoluteTemperatureOf(unit) > hd.minSafeTemperature) { 54 | unit.armor = unit.type.armor + hd.overArmor; 55 | } // else { 56 | // unit.armor = unit.type.armor - hd.overArmor; 57 | // } 58 | 59 | 60 | if ((SVars.temperatureController.getRelativeTemperatureOf(unit) < hd.capacity) && !TemperatureController.simulationPaused) { 61 | SVars.temperatureController.setRelativeTemperatureOf(unit, hd.generateTemperature * Time.delta); 62 | } else { 63 | //SVars.temperatureController.at(unit, -hd.generateTemperature * Time.delta * 0.1f); 64 | } 65 | } 66 | } 67 | 68 | public HeatAbility(HeatData heatData) { 69 | super(); 70 | hd = heatData; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /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 | 17 | @if "%DEBUG%"=="" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%"=="" set DIRNAME=. 29 | @rem This is normally unused 30 | set APP_BASE_NAME=%~n0 31 | set APP_HOME=%DIRNAME% 32 | 33 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 34 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 35 | 36 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 37 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 38 | 39 | @rem Find java.exe 40 | if defined JAVA_HOME goto findJavaFromJavaHome 41 | 42 | set JAVA_EXE=java.exe 43 | %JAVA_EXE% -version >NUL 2>&1 44 | if %ERRORLEVEL% equ 0 goto execute 45 | 46 | echo. 47 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 48 | echo. 49 | echo Please set the JAVA_HOME variable in your environment to match the 50 | echo location of your Java installation. 51 | 52 | goto fail 53 | 54 | :findJavaFromJavaHome 55 | set JAVA_HOME=%JAVA_HOME:"=% 56 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 57 | 58 | if exist "%JAVA_EXE%" goto execute 59 | 60 | echo. 61 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 62 | echo. 63 | echo Please set the JAVA_HOME variable in your environment to match the 64 | echo location of your Java installation. 65 | 66 | goto fail 67 | 68 | :execute 69 | @rem Setup the command line 70 | 71 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 72 | 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if %ERRORLEVEL% equ 0 goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | set EXIT_CODE=%ERRORLEVEL% 85 | if %EXIT_CODE% equ 0 set EXIT_CODE=1 86 | if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% 87 | exit /b %EXIT_CODE% 88 | 89 | :mainEnd 90 | if "%OS%"=="Windows_NT" endlocal 91 | 92 | :omega 93 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/content/SPlanets.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.content; 2 | 3 | 4 | import arc.graphics.Color; 5 | import arc.graphics.g3d.VertexBatch3D; 6 | import arc.math.Mathf; 7 | import arc.math.geom.Mat3D; 8 | import arc.math.geom.Vec3; 9 | import arc.struct.Seq; 10 | import arc.util.Time; 11 | import mindustry.Vars; 12 | import mindustry.content.Items; 13 | import mindustry.content.Planets; 14 | import mindustry.game.Team; 15 | import mindustry.graphics.Pal; 16 | import mindustry.graphics.g3d.*; 17 | import mindustry.type.Planet; 18 | import org.durmiendo.sueno.core.SVars; 19 | import org.durmiendo.sueno.graphics.g3d.wobj.Obj; 20 | import org.durmiendo.sueno.graphics.g3d.wobj.ObjParser; 21 | import org.durmiendo.sueno.maps.planet.HieloPlanetGenerator; 22 | import org.durmiendo.sueno.spacestations.SpaceStations; 23 | 24 | 25 | public class SPlanets { 26 | public static Planet hielo; 27 | 28 | public static void load() { 29 | hielo = new Planet("hielo", Planets.sun, 1f, 2) { 30 | { 31 | generator = new HieloPlanetGenerator(); 32 | meshLoader = () -> new HexMesh(this, 5); 33 | 34 | cloudMeshLoader = () -> new MultiMesh( 35 | new HexSkyMesh(this, 2, 0.15f, 0.14f, 5, Color.valueOf("77dde7").a(0.12f), 3, 0.42f, 1f, 0.43f), 36 | new HexSkyMesh(this, 3, 0.6f, 0.15f, 5, Color.valueOf("003153").a(0.1f), 3, 0.42f, 1.2f, 0.45f) 37 | ); 38 | orbitRadius = 20f; 39 | 40 | launchCapacityMultiplier = 0.5f; 41 | sectorSeed = 2; 42 | allowWaves = true; 43 | allowWaveSimulation = true; 44 | allowSectorInvasion = true; 45 | allowLaunchSchematics = false; 46 | enemyCoreSpawnReplace = true; 47 | allowLaunchLoadout = true; 48 | prebuildBase = false; 49 | ruleSetter = r -> { 50 | r.waveTeam = Team.crux; 51 | r.placeRangeCheck = false; 52 | r.showSpawns = false; 53 | }; 54 | iconColor = Color.valueOf("aaaaff"); 55 | atmosphereColor = Color.valueOf("060f16"); 56 | atmosphereRadIn = 0.02f; 57 | atmosphereRadOut = 0.3f; 58 | startSector = 15; 59 | alwaysUnlocked = true; 60 | accessible = true; 61 | visible = true; 62 | landCloudColor = Pal.spore.cpy().a(0.5f); 63 | hiddenItems.removeAll(Items.erekirItems); 64 | hiddenItems.removeAll(Items.serpuloItems); 65 | } 66 | 67 | @Override 68 | public void draw(PlanetParams params, Mat3D projection, Mat3D transform) { 69 | SVars.spaceStations.render(projection, transform); 70 | 71 | super.draw(params, projection, transform); 72 | } 73 | 74 | @Override 75 | public void drawArc(VertexBatch3D batch, Vec3 a, Vec3 b, Color from, Color to, float length, float timeScale, int pointCount) { 76 | super.drawArc(batch, a, b, from, to, length, timeScale, pointCount); 77 | } 78 | }; 79 | } 80 | } 81 | 82 | -------------------------------------------------------------------------------- /annotations/build.gradle: -------------------------------------------------------------------------------- 1 | project.repositories { 2 | mavenCentral() 3 | mavenLocal() 4 | maven { url "https://raw.githubusercontent.com/Zelaux/MindustryRepo/master/repository" } 5 | maven { url "https://www.jitpack.io" } 6 | } 7 | 8 | project.plugins.apply("java") 9 | project.plugins.apply("idea") 10 | project.plugins.apply("maven-publish") 11 | 12 | project.sourceSets.main.java.srcDirs = [ 13 | "src", "gen" 14 | ] 15 | project.sourceSets.main.resources.srcDirs = [ 16 | "res" 17 | ] 18 | 19 | project.tasks.compileJava { JavaCompile task -> 20 | task.options.forkOptions.executable = "D:/.jdks/corretto-1.8.0_372/bin/javac.exe" 21 | //task.options.fork = true 22 | 23 | task.options.encoding = "UTF-8" 24 | task.options.compilerArgs += "-Xlint:none" 25 | task.options.generatedSourceOutputDirectory.set(project.file("gen")) 26 | 27 | //task.options.compilerArgs += ['--release', '8'] 28 | task.targetCompatibility = JavaVersion.VERSION_1_8 29 | task.sourceCompatibility = JavaVersion.VERSION_1_8 30 | 31 | task.options.forkOptions.jvmArgs += [ 32 | "--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED", 33 | "--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED", 34 | "--add-opens=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED", 35 | "--add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED", 36 | "--add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED", 37 | "--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED", 38 | "--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED", 39 | "--add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED", 40 | "--add-opens=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED", 41 | "--add-opens=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED", 42 | "--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED", 43 | "--add-opens=java.base/sun.reflect.annotation=ALL-UNNAMED" 44 | ] 45 | 46 | doFirst { 47 | delete options.generatedSourceOutputDirectory.get().asFile.listFiles() 48 | } 49 | 50 | doLast { 51 | var processorDir = new File(file(project.sourceSets.main.resources.srcDirs.first()), "META-INF/services/") 52 | processorDir.mkdirs() 53 | var processorFile = new File(processorDir, "javax.annotation.processing.Processor") 54 | 55 | var text = new StringBuilder() 56 | project.sourceSets.main.java.srcDirs.each { File f -> 57 | f.eachFileRecurse(groovy.io.FileType.FILES){ file -> 58 | boolean isProcessor = file.text.contains('// annotation processor') 59 | if(file.name.endsWith(".java") && isProcessor){ 60 | text.append(file.path.substring(f.path.length() + 1)).append("\n") 61 | } 62 | } 63 | } 64 | 65 | processorFile.text = text.toString().replace(".java", "").replace("/", ".").replace("\\", ".") 66 | } 67 | } 68 | 69 | project.dependencies { 70 | //annotationProcessor "com.github.Anuken:jabel:93fde537c7" 71 | 72 | compileOnly "com.github.Anuken.Arc:arc-core:v145" 73 | compileOnly "com.squareup:javapoet:1.13.0" 74 | } -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/graphics/g3d/wobj/Obj.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.graphics.g3d.wobj; 2 | 3 | import arc.graphics.Color; 4 | import arc.graphics.Gl; 5 | import arc.graphics.Mesh; 6 | import arc.graphics.Texture; 7 | import arc.graphics.g3d.Camera3D; 8 | import arc.graphics.gl.Shader; 9 | import arc.math.geom.Mat3D; 10 | import arc.math.geom.Vec3; 11 | import arc.struct.Seq; 12 | import arc.util.Log; 13 | import org.durmiendo.sueno.graphics.SShaders; 14 | 15 | public class Obj { 16 | public static Obj zero = new Obj(){ 17 | public void render(Vec3 pos, Vec3 rot, Mat3D projection, Mat3D view, Camera3D cam, Vec3 light) {} 18 | }; 19 | 20 | public Seq materials = new Seq<>(); 21 | public Shader shader = SShaders.g3d; 22 | public Vec3 scl = new Vec3(1.0f, 1.0f, 1.0f); 23 | 24 | private final Mat3D worldTransform = new Mat3D(); 25 | 26 | public void render(Vec3 pos, Vec3 rot, Mat3D projection, Mat3D view, Camera3D cam, Vec3 light) { 27 | shader.bind(); 28 | 29 | shader.setUniformMatrix4("u_proj", projection.val); 30 | shader.setUniformMatrix4("u_view", view.val); 31 | shader.setUniformf("u_campos", cam.position); 32 | shader.setUniformf("u_lightdir", light); 33 | 34 | for (int i = 0; i < materials.size; i++) { 35 | Material m = materials.get(i); 36 | 37 | worldTransform.idt(); 38 | worldTransform.translate(pos); 39 | worldTransform.rotate(Vec3.X, rot.x); 40 | worldTransform.rotate(Vec3.Y, rot.y); 41 | worldTransform.rotate(Vec3.Z, rot.z); 42 | worldTransform.scale(scl); 43 | 44 | shader.setUniformMatrix4("u_worldTrans", worldTransform.val); 45 | 46 | Texture tex = m.mtl.texture; 47 | if (tex != null) { 48 | tex.bind(0); 49 | shader.setUniformi("u_texture", 0); 50 | } 51 | 52 | applyMaterial(m); 53 | 54 | m.mesh.bind(shader); 55 | m.mesh.render(shader, Gl.triangles); 56 | m.mesh.unbind(shader); 57 | } 58 | } 59 | 60 | private void applyMaterial(Material i) { 61 | Color ambient = i.mtl.ambient; 62 | Color diffuse = i.mtl.diffuse; 63 | Color specular = i.mtl.specular; 64 | 65 | shader.setUniformf("u_ambientColor", ambient.r, ambient.g, ambient.b); 66 | shader.setUniformf("u_diffuseColor", diffuse.r, diffuse.g, diffuse.b); 67 | shader.setUniformf("u_specularColor", specular.r, specular.g, specular.b); 68 | shader.setUniformf("u_shininess", i.mtl.shininess); 69 | shader.setUniformi("u_illum", i.mtl.illum); 70 | } 71 | 72 | public static class Material { 73 | public String on; 74 | public Mtl mtl; 75 | public Mesh mesh; 76 | } 77 | 78 | public static class Mtl { 79 | public String name; 80 | public Texture texture; 81 | 82 | public Color ambient = Color.white.cpy(); 83 | public Color diffuse = Color.white.cpy(); 84 | public Color specular = Color.white.cpy(); 85 | public float shininess = 32f; 86 | public int illum = 2; 87 | 88 | public Mtl() {} 89 | } 90 | } -------------------------------------------------------------------------------- /res/shaders/contraction.frag: -------------------------------------------------------------------------------- 1 | uniform sampler2D u_texture; 2 | 3 | uniform vec2 u_campos; 4 | uniform vec2 u_resolution; 5 | uniform float u_time; 6 | 7 | uniform vec2 u_texsize; 8 | uniform vec2 u_offset; 9 | uniform float u_per; 10 | //uniform float u_tire; 11 | 12 | varying vec2 v_texCoords; 13 | 14 | float random(in vec2 st) { 15 | return fract(sin(dot(st.xy, 16 | vec2(12.9898,78.233))) 17 | * 43758.5453123); 18 | } 19 | 20 | 21 | float len(vec3 a) { 22 | return sqrt(a.x*a.x + a.y*a.y + a.z*a.z); 23 | } 24 | 25 | float dvnoise (in vec2 st) { 26 | vec2 i = floor(st); 27 | vec2 f = fract(st); 28 | float a = random(i); 29 | float b = random(i + vec2(1.0, 0.0)); 30 | float c = random(i + vec2(0.0, 1.0)); 31 | float d = random(i + vec2(1.0, 1.0)); 32 | vec2 u = f*f*(3.0-2.0*f); 33 | return mix(a, b, u.x) + 34 | (c - a)* u.y * (1.0 - u.x) + 35 | (d - b) * u.x * u.y; 36 | } 37 | 38 | float fbm(vec2 x) { 39 | float v = 0.0; 40 | float a = 0.5; 41 | vec2 shift = vec2(300.0); 42 | for (int i = 0; i < 8; ++i) { 43 | v += a * dvnoise(x); 44 | x = x * 2.0 + shift; 45 | a *= 0.5; 46 | } 47 | return v; 48 | } 49 | 50 | 51 | 52 | //void main(){gl_FragColor = vec4(1,1,1,max(texture2D(u_texture, v_texCoords).a, 0.2));} 53 | void main(){ 54 | vec2 T = v_texCoords.xy; 55 | vec2 coords = (T * u_texsize) + u_offset; 56 | 57 | vec4 col = texture2D(u_texture, T); 58 | vec4 color = vec4(col); 59 | 60 | if (col.a > 0.) { 61 | vec2 st = coords/5.2; 62 | // st += st * abs(sin(u_time*0.1)*3.0); 63 | color.rgb = vec3(0.0); 64 | 65 | vec2 q = vec2(0.); 66 | q.x = fbm( st + 0.00*u_time/7.); 67 | q.y = fbm( st + vec2(1.0)); 68 | 69 | vec2 r = vec2(0.); 70 | r.x = fbm( st + 1.0*q + vec2(1.7,9.2)+ 0.15*u_time/7.); 71 | r.y = fbm( st + 1.0*q + vec2(8.3,2.8)+ 0.126*u_time/7.); 72 | 73 | float f = fbm(st+r); 74 | 75 | color.rgb = mix(col.rgb/5.6, 76 | col.rgb/3.3, 77 | clamp((f*f)*4.0,0.0,1.0)); 78 | 79 | color.rgb = mix(color.rgb, 80 | col.rgb/1.4, 81 | clamp(length(q),0.0,1.0)); 82 | 83 | color.rgb = mix(color.rgb, 84 | col.rgb, 85 | clamp(length(r.x),0.0,1.0)); 86 | 87 | // color.rgb = mix(vec3(0.610,0.537,0.234), 88 | // vec3(0.175,0.145,0.050), 89 | // clamp((f*f)*4.0,0.0,1.0)); 90 | // 91 | // color.rgb = mix(color.rgb, 92 | // vec3(0.820,0.611,0.204), 93 | // clamp(length(q),0.0,1.0)); 94 | // 95 | // color.rgb = mix(color.rgb, 96 | // vec3(1.000,0.726,0.121), 97 | // clamp(length(r.x),0.0,1.0)); 98 | 99 | float noise = (fbm(vec2(coords / 2.2 + vec2(u_time/60.0))) + 1.) / 2.0; 100 | 101 | // color.a = pow(len(color.rgb)/sqrt(2.)+0.2, 32)*512.; 102 | if (noise < u_per) color.a = 0.; 103 | 104 | 105 | color.rgb = vec3((f*f+.6*f*f+.5*f)*color); 106 | // color.rgb = abs(color.rgb-0.4); 107 | color.r = pow(color.r, 0.5); 108 | color.g = pow(color.g, 0.5); 109 | color.b = pow(color.b, 0.5); 110 | 111 | // color.rgb *= noise; 112 | } 113 | 114 | 115 | gl_FragColor = color; 116 | } 117 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/entities/abilities/DeathZoneAbility.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.entities.abilities; 2 | 3 | import arc.Core; 4 | import arc.Events; 5 | import arc.graphics.Color; 6 | import arc.graphics.g2d.Draw; 7 | import arc.math.Mathf; 8 | import arc.scene.ui.layout.Table; 9 | import arc.util.Strings; 10 | import arc.util.Time; 11 | import mindustry.Vars; 12 | import mindustry.content.Fx; 13 | import mindustry.entities.Effect; 14 | import mindustry.entities.abilities.Ability; 15 | import mindustry.game.EventType; 16 | import mindustry.gen.Groups; 17 | import mindustry.gen.Unit; 18 | import mindustry.type.UnitType; 19 | import mindustry.world.meta.Stat; 20 | import mindustry.world.meta.StatUnit; 21 | import org.durmiendo.sueno.core.SVars; 22 | import org.durmiendo.sueno.graphics.SLayers; 23 | 24 | public class DeathZoneAbility extends Ability { 25 | public UnitType summon; 26 | public float spawnTime = 60f, minRange, maxRange; 27 | public Effect spawnEffect = Fx.spawn; 28 | public boolean parentizeEffects; 29 | public int maxSummon = 10; 30 | 31 | protected float timer; 32 | 33 | public DeathZoneAbility(UnitType summon, float spawnTime, float minRange, float maxRange, int summonCount){ 34 | this.summon = summon; 35 | this.spawnTime = spawnTime; 36 | this.minRange = minRange; 37 | this.maxRange = maxRange; 38 | maxSummon = summonCount; 39 | } 40 | 41 | public DeathZoneAbility(){ 42 | } 43 | 44 | public void addStats(Table t) { 45 | t.add("[lightgray]" + Stat.buildTime.localized() + ": [white]" + Strings.autoFixed(this.spawnTime / 60.0F, 2) + " " + StatUnit.seconds.localized()); 46 | } 47 | 48 | public void update(Unit unit) { 49 | this.timer += Time.delta * Vars.state.rules.unitBuildSpeed(unit.team); 50 | if (this.timer >= this.spawnTime) { 51 | int units = Groups.unit.count(a -> a.team == unit.team && a.type == this.summon && a.dst(unit) < 8*20f); 52 | int tunits = Groups.unit.count(a -> a.team == unit.team && a.type == unit.type); 53 | 54 | if (units <= tunits * maxSummon) { 55 | float a = Mathf.random(0f, 360f); 56 | float r = Mathf.random(minRange, maxRange); 57 | float x = r * Mathf.cos(a) + unit.x; 58 | float y = r * Mathf.sin(a) + unit.y; 59 | this.spawnEffect.at(x, y, a, this.parentizeEffects ? unit : null); 60 | 61 | Unit u = this.summon.create(unit.team); 62 | u.set(x, y); 63 | u.rotation = unit.rotation + Mathf.random(-10f, 10f); 64 | Events.fire(new EventType.UnitCreateEvent(u, null, unit)); 65 | if(!Vars.net.client()){ 66 | u.add(); 67 | } 68 | 69 | this.timer = 0f; 70 | } 71 | } 72 | } 73 | 74 | public Color c = Color.valueOf("79eef2"); 75 | 76 | @Override 77 | public void draw(Unit unit) { 78 | super.draw(unit); 79 | Draw.z(SLayers.deadZone); 80 | 81 | Draw.alpha(0.3f); 82 | Draw.color(c); 83 | Draw.scl(1f / 64f * maxRange); 84 | Draw.rect(SVars.core.getRegion("circle"), unit.x, unit.y); 85 | } 86 | 87 | @Override 88 | public String localized(){ 89 | return Core.bundle.format("ability.deadzone"); 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/world/blocks/Heater.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.world.blocks; 2 | 3 | import arc.Core; 4 | import arc.scene.ui.Label; 5 | import arc.scene.ui.Slider; 6 | import arc.scene.ui.layout.Table; 7 | import arc.util.Strings; 8 | import arc.util.io.Reads; 9 | import arc.util.io.Writes; 10 | import mindustry.gen.Building; 11 | import mindustry.world.Block; 12 | import mindustry.world.meta.BlockGroup; 13 | import mindustry.world.meta.Env; 14 | import org.durmiendo.sueno.core.SVars; 15 | import org.durmiendo.sueno.math.SInterp; 16 | import org.durmiendo.sueno.temperature.TemperatureController; 17 | import org.durmiendo.sueno.world.blocks.build.Heated; 18 | 19 | public class Heater extends Block { 20 | public float heatPower = 0.55f; 21 | public Heater(String name) { 22 | super(name); 23 | solid = true; 24 | update = true; 25 | group = BlockGroup.projectors; 26 | hasPower = true; 27 | hasItems = true; 28 | emitLight = true; 29 | suppressable = true; 30 | envEnabled |= Env.space; 31 | configurable = true; 32 | } 33 | 34 | public class HeatBuild extends Building implements Heated { 35 | public float tpower = 1; 36 | @Override 37 | public void updateTile() { 38 | if (!TemperatureController.simulationPaused) { 39 | for (int x = tileX(); x < tileX()+size; x++) { 40 | for (int y = tileY(); y < tileY()+size; y++) { 41 | SVars.temperatureController.setRelativeTemperatureAt( 42 | x, y, 43 | heatPower/size/16f*tpower*efficiency* 44 | (SInterp.recession.apply( 45 | 0+ SVars.temperatureController.ambientTemperatureChangeRate, TemperatureController.maxSafeTemperature + SVars.temperatureController.ambientTemperatureChangeRate, 46 | SVars.temperatureController.getRelativeTemperatureAt(x,y) 47 | )+1f) 48 | ); 49 | } 50 | } 51 | } 52 | super.updateTile(); 53 | } 54 | 55 | @Override 56 | public void buildConfiguration(Table table) { 57 | super.buildConfiguration(table); 58 | table.setBackground(Core.atlas.drawable("sueno-black75")); 59 | 60 | Label label = new Label("Сила нагревателя " + Strings.fixed(tpower, 2) + "%"); 61 | Slider slider = new Slider(0, 1, 0.01f, false); 62 | slider.setValue(tpower); 63 | slider.changed(() -> { 64 | tpower = slider.getValue(); 65 | label.setText("Сила нагревателя " + Strings.fixed(tpower, 2) + "%"); 66 | }); 67 | table.row(); 68 | table.add(label); 69 | table.row(); 70 | table.add(slider); 71 | table.row(); 72 | } 73 | 74 | @Override 75 | public void write(Writes write) { 76 | super.write(write); 77 | write.f(tpower); 78 | } 79 | 80 | @Override 81 | public void read(Reads read) { 82 | super.read(read); 83 | tpower = read.f(); 84 | } 85 | 86 | @Override 87 | public void read(Reads read, byte revision) { 88 | super.read(read, revision); 89 | tpower = read.f(); 90 | } 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/graphics/DynamicTexture.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.graphics; 2 | 3 | import arc.Core; 4 | import arc.Events; 5 | import arc.func.Cons; 6 | import arc.graphics.Color; 7 | import arc.graphics.Texture; 8 | import arc.graphics.g2d.Draw; 9 | import arc.graphics.g2d.TextureRegion; 10 | import arc.graphics.gl.FrameBuffer; 11 | import arc.graphics.gl.Shader; 12 | import arc.math.Mathf; 13 | import arc.struct.Seq; 14 | import arc.util.Disposable; 15 | import arc.util.Time; 16 | import mindustry.game.EventType; 17 | import mindustry.graphics.Shaders; 18 | import org.durmiendo.sueno.core.SVars; 19 | 20 | public class DynamicTexture implements Disposable { 21 | public static Seq all = new Seq<>(); 22 | 23 | public static DynamicTexture create(int width, int height, String pathToShader, Cons uniformSets) { 24 | DynamicTexture dyn = new DynamicTexture( 25 | width, 26 | height, 27 | null 28 | ); 29 | dyn.apply = uniformSets; 30 | dyn.shader = new Shader( 31 | Shaders.getShaderFi("screenspace.vert"), 32 | SVars.internalFileTree.child(pathToShader) 33 | ){ 34 | @Override 35 | public void apply() { 36 | dyn.apply.get(this); 37 | } 38 | }; 39 | return dyn; 40 | } 41 | 42 | static { 43 | Events.run(EventType.Trigger.draw, () -> { 44 | all.each(DynamicTexture::preDraw); 45 | }); 46 | } 47 | 48 | public int width, height, realWidth, realHeight; 49 | public FrameBuffer frameBuffer; 50 | public Shader shader; 51 | public Cons apply = s -> {}; 52 | 53 | private boolean itDrawn; 54 | private final TextureRegion textureRegion; 55 | 56 | private DynamicTexture(int width, int height, Shader shader) { 57 | this.width = width; 58 | this.height = height; 59 | this.shader = shader; 60 | 61 | frameBuffer = new FrameBuffer(width, height, true); 62 | textureRegion = new TextureRegion(frameBuffer.getTexture(), width, height); 63 | 64 | 65 | setResolution(); 66 | 67 | all.add(this); 68 | } 69 | 70 | public void setResolution() { 71 | realWidth = Mathf.round(width * SVars.getQuality()); 72 | realHeight = Mathf.round(height * SVars.getQuality()); 73 | 74 | frameBuffer.resize(realWidth, realHeight); 75 | 76 | textureRegion.setWidth(width); 77 | textureRegion.setHeight(height); 78 | } 79 | 80 | public void preDraw() { 81 | itDrawn = false; 82 | draw(); 83 | } 84 | 85 | public TextureRegion getTextureRegion() { 86 | draw(); 87 | return textureRegion; 88 | } 89 | 90 | public void draw() { 91 | if (!itDrawn) { 92 | forceDraw(); 93 | itDrawn = true; 94 | } 95 | } 96 | 97 | public void forceDraw() { 98 | Draw.flush(); 99 | Draw.reset(); 100 | 101 | setResolution(); 102 | 103 | shader.apply(); 104 | frameBuffer.begin(Color.clear); 105 | 106 | Draw.blit(shader); 107 | Draw.flush(); 108 | 109 | frameBuffer.end(); 110 | textureRegion.set(frameBuffer.getTexture()); 111 | } 112 | 113 | @Override 114 | public void dispose() { 115 | frameBuffer.dispose(); 116 | } 117 | } -------------------------------------------------------------------------------- /res/shaders/sun.frag: -------------------------------------------------------------------------------- 1 | uniform vec2 u_resolution; 2 | uniform float u_time; 3 | 4 | // based on https://www.shadertoy.com/view/4dXGR4# by 5 | // flight404 (THANKS!) 6 | 7 | float snoise(vec3 uv, float res) // by trisomie21 8 | { 9 | const vec3 s = vec3(1e0, 1e2, 1e4); 10 | 11 | uv *= res; 12 | 13 | vec3 uv0 = floor(mod(uv, res))*s; 14 | vec3 uv1 = floor(mod(uv+vec3(1.), res))*s; 15 | 16 | vec3 f = fract(uv); f = f*f*(3.0-2.0*f); 17 | 18 | vec4 v = vec4(uv0.x+uv0.y+uv0.z, uv1.x+uv0.y+uv0.z, 19 | uv0.x+uv1.y+uv0.z, uv1.x+uv1.y+uv0.z); 20 | 21 | vec4 r = fract(sin(v*1e-3)*1e5); 22 | float r0 = mix(mix(r.x, r.y, f.x), mix(r.z, r.w, f.x), f.y); 23 | 24 | r = fract(sin((v + uv1.z - uv0.z)*1e-3)*1e5); 25 | float r1 = mix(mix(r.x, r.y, f.x), mix(r.z, r.w, f.x), f.y); 26 | 27 | return mix(r0, r1, f.z)*2.-1.; 28 | } 29 | 30 | void main() 31 | { 32 | float brightness = -.2; 33 | float radius = brightness * 0.2; 34 | float invRadius = 1.0/radius; 35 | 36 | vec3 orange = vec3( 0.8, 0.65, 0.3 ); 37 | vec3 orangeRed = vec3( 0.8, 0.35, 0.1 ); 38 | float time = u_time * 0.1; 39 | float aspect = u_resolution.x/u_resolution.y; 40 | vec2 uv = gl_FragCoord.xy / u_resolution.xy; 41 | vec2 p = -0.5 + uv; 42 | p.x *= aspect; 43 | 44 | float fade = pow(length( 1.7 * p ), sin(time*50.3)/25.+0.15); 45 | float fVal1 = 1.0 - fade; 46 | float fVal2 = 1.0 - fade; 47 | 48 | float angle = atan( p.x, p.y )/6.2832; 49 | float dist = length(p*p); 50 | float distr = length(p); 51 | vec3 coord = vec3( angle, dist, time * 0.1 ); 52 | 53 | float newTime1 = abs( snoise( coord + vec3( 0.0, -time * ( 0.35 + brightness * 0.001 ), time * 0.015 ), 15.0 ) ); 54 | float newTime2 = abs( snoise( coord + vec3( 0.0, -time * ( 0.15 + brightness * 0.001 ), time * 0.015 ), 45.0 ) ); 55 | for( int i=1; i<=7; i++ ){ 56 | float power = pow( 2.0, float(i + 1) ); 57 | fVal1 += ( 0.5 / power ) * snoise( coord + vec3( 0.0, -time, time * 0.2 ), ( power * ( 10.0 ) * ( newTime1 + 1.0 ) ) ); 58 | fVal2 += ( 0.5 / power ) * snoise( coord + vec3( 0.0, -time, time * 0.2 ), ( power * ( 25.0 ) * ( newTime2 + 1.0 ) ) ); 59 | } 60 | 61 | float corona = pow( fVal1 * max( 1.1 - fade, 0.0 ), 2.0 ) * 50.0; 62 | corona += pow( fVal2 * max( 1.1 - fade, 0.0 ), 2.0 ) * 50.0; 63 | corona *= 1.2 - newTime1; 64 | vec3 sphereNormal = vec3( 0.0, 0.0, 1.0 ); 65 | vec3 dir = vec3( 0.0 ); 66 | vec3 center = vec3( 0.5, 0.5, 1.0 ); 67 | vec3 starSphere = vec3( 0.0 ); 68 | 69 | vec2 sp = -1.0 + 2.0 * uv; 70 | sp.x *= aspect; 71 | sp *= ( 2.0 - brightness ); 72 | float r = dot(sp,sp); 73 | float f = (1.0-sqrt(abs(1.0-r)))/(r) + brightness * 0.5; 74 | if( dist < radius ){ 75 | corona *= pow( dist * invRadius, 24.0 ); 76 | vec2 newUv; 77 | newUv.x = sp.x*f; 78 | newUv.y = sp.y*f; 79 | newUv += vec2( time, 0.0 ); 80 | } 81 | 82 | // float starGlow = min( max( 1.0 - dist * ( 1.0 - brightness ), 0.0 ), 1.0 ); 83 | float starGlow = min( max( 1.0 - distr * ( 1.0 - brightness ), 0.0 ), 1.0 )/(fade*3.); 84 | // float starGlow = 0.; 85 | 86 | float alpha = clamp((corona + starGlow) * 1.2, 0.0, 1.0 ); 87 | 88 | if (alpha < 0.885) { 89 | gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); 90 | } else { 91 | vec3 finalColor = vec3( f * ( 0.75 + brightness * 0.3 ) * orange ) + corona * orange + starGlow * orangeRed; 92 | gl_FragColor = vec4( finalColor * alpha * 1.8, alpha ); 93 | } 94 | } -------------------------------------------------------------------------------- /src/org/durmiendo/sueno/ui/dialogs/ShadersEditor.java: -------------------------------------------------------------------------------- 1 | package org.durmiendo.sueno.ui.dialogs; 2 | 3 | import arc.graphics.Gl; 4 | import arc.graphics.gl.Shader; 5 | import arc.math.Mathf; 6 | import arc.scene.ui.Dialog; 7 | import arc.scene.ui.TextField; 8 | import arc.util.Reflect; 9 | import mindustry.ui.Styles; 10 | import org.durmiendo.sueno.graphics.SShaders; 11 | 12 | import java.lang.reflect.Field; 13 | 14 | // TODO fuck1пg ui 15 | public class ShadersEditor extends Dialog { 16 | int level = 0; 17 | Field editing; 18 | 19 | public ShadersEditor() { 20 | super("@shader-editor"); 21 | } 22 | 23 | @Override 24 | public Dialog show() { 25 | rebuild(); 26 | return super.show(); 27 | } 28 | 29 | public void rebuild() { 30 | cont.clearChildren(); 31 | 32 | cont.fill(t -> { 33 | t.top(); 34 | t.button("back", Styles.cleart, () -> { 35 | if (level == 0) 36 | hide(); 37 | else { 38 | level--; 39 | rebuild(); 40 | } 41 | }).fillX(); 42 | }); 43 | cont.row(); 44 | cont.pane(t -> { 45 | if (level == 0) { 46 | for (Field field : SShaders.class.getDeclaredFields()) { 47 | t.button(field.getName(), () -> { 48 | editing = field; 49 | level = 1; 50 | rebuild(); 51 | }).fillX(); 52 | t.row(); 53 | } 54 | } else if (level == 1) { 55 | TextField frag = t.field("frag", str -> {}).fillX().get(); 56 | TextField vert = t.field("vert", str -> {}).fillX().get(); 57 | 58 | t.row(); 59 | 60 | t.button("compile", () -> { 61 | Shader shader = Reflect.get(editing); 62 | 63 | Gl.useProgram(0); 64 | Gl.deleteShader(Reflect.get(shader, "vertexShaderHandle")); 65 | Gl.deleteShader(Reflect.get(shader, "fragmentShaderHandle")); 66 | Gl.deleteProgram(Reflect.get(shader, "program")); 67 | 68 | compile(shader, vert.getText(), frag.getText()); 69 | }).fillX(); 70 | } 71 | }).fillX(); 72 | } 73 | 74 | void compile(Shader shader, String vert, String frag) { 75 | if(vert == null) throw new IllegalArgumentException("vertex shader must not be null"); 76 | if(frag == null) throw new IllegalArgumentException("fragment shader must not be null"); 77 | 78 | vert = Reflect.invoke(shader, "preprocess", new Object[]{vert, false}, String.class, boolean.class); 79 | frag = Reflect.invoke(shader, "preprocess", new Object[]{frag, true}, String.class, boolean.class); 80 | 81 | if(Shader.prependVertexCode != null && Shader.prependVertexCode.length() > 0) vert = Shader.prependVertexCode + vert; 82 | if(Shader.prependFragmentCode != null && Shader.prependFragmentCode.length() > 0) frag = Shader.prependFragmentCode + frag; 83 | 84 | Reflect.set(shader, "vertexShaderSource", vert); 85 | Reflect.set(shader, "fragmentShaderSource", frag); 86 | 87 | Reflect.invoke(shader, "compileShaders", new Object[]{vert, frag}, String.class, String.class); 88 | if(Reflect.invoke(shader, "isCompiled")){ 89 | Reflect.invoke(shader, "fetchAttributes"); 90 | Reflect.invoke(shader, "fetchUniforms"); 91 | }else{ 92 | throw new IllegalArgumentException("Failed to compile shader: " + shader); 93 | } 94 | } 95 | } 96 | --------------------------------------------------------------------------------