mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 11:04:05 +09:00
sky model update
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
package net.torvald.terrarum.modulebasegame.console
|
||||
|
||||
import net.torvald.reflection.extortField
|
||||
import net.torvald.terrarum.INGAME
|
||||
import net.torvald.terrarum.console.ConsoleCommand
|
||||
import net.torvald.terrarum.console.Echo
|
||||
import net.torvald.terrarum.gameactors.ActorWithBody
|
||||
import net.torvald.terrarum.weather.WeatherMixer
|
||||
import net.torvald.terrarum.worlddrawer.LightmapRenderer
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 2023-07-25.
|
||||
@@ -17,6 +21,13 @@ internal object SetSol : ConsoleCommand {
|
||||
try {
|
||||
val solarAngle = args[1].toDouble().coerceIn(-75.0..75.0)
|
||||
WeatherMixer.forceSolarElev = solarAngle
|
||||
LightmapRenderer.recalculate(
|
||||
INGAME.extortField<ArrayList<ActorWithBody>>("visibleActorsRenderBehind")!! +
|
||||
INGAME.extortField<ArrayList<ActorWithBody>>("visibleActorsRenderMiddle")!! +
|
||||
INGAME.extortField<ArrayList<ActorWithBody>>("visibleActorsRenderMidTop")!! +
|
||||
INGAME.extortField<ArrayList<ActorWithBody>>("visibleActorsRenderFront")!! +
|
||||
INGAME.extortField<ArrayList<ActorWithBody>>("visibleActorsRenderOverlay")!!
|
||||
)
|
||||
}
|
||||
catch (e: NumberFormatException) {
|
||||
Echo("Wrong number input.")
|
||||
|
||||
Reference in New Issue
Block a user