mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 11:04:05 +09:00
weather in weathercodex
This commit is contained in:
@@ -29,6 +29,7 @@ import net.torvald.terrarum.serialise.Common
|
||||
import net.torvald.terrarum.ui.UICanvas
|
||||
import net.torvald.terrarum.utils.CSVFetcher
|
||||
import net.torvald.terrarum.utils.JsonFetcher
|
||||
import net.torvald.terrarum.weather.WeatherCodex
|
||||
import net.torvald.terrarumsansbitmap.gdx.TextureRegionPack
|
||||
import org.apache.commons.codec.digest.DigestUtils
|
||||
import org.apache.commons.csv.CSVFormat
|
||||
@@ -794,6 +795,20 @@ object ModMgr {
|
||||
}
|
||||
}
|
||||
|
||||
object GameWeatherLoader {
|
||||
val weatherPath = "weathers/"
|
||||
|
||||
init {
|
||||
Terrarum.weatherCodex = WeatherCodex()
|
||||
}
|
||||
|
||||
@JvmStatic operator fun invoke(module: String) {
|
||||
getFiles(module, weatherPath).filter { it.isFile && it.name.lowercase().endsWith(".json") }.forEach {
|
||||
Terrarum.weatherCodex.readFromJson(module, it)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A sugar-library for easy texture pack creation
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user