Skip to content

Commit 95f5cbd

Browse files
author
slava0135
committed
build: release 14.0 / mindustry v8 support
1 parent 1fcd619 commit 95f5cbd

File tree

6 files changed

+16
-15
lines changed

6 files changed

+16
-15
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
![logo](assets/preview.png)
22

3-
# V13 - mindustry v7 support
3+
# V14 - mindustry v8 support
44
## Additions
55
#### Hacker
66
* Capture enemy units

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ buildscript{
88
ext{
99
kotlinVersion = "1.9.25"
1010
//the build number that this mod is made for
11-
mindustryVersion = 'v146'
11+
mindustryVersion = 'v147.1'
1212
jabelVersion = "93fde537c7"
1313
//windows sucks
1414
isWindows = System.getProperty("os.name").toLowerCase().contains("windows")

mod.hjson

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ author: "Slava0135"
44
main: "revision.ReVision"
55
description: "Install for fresh and revised mindustry experience"
66
version: "14.0"
7-
minGameVersion: 146
7+
minGameVersion: 147.1
88

src/revision/world/blocks/defense/HackTurret.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import arc.util.io.Writes
1313
import mindustry.Vars
1414
import mindustry.entities.Units
1515
import mindustry.entities.Units.Sortf
16-
import mindustry.game.EventType
17-
import mindustry.gen.*
16+
import mindustry.gen.Healthc
17+
import mindustry.gen.Sounds
1818
import mindustry.gen.Unit
1919
import mindustry.graphics.Drawf
2020
import mindustry.graphics.Layer
@@ -70,7 +70,7 @@ open class HackTurret(name: String) : BaseTurret(name) {
7070
inner class HackBuild : BaseTurretBuild() {
7171

7272
var target: Unit? = null
73-
var lastX = 0f;
73+
var lastX = 0f
7474
var lastY = 0f
7575
var progress = 0f
7676
var normalProgress = 0f
@@ -125,7 +125,7 @@ open class HackTurret(name: String) : BaseTurret(name) {
125125
}
126126

127127
private fun validateTarget(): Boolean {
128-
return !Units.invalidateTarget(target, team, x, y, range) && efficiency() > 0.02f
128+
return !Units.invalidateTarget(target, team, x, y, range) && efficiency > 0.02f
129129
}
130130

131131
override fun onRemoved() {
@@ -154,7 +154,7 @@ open class HackTurret(name: String) : BaseTurret(name) {
154154
Drawf.laser(
155155
laser, laserEnd,
156156
x + Angles.trnsx(ang, shootLength), y + Angles.trnsy(ang, shootLength),
157-
lastX, lastY, efficiency() * laserWidth
157+
lastX, lastY, efficiency * laserWidth
158158
)
159159
Draw.mixcol()
160160
}

src/revision/world/blocks/defense/ReWall.kt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ open class ReWall(name: String) : Wall(name) {
2929
super.setBars()
3030
addBar("efficiency") { entity: ReWallBuild ->
3131
Bar(
32-
{ Core.bundle.formatFloat("bar.efficiency", 100 * entity.efficiency(), 1) },
32+
{ Core.bundle.formatFloat("bar.efficiency", 100 * entity.efficiency, 1) },
3333
{ Pal.ammo },
34-
{ entity.efficiency() }
34+
{ entity.efficiency }
3535
)
3636
}
3737
}
@@ -44,14 +44,15 @@ open class ReWall(name: String) : Wall(name) {
4444
timeElapsed += delta()
4545
if (timeElapsed > healInterval) {
4646
timeElapsed = 0f
47-
heal(efficiency() * healRatio * maxHealth)
47+
heal(efficiency * healRatio * maxHealth)
4848
Fx.healBlockFull.at(x, y, block.size.toFloat(), Pal.heal, this.block)
4949
}
5050
}
5151
}
5252

53-
override fun efficiency() =
54-
Mathf.maxZero(Attribute.light.env() + if (Vars.state.rules.lighting) 1f - Vars.state.rules.ambientLight.a else 1f)
53+
override fun efficiencyScale(): Float {
54+
return Mathf.maxZero(Attribute.light.env() + if (Vars.state.rules.lighting) 1f - Vars.state.rules.ambientLight.a else 1f)
55+
}
5556
}
5657

5758
}

src/revision/world/blocks/production/MultiDrill.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,9 @@ open class MultiDrill(name: String) : Block(name) {
145145
var timeDrilled = 0f
146146
var warmup = 0f
147147

148-
override fun shouldActiveSound() = efficiency() > 0.01f
148+
override fun shouldAmbientSound() = efficiency > 0.01f && items.total() < itemCapacity
149149

150-
override fun ambientVolume() = efficiency() * (size * size) / 4f
150+
override fun ambientVolume() = efficiency * (size * size) / 4f
151151

152152
override fun drawSelect() {
153153
var off = 0

0 commit comments

Comments
 (0)