fix things up, put creative nodes in creative inv

master
MisterE123 2021-02-01 13:29:16 -05:00
parent 5d8de72f52
commit 49d2442604
3 changed files with 19 additions and 47 deletions

View File

@ -70,9 +70,10 @@ if not minetest.get_modpath("lib_chatcmdbuilder") then
end
dofile(minetest.get_modpath("wormball") .. "/commands.lua")
--nodes includes the attachment entity, also there are creative decorative worm body parts for decorating minigame hubs
dofile(minetest.get_modpath("wormball") .. "/nodes.lua")
dofile(minetest.get_modpath("wormball") .. "/privs.lua")
--minigame_manager simply runs all the files in the folder minigame_manager
dofile(minetest.get_modpath("wormball") .. "/minigame_manager.lua")

View File

@ -1,4 +1,4 @@
name = wormball
description = Wormball subgame
depends = default, arena_lib, player_api
depends = default, arena_lib, player_api, dye
depends_optional = lib_chatcmdbuilder

View File

@ -1,14 +1,10 @@
--register minigame worm body parts
for name,color in pairs(wormball.colors) do
-- minetest.register_node("wormball:node_"..name, {
-- description = "wormball node "..name,
-- drawtype = "glasslike_framed",
-- tiles = {"default_stone.png^[colorize:#"..color, "default_stone.png^[colorize:#"..color},
-- inventory_image = minetest.inventorycube("default_stone.png^[colorize:#"..color),
-- paramtype = "light",
-- sunlight_propagates = true, -- Sunlight can shine through block
-- groups = {cracky = 3, oddly_breakable_by_hand = 3},
-- sounds = default.node_sound_glass_defaults()
-- })
minetest.register_node("wormball:straight_"..name, {
description = "wormball node straight "..name,
@ -78,7 +74,7 @@ for name,color in pairs(wormball.colors) do
end
--register creative decorative worm bodyparts (pointable, rotatable, and breakable by hand, and in creative inv)
@ -92,10 +88,10 @@ for name,color in pairs(wormball.colors) do
tiles = {"wormball_straight.png^[colorize:#"..color, "wormball_end.png^[colorize:#"..color},
paramtype2 = "facedir",
paramtype = "light",
pointable = false,
pointable = true,
backface_culling = true,
sunlight_propagates = true, -- Sunlight can shine through block
groups = {not_in_creative_inventory = 1,},
groups = {oddly_breakable_by_hand = 1,},
sounds = default.node_sound_glass_defaults()
})
@ -105,11 +101,10 @@ for name,color in pairs(wormball.colors) do
mesh = 'wormball_corner.b3d',
tiles = {"wormball_straight.png^[colorize:#"..color, "wormball_end.png^[colorize:#"..color,"wormball_corner_side.png^[colorize:#"..color,"wormball_corner_top.png^[colorize:#"..color},
paramtype2 = "facedir",
pointable = false,
paramtype = "light",
pointable = true,
backface_culling = true,
sunlight_propagates = true, -- Sunlight can shine through block
groups = {not_in_creative_inventory = 1,},
groups = {oddly_breakable_by_hand = 1,},
sounds = default.node_sound_glass_defaults()
})
@ -119,11 +114,10 @@ for name,color in pairs(wormball.colors) do
mesh = 'wormball_head.b3d',
tiles = {"wormball_head.png^[colorize:#"..color,"wormball_eye.png"},
paramtype2 = "facedir",
pointable = false,
paramtype = "light",
pointable = true,
backface_culling = true,
sunlight_propagates = true, -- Sunlight can shine through block
groups = {not_in_creative_inventory = 1,},
groups = {oddly_breakable_by_hand = 1,},
sounds = default.node_sound_glass_defaults()
})
@ -135,11 +129,10 @@ for name,color in pairs(wormball.colors) do
mesh = 'wormball_power.b3d',
tiles = {"wormball_power.png^[colorize:#"..color},
paramtype2 = "facedir",
paramtype = "light",
pointable = false,
pointable = true,
backface_culling = true,
sunlight_propagates = true, -- Sunlight can shine through block
groups = {not_in_creative_inventory = 1,},
groups = {oddly_breakable_by_hand = 1,},
sounds = default.node_sound_glass_defaults()
})
@ -149,29 +142,7 @@ for name,color in pairs(wormball.colors) do
end
-- minetest.register_node("wormball:power", {
-- description = "wormball node straight",
-- drawtype = "mesh",
-- mesh = 'wormball_power.b3d',
-- tiles = {"wormball_power.png^[colorize:#e0bb00bb"},
-- paramtype2 = "facedir",
-- paramtype = "light",
-- backface_culling = true,
-- sunlight_propagates = true, -- Sunlight can shine through block
-- groups = {cracky = 3, oddly_breakable_by_hand = 3},
-- sounds = default.node_sound_glass_defaults()
-- })
--register attachment entity
minetest.register_entity('wormball:player_att',{
initial_properties = {