Light fuck: At least I've figured out what the fuck was wrong with.

This commit is contained in:
minjaesong
2017-09-12 21:29:45 +09:00
parent e67b97257c
commit 82ddfeb6ee
15 changed files with 99 additions and 54 deletions

View File

@@ -47,7 +47,7 @@ class UIBasicNotifier(private val player: ActorHumanoid?) : UICanvas() {
private val temperature: Int
get() {
if (player != null) {
val playerTilePos = player.tilewiseHitbox
val playerTilePos = player.hIntTilewiseHitbox
val tempCelsius = -273f + (Terrarum.ingame?.world?.getTemperature(playerTilePos.centeredX.toInt(), playerTilePos.centeredY.toInt()) ?: 288f)
return if (Terrarum.getConfigBoolean("useamericanunit")) {
tempCelsius.times(1.8f).plus(32f).roundInt()
@@ -111,7 +111,7 @@ class UIBasicNotifier(private val player: ActorHumanoid?) : UICanvas() {
val lightLevel: Color
if (player != null) {
val playerPos = player.tilewiseHitbox
val playerPos = player.hIntTilewiseHitbox
lightLevel = (LightmapRenderer.getLight(playerPos.centeredX.toInt(), playerPos.centeredY.toInt()) ?:
Terrarum.ingame!!.world.globalLight
)

View File

@@ -66,7 +66,7 @@ class UITierOneWatch(private val player: ActorHumanoid?) : UICanvas() {
val lightLevel: Color
if (player != null) {
val playerPos = player.tilewiseHitbox
val playerPos = player.hIntTilewiseHitbox
lightLevel = (LightmapRenderer.getLight(playerPos.centeredX.toInt(), playerPos.centeredY.toInt()) ?:
Terrarum.ingame!!.world.globalLight
)