mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 11:04:05 +09:00
abolished a need to pass world as parametre
+ simply changing the single variable (ingame.world) will update all the renderer's behaviour + somehow my git changelogs are exploding
This commit is contained in:
@@ -4,15 +4,13 @@ import com.badlogic.gdx.graphics.Color
|
||||
import net.torvald.terrarum.worlddrawer.LightmapRenderer
|
||||
import net.torvald.terrarum.Terrarum
|
||||
import net.torvald.terrarum.modulebasegame.Ingame
|
||||
import net.torvald.terrarum.modulebasegame.weather.WeatherMixer
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 2016-02-17.
|
||||
*/
|
||||
internal object SetGlobalLightOverride : ConsoleCommand {
|
||||
|
||||
var lightOverride = false
|
||||
private set
|
||||
|
||||
override fun execute(args: Array<String>) {
|
||||
if (args.size == 5) {
|
||||
try {
|
||||
@@ -22,7 +20,7 @@ internal object SetGlobalLightOverride : ConsoleCommand {
|
||||
val a = args[4].toFloat()
|
||||
val GL = Color(r, g, b, a)
|
||||
|
||||
lightOverride = true
|
||||
WeatherMixer.globalLightOverridden = true
|
||||
(Terrarum.ingame!!.world).globalLight = GL
|
||||
}
|
||||
catch (e: NumberFormatException) {
|
||||
@@ -33,6 +31,9 @@ internal object SetGlobalLightOverride : ConsoleCommand {
|
||||
}
|
||||
|
||||
}
|
||||
else if (args.size == 2 && args[1].trim().toLowerCase() == "none") {
|
||||
WeatherMixer.globalLightOverridden = false
|
||||
}
|
||||
else {
|
||||
printUsage()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user