From 49d244260476aaef58f41e200c9ae9461d77b90d Mon Sep 17 00:00:00 2001 From: MisterE123 Date: Mon, 1 Feb 2021 13:29:16 -0500 Subject: [PATCH] fix things up, put creative nodes in creative inv --- init.lua | 3 ++- mod.conf | 2 +- nodes.lua | 61 +++++++++++++++---------------------------------------- 3 files changed, 19 insertions(+), 47 deletions(-) diff --git a/init.lua b/init.lua index 5c23a12..ffb55b1 100644 --- a/init.lua +++ b/init.lua @@ -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") diff --git a/mod.conf b/mod.conf index 404917e..55b2c98 100644 --- a/mod.conf +++ b/mod.conf @@ -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 diff --git a/nodes.lua b/nodes.lua index 1ba4cd5..40e1090 100644 --- a/nodes.lua +++ b/nodes.lua @@ -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 = {