summaryrefslogtreecommitdiffstats
path: root/cwd/assets/altcraft/scripts/ui.lua
diff options
context:
space:
mode:
Diffstat (limited to 'cwd/assets/altcraft/scripts/ui.lua')
-rw-r--r--cwd/assets/altcraft/scripts/ui.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/cwd/assets/altcraft/scripts/ui.lua b/cwd/assets/altcraft/scripts/ui.lua
index 392ad27..98f0fae 100644
--- a/cwd/assets/altcraft/scripts/ui.lua
+++ b/cwd/assets/altcraft/scripts/ui.lua
@@ -106,13 +106,26 @@ function UpdateUi()
local selection = AC.GetGameState():GetSelectionStatus()
if selection.isBlockSelected then
bid = wrld:GetBlockId(selection.selectedBlock)
+ binfo = AC.GetBlockInfo(bid)
+ light = wrld:GetBlockLight(selection.selectedBlock)
+ skyLight = wrld:GetBlockSkyLight(selection.selectedBlock)
doc:GetElementById('dbg-select-pos').inner_rml = tostring(selection.selectedBlock)
doc:GetElementById('dbg-select-bid').inner_rml = string.format("%d:%d", bid.id, bid.state)
+ doc:GetElementById('dbg-select-name').inner_rml = string.format("%s:%s", binfo.blockstate, binfo.variant)
+ doc:GetElementById('dbg-select-light').inner_rml = string.format("%d:%d", light, skyLight)
else
doc:GetElementById('dbg-select-pos').inner_rml = ""
doc:GetElementById('dbg-select-bid').inner_rml = ""
+ doc:GetElementById('dbg-select-name').inner_rml = ""
+ doc:GetElementById('dbg-select-light').inner_rml = ""
end
+ doc:GetElementById('dbg-sections-loaded').inner_rml = AC.GetDebugValue(0)
+ doc:GetElementById('dbg-sections-renderer').inner_rml = AC.GetDebugValue(1)
+ doc:GetElementById('dbg-sections-ready').inner_rml = AC.GetDebugValue(2)
+ doc:GetElementById('dbg-sections-culled').inner_rml = AC.GetDebugValue(0) - AC.GetDebugValue(5)
+ doc:GetElementById('dbg-rendered-faces').inner_rml = AC.GetDebugValue(4)
+
local player = AC.GetGameState():GetPlayerStatus()
local playerHp = string.format("%.0f", player.health)
doc:GetElementById('status-hp').inner_rml = playerHp