summaryrefslogtreecommitdiff
path: root/fruit.lua
diff options
context:
space:
mode:
authorDonBatman <serfdon@gmail.com>2015-10-23 18:23:46 -0700
committerDonBatman <serfdon@gmail.com>2015-10-23 18:23:46 -0700
commite996c04e9c04c02a534c38c0aee68db096a5aba0 (patch)
tree9945ddc2d63b4bc824685ebcd4cd03351df81fbd /fruit.lua
parent3ab8a0c3f3163ecdcafe8f1f6d2d0e125edcde86 (diff)
Added models for fruit
changed portal color to blue
Diffstat (limited to 'fruit.lua')
-rw-r--r--fruit.lua84
1 files changed, 11 insertions, 73 deletions
diff --git a/fruit.lua b/fruit.lua
index 8648363..34bcdd3 100644
--- a/fruit.lua
+++ b/fruit.lua
@@ -1,94 +1,32 @@
-local cherry_box = {
+local cbox = {
type = "fixed",
- fixed = {
- {0, -0.375, -0.0625, 0.25, 0, 0.0625},
- {-0.0625, -0.3125, -0.0625, 0.3125, -0.0625, 0.0625},
- {-0.3125, -0.25, -0.0625, -0.125, 0.125, 0.0625},
- {-0.375, -0.1875, -0.0625, -0.125, 0.0625, 0.0625},
- {-0.125, -0.0625, -0.0625, -0.0625, 0.125, 0.0625},
- {-0.0625, 0, -0.0625, 0, 0.0625, 0.0625},
- {-0.0625, 0.125, -0.0625, 0, 0.1875, 0.0625},
- {0, 0.1875, -0.0625, 0.125, 0.25, 0.0625},
- {0.125, 0.25, -0.0625, 0.375, 0.3125, 0.0625},
- {0.25, 0.3125, -0.0625, 0.375, 0.375, 0.0625},
- {0.1875, 0.125, -0.0625, 0.25, 0.25, 0.0625},
- {0.125, 0.0625, -0.0625, 0.1875, 0.125, 0.0625},
- {0.0625, 0, -0.0625, 0.125, 0.0625, 0.0625},
- }
- }
-local strawberry_box = {
- type = "fixed",
- fixed = {
- {-0.0625, 0.3125, -0.0625, 0, 0.375, 0.0625},
- {-0.25, 0.25, -0.0625, 0.1875, 0.3125, 0.0625},
- {-0.3125, 0.1875, -0.0625, 0.25, 0.25, 0.0625},
- {-0.375, -0.0625, -0.0625, 0.3125, 0.1875, 0.0625},
- {-0.3125, -0.1875, -0.0625, 0.25, -0.0625, 0.0625},
- {-0.25, -0.25, -0.0625, 0.1875, -0.1875, 0.0625},
- {-0.1875, -0.3125, -0.0625, 0.125, -0.25, 0.0625},
- {-0.0625, -0.375, -0.0625, 0, -0.3125, 0.0625},
- }
- }
-local apple_box = {
- type = "fixed",
- fixed = {
- {-0.3125, -0.125, -0.0625, 0.375, 0.25, 0.0625},
- {-0.375, -0.125, -0.0625, -0.3125, 0.1875, 0.0625},
- {-0.3125, -0.25, -0.0625, 0.3125, -0.125, 0.0625},
- {-0.25, -0.3125, -0.0625, 0.25, -0.25, 0.0625},
- {0.0625, -0.375, -0.0625, 0.1875, -0.3125, 0.0625},
- {-0.1875, -0.375, -0.0625, 0, -0.3125, 0.0625},
- {0.125, 0.25, -0.0625, 0.3125, 0.3125, 0.0625},
- {0, 0.25, -0.0625, 0.0625, 0.3125, 0.0625},
- {-0.25, 0.25, -0.0625, -0.0625, 0.3125, 0.0625},
- {-0.0625, 0.3125, -0.0625, 0, 0.375, 0.0625},
- }
- }
-local orange_box = {
- type = "fixed",
- fixed = {
- {-0.375, -0.125, -0.0625, 0.375, 0.125, 0.0625},
- {-0.3125, -0.25, -0.0625, 0.3125, 0.1875, 0.0625},
- {-0.25, -0.3125, -0.0625, 0.25, 0.25, 0.0625},
- {0.0625, -0.375, -0.0625, 0.1875, -0.3125, 0.0625},
- {-0.1875, -0.375, -0.0625, 0, -0.3125, 0.0625},
- {0, 0.25, -0.0625, 0.0625, 0.375, 0.0625},
- {-0.25, 0.3125, -0.0625, 0.0625, 0.375, 0.0625},
- {-0.1875, 0.25, -0.0625, -0.0625, 0.4375, 0.0625},
- {-0.25, 0.25, -0.0625, -0.1875, 0.3125, 0.0625},
- }
+ fixed = {{-0.875, 0.125, -0.0625, -0.125, 0.875, 0.0625}}
}
local pelletitems = {
- {"cherrys", "Cherrys","2",cherry_box},
- {"apple", "Apple","3",apple_box},
- {"orange", "Orange","4",orange_box},
- {"strawberry", "Strawberry","2",strawberry_box},
+ {"cherrys", "Cherrys","2"},
+ {"apple", "Apple","3"},
+ {"orange", "Orange","4"},
+ {"strawberry", "Strawberry","2"},
}
for i in ipairs (pelletitems) do
local itm = pelletitems[i][1]
local desc = pelletitems[i][2]
local hlth = pelletitems[i][3]
- local cbox = pelletitems[i][4]
minetest.register_node("mypacman:"..itm,{
description = desc,
inventory_image = "mypacman_"..itm..".png",
- tiles = {
- "mypacman_"..itm..".png",
- "mypacman_"..itm..".png",
- "mypacman_"..itm..".png",
- "mypacman_"..itm..".png",
- "mypacman_"..itm..".png",
- "mypacman_"..itm..".png^[transformFX",
- },
- drawtype = "nodebox",
+ tiles = {"mypacman_"..itm..".png",},
+ drawtype = "mesh",
+ mesh = "mypacman_"..itm..".obj",
paramtype = "light",
paramtype2 = "facedir",
walkable = false,
light_source = 14,
groups = {cracky=3,not_in_creative_inventory = 0},
- node_box = cbox,
+ --node_box = cbox,
+ selection_box = cbox,
collision_box = cbox,
after_destruct = function(pos, oldnode)
mypacman.on_player_got_fruit()