some preliminary stuff

This commit is contained in:
Tai Kedzierski 2019-01-24 11:56:57 +00:00
parent 6e54f0e7a6
commit 06d683cd69
5 changed files with 34 additions and 0 deletions

1
depends.txt Normal file

@ -0,0 +1 @@
datasaver

13
init.lua Normal file

@ -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")

0
lua/craft.lua Normal file

0
lua/items.lua Normal file

20
lua/nodes.lua Normal file

@ -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,
})