Fix setting var names and bug

This commit is contained in:
tacotexmex 2018-11-18 17:38:02 +01:00
parent 2850a71877
commit e162ee9f39
2 changed files with 10 additions and 10 deletions

14
hud.lua
View File

@ -26,25 +26,25 @@ local hud_template = {
}
hud_template.position.x = tonumber(minetest.settings:get(
"late.hud_template.position.x")) or hud_template.position.x
"late.hud.position.x")) or hud_template.position.x
hud_template.position.y = tonumber(minetest.settings:get(
"late.hud_template.position.y")) or hud_template.position.y
"late.hud.position.y")) or hud_template.position.y
hud_template.alignment.x = tonumber(minetest.settings:get(
"late.hud_template.alignment.x")) or hud_template.alignment.x
"late.hud.alignment.x")) or hud_template.alignment.x
hud_template.alignment.y = tonumber(minetest.settings:get(
"late.hud_template.alignment.y")) or hud_template.alignment.y
"late.hud.alignment.y")) or hud_template.alignment.y
hud_template.icon_scale = tonumber(minetest.settings:get(
"late.hud_template.icon_scale")) or hud_template.icon_scale
"late.hud.icon_scale")) or hud_template.icon_scale
hud_template.offset.x = tonumber(minetest.settings:get(
"late.hud_template.offset.x")) or hud_template.offset.x
"late.hud.offset.x")) or hud_template.offset.x
hud_template.offset.y = tonumber(minetest.settings:get(
"late.hud_template.offset.y")) or hud_template.offset.y
"late.hud.offset.y")) or hud_template.offset.y
local function get_hud_slot(effect)
local data = late.get_storage_for_target(effect.target)

View File

@ -2,6 +2,6 @@ late.hud_template.position.x (Horizontal position of HUD) float 1
late.hud_template.position.y (Vertical position of HUD) float 0.2
late.hud_template.alignment.x (Horizontal alignment of HUD) float -1
late.hud_template.alignment.y (Vertical alignment of HUD) float -1
late.hud_template.icon_scale = 2 (Scale factor of 16px effect icon) float 1.7
late.hud_template.offset.x = 20 (Horizontal offset of effect) int 18
late.hud_template.offset.y = 42 (Vertical offset of effect) int 34
late.hud_template.icon_scale (Scale factor of 16px effect icon) float 1.7
late.hud_template.offset.x (Horizontal offset of effect) int 18
late.hud_template.offset.y (Vertical offset of effect) int 34