From 06d683cd69f17dcd679701a0b91ac924483a2fd3 Mon Sep 17 00:00:00 2001 From: Tai Kedzierski Date: Thu, 24 Jan 2019 11:56:57 +0000 Subject: [PATCH] some preliminary stuff --- depends.txt | 1 + init.lua | 13 +++++++++++++ lua/craft.lua | 0 lua/items.lua | 0 lua/nodes.lua | 20 ++++++++++++++++++++ 5 files changed, 34 insertions(+) create mode 100644 depends.txt create mode 100644 init.lua create mode 100644 lua/craft.lua create mode 100644 lua/items.lua create mode 100644 lua/nodes.lua diff --git a/depends.txt b/depends.txt new file mode 100644 index 0000000..d772ee7 --- /dev/null +++ b/depends.txt @@ -0,0 +1 @@ +datasaver diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..3e83825 --- /dev/null +++ b/init.lua @@ -0,0 +1,13 @@ +onetime_waypoint = { + maintainer = "taikedz-mt", + version = "20190124" +} + +onetime_waypoint.saver = datasaver:new("onetime_waypoint", "waypoints") +onetime_waypoint.waypoints = onetime_waypoint.saver:load() + +local modpath = minetest.get_modpath("onetime_waypoint") + +dofile(modpath.."/lua/craft.lua") +dofile(modpath.."/lua/items.lua") +dofile(modpath.."/lua/nodes.lua") diff --git a/lua/craft.lua b/lua/craft.lua new file mode 100644 index 0000000..e69de29 diff --git a/lua/items.lua b/lua/items.lua new file mode 100644 index 0000000..e69de29 diff --git a/lua/nodes.lua b/lua/nodes.lua new file mode 100644 index 0000000..c273caf --- /dev/null +++ b/lua/nodes.lua @@ -0,0 +1,20 @@ +minetest.register_node("onetime_waypoint:waypoint", { + groups = {oddly_diggable_by_hand = 1, dig_immediate = 1}, + + on_dig = function(digger) + -- check ownership of node + -- remove waypoint + end, + + on_place = function(pointer, pointedthing) + -- check protection + -- remove old waypoint + -- place new waypoint + -- set owner + end, + on_use = function(pointer, pointedthing) + -- get player waypoint + -- go to pos + -- remove waypoint + end, +})