summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonBatman <serfdon@gmail.com>2015-10-24 21:34:06 -0700
committerDonBatman <serfdon@gmail.com>2015-10-24 21:34:06 -0700
commitcb94946e1e596b42b21d7e73213f59feb8e76f92 (patch)
tree3b850035aab669fb1dfda692f5c5f711c72efacb
parent4a9d35295a47539ebf9a525f14702f8f73f0776d (diff)
alligned score board
added pacmini board
-rwxr-xr-xmyhighscore/scoreboard.lua14
-rw-r--r--pacmine/fruit.lua9
-rwxr-xr-xpacmine/gamestate.lua5
-rw-r--r--pacmine/init.lua36
-rw-r--r--pacmine/schems/pacmini.mtsbin0 -> 534 bytes
-rw-r--r--pacmine/textures/pacmine_mini.pngbin0 -> 178 bytes
-rw-r--r--pong/init.lua2
-rw-r--r--pong/schems/pong.mtsbin196 -> 195 bytes
8 files changed, 54 insertions, 12 deletions
diff --git a/myhighscore/scoreboard.lua b/myhighscore/scoreboard.lua
index 38e659e..2de154b 100755
--- a/myhighscore/scoreboard.lua
+++ b/myhighscore/scoreboard.lua
@@ -4,9 +4,9 @@
local button_form = "size[6,8;]"..
"background[0,0;6,8;myhighscore_form_bg.png]"..
- "label[1,0.5;HIGH SCORES]"..
+ "label[2,0.5;HIGH SCORES]"..
"button[1,1;4,1;game;label]"..
- "button_exit[4,7;1,2;exit;Exit]"
+ "button_exit[2,7;2,1;exit;Exit]"
--place holders
local game_name = "the game"
@@ -19,18 +19,18 @@ local function get_formspec_for_game(name)
-- Obtain a comma separated list of scores to display
local scorelist = ""
for _,score in pairs(scores) do
- scorelist = scorelist .. minetest.formspec_escape(score.player) ..
- "\t\t\t\t " .. score.score ..","
+ scorelist = scorelist .." ".. minetest.formspec_escape(score.player) ..
+ "\t\t\t\t " .." ".. score.score ..","
end
return "size[6,8;]"..
"background[0,0;6,8;myhighscore_form_bg.png]"..
"label[1,0.5;HIGH SCORES FOR "..def.description.."]"..
- "label[1,1.5;PLAYER]"..
+ "label[1.25,1.5;PLAYER]"..
"label[3.5,1.5;SCORE]"..
"textlist[0.5,2;5,5;;"..scorelist.."]"..
- "button[2,7;1,2;back;Back]"..
- "button_exit[4,7;1,2;exit;Exit]"
+ "button[1,7;2,1;back;Back]"..
+ "button_exit[3,7;2,1;exit;Exit]"
end
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
new file mode 100644
index 0000000..43be871
--- /dev/null
+++ b/pacmine/schems/pacmini.mts
Binary files differ
diff --git a/pacmine/textures/pacmine_mini.png b/pacmine/textures/pacmine_mini.png
new file mode 100644
index 0000000..5672271
--- /dev/null
+++ b/pacmine/textures/pacmine_mini.png
Binary files differ
diff --git a/pong/init.lua b/pong/init.lua
index be72843..8c277df 100644
--- a/pong/init.lua
+++ b/pong/init.lua
@@ -121,6 +121,6 @@ minetest.register_node("pong:block",{
groups = {cracky = 1},
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
local schem = minetest.get_modpath("pong").."/schems/pong.mts"
- minetest.place_schematic(pos,schem,0, "air", true)
+ minetest.place_schematic({x=pos.x,y=pos.y-1,z=pos.z},schem,0, "air", true)
end,
})
diff --git a/pong/schems/pong.mts b/pong/schems/pong.mts
index d0c1a7c..20ec05f 100644
--- a/pong/schems/pong.mts
+++ b/pong/schems/pong.mts
Binary files differ