From d84d8075a601cb934f6939507910f4aa90ece223 Mon Sep 17 00:00:00 2001 From: Liplum Date: Tue, 5 Dec 2023 16:00:04 +0800 Subject: [PATCH] merged `S` into `Var` --- build.gradle.kts | 2 +- main/src/net/liplum/S.java | 11 -------- main/src/net/liplum/Var.kt | 2 ++ main/src/net/liplum/api/cyber/NetworkNodeH.kt | 6 ++--- .../blocks/cyberion/CyberionMixerDrawer.kt | 6 ++--- .../blocks/decentralizer/Decentralizer.kt | 4 +-- .../net/liplum/blocks/deleter/DeleterWave.kt | 6 ++--- main/src/net/liplum/holo/HoloForceField.kt | 4 +-- main/src/net/liplum/holo/HoloFx.kt | 12 ++++----- .../net/liplum/holo/HoloProjectingSection.kt | 4 +-- main/src/net/liplum/holo/HoloProjector.kt | 8 +++--- main/src/net/liplum/holo/HoloUnit.kt | 10 ++++---- main/src/net/liplum/holo/HoloUnitType.kt | 25 +++++++++---------- main/src/net/liplum/holo/HoloWall.kt | 13 +++++----- main/src/net/liplum/holo/Stealth.kt | 8 +++--- main/src/net/liplum/registry/CioBlock.kt | 16 ++++++------ main/src/net/liplum/registry/CioFluid.kt | 6 ++--- main/src/net/liplum/registry/CioHoloUnit.kt | 12 ++++----- main/src/net/liplum/registry/CioSpaceship.kt | 4 +-- .../src/net/liplum/registry/SpecificLoader.kt | 4 +-- .../net/liplum/shaders/HologramShader.java | 6 ++--- .../net/liplum/shaders/HologramizeShader.kt | 6 ++--- .../src/net/liplum/shaders/VanishingShader.kt | 6 ++--- main/src/net/liplum/ui/DebugSettings.kt | 4 +-- main/src/net/liplum/ui/OverwrittenUI.kt | 4 +-- main/src/net/liplum/welcome/SharedUI.kt | 3 +-- main/src/net/liplum/welcome/Templates.kt | 4 +-- main/src/net/liplum/welcome/Welcome.kt | 4 +-- mod.hjson | 6 ++--- 29 files changed, 96 insertions(+), 110 deletions(-) delete mode 100644 main/src/net/liplum/S.java diff --git a/build.gradle.kts b/build.gradle.kts index a4b739c4..9b6409df 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -17,7 +17,7 @@ buildscript { val settings = localConfig allprojects { group = "net.liplum" - version = "5.1" + version = "6.0" repositories { mavenCentral() maven { diff --git a/main/src/net/liplum/S.java b/main/src/net/liplum/S.java deleted file mode 100644 index 7a44e801..00000000 --- a/main/src/net/liplum/S.java +++ /dev/null @@ -1,11 +0,0 @@ -package net.liplum; - -import arc.graphics.Color; -import org.jetbrains.annotations.NotNull; - -public class S { - @NotNull - public static Color - Hologram = R.C.Holo, - HologramDark = R.C.HoloDark; -} diff --git a/main/src/net/liplum/Var.kt b/main/src/net/liplum/Var.kt index a62d7af8..42db7386 100644 --- a/main/src/net/liplum/Var.kt +++ b/main/src/net/liplum/Var.kt @@ -6,6 +6,8 @@ import net.liplum.ui.NavigationService import plumy.dsl.WorldXY object Var { + @JvmField var Hologram = R.C.Holo + @JvmField var HologramDark = R.C.HoloDark @JvmField var ContentSpecific = ContentSpec.Vanilla @JvmField var CurDebugLevel = DebugLevel.Any @JvmField var ExperimentalMode = false diff --git a/main/src/net/liplum/api/cyber/NetworkNodeH.kt b/main/src/net/liplum/api/cyber/NetworkNodeH.kt index 7e88cdd4..c97ca996 100644 --- a/main/src/net/liplum/api/cyber/NetworkNodeH.kt +++ b/main/src/net/liplum/api/cyber/NetworkNodeH.kt @@ -16,7 +16,6 @@ import mindustry.graphics.Layer import mindustry.graphics.Pal import net.liplum.DebugOnly import net.liplum.R -import net.liplum.S import net.liplum.Var import net.liplum.api.cyber.SideLinks.Companion.coordinates import net.liplum.api.cyber.SideLinks.Companion.reflect @@ -34,7 +33,6 @@ import net.liplum.input.smoothPlacing import net.liplum.input.smoothSelect import plumy.animation.ContextDraw.Draw import plumy.animation.ContextDraw.DrawSize -import net.liplum.render.* import net.liplum.registry.SD import net.liplum.render.G import net.liplum.render.Text @@ -245,7 +243,7 @@ fun INetworkNode.drawLinkInfo() = building.run { if (sendingProgress > 0f) { val width = 25f Fill.rect(x, y, width, 5f) - Draw.color(S.Hologram) + Draw.color(Var.Hologram) Fill.rect(x - width * (1f - sendingProgress) / 2f, y, width * sendingProgress, 5f) Draw.color() } @@ -311,7 +309,7 @@ fun INetworkNode.drawRail(beamTR: TR, beamEndTR: TR) { val oy = this.building.y val widthHalf = Var.NetworkNodeRailWidth / 2f val thickness = Var.NetworkRailThickness - Draw.color(S.Hologram) + Draw.color(Var.Hologram) links.forEachNodeWithSide { side, t -> val time = linkingTime[side] val dir = coordinates[side] diff --git a/main/src/net/liplum/blocks/cyberion/CyberionMixerDrawer.kt b/main/src/net/liplum/blocks/cyberion/CyberionMixerDrawer.kt index 08f183f3..c9a80778 100644 --- a/main/src/net/liplum/blocks/cyberion/CyberionMixerDrawer.kt +++ b/main/src/net/liplum/blocks/cyberion/CyberionMixerDrawer.kt @@ -12,13 +12,13 @@ import arc.util.Time import mindustry.gen.Building import mindustry.graphics.Layer import mindustry.world.draw.DrawBlock -import net.liplum.S +import net.liplum.Var import plumy.dsl.DrawLayer import plumy.core.math.smooth class DrawCyberionAgglomeration : DrawBlock() { - var flameColor: Color = S.HologramDark - var midColor: Color = S.Hologram + var flameColor: Color = Var.HologramDark + var midColor: Color = Var.Hologram var flameRad = 1f var flameRadiusScl = 5f var circleStroke = 1.5f diff --git a/main/src/net/liplum/blocks/decentralizer/Decentralizer.kt b/main/src/net/liplum/blocks/decentralizer/Decentralizer.kt index 633ab37e..70973b9a 100644 --- a/main/src/net/liplum/blocks/decentralizer/Decentralizer.kt +++ b/main/src/net/liplum/blocks/decentralizer/Decentralizer.kt @@ -9,7 +9,7 @@ import mindustry.type.ItemStack import mindustry.world.Block import net.liplum.CLog import net.liplum.DebugOnly -import net.liplum.S +import net.liplum.Var import net.liplum.blocks.decentralizer.RecipeCenter.AllRecipes import net.liplum.blocks.decentralizer.RecipeCenter.calcuID import net.liplum.common.util.getF @@ -138,7 +138,7 @@ open class Decentralizer(name: String) : Block(name) { override fun draw() { super.draw() DebugOnly { - "$curRecipe".postToastTextOn(this, S.Hologram, faded = false) + "$curRecipe".postToastTextOn(this, Var.Hologram, faded = false) } } } diff --git a/main/src/net/liplum/blocks/deleter/DeleterWave.kt b/main/src/net/liplum/blocks/deleter/DeleterWave.kt index 8af8e3ef..3d0e6590 100644 --- a/main/src/net/liplum/blocks/deleter/DeleterWave.kt +++ b/main/src/net/liplum/blocks/deleter/DeleterWave.kt @@ -8,7 +8,7 @@ import mindustry.entities.Effect import mindustry.entities.bullet.BasicBulletType import mindustry.gen.* import mindustry.graphics.Layer -import net.liplum.S +import net.liplum.Var import net.liplum.api.IExecutioner import net.liplum.math.quadratic import plumy.animation.ContextDraw.DrawScale @@ -31,8 +31,8 @@ open class DeleterWave( init { hitEffect = Fx.hitLancer - frontColor = S.Hologram - backColor = S.HologramDark + frontColor = Var.Hologram + backColor = Var.HologramDark pierce = true pierceCap = 10 lightRadius = 1f diff --git a/main/src/net/liplum/holo/HoloForceField.kt b/main/src/net/liplum/holo/HoloForceField.kt index 0e695a83..e7188f08 100644 --- a/main/src/net/liplum/holo/HoloForceField.kt +++ b/main/src/net/liplum/holo/HoloForceField.kt @@ -17,7 +17,7 @@ import mindustry.graphics.Layer import mindustry.graphics.Pal import mindustry.ui.Bar import net.liplum.Meta -import net.liplum.S +import net.liplum.Var import net.liplum.common.shader.use import net.liplum.utils.healthPct import net.liplum.utils.localized @@ -25,7 +25,7 @@ import net.liplum.registry.SD open class HoloForceField( val radius: Float, val regen: Float, val max: Float, val cooldown: Float, - val color: Color = S.Hologram, + val color: Color = Var.Hologram, ) : Ability() { override fun update(unit: Unit) { if (unit.shield < max) { diff --git a/main/src/net/liplum/holo/HoloFx.kt b/main/src/net/liplum/holo/HoloFx.kt index 292e97fc..2411bb55 100644 --- a/main/src/net/liplum/holo/HoloFx.kt +++ b/main/src/net/liplum/holo/HoloFx.kt @@ -8,29 +8,29 @@ import mindustry.Vars import mindustry.entities.Effect import mindustry.graphics.Drawf import mindustry.graphics.Layer -import net.liplum.S +import net.liplum.Var import net.liplum.common.shader.on import net.liplum.registry.SD object HoloFx { val heal = Effect(11f) { - Draw.color(S.Hologram) + Draw.color(Var.Hologram) Lines.stroke(it.fout() * 2f) Lines.circle(it.x, it.y, 2f + it.finpow() * 7f) } val healWaveDynamic = Effect(22f) { - Draw.color(S.Hologram) + Draw.color(Var.Hologram) Lines.stroke(it.fout() * 2f) Lines.circle(it.x, it.y, 4f + it.finpow() * it.rotation) } val hitLaser = Effect(8f) { - Draw.color(Color.white, S.Hologram, it.fin()) + Draw.color(Color.white, Var.Hologram, it.fin()) Lines.stroke(0.5f + it.fout()) Lines.circle(it.x, it.y, it.fin() * 5f) - Drawf.light(it.x, it.y, 23f, S.Hologram, it.fout() * 0.7f) + Drawf.light(it.x, it.y, 23f, Var.Hologram, it.fout() * 0.7f) } val shootHeal = Effect(8f) { - Draw.color(S.Hologram) + Draw.color(Var.Hologram) val w = 1f + 5 * it.fout() Drawf.tri(it.x, it.y, w, 17f * it.fout(), it.rotation) Drawf.tri(it.x, it.y, w, 4f * it.fout(), it.rotation + 180f) diff --git a/main/src/net/liplum/holo/HoloProjectingSection.kt b/main/src/net/liplum/holo/HoloProjectingSection.kt index ac61efeb..2d81eaaf 100644 --- a/main/src/net/liplum/holo/HoloProjectingSection.kt +++ b/main/src/net/liplum/holo/HoloProjectingSection.kt @@ -5,7 +5,7 @@ import arc.math.geom.Vec2 import arc.util.Tmp import mindustry.gen.Building import mindustry.graphics.Layer -import net.liplum.S +import net.liplum.Var import net.liplum.render.G import net.liplum.render.* import plumy.dsl.DrawLayer @@ -14,7 +14,7 @@ class HoloProjectingSection : DrawSection() where T : Building { val v = Vec2() var center: T.() -> Vec2 = { v.set(x, y) } var alphaProgress: SectionProgress = Sections.warmupSmooth - var color = S.Hologram + var color = Var.Hologram var x = 0f var y = 0f var width = 6f diff --git a/main/src/net/liplum/holo/HoloProjector.kt b/main/src/net/liplum/holo/HoloProjector.kt index 1818922a..7f7a9b87 100644 --- a/main/src/net/liplum/holo/HoloProjector.kt +++ b/main/src/net/liplum/holo/HoloProjector.kt @@ -30,7 +30,7 @@ import mindustry.world.meta.BlockGroup import mindustry.world.meta.Stat import net.liplum.DebugOnly import net.liplum.R -import net.liplum.S +import net.liplum.Var import net.liplum.UndebugOnly import net.liplum.common.util.percentI import net.liplum.utils.CalledBySync @@ -211,7 +211,7 @@ open class HoloProjector(name: String) : Block(name) { override fun buildConfiguration(table: Table) { val options = Seq.with(plans).map { it.unitType - }.filter { + }.retainAll { it.unlockedNow() && !it.isBanned } if (options.any()) { @@ -378,13 +378,13 @@ open class HoloProjector(name: String) : Block(name) { DebugOnly { AddBar("progress", { "${"bar.progress".bundle}: ${progress.percentI}" }, - { S.Hologram }, + { Var.Hologram }, { progress } ) }.Else { AddBar("progress", { "bar.progress".bundle }, - { S.Hologram }, + { Var.Hologram }, { progress } ) } diff --git a/main/src/net/liplum/holo/HoloUnit.kt b/main/src/net/liplum/holo/HoloUnit.kt index ee94461c..0624e54e 100644 --- a/main/src/net/liplum/holo/HoloUnit.kt +++ b/main/src/net/liplum/holo/HoloUnit.kt @@ -20,7 +20,7 @@ import mindustry.world.blocks.ConstructBlock.ConstructBuild import mindustry.world.blocks.payloads.BuildPayload import mindustry.world.blocks.payloads.Payload import mindustry.world.blocks.power.PowerGraph -import net.liplum.S +import net.liplum.Var import net.liplum.common.persistence.* import net.liplum.holo.HoloProjector.HoloProjectorBuild import net.liplum.mixin.PayloadMixin @@ -136,7 +136,7 @@ open class HoloUnit : UnitEntity(), PayloadMixin, IRevisionable { HoloFx.shieldBreak.at( x, y, cacheRange, - S.Hologram, this + Var.Hologram, this ) } } @@ -170,7 +170,7 @@ open class HoloUnit : UnitEntity(), PayloadMixin, IRevisionable { val size = if (plan.breaking) if (active) tile.block().size else lastSize else plan.block.size val tx = plan.drawx() val ty = plan.drawy() - Lines.stroke(1.0f, S.Hologram) + Lines.stroke(1.0f, Var.Hologram) Draw.z(Layer.buildBeam) Draw.alpha(buildAlpha) if (!active && tile.build !is ConstructBuild) { @@ -193,7 +193,7 @@ open class HoloUnit : UnitEntity(), PayloadMixin, IRevisionable { val ox = mineTile.worldx() val oy = mineTile.worldy() Draw.z(115.1f) - Draw.color(S.Hologram) + Draw.color(Var.Hologram) val size = mineTile.overlay().size.worldXY DrawLayer(Layer.buildBeam) { Fill.poly(ox, oy, 8, size, Time.time) @@ -217,7 +217,7 @@ open class HoloUnit : UnitEntity(), PayloadMixin, IRevisionable { ruvikTipAlpha -= 0.5f / holoType.ruvikShootingTipTime } if (ruvikTipAlpha > 0f) { - G.dashCircleBreath(x, y, holoType.ruvikTipRange, color = S.Hologram, alpha = ruvikTipAlpha) + G.dashCircleBreath(x, y, holoType.ruvikTipRange, color = Var.Hologram, alpha = ruvikTipAlpha) } } } diff --git a/main/src/net/liplum/holo/HoloUnitType.kt b/main/src/net/liplum/holo/HoloUnitType.kt index 8d6d204c..7603d799 100644 --- a/main/src/net/liplum/holo/HoloUnitType.kt +++ b/main/src/net/liplum/holo/HoloUnitType.kt @@ -29,7 +29,6 @@ import mindustry.world.meta.Env import mindustry.world.meta.Stat import net.liplum.DebugOnly import net.liplum.R -import net.liplum.S import net.liplum.Var import net.liplum.common.shader.use import plumy.dsl.bundle @@ -89,13 +88,13 @@ open class HoloUnitType(name: String) : UnitType(name) { var researchReq: Array = emptyArray() init { - //outlineColor = S.HologramDark + //outlineColor = Var.HologramDark allowedInPayloads = false - lightColor = S.Hologram - engineColor = S.Hologram - healColor = S.Hologram - engineColorInner = S.HologramDark - mechLegColor = S.HologramDark + lightColor = Var.Hologram + engineColor = Var.Hologram + healColor = Var.Hologram + engineColorInner = Var.HologramDark + mechLegColor = Var.HologramDark wreckRegions = emptyArray() fallEffect = Fx.none fallEngineEffect = Fx.none @@ -117,7 +116,7 @@ open class HoloUnitType(name: String) : UnitType(name) { val layers = listOf( Layer(Core.atlas.getPixmap(rawIcon).toLayerBuffer()), Layer(Core.atlas.getPixmap(rawIcon).toLayerBuffer()) { - +TintLerpLayerProcessor(S.Hologram, Var.HoloUnitTintAlpha) + +TintLerpLayerProcessor(Var.Hologram, Var.HoloUnitTintAlpha) } ) val baked = maker.bake(layers).createPixmap() @@ -264,13 +263,13 @@ open class HoloUnitType(name: String) : UnitType(name) { DebugOnly { bars.add(Bar( { R.Bar.RestLifeFigure.bundle(unit.restLife.toSecond) }, - { S.Hologram }, + { Var.Hologram }, { unit.restLifePercent } )) }.Else { bars.add(Bar( { R.Bar.RestLife.bundle }, - { S.Hologram }, + { Var.Hologram }, { unit.restLifePercent } )) } @@ -322,7 +321,7 @@ open class HoloUnitType(name: String) : UnitType(name) { else "${Iconc.cancel}" }, { val p = unit.projectorPos.castBuild() - if (p != null) S.Hologram + if (p != null) Var.Hologram else Color.gray }, { (unit.projectorPos.castBuild() != null).toFloat() @@ -335,7 +334,7 @@ open class HoloUnitType(name: String) : UnitType(name) { if (p != null) "${Iconc.home}" else "${Iconc.cancel}" }, { - S.Hologram + Var.Hologram }, { (unit.projectorPos.castBuild() != null).toFloat() }) @@ -373,7 +372,7 @@ open class HoloUnitType(name: String) : UnitType(name) { Fill.light( unit.x, unit.y, Lines.circleVertices(radius), radius, Color.clear, - Tmp.c2.set(S.Hologram) + Tmp.c2.set(Var.Hologram) .lerp(Color.white, Mathf.clamp(unit.hitTime() / 2f)) .a(0.7f * alpha) ) diff --git a/main/src/net/liplum/holo/HoloWall.kt b/main/src/net/liplum/holo/HoloWall.kt index 4636f4a4..52ce9b9e 100644 --- a/main/src/net/liplum/holo/HoloWall.kt +++ b/main/src/net/liplum/holo/HoloWall.kt @@ -20,7 +20,6 @@ import mindustry.world.Tile import mindustry.world.blocks.defense.Wall import mindustry.world.meta.BlockStatus import net.liplum.DebugOnly -import net.liplum.S import net.liplum.Var import net.liplum.api.holo.IHoloEntity import net.liplum.api.holo.IHoloEntity.Companion.addHoloChargeTimeStats @@ -108,7 +107,7 @@ open class HoloWall(name: String) : Wall(name) { } override fun minimapColor(tile: Tile): Int { - return S.Hologram.rgba8888() + return Var.Hologram.rgba8888() } override fun loadIcon() { @@ -117,7 +116,7 @@ open class HoloWall(name: String) : Wall(name) { val layers = listOf( Layer(Core.atlas.getPixmap(ProjectorTR).toLayerBuffer()), Layer(Core.atlas.getPixmap(ImageTR).toLayerBuffer()) { - +TintLerpLayerProcessor(S.Hologram, Var.HoloWallTintAlpha) + +TintLerpLayerProcessor(Var.Hologram, Var.HoloWallTintAlpha) }, ) @@ -139,7 +138,7 @@ open class HoloWall(name: String) : Wall(name) { super.setBars() AddBar("health", { "stat.health".bundle }, - { S.Hologram }, + { Var.Hologram }, { healthf() } ) { blink(Color.white) @@ -148,12 +147,12 @@ open class HoloWall(name: String) : Wall(name) { DebugOnly { AddBar("is-projecting", { "Is Projecting: ${isProjecting.yesNo()}" }, - { S.HologramDark }, + { Var.HologramDark }, { isProjecting.toFloat() } ) AddBar("rest-restore", { "Rest Restore: ${restRestore.toInt()}" }, - { S.Hologram }, + { Var.Hologram }, { restRestore / maxHealth } ) AddBar("charge", @@ -239,7 +238,7 @@ open class HoloWall(name: String) : Wall(name) { it.opacityNoise *= 2f - healthPct it.flickering = it.DefaultFlickering + (1f - healthPct) it.blendHoloColorOpacity = 0f - Draw.color(S.Hologram) + Draw.color(Var.Hologram) Draw.rect( ImageTR, x + floating.x, diff --git a/main/src/net/liplum/holo/Stealth.kt b/main/src/net/liplum/holo/Stealth.kt index 26dcca8e..89dc56e1 100644 --- a/main/src/net/liplum/holo/Stealth.kt +++ b/main/src/net/liplum/holo/Stealth.kt @@ -28,7 +28,7 @@ import mindustry.world.meta.Stat import mindustry.world.meta.StatUnit import mindustry.world.meta.StatValues import net.liplum.DebugOnly -import net.liplum.S +import net.liplum.Var import net.liplum.animation.Floating import net.liplum.api.cyber.* import net.liplum.api.holo.IHoloEntity @@ -136,7 +136,7 @@ open class Stealth(name: String) : Turret(name) { it.opacityNoise *= 2f - healthPct it.flickering = it.DefaultFlickering + (1f - healthPct) it.blendHoloColorOpacity = 0f - Draw.color(S.Hologram) + Draw.color(Var.Hologram) ImageTR.Draw( x + recoilOffset.x + floating.x, y + recoilOffset.y + floating.y, @@ -152,7 +152,7 @@ open class Stealth(name: String) : Turret(name) { ruvikTipAlpha -= 0.5f / ruvikShootingTipTime } if (ruvikTipAlpha > 0f) { - G.dashCircleBreath(x, y, range, color = S.Hologram, alpha = ruvikTipAlpha) + G.dashCircleBreath(x, y, range, color = Var.Hologram, alpha = ruvikTipAlpha) } } } @@ -267,7 +267,7 @@ open class Stealth(name: String) : Turret(name) { } override fun drawSelect() { - G.dashCircleBreath(x, y, range, S.HologramDark) + G.dashCircleBreath(x, y, range, Var.HologramDark) whenNotConfiguringP2P { this.drawStreamGraph() } diff --git a/main/src/net/liplum/registry/CioBlock.kt b/main/src/net/liplum/registry/CioBlock.kt index 86ba6b7e..ddef330a 100644 --- a/main/src/net/liplum/registry/CioBlock.kt +++ b/main/src/net/liplum/registry/CioBlock.kt @@ -370,7 +370,7 @@ object CioBlock { drawTurret { regionPart("-side") { heatProgress = PartProgress.warmup - heatColor = S.Hologram + heatColor = Var.Hologram VanillaSpec { progress = PartProgress.warmup moveX = 8f @@ -386,7 +386,7 @@ object CioBlock { } regionPart("-head") { heatProgress = PartProgress.warmup - heatColor = S.Hologram + heatColor = Var.Hologram VanillaSpec { progress = PartProgress { it.warmup.smooth } moveY = 3f @@ -445,7 +445,7 @@ object CioBlock { powerCapacity = 300f powerUseForChargePreUnit = 0.2f } - lightColor = S.Hologram + lightColor = Var.Hologram lightRadius = 40f floatingRange = 1f size = 1 @@ -483,7 +483,7 @@ object CioBlock { powerCapacity = 800f powerUseForChargePreUnit = 0.3f } - lightColor = S.Hologram + lightColor = Var.Hologram lightRadius = 80f floatingRange = 2f squareSprite = false @@ -752,7 +752,7 @@ object CioBlock { +DrawLiquidTile(CioFluid.cyberion, 3f) +DrawDefaultSpec() +DrawHeatOutputSpec().apply { - heatColor = S.Hologram + heatColor = Var.Hologram } +DrawCyberionAgglomeration() } @@ -790,7 +790,7 @@ object CioBlock { +DrawLiquidTile(CioFluid.cyberion, 37f / 4f) +DrawRegionSpec("-top") +DrawHeatInputSpec().apply { - heatColor = S.Hologram + heatColor = Var.Hologram } } size = 3 @@ -817,7 +817,7 @@ object CioBlock { cacheLayer = CioCLs.cyberion emitLight = true lightRadius = 30f - lightColor = S.Hologram.cpy().a(0.19f) + lightColor = Var.Hologram.cpy().a(0.19f) } } @DependOn( @@ -872,7 +872,7 @@ object CioBlock { hitSize = 10f lifetime = 240f maxRange = this@apply.range - trailColor = S.Hologram + trailColor = Var.Hologram } } } diff --git a/main/src/net/liplum/registry/CioFluid.kt b/main/src/net/liplum/registry/CioFluid.kt index 1154e743..5dd523e9 100644 --- a/main/src/net/liplum/registry/CioFluid.kt +++ b/main/src/net/liplum/registry/CioFluid.kt @@ -11,7 +11,7 @@ object CioFluid { @JvmStatic lateinit var blood: Liquid @DependOn fun cyberion() { - cyberion = SpecFluid(R.Liquid.Cyberion, S.Hologram).apply { + cyberion = SpecFluid(R.Liquid.Cyberion, Var.Hologram).apply { VanillaSpec { flammability = 0f explosiveness = 0f @@ -28,7 +28,7 @@ object CioFluid { } heatCapacity = 1.4f viscosity = 0.8f - lightColor = S.Hologram.cpy().a(0.2f) + lightColor = Var.Hologram.cpy().a(0.2f) } } @DependOn @@ -41,7 +41,7 @@ object CioFluid { heatCapacity = 0.3f viscosity = 0.6f boilPoint = 0.51f - lightColor = S.Hologram.cpy().a(0.2f) + lightColor = Var.Hologram.cpy().a(0.2f) } } } diff --git a/main/src/net/liplum/registry/CioHoloUnit.kt b/main/src/net/liplum/registry/CioHoloUnit.kt index 21fce577..131d73ad 100644 --- a/main/src/net/liplum/registry/CioHoloUnit.kt +++ b/main/src/net/liplum/registry/CioHoloUnit.kt @@ -338,7 +338,7 @@ object CioHoloUnit { maxRange = ruvikTipRange hitSize = 10f lifetime = 240f - trailColor = S.Hologram + trailColor = Var.Hologram } } } @@ -447,8 +447,8 @@ object CioHoloUnit { hitSound = Sounds.none healPercent = 5.5f collidesTeam = true - backColor = S.Hologram - trailColor = S.HologramDark + backColor = Var.Hologram + trailColor = Var.HologramDark } } } @@ -515,12 +515,12 @@ object CioHoloUnit { healAmount = 50f } collidesTeam = true - backColor = S.HologramDark - frontColor = S.Hologram + backColor = Var.HologramDark + frontColor = Var.Hologram smokeEffect = HoloFx.hitLaser hitEffect = HoloFx.hitLaser despawnEffect = HoloFx.hitLaser - lightColor = S.Hologram + lightColor = Var.Hologram } } } diff --git a/main/src/net/liplum/registry/CioSpaceship.kt b/main/src/net/liplum/registry/CioSpaceship.kt index 4f845abf..a0003689 100644 --- a/main/src/net/liplum/registry/CioSpaceship.kt +++ b/main/src/net/liplum/registry/CioSpaceship.kt @@ -58,7 +58,7 @@ object CioSpaceship { length = 130f }) addAmmo(CioFluid.cyberion, ArcFieldBulletType { - hitColor = S.Hologram + hitColor = Var.Hologram damage = 140f length = 145f lightenIntensity = 0.2f @@ -88,7 +88,7 @@ object CioSpaceship { length = 120f }) addAmmo(CioFluid.cyberion, ArcFieldBulletType { - hitColor = S.Hologram + hitColor = Var.Hologram damage = 150f length = 145f lightenIntensity = 0.2f diff --git a/main/src/net/liplum/registry/SpecificLoader.kt b/main/src/net/liplum/registry/SpecificLoader.kt index b6e0bd58..1f5912dd 100644 --- a/main/src/net/liplum/registry/SpecificLoader.kt +++ b/main/src/net/liplum/registry/SpecificLoader.kt @@ -7,8 +7,8 @@ object SpecificLoader { fun handle() { when (Var.ContentSpecific) { ContentSpec.Erekir -> { - S.Hologram = R.C.HoloOrange - S.HologramDark = R.C.HoloDarkOrange + Var.Hologram = R.C.HoloOrange + Var.HologramDark = R.C.HoloDarkOrange } else -> { } diff --git a/main/src/net/liplum/shaders/HologramShader.java b/main/src/net/liplum/shaders/HologramShader.java index 29938b9d..58b41975 100644 --- a/main/src/net/liplum/shaders/HologramShader.java +++ b/main/src/net/liplum/shaders/HologramShader.java @@ -3,7 +3,7 @@ import arc.files.Fi; import arc.graphics.Color; import arc.util.Time; -import net.liplum.S; +import net.liplum.Var; import net.liplum.common.shader.ShaderBase; import static mindustry.Vars.renderer; @@ -17,7 +17,7 @@ public class HologramShader extends ShaderBase { public float blendHoloColorOpacity = DefaultBlendHoloColorOpacity; public float blendFormerColorOpacity = DefaultBlendFormerColorOpacity; public float flickering = DefaultFlickering; - public Color holoColor = new Color(S.Hologram); + public Color holoColor = new Color(Var.Hologram); public HologramShader(Fi vert, Fi frag) { super(vert, frag); @@ -43,6 +43,6 @@ public void reset() { this.flickering = DefaultFlickering; this.blendHoloColorOpacity = DefaultBlendHoloColorOpacity; this.blendFormerColorOpacity = DefaultBlendFormerColorOpacity; - this.holoColor.set(S.Hologram); + this.holoColor.set(Var.Hologram); } } diff --git a/main/src/net/liplum/shaders/HologramizeShader.kt b/main/src/net/liplum/shaders/HologramizeShader.kt index fa51c59d..64714b8b 100644 --- a/main/src/net/liplum/shaders/HologramizeShader.kt +++ b/main/src/net/liplum/shaders/HologramizeShader.kt @@ -3,7 +3,7 @@ package net.liplum.shaders import arc.files.Fi import arc.graphics.Color import arc.util.Time -import net.liplum.S +import net.liplum.Var import plumy.core.assets.TR import net.liplum.common.shader.ShaderBase @@ -19,7 +19,7 @@ class HologramizeShader( var blendHoloColorOpacity = DefaultBlendHoloColorOpacity var blendFormerColorOpacity = DefaultBlendFormerColorOpacity var flickering = DefaultFlickering - var holoColor = Color(S.Hologram) + var holoColor = Color(Var.Hologram) override fun apply() { setUniformf("u_time", Time.time) setUniformf("u_scanline_width", scanlineWidthPct) @@ -46,7 +46,7 @@ class HologramizeShader( flickering = DefaultFlickering blendHoloColorOpacity = DefaultBlendHoloColorOpacity blendFormerColorOpacity = DefaultBlendFormerColorOpacity - holoColor.set(S.Hologram) + holoColor.set(Var.Hologram) isTopDown = true } diff --git a/main/src/net/liplum/shaders/VanishingShader.kt b/main/src/net/liplum/shaders/VanishingShader.kt index 5a52d64d..4ba938be 100644 --- a/main/src/net/liplum/shaders/VanishingShader.kt +++ b/main/src/net/liplum/shaders/VanishingShader.kt @@ -3,7 +3,7 @@ package net.liplum.shaders import arc.files.Fi import arc.graphics.Color import arc.util.Time -import net.liplum.S +import net.liplum.Var import plumy.core.assets.TR import net.liplum.common.shader.ShaderBase @@ -13,7 +13,7 @@ class VanishingShader( ) : ShaderBase(vert, frag) { var progress = 0f var scanlineWidthPct = 0.1f // [0f,1f] <= 0.2 is better - var scanlineColor = Color(S.Hologram) + var scanlineColor = Color(Var.Hologram) var region = TR() var isTopDown = true override fun apply() { @@ -35,6 +35,6 @@ class VanishingShader( progress = 0f scanlineWidthPct = 0.1f isTopDown = true - scanlineColor.set(S.Hologram) + scanlineColor.set(Var.Hologram) } } \ No newline at end of file diff --git a/main/src/net/liplum/ui/DebugSettings.kt b/main/src/net/liplum/ui/DebugSettings.kt index b07320d1..0180b31c 100644 --- a/main/src/net/liplum/ui/DebugSettings.kt +++ b/main/src/net/liplum/ui/DebugSettings.kt @@ -16,7 +16,7 @@ import mindustry.graphics.Shaders.getShaderFi import mindustry.ui.dialogs.BaseDialog import net.liplum.Debug import net.liplum.Debug.SettingType -import net.liplum.S +import net.liplum.Var import net.liplum.Settings import net.liplum.common.Dir import net.liplum.common.toFi @@ -51,7 +51,7 @@ object DebugSettingsDialog { } }).fill().row() add(Table(Tex.button).apply { - add("Shaders").color(S.HologramDark).row() + add("Shaders").color(Var.HologramDark).row() add(Table().apply { add("Root Folder:") field(Settings.ShaderRootPath) { diff --git a/main/src/net/liplum/ui/OverwrittenUI.kt b/main/src/net/liplum/ui/OverwrittenUI.kt index 84bf4245..35df86b7 100644 --- a/main/src/net/liplum/ui/OverwrittenUI.kt +++ b/main/src/net/liplum/ui/OverwrittenUI.kt @@ -6,7 +6,7 @@ import arc.scene.ui.layout.Table import mindustry.Vars import mindustry.gen.BlockUnitc import mindustry.graphics.Pal -import net.liplum.S +import net.liplum.Var import net.liplum.annotations.Only import net.liplum.annotations.SubscribeEvent import net.liplum.blocks.prism.Prism @@ -60,7 +60,7 @@ object OverwrittenUI { val unit = Vars.player.unit() siderBar.color.set( if (unit is HoloUnit) - S.Hologram + Var.Hologram else if (player.displayAmmo()) if (player.dead() || unit is BlockUnitc) { if (unit is BlockUnitc) { diff --git a/main/src/net/liplum/welcome/SharedUI.kt b/main/src/net/liplum/welcome/SharedUI.kt index ba0ffb26..ffa6fe8a 100644 --- a/main/src/net/liplum/welcome/SharedUI.kt +++ b/main/src/net/liplum/welcome/SharedUI.kt @@ -11,7 +11,6 @@ import arc.scene.utils.Elem import arc.util.Scaling import mindustry.gen.Tex import net.liplum.Meta -import net.liplum.S import net.liplum.Var import net.liplum.i18nName import plumy.core.assets.TR @@ -42,7 +41,7 @@ internal fun Dialog.addPoliteWelcome(entity: Welcome.Entity) { "welcome", "${Meta.DetailedVersion} ${Var.ContentSpecific.i18nName}" ) - ).color(S.Hologram) + ).color(Var.Hologram) } internal fun Dialog.addCenterText( diff --git a/main/src/net/liplum/welcome/Templates.kt b/main/src/net/liplum/welcome/Templates.kt index 46bb0fe4..c81f1ef7 100644 --- a/main/src/net/liplum/welcome/Templates.kt +++ b/main/src/net/liplum/welcome/Templates.kt @@ -3,7 +3,7 @@ package net.liplum.welcome import arc.scene.ui.Button import mindustry.ui.dialogs.BaseDialog import net.liplum.R -import net.liplum.S +import net.liplum.Var import plumy.core.arc.tinted import net.liplum.common.ui.RateStarPanelBuilder import net.liplum.update.Updater @@ -136,7 +136,7 @@ object Templates { val noAction = ActionRegistry[data["ActionB"]] val dontShowAction = ActionRegistry[data["ActionC"]] addPoster(entity.icon) - addCenterText(entity.content(Updater.latestVersion.toString().tinted(S.Hologram))) + addCenterText(entity.content(Updater.latestVersion.toString().tinted(Var.Hologram))) if (Updater.isCurrentBreakUpdate) addCenterText(entity["break-update-warning"]).color(R.C.RedAlert) if (Updater.hasUpdateDescription) diff --git a/main/src/net/liplum/welcome/Welcome.kt b/main/src/net/liplum/welcome/Welcome.kt index ca3c9315..5ca1ed9d 100644 --- a/main/src/net/liplum/welcome/Welcome.kt +++ b/main/src/net/liplum/welcome/Welcome.kt @@ -10,7 +10,7 @@ import mindustry.game.EventType.Trigger import mindustry.io.JsonIO import net.liplum.CioMod import net.liplum.Meta -import net.liplum.S +import net.liplum.Var import net.liplum.Settings.CioVersion import net.liplum.Settings.ClickWelcomeTimes import net.liplum.Settings.LastWelcomeID @@ -83,7 +83,7 @@ object Welcome { @SubscribeEvent(CioInitEvent::class, Only.client) fun modifierModInfo() { val meta = CioMod.Info.meta - meta.displayName = "[#${S.Hologram}]${Meta.Name}[]" + meta.displayName = "[#${Var.Hologram}]${Meta.Name}[]" Events.run(Trigger.update) { if (Time.time % 60 < 1f) { meta.author = RandomName.randomTinted(Meta.Author) diff --git a/mod.hjson b/mod.hjson index 89a6009a..bbed84fd 100644 --- a/mod.hjson +++ b/mod.hjson @@ -8,7 +8,7 @@ */ { "displayName": "[#42a5f5[]]Cyber IO[[]]", - "subtitle":"V5.1 for Erekir", + "subtitle":"V6.0 for Erekir", "name": "cyber-io", "author": "[#42a5f5[]]Liplum[[]]", "main": "net.liplum.CioMod", @@ -25,8 +25,8 @@ GitHub: [#42a5f5[]]github.com/liplum/CyberIO[[]] ''' - "version": "5.1", - "minGameVersion": 141, + "version": "6.0", + "minGameVersion": 146, "dependencies": [], "hidden": false, "java": true