DonBatman 2016-03-07 06:25:19 -08:00
commit 1496c2bcf8
16 changed files with 179 additions and 64 deletions

View File

@ -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
The privilege myboardgames is required to place any of the game placing nodes, by default this is granted to singleplayer, to change that modify the mycanadiancheckers/init.lua file and change give_to_single_player = true to false.

View File

@ -1,3 +1,8 @@
minetest.register_privilege("myboardgames", {
description = "Place board games",
give_to_singleplayer = true
})
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 = {

View File

@ -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 = {

View File

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

View File

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

View File

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

View File

@ -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 = {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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",{