-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
111 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
group=com.mineinabyss | ||
version=0.6 | ||
kotlinVersion=1.6.10 | ||
version=0.7 | ||
kotlinVersion=1.7.10 | ||
serverVersion=1.19.2-R0.1-SNAPSHOT | ||
idofrontVersion=0.12.112 | ||
idofrontVersion=0.14.6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
src/main/kotlin/com/mineinabyss/deeperworld/DeeperConfig.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
@file:UseSerializers(DurationSerializer::class) | ||
|
||
package com.mineinabyss.deeperworld | ||
|
||
import com.mineinabyss.deeperworld.world.section.Section | ||
import com.mineinabyss.idofront.serialization.DurationSerializer | ||
import com.mineinabyss.idofront.serialization.WorldSerializer | ||
import com.mineinabyss.idofront.time.ticks | ||
import kotlinx.serialization.Serializable | ||
import kotlinx.serialization.UseSerializers | ||
import org.bukkit.World | ||
import kotlin.time.Duration | ||
import kotlin.time.Duration.Companion.seconds | ||
|
||
val deeperConfig get() = deeperWorld.config.data.deeperConfig | ||
@Serializable | ||
data class DeeperWorldConfig(val deeperConfig: DeeperConfig = DeeperConfig()) { | ||
@Serializable | ||
data class DeeperConfig( | ||
val sections: List<Section> = emptyList(), | ||
val damageOutsideSections: Double = 0.0, | ||
val damageExcludedWorlds: Set<@Serializable(with = WorldSerializer::class) World> = emptySet(), | ||
val remountPacketDelay: Duration = 40.ticks, | ||
val fall: FallDamageConfig = FallDamageConfig(), | ||
val time: TimeConfig = TimeConfig(), | ||
) { | ||
val worlds = sections.map { it.world }.toSet() | ||
} | ||
|
||
@Serializable | ||
data class FallDamageConfig( | ||
val maxSafeDist: Float = -1f, | ||
val fallDistanceDamageScaler: Double = 0.01, | ||
val startingDamage: Double = 1.0, | ||
val hitDelay: Duration = 10.ticks, | ||
val spawnParticles: Boolean = true | ||
) | ||
|
||
@Serializable | ||
data class TimeConfig( | ||
val updateInterval: Duration = 1800.seconds, | ||
val mainWorld: World? = null, | ||
val syncedWorlds: Map<World, Long> = emptyMap(), | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 0 additions & 45 deletions
45
src/main/kotlin/com/mineinabyss/deeperworld/config/DeeperConfig.kt
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
src/main/kotlin/com/mineinabyss/deeperworld/config/FallDamageConfig.kt
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
src/main/kotlin/com/mineinabyss/deeperworld/config/TimeConfig.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.