diff options
Diffstat (limited to 'pacmine')
-rw-r--r-- | pacmine/fruit.lua | 9 | ||||
-rwxr-xr-x | pacmine/gamestate.lua | 5 | ||||
-rw-r--r-- | pacmine/init.lua | 36 | ||||
-rw-r--r-- | pacmine/schems/pacmini.mts | bin | 0 -> 534 bytes | |||
-rw-r--r-- | pacmine/textures/pacmine_mini.png | bin | 0 -> 178 bytes |
5 files changed, 46 insertions, 4 deletions
diff --git a/pacmine/fruit.lua b/pacmine/fruit.lua index 2969ecc..4c21ccc 100644 --- a/pacmine/fruit.lua +++ b/pacmine/fruit.lua @@ -2,7 +2,11 @@ local cbox = { type = "fixed", fixed = {{-0.875, 0.125, -0.0625, -0.125, 0.875, 0.0625}} } - +local sbox = { + type = "fixed", + fixed = {{0, 0, 0, 0, 0, 0}} + } + local pelletitems = { {"cherrys", "Cherrys","2"}, {"apple", "Apple","3"}, @@ -26,10 +30,9 @@ minetest.register_node("pacmine:"..itm,{ light_source = 14, groups = {immortal=1,not_in_creative_inventory = 0}, --node_box = cbox, - selection_box = cbox, + selection_box = sbox, collision_box = cbox, on_timer = function(pos, dtime) - print("DELETEEE??") minetest.remove_node(pos) end }) diff --git a/pacmine/gamestate.lua b/pacmine/gamestate.lua index 7bbc0af..6d507b2 100755 --- a/pacmine/gamestate.lua +++ b/pacmine/gamestate.lua @@ -145,15 +145,20 @@ function pacmine.add_fruit(id) -- Different fruit will be used depending on the level if gamestate.level == 1 then node.name = "pacmine:cherrys" + node.param2 = 3 elseif gamestate.level == 2 then node.name = "pacmine:strawberry" + node.param2 = 3 elseif gamestate.level < 5 then node.name = "pacmine:orange" + node.param2 = 3 else node.name = "pacmine:apple" + node.param2 = 3 end local pos = vector.add(gamestate.start,{x=0,y=-1,z=0}) minetest.set_node(pos, node) + print(node.param2) -- Set the timer for the fruit to disappear minetest.get_node_timer(pos):start(math.random(20, 30)) end diff --git a/pacmine/init.lua b/pacmine/init.lua index e9e37dc..7ada96f 100644 --- a/pacmine/init.lua +++ b/pacmine/init.lua @@ -29,6 +29,12 @@ minetest.register_node("pacmine:pellet_1", { {-0.625, 0.25, -0.125, -0.375, 0.5, 0.125}, } }, + selection_box = { + type = "fixed", + fixed = { + {0, 0, 0, 0, 0, 0}, + } + }, }) --Power Pellets. Need to make these do something @@ -56,9 +62,15 @@ minetest.register_node("pacmine:pellet_2", { {-0.6875, -0.1875, -0.1875, -0.3125, 0.1875, 0.1875}, } }, + selection_box = { + type = "fixed", + fixed = { + {0, 0, 0, 0, 0, 0}, + } + }, }) ---The placer block +--The placer block for pacmine minetest.register_node("pacmine:block2",{ description = "Pacman", inventory_image = "pacmine_1.png", @@ -79,3 +91,25 @@ minetest.register_node("pacmine:block2",{ pacmine.game_start(pos, player) end, }) +--The placer block for pacmine mini +minetest.register_node("pacmine:block",{ + description = "Pacman Mini", + inventory_image = "pacmine_1.png^pacmine_mini.png", + tiles = { + "pacmine_wallc.png", + "pacmine_1.png", + "pacmine_1.png", + "pacmine_1.png", + "pacmine_1.png", + "pacmine_1.png^pacmine_mini.png", + }, + drawtype = "normal", + paramtype = "light", + paramtype2 = "facedir", + light_source = 8, + groups = {cracky = 1}, + on_rightclick = function(pos, node, player, itemstack, pointed_thing) + local schem = minetest.get_modpath("pacmine").."/schems/pacmini.mts" + minetest.place_schematic({x=pos.x,y=pos.y-1,z=pos.z-2},schem,0, "air", true) + end, +}) diff --git a/pacmine/schems/pacmini.mts b/pacmine/schems/pacmini.mts Binary files differnew file mode 100644 index 0000000..43be871 --- /dev/null +++ b/pacmine/schems/pacmini.mts diff --git a/pacmine/textures/pacmine_mini.png b/pacmine/textures/pacmine_mini.png Binary files differnew file mode 100644 index 0000000..5672271 --- /dev/null +++ b/pacmine/textures/pacmine_mini.png |