From 04593eca08147083105a02b42de4d2e5dca9fbae Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Wed, 2 Aug 2017 01:34:12 +0200 Subject: [PATCH] Localize a couple of accidental global variables --- mods/HUD/mcl_death_messages/init.lua | 2 +- mods/ITEMS/REDSTONE/mcl_dispensers/init.lua | 2 +- mods/ITEMS/REDSTONE/mcl_droppers/init.lua | 2 +- mods/ITEMS/mcl_doors/api_doors.lua | 4 ++-- mods/ITEMS/mcl_flowers/init.lua | 1 - mods/ITEMS/mcl_jukebox/init.lua | 2 +- mods/MAPGEN/mcl_mapgen_core/init.lua | 2 +- 7 files changed, 7 insertions(+), 8 deletions(-) diff --git a/mods/HUD/mcl_death_messages/init.lua b/mods/HUD/mcl_death_messages/init.lua index 8d02609852..db37805bff 100644 --- a/mods/HUD/mcl_death_messages/init.lua +++ b/mods/HUD/mcl_death_messages/init.lua @@ -56,7 +56,7 @@ local msgs = { } } -mobkills = { +local mobkills = { ["mobs_mc:zombie"] = "%s was killed by a zombie.", ["mobs_mc:blaze"] = "%s was killed by a blaze.", ["mobs_mc:slime"] = "%s was killed by a slime.", diff --git a/mods/ITEMS/REDSTONE/mcl_dispensers/init.lua b/mods/ITEMS/REDSTONE/mcl_dispensers/init.lua index 79f392cef0..480641a864 100644 --- a/mods/ITEMS/REDSTONE/mcl_dispensers/init.lua +++ b/mods/ITEMS/REDSTONE/mcl_dispensers/init.lua @@ -416,7 +416,7 @@ minetest.register_node("mcl_dispensers:dispenser_down", down_def) -- Up dispenser -- The up dispenser is almost identical to the down dispenser , it only differs in textures -up_def = table.copy(down_def) +local up_def = table.copy(down_def) up_def.description = "Upwards-Facing Dispenser" up_def.tiles = { "mcl_dispensers_dispenser_front_vertical.png", "default_furnace_bottom.png", diff --git a/mods/ITEMS/REDSTONE/mcl_droppers/init.lua b/mods/ITEMS/REDSTONE/mcl_droppers/init.lua index 575f495eb6..324608338b 100644 --- a/mods/ITEMS/REDSTONE/mcl_droppers/init.lua +++ b/mods/ITEMS/REDSTONE/mcl_droppers/init.lua @@ -137,7 +137,7 @@ minetest.register_node("mcl_droppers:dropper_down", down_def) -- Up dropper -- The up dropper is almost identical to the down dropper, it only differs in textures -up_def = table.copy(down_def) +local up_def = table.copy(down_def) up_def.description = "Upwards-Facing Dropper" up_def.tiles = { "mcl_droppers_dropper_front_vertical.png", "default_furnace_bottom.png", diff --git a/mods/ITEMS/mcl_doors/api_doors.lua b/mods/ITEMS/mcl_doors/api_doors.lua index ca1b753bd8..32d2aaccd4 100644 --- a/mods/ITEMS/mcl_doors/api_doors.lua +++ b/mods/ITEMS/mcl_doors/api_doors.lua @@ -63,8 +63,8 @@ function mcl_doors:register_door(name, def) minetest.register_craftitem(name, { description = def.description, - _doc_items_longdesc = def._doc_items_longdesc, - _doc_items_usagehelp = def._doc_items_usagehelp, + _doc_items_longdesc = longdesc, + _doc_items_usagehelp = usagehelp, inventory_image = def.inventory_image, stack_max = 64, groups = { mesecon_conductor_craftable = 1 }, diff --git a/mods/ITEMS/mcl_flowers/init.lua b/mods/ITEMS/mcl_flowers/init.lua index 6e365b659d..23d4315b87 100644 --- a/mods/ITEMS/mcl_flowers/init.lua +++ b/mods/ITEMS/mcl_flowers/init.lua @@ -1,7 +1,6 @@ -- Minetest 0.4 mod: default -- See README.txt for licensing and other information. local init = os.clock() -flower_tmp={} -- Simple flower template local smallflowerlongdesc = "This is a small flower. Small flowers are mainly used for dye production and can also be potted." diff --git a/mods/ITEMS/mcl_jukebox/init.lua b/mods/ITEMS/mcl_jukebox/init.lua index 1deb6e039e..1e2ac71630 100644 --- a/mods/ITEMS/mcl_jukebox/init.lua +++ b/mods/ITEMS/mcl_jukebox/init.lua @@ -15,7 +15,7 @@ local records = #recorddata for r=1, records do local doc = false - local entryname, longdesc, useahelp + local entryname, longdesc, usagehelp if r == 1 then doc = true entryname = "Music Disc" diff --git a/mods/MAPGEN/mcl_mapgen_core/init.lua b/mods/MAPGEN/mcl_mapgen_core/init.lua index e2b0084c24..612dc32a59 100644 --- a/mods/MAPGEN/mcl_mapgen_core/init.lua +++ b/mods/MAPGEN/mcl_mapgen_core/init.lua @@ -581,7 +581,7 @@ minetest.register_ore({ end -- Rarely replace stone with stone monster eggs -local scarcity +local monster_egg_scarcity if mg_name == "v6" then monster_egg_scarcity = 28 * 28 * 28 else