Added privs for use on a server.
parent
7ed435e9c2
commit
61e3371403
|
@ -28,3 +28,5 @@ There is no craft for these. Use /giveme or creative to get the placer block.
|
|||
Place the block and right click it. The schematic places to the north east.(+x,+z)
|
||||
|
||||
For more information please view the topic on the forum. https://forum.minetest.net/viewtopic.php?f=9&t=13209
|
||||
|
||||
This version of the mod has been modified for server use, basically you need to have the myboardgames privilege to place the boards, by default this isn't granted to singleplayer. ~Nathan.S
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
minetest.register_privilege("myboardgames", {
|
||||
description = "Place board games",
|
||||
give_to_singleplayer = false
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node("mycanadiancheckers:board", {
|
||||
description = "Canadian Checkers",
|
||||
|
@ -10,11 +15,17 @@ minetest.register_node("mycanadiancheckers:board", {
|
|||
groups = {cracky = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
|
||||
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
|
||||
local schem = minetest.get_modpath("mycanadiancheckers").."/schems/mycanadiancheckers.mts"
|
||||
minetest.place_schematic({x=pos.x,y=pos.y,z=pos.z},schem,0, "air", true)
|
||||
end,
|
||||
|
||||
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
|
||||
local schem = minetest.get_modpath("mycanadiancheckers").."/schems/mycanadiancheckers.mts"
|
||||
minetest.place_schematic({x=pos.x,y=pos.y,z=pos.z},schem,0, "air", true)
|
||||
end,
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
if placer and minetest.check_player_privs(placer:get_player_name(), {myboardgames = true}) then
|
||||
else
|
||||
minetest.remove_node(pos)
|
||||
return true
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
local board = {
|
||||
|
|
|
@ -10,11 +10,17 @@ minetest.register_node("mycheckers:board", {
|
|||
groups = {cracky = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
|
||||
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
|
||||
local schem = minetest.get_modpath("mycheckers").."/schems/mycheckersboard.mts"
|
||||
minetest.place_schematic({x=pos.x,y=pos.y,z=pos.z},schem,0, "air", true)
|
||||
end,
|
||||
|
||||
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
|
||||
local schem = minetest.get_modpath("mycheckers").."/schems/mycheckersboard.mts"
|
||||
minetest.place_schematic({x=pos.x,y=pos.y,z=pos.z},schem,0, "air", true)
|
||||
end,
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
if placer and minetest.check_player_privs(placer:get_player_name(), {myboardgames = true}) then
|
||||
else
|
||||
minetest.remove_node(pos)
|
||||
return true
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
local board = {
|
||||
|
|
|
@ -10,11 +10,17 @@ minetest.register_node("mychess:board", {
|
|||
groups = {cracky = 3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
|
||||
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
|
||||
local schem = minetest.get_modpath("mychess").."/schems/mychessboard.mts"
|
||||
minetest.place_schematic({x=pos.x,y=pos.y,z=pos.z},schem,0, "air", true)
|
||||
end,
|
||||
|
||||
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
|
||||
local schem = minetest.get_modpath("mychess").."/schems/mychessboard.mts"
|
||||
minetest.place_schematic({x=pos.x,y=pos.y,z=pos.z},schem,0, "air", true)
|
||||
end,
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
if placer and minetest.check_player_privs(placer:get_player_name(), {myboardgames = true}) then
|
||||
else
|
||||
minetest.remove_node(pos)
|
||||
return true
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
|
|
|
@ -124,8 +124,15 @@ minetest.register_node("myconnect4:reset",{
|
|||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky=1},
|
||||
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
|
||||
local schem = minetest.get_modpath("myconnect4").."/schems/myconnect4.mts"
|
||||
minetest.place_schematic({x=pos.x,y=pos.y,z=pos.z},schem,0, "air", true)
|
||||
end,
|
||||
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
|
||||
local schem = minetest.get_modpath("myconnect4").."/schems/myconnect4.mts"
|
||||
minetest.place_schematic({x=pos.x,y=pos.y,z=pos.z},schem,0, "air", true)
|
||||
end,
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
if placer and minetest.check_player_privs(placer:get_player_name(), {myboardgames = true}) then
|
||||
else
|
||||
minetest.remove_node(pos)
|
||||
return true
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
|
|
@ -7,10 +7,17 @@ minetest.register_node("mydiamondblock:block",{
|
|||
paramtype = "light",
|
||||
light_source = 8,
|
||||
groups = {cracky = 1},
|
||||
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
|
||||
local schem = minetest.get_modpath("mydiamondblock").."/schems/mydiamondblock.mts"
|
||||
minetest.place_schematic(pos,schem,0, "air", true)
|
||||
end,
|
||||
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
|
||||
local schem = minetest.get_modpath("mydiamondblock").."/schems/mydiamondblock.mts"
|
||||
minetest.place_schematic(pos,schem,0, "air", true)
|
||||
end,
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
if placer and minetest.check_player_privs(placer:get_player_name(), {myboardgames = true}) then
|
||||
else
|
||||
minetest.remove_node(pos)
|
||||
return true
|
||||
end
|
||||
end,
|
||||
})
|
||||
for blues = 1,6 do
|
||||
local blue = blues
|
||||
|
|
|
@ -10,11 +10,17 @@ minetest.register_node("mydraughts:board", {
|
|||
groups = {cracky = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
|
||||
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
|
||||
local schem = minetest.get_modpath("mydraughts").."/schems/mydraughts.mts"
|
||||
minetest.place_schematic({x=pos.x,y=pos.y,z=pos.z},schem,0, "air", true)
|
||||
end,
|
||||
|
||||
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
|
||||
local schem = minetest.get_modpath("mydraughts").."/schems/mydraughts.mts"
|
||||
minetest.place_schematic({x=pos.x,y=pos.y,z=pos.z},schem,0, "air", true)
|
||||
end,
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
if placer and minetest.check_player_privs(placer:get_player_name(), {myboardgames = true}) then
|
||||
else
|
||||
minetest.remove_node(pos)
|
||||
return true
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
local board = {
|
||||
|
|
|
@ -41,9 +41,16 @@ minetest.register_node("mygomoku:placer",{
|
|||
groups = {cracky=3},
|
||||
light_source = 5,
|
||||
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
|
||||
local schem = minetest.get_modpath("mygomoku").."/schems/mygomoku.mts"
|
||||
minetest.place_schematic(pos,schem,0, "air", true)
|
||||
end,
|
||||
local schem = minetest.get_modpath("mygomoku").."/schems/mygomoku.mts"
|
||||
minetest.place_schematic(pos,schem,0, "air", true)
|
||||
end,
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
if placer and minetest.check_player_privs(placer:get_player_name(), {myboardgames = true}) then
|
||||
else
|
||||
minetest.remove_node(pos)
|
||||
return true
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_alias("mygomoku:stone_brown","mygomoku:stone_black")
|
||||
|
|
|
@ -83,10 +83,17 @@ minetest.register_node("mylittle_bg:board",{
|
|||
paramtype = "light",
|
||||
light_source = 8,
|
||||
groups = {cracky = 1},
|
||||
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
|
||||
local schem = minetest.get_modpath("mylittle_bg").."/schems/my_little_bg.mts"
|
||||
minetest.place_schematic({x=pos.x,y=pos.y-2,z=pos.z},schem,0, "air", true)
|
||||
end,
|
||||
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
|
||||
local schem = minetest.get_modpath("mylittle_bg").."/schems/my_little_bg.mts"
|
||||
minetest.place_schematic({x=pos.x,y=pos.y-2,z=pos.z},schem,0, "air", true)
|
||||
end,
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
if placer and minetest.check_player_privs(placer:get_player_name(), {myboardgames = true}) then
|
||||
else
|
||||
minetest.remove_node(pos)
|
||||
return true
|
||||
end
|
||||
end,
|
||||
})
|
||||
local signs = {
|
||||
{"1","red","^[colorize:red:120"},
|
||||
|
|
|
@ -7,10 +7,17 @@ minetest.register_node("mymazes:block1",{
|
|||
paramtype = "light",
|
||||
light_source = 8,
|
||||
groups = {cracky = 1},
|
||||
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
|
||||
local schem = minetest.get_modpath("mymazes").."/schems/mymaze1.mts"
|
||||
minetest.place_schematic(pos,schem,0, "air", true)
|
||||
end,
|
||||
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
|
||||
local schem = minetest.get_modpath("mymazes").."/schems/mymaze1.mts"
|
||||
minetest.place_schematic(pos,schem,0, "air", true)
|
||||
end,
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
if placer and minetest.check_player_privs(placer:get_player_name(), {myboardgames = true}) then
|
||||
else
|
||||
minetest.remove_node(pos)
|
||||
return true
|
||||
end
|
||||
end,
|
||||
})
|
||||
minetest.register_node("mymazes:block2",{
|
||||
description = "Maze 2",
|
||||
|
@ -21,8 +28,15 @@ minetest.register_node("mymazes:block2",{
|
|||
paramtype = "light",
|
||||
light_source = 8,
|
||||
groups = {cracky = 1},
|
||||
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
|
||||
local schem = minetest.get_modpath("mymazes").."/schems/mymaze2.mts"
|
||||
minetest.place_schematic(pos,schem,0, "air", true)
|
||||
end,
|
||||
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
|
||||
local schem = minetest.get_modpath("mymazes").."/schems/mymaze2.mts"
|
||||
minetest.place_schematic(pos,schem,0, "air", true)
|
||||
end,
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
if placer and minetest.check_player_privs(placer:get_player_name(), {myboardgames = true}) then
|
||||
else
|
||||
minetest.remove_node(pos)
|
||||
return true
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
|
|
@ -68,8 +68,15 @@ minetest.register_node("mypachisi:placer",{
|
|||
paramtype2 = "facedir",
|
||||
groups = {cracky=3},
|
||||
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
|
||||
local schem = minetest.get_modpath("mypachisi").."/schems/mypachisi.mts"
|
||||
minetest.place_schematic(pos,schem,0, "air", true)
|
||||
end,
|
||||
local schem = minetest.get_modpath("mypachisi").."/schems/mypachisi.mts"
|
||||
minetest.place_schematic(pos,schem,0, "air", true)
|
||||
end,
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
if placer and minetest.check_player_privs(placer:get_player_name(), {myboardgames = true}) then
|
||||
else
|
||||
minetest.remove_node(pos)
|
||||
return true
|
||||
end
|
||||
end,
|
||||
})
|
||||
dofile(minetest.get_modpath("mypachisi").."/dice.lua")
|
||||
|
|
|
@ -7,10 +7,17 @@ minetest.register_node("mypitfall:block",{
|
|||
paramtype = "light",
|
||||
light_source = 8,
|
||||
groups = {cracky = 1},
|
||||
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
|
||||
local schem = minetest.get_modpath("mypitfall").."/schems/mypitfall1.mts"
|
||||
minetest.place_schematic({x=pos.x,y=pos.y-9,z=pos.z},schem,0, "air", true)
|
||||
end,
|
||||
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
|
||||
local schem = minetest.get_modpath("mypitfall").."/schems/mypitfall1.mts"
|
||||
minetest.place_schematic({x=pos.x,y=pos.y-9,z=pos.z},schem,0, "air", true)
|
||||
end,
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
if placer and minetest.check_player_privs(placer:get_player_name(), {myboardgames = true}) then
|
||||
else
|
||||
minetest.remove_node(pos)
|
||||
return true
|
||||
end
|
||||
end,
|
||||
})
|
||||
minetest.register_node("mypitfall:swamp_water", {
|
||||
description = "Swamp Water",
|
||||
|
|
|
@ -135,9 +135,16 @@ minetest.register_node("mys_n_l:placer",{
|
|||
paramtype2 = "facedir",
|
||||
groups = {cracky=3},
|
||||
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
|
||||
local schem = minetest.get_modpath("mys_n_l").."/schems/mys_n_l.mts"
|
||||
minetest.place_schematic({x=pos.x,y=pos.y,z=pos.z},schem,0, "air", true)
|
||||
end,
|
||||
local schem = minetest.get_modpath("mys_n_l").."/schems/mys_n_l.mts"
|
||||
minetest.place_schematic({x=pos.x,y=pos.y,z=pos.z},schem,0, "air", true)
|
||||
end,
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
if placer and minetest.check_player_privs(placer:get_player_name(), {myboardgames = true}) then
|
||||
else
|
||||
minetest.remove_node(pos)
|
||||
return true
|
||||
end
|
||||
end,
|
||||
})
|
||||
local pieces = {
|
||||
{"Red","red","^[colorize:red:120"},
|
||||
|
|
|
@ -71,9 +71,16 @@ minetest.register_node("mys_n_l_mini:placer",{
|
|||
paramtype2 = "facedir",
|
||||
groups = {cracky=3},
|
||||
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
|
||||
local schem = minetest.get_modpath("mys_n_l_mini").."/schems/mys_n_l_mini.mts"
|
||||
minetest.place_schematic({x=pos.x,y=pos.y,z=pos.z},schem,0, "air", true)
|
||||
end,
|
||||
local schem = minetest.get_modpath("mys_n_l_mini").."/schems/mys_n_l_mini.mts"
|
||||
minetest.place_schematic({x=pos.x,y=pos.y,z=pos.z},schem,0, "air", true)
|
||||
end,
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
if placer and minetest.check_player_privs(placer:get_player_name(), {myboardgames = true}) then
|
||||
else
|
||||
minetest.remove_node(pos)
|
||||
return true
|
||||
end
|
||||
end,
|
||||
})
|
||||
local pieces = {
|
||||
{"Red","red","^[colorize:red:120"},
|
||||
|
|
|
@ -72,8 +72,15 @@ minetest.register_node("mytrouble:placer",{
|
|||
paramtype2 = "facedir",
|
||||
groups = {cracky=3},
|
||||
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
|
||||
local schem = minetest.get_modpath("mytrouble").."/schems/mytrouble.mts"
|
||||
minetest.place_schematic({x=pos.x-1,y=pos.y,z=pos.z-1},schem,0, "air", true)
|
||||
end,
|
||||
local schem = minetest.get_modpath("mytrouble").."/schems/mytrouble.mts"
|
||||
minetest.place_schematic({x=pos.x-1,y=pos.y,z=pos.z-1},schem,0, "air", true)
|
||||
end,
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
if placer and minetest.check_player_privs(placer:get_player_name(), {myboardgames = true}) then
|
||||
else
|
||||
minetest.remove_node(pos)
|
||||
return true
|
||||
end
|
||||
end,
|
||||
})
|
||||
dofile(minetest.get_modpath("mytrouble").."/dice.lua")
|
||||
|
|
|
@ -229,11 +229,18 @@ end,
|
|||
drawtype = "normal",
|
||||
paramtype = "light",
|
||||
groups = {oddly_breakable_by_hand = 1},
|
||||
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
|
||||
local schem = minetest.get_modpath("myuno").."/schems/myuno.mts"
|
||||
minetest.place_schematic({x=pos.x,y=pos.y,z=pos.z},schem,0, "air", true)
|
||||
count = 0
|
||||
end,
|
||||
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
|
||||
local schem = minetest.get_modpath("myuno").."/schems/myuno.mts"
|
||||
minetest.place_schematic({x=pos.x,y=pos.y,z=pos.z},schem,0, "air", true)
|
||||
count = 0
|
||||
end,
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
if placer and minetest.check_player_privs(placer:get_player_name(), {myboardgames = true}) then
|
||||
else
|
||||
minetest.remove_node(pos)
|
||||
return true
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node("myuno:placer",{
|
||||
|
|
Loading…
Reference in New Issue