From 439eb2124b6ca79b41fbcddf9f650674d9de02b1 Mon Sep 17 00:00:00 2001 From: Quentin Bazin Date: Wed, 1 Jul 2020 22:33:10 +0200 Subject: [PATCH] [mods/creative_inventory] Fixed a bug causing textures to appear black. --- mods/creative_inventory/init.lua | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/mods/creative_inventory/init.lua b/mods/creative_inventory/init.lua index 106903fd7..e00d6b88f 100644 --- a/mods/creative_inventory/init.lua +++ b/mods/creative_inventory/init.lua @@ -24,7 +24,12 @@ -- -- ===================================================================================== -- -mod = openminer.mod_loader:register_mod("creative_inventory") +if not mods then mods = {} end + +mods["creative_inventory"] = openminer.mod_loader:register_mod("creative_inventory") +mod = mods["creative_inventory"] + +local modpath = mod:path() mod:key { id = "creative_inventory", @@ -48,7 +53,7 @@ mod:key { name = "img_background", pos = {x = 0, y = 0}, - texture = mod:path() .. "/textures/gui/creative_window.png", + texture = modpath .. "/textures/gui/creative_window.png", clip = {x = 0, y = 0, width = 195, height = 136}, } @@ -81,7 +86,7 @@ mod:key { name = "scroll_bar", pos = {x = 175, y = 18}, - texture = mod:path() .. "/textures/gui/tabs.png", + texture = modpath .. "/textures/gui/tabs.png", clip = {x = 232, y = 0, width = 12, height = 15}, clip_selected = {x = 244, y = 0, width = 12, height = 15},