From a26ce76b23e6c47f4890e8868c8e101dee3a6e88 Mon Sep 17 00:00:00 2001 From: tchncs <tchncs@vivaldi.net> Date: Sat, 4 Aug 2018 16:27:07 +0200 Subject: [PATCH] add travelcenter button to unified_inventory --- depends.txt | 1 + init.lua | 3 +++ unified_inventory.lua | 12 ++++++++++++ 3 files changed, 16 insertions(+) create mode 100644 unified_inventory.lua diff --git a/depends.txt b/depends.txt index 0da06da..63f3bb2 100644 --- a/depends.txt +++ b/depends.txt @@ -17,5 +17,6 @@ mobs_better_rat ? mobs_slimes ? mobs_sandworm ? pkarcs? +unified_inventory? wiki unifieddyes diff --git a/init.lua b/init.lua index 507a6e2..640c367 100644 --- a/init.lua +++ b/init.lua @@ -18,3 +18,6 @@ end if minetest.get_modpath("technic") then dofile(minetest.get_modpath("illuna").."/technic.lua") end +if minetest.get_modpath("unified_inventory") then + dofile(minetest.get_modpath("illuna").."/unified_inventory.lua") +end diff --git a/unified_inventory.lua b/unified_inventory.lua new file mode 100644 index 0000000..0856751 --- /dev/null +++ b/unified_inventory.lua @@ -0,0 +1,12 @@ +unified_inventory.register_button("illuna_travelcenter", { + type = "image", + image = "travelnet_inv.png", + tooltip = "Teleport to the Travelcenter", + hide_lite = true, + action = function(player, param) + local player = minetest.get_player_by_name(name) + local travelcenterPos = minetest.setting_get("travelcenter_pos") + player:setpos(travelcenterPos) + --minetest.chat_send_player(name, core.colorize(color_success, "Alrighty, have fun exploring.")) + end +}) -- GitLab