From 22a8bdedaddba7e2b3ae674ce6d4e5609c44eea2 Mon Sep 17 00:00:00 2001 From: MisterE123 Date: Tue, 26 Jan 2021 20:26:37 -0500 Subject: [PATCH] update stuffs --- minigame_manager.lua | 11 ++-- nodes.lua | 117 ++++++++++++++++++++++++++++++++++++------- readme.txt | 5 +- 3 files changed, 110 insertions(+), 23 deletions(-) diff --git a/minigame_manager.lua b/minigame_manager.lua index d62e268..4aba6da 100644 --- a/minigame_manager.lua +++ b/minigame_manager.lua @@ -1,8 +1,9 @@ ---todo: make it only delete wormball nodes in clear area, so unusuall shape arenas are possible. ---bgm ---colorize chat messages ---timer hud ---highscores +--todo: +--make it only delete wormball nodes in clear area, so unusual shape arenas are possible. --done +--bgm --available (..wormball/sounds/wormball_bgm) +--colorize chat messages --kinda done +--timer hud --done +--highscores --kinda done, needs rework wormball.player_texture_save = {} diff --git a/nodes.lua b/nodes.lua index 1c297dc..e54421b 100644 --- a/nodes.lua +++ b/nodes.lua @@ -21,7 +21,7 @@ for name,color in pairs(wormball.colors) do pointable = false, backface_culling = true, sunlight_propagates = true, -- Sunlight can shine through block - groups = {cracky = 3,}, + groups = {not_in_creative_inventory = 1,}, sounds = default.node_sound_glass_defaults() }) @@ -36,7 +36,7 @@ for name,color in pairs(wormball.colors) do paramtype = "light", backface_culling = true, sunlight_propagates = true, -- Sunlight can shine through block - groups = {cracky = 3,}, + groups = {not_in_creative_inventory = 1,}, sounds = default.node_sound_glass_defaults() }) @@ -51,7 +51,7 @@ for name,color in pairs(wormball.colors) do paramtype = "light", backface_culling = true, sunlight_propagates = true, -- Sunlight can shine through block - groups = {cracky = 3,}, + groups = {not_in_creative_inventory = 1,}, sounds = default.node_sound_glass_defaults() }) @@ -64,9 +64,10 @@ for name,color in pairs(wormball.colors) do tiles = {"wormball_power.png^[colorize:#"..color}, paramtype2 = "facedir", paramtype = "light", + pointable = false, backface_culling = true, sunlight_propagates = true, -- Sunlight can shine through block - groups = {cracky = 3, oddly_breakable_by_hand = 3}, + groups = {not_in_creative_inventory = 1,}, sounds = default.node_sound_glass_defaults() }) @@ -77,18 +78,96 @@ 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() -}) + + + + + +for name,color in pairs(wormball.colors) do + + minetest.register_node("wormball:creative_straight_"..name, { + description = "wormball creative node straight "..name, + drawtype = "mesh", + mesh = 'wormball_straight.b3d', + tiles = {"wormball_straight.png^[colorize:#"..color, "wormball_end.png^[colorize:#"..color}, + paramtype2 = "facedir", + paramtype = "light", + pointable = false, + backface_culling = true, + sunlight_propagates = true, -- Sunlight can shine through block + groups = {not_in_creative_inventory = 1,}, + sounds = default.node_sound_glass_defaults() + }) + + minetest.register_node("wormball:creative_corner_"..name, { + description = "wormball creative node corner "..name, + drawtype = "mesh", + 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", + backface_culling = true, + sunlight_propagates = true, -- Sunlight can shine through block + groups = {not_in_creative_inventory = 1,}, + sounds = default.node_sound_glass_defaults() + }) + + minetest.register_node("wormball:creative_head_"..name, { + description = "wormball creative head "..name, + drawtype = "mesh", + mesh = 'wormball_head.b3d', + tiles = {"wormball_head.png^[colorize:#"..color,"wormball_eye.png"}, + paramtype2 = "facedir", + pointable = false, + paramtype = "light", + backface_culling = true, + sunlight_propagates = true, -- Sunlight can shine through block + groups = {not_in_creative_inventory = 1,}, + sounds = default.node_sound_glass_defaults() + }) + + + + minetest.register_node("wormball:creative_power_"..name, { + description = "wormball creative power "..name, + drawtype = "mesh", + mesh = 'wormball_power.b3d', + tiles = {"wormball_power.png^[colorize:#"..color}, + paramtype2 = "facedir", + paramtype = "light", + pointable = false, + backface_culling = true, + sunlight_propagates = true, -- Sunlight can shine through block + groups = {not_in_creative_inventory = 1,}, + sounds = default.node_sound_glass_defaults() + }) + + + + + +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() +-- }) @@ -115,4 +194,8 @@ minetest.register_entity('wormball:player_att',{ end, -}) \ No newline at end of file +}) + + + + diff --git a/readme.txt b/readme.txt index 90d0e54..180e7a8 100644 --- a/readme.txt +++ b/readme.txt @@ -1,7 +1,7 @@ Wormball mod by MisterE for use with arena_lib (minigame_lib) You should be familiar with how to set up arena_lib arenas. Code snippets from https://gitlab.com/zughy-friends-minetest/arena_lib/-/blob/master/DOCS.md and from Zughy's minigames - +all assets cc0. Models by MisterE, textures by MisterE, and sounds CC0 from opengameart to set up an arena, create a completely enclosed arena out of any nodes you wish except those provided by this mod. You should place lights in the walls, or have glass to allow light in. In this version, you can have any shape arena you like. @@ -39,6 +39,9 @@ end 11) change the hub spawnpoint to be next to the signs. +background music is available: it is in the sounds folder, and titled: wormball_bgm + +