Less namespace pollution

This commit is contained in:
Wuzzy 2016-08-11 18:34:46 +02:00
parent e72d2f82e5
commit ce53bea7c0

View File

@ -1,3 +1,4 @@
local S
if (minetest.get_modpath("intllib")) then
dofile(minetest.get_modpath("intllib").."/intllib.lua")
S = intllib.Getter(minetest.get_current_modname())
@ -177,8 +178,8 @@ end
--[[ liquids ]]
function pedology.register_liquid(basename, description, alpha, viscosity, drowning, damage_per_second, post_effect_color, additional_groups)
flowing_groups = {wet=6,not_in_creative_inventory=1}
source_groups = {wet=6}
local flowing_groups = {wet=6,not_in_creative_inventory=1}
local source_groups = {wet=6}
for k,v in pairs(additional_groups) do
flowing_groups[k] = v
source_groups[k] = v
@ -296,6 +297,7 @@ function pedology.register_sucky(basename, description, wetness, oozing, sucky,
-- If the node is not dry, do not add it into the creative inventory
if wetness == 0 then noncreative = 0 else noncreative = 1 end
local on_construct, on_destruct
if pedology.USE_DRIPS == 2 then
on_construct = function(pos)
local dripper = pedology.drip_particle(pos, wetness)
@ -312,7 +314,7 @@ function pedology.register_sucky(basename, description, wetness, oozing, sucky,
end
end
else
on_construct, after_destruct = nil
on_construct, on_destruct = nil
end
local nodedef = {
description = S(description),
@ -351,7 +353,7 @@ end
additional_groups: Either a table of tables of strings, a table of strings or nil. If it is nil, no additional groups will be added to all nodes. If it is a table, the strings are interpreted as group names which will be added to each node. If it is a table of tables strings, you can specify the groups tables for each wetness level (start with index number 0 for dry).
]]
function pedology.register_sucky_group(basename, basedescription, lumpbasedescription, maxwet, maxlump, oozeinterval, oozechance, melttable, dropcount, sounds, additional_groups)
local oozing, dripinterval
local sucky, oozing, dripinterval
local m -- melting_point
local lumpdescription
local groups