-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.lua
More file actions
37 lines (34 loc) · 1.04 KB
/
init.lua
File metadata and controls
37 lines (34 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
local MODPATH = minetest.get_modpath(minetest.get_current_modname())
local PM = rawget(_G, "plots_mod")
if type(PM) ~= "table" then
PM = {}
end
PM.modpath = MODPATH
PM.storage = PM.storage or minetest.get_mod_storage()
PM.formname_confirm = PM.formname_confirm or "plots:confirm"
rawset(_G, "plots_mod", PM)
local function register_locked_plot_node(name, description, texture)
if minetest.registered_nodes[name] then
return
end
minetest.register_node(name, {
description = description,
tiles = {texture},
groups = {unbreakable = 1, not_in_creative_inventory = 1},
pointable = false,
drop = "",
can_dig = function()
return false
end,
on_blast = function()
end,
})
end
register_locked_plot_node("plots:claimed", "Claimed Plot Border", "claimed.png")
register_locked_plot_node("plots:unclaimed", "Unclaimed Plot Border", "unclaimed.png")
for _, rel in ipairs({
"lib/core.lua",
"lib/commands.lua",
}) do
dofile(MODPATH .. "/" .. rel)
end