diff --git a/autogen.lua b/autogen.lua index b2a0add..4ae67eb 100644 --- a/autogen.lua +++ b/autogen.lua @@ -17,7 +17,7 @@ minetest.register_on_joinplayer(function(player) local name = player:get_player_name() -- Verifica se o registro de balao existe no banco de dados - if telepro.bd.verif(name, "pos") == false then + if telepro.bd.verif("jogador_"..name, "pos") == false then telepro.gerar_balao_aleatorio(name) end end) diff --git a/balao.lua b/balao.lua index 5ac7013..b0b2f74 100644 --- a/balao.lua +++ b/balao.lua @@ -29,7 +29,7 @@ minetest.register_node("telepro:balao_jogador", { drawtype = "mesh", mesh = "telepro_node_balao.b3d", visual_scale = 0.45, - groups = {choppy = 2, oddly_breakable_by_hand = 2}, + groups = {choppy = 2, oddly_breakable_by_hand = 2, not_in_creative_inventory = 1}, sounds = default.node_sound_wood_defaults(), drop = "", }) diff --git a/balao_decor.lua b/balao_decor.lua index 8198f5b..3d6fd6b 100644 --- a/balao_decor.lua +++ b/balao_decor.lua @@ -10,8 +10,8 @@ ]] -- Node -minetest.register_node("telepro:balao_decorativo", { - description = "Balao Decorativo", +minetest.register_node("telepro:node_balao_decorativo", { + description = "Node de Balao Decorativo", tiles = {"telepro_balao.png"}, paramtype = "light", paramtype2 = "facedir", @@ -19,7 +19,26 @@ minetest.register_node("telepro:balao_decorativo", { drawtype = "mesh", mesh = "telepro_node_balao.b3d", visual_scale = 0.45, - groups = {choppy = 2, oddly_breakable_by_hand = 2}, + groups = {choppy = 2, oddly_breakable_by_hand = 2, not_in_creative_inventory = 1}, sounds = default.node_sound_wood_defaults(), drop = "", }) + +-- Node de inventario +minetest.register_node("telepro:balao_decorativo", { + description = "Balao Decorativo", + tiles = {"telepro_balao.png"}, + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + drawtype = "mesh", + mesh = "telepro_node_balao_inv.b3d", + visual_scale = 1, + groups = {choppy = 2, oddly_breakable_by_hand = 2}, + sounds = default.node_sound_wood_defaults(), + drop = "", + + on_construct = function(pos) + minetest.set_node(pos, {name = "telepro:node_balao_decorativo"}) + end, +}) diff --git a/bau.lua b/bau.lua index 4109807..7f4b9a3 100644 --- a/bau.lua +++ b/bau.lua @@ -31,7 +31,7 @@ minetest.register_node("telepro:bau", { "default_chest_front.png" -- Frente }, paramtype2 = "facedir", - groups = {choppy = 2, oddly_breakable_by_hand = 2}, + groups = {choppy = 2, oddly_breakable_by_hand = 2, not_in_creative_inventory = 1}, sounds = default.node_sound_wood_defaults(), on_rightclick = function(pos, node, player) local meta = minetest.get_meta(pos) diff --git a/models/telepro_balao.blend1 b/models/telepro_balao.blend1 deleted file mode 100644 index 228380b..0000000 Binary files a/models/telepro_balao.blend1 and /dev/null differ diff --git a/models/telepro_node_balao_inv.b3d b/models/telepro_node_balao_inv.b3d new file mode 100644 index 0000000..9546c67 Binary files /dev/null and b/models/telepro_node_balao_inv.b3d differ diff --git a/models/telepro_node_balao.blend1 b/models/telepro_node_balao_inv.blend similarity index 60% rename from models/telepro_node_balao.blend1 rename to models/telepro_node_balao_inv.blend index 541d560..e666bec 100644 Binary files a/models/telepro_node_balao.blend1 and b/models/telepro_node_balao_inv.blend differ