From c6c2607e232a06dab8dcbca71a110a1d56459482 Mon Sep 17 00:00:00 2001 From: davedevils Date: Wed, 1 Jul 2015 08:24:45 +0200 Subject: [PATCH] Fix of all warning when you launch new world --- mods/DOM/watch/rotinas.lua | 4 ++-- mods/WorldEdit/worldedit/init.lua | 2 +- mods/WorldEdit/worldedit_commands/init.lua | 5 +++-- mods/WorldEdit/worldedit_infinity/init.lua | 4 ++-- mods/default/nodes.lua | 8 ++++---- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/mods/DOM/watch/rotinas.lua b/mods/DOM/watch/rotinas.lua index 99378a6d7..4d973a5bf 100644 --- a/mods/DOM/watch/rotinas.lua +++ b/mods/DOM/watch/rotinas.lua @@ -46,7 +46,7 @@ function watch.pega_hora(tipo) local tempo_m =math.floor((tempo - tempo_h)*60) --Get only minutes --Hour - tempo_h_12=tempo_h + local tempo_h_12 = tempo_h if tempo_h > 12 then -- Converte time to time in 12h format tempo_h_12 = tempo_h - 12 end @@ -112,7 +112,7 @@ end minetest.register_globalstep(function(dtime) local t="a" -- d to digital, a to analogic - now = watch.pega_hora(2) + local now = watch.pega_hora(2) --DOM_inspeciona_r("Hora:"..now) if now == "12" then now = "0" end diff --git a/mods/WorldEdit/worldedit/init.lua b/mods/WorldEdit/worldedit/init.lua index a6361b58b..91cbf4758 100644 --- a/mods/WorldEdit/worldedit/init.lua +++ b/mods/WorldEdit/worldedit/init.lua @@ -1,4 +1,4 @@ -worldedit = worldedit or {} +worldedit = {} worldedit.version = {major=1, minor=0} worldedit.version_string = "1.0" diff --git a/mods/WorldEdit/worldedit_commands/init.lua b/mods/WorldEdit/worldedit_commands/init.lua index 5e75fbb71..cb086c19a 100644 --- a/mods/WorldEdit/worldedit_commands/init.lua +++ b/mods/WorldEdit/worldedit_commands/init.lua @@ -14,6 +14,7 @@ end dofile(minetest.get_modpath("worldedit_commands") .. "/mark.lua") dofile(minetest.get_modpath("worldedit_commands") .. "/safe.lua") +safe_region = safe_region or function(callback) return callback end local get_position = function(name) --position 1 retrieval function for when not using `safe_region` local pos1 = worldedit.pos1[name] @@ -858,7 +859,7 @@ minetest.register_chatcommand("/suppress", { local node = get_node(name, param) local count = worldedit.suppress(worldedit.pos1[name], worldedit.pos2[name], node) worldedit.player_notify(name, count .. " nodes suppressed") - end, check_set), + end, check_region), }) minetest.register_chatcommand("/highlight", { @@ -869,7 +870,7 @@ minetest.register_chatcommand("/highlight", { local node = get_node(name, param) local count = worldedit.highlight(worldedit.pos1[name], worldedit.pos2[name], node) worldedit.player_notify(name, count .. " nodes highlighted") - end, check_set), + end, check_region), }) minetest.register_chatcommand("/restore", { diff --git a/mods/WorldEdit/worldedit_infinity/init.lua b/mods/WorldEdit/worldedit_infinity/init.lua index be7910187..f5eda8f9d 100644 --- a/mods/WorldEdit/worldedit_infinity/init.lua +++ b/mods/WorldEdit/worldedit_infinity/init.lua @@ -1,4 +1,4 @@ -worldedit = worldedit or {} +local worldedit = {} local minetest = minetest --local copy of global local get_pointed = function(pos, nearest, distance) @@ -100,4 +100,4 @@ worldedit.raytrace = function(pos, dir, callback) intersectz = intersectz + componentz end end -end \ No newline at end of file +end diff --git a/mods/default/nodes.lua b/mods/default/nodes.lua index 6e51915b0..0aabe24a7 100644 --- a/mods/default/nodes.lua +++ b/mods/default/nodes.lua @@ -373,7 +373,7 @@ minetest.register_node("default:sapling", { fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3} }, stack_max = 64, - groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1}, + groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1,dig_by_water=1}, sounds = default.node_sound_defaults(), }) @@ -469,7 +469,7 @@ minetest.register_node("default:junglesapling", { fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3} }, stack_max = 64, - groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1}, + groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1,dig_by_water=1}, sounds = default.node_sound_defaults(), }) @@ -535,7 +535,7 @@ minetest.register_node("default:acaciasapling", { fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3} }, stack_max = 64, - groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1}, + groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1,dig_by_water=1}, sounds = default.node_sound_defaults(), }) @@ -600,7 +600,7 @@ minetest.register_node("default:sprucesapling", { fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3} }, stack_max = 64, - groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1}, + groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1,dig_by_water=1}, sounds = default.node_sound_defaults(), })