mirror of
https://repo.or.cz/minetest_pedology.git
synced 2024-12-29 11:20:17 +01:00
Less namespace pollution
This commit is contained in:
parent
e72d2f82e5
commit
ce53bea7c0
10
init.lua
10
init.lua
@ -1,3 +1,4 @@
|
|||||||
|
local S
|
||||||
if (minetest.get_modpath("intllib")) then
|
if (minetest.get_modpath("intllib")) then
|
||||||
dofile(minetest.get_modpath("intllib").."/intllib.lua")
|
dofile(minetest.get_modpath("intllib").."/intllib.lua")
|
||||||
S = intllib.Getter(minetest.get_current_modname())
|
S = intllib.Getter(minetest.get_current_modname())
|
||||||
@ -177,8 +178,8 @@ end
|
|||||||
--[[ liquids ]]
|
--[[ liquids ]]
|
||||||
|
|
||||||
function pedology.register_liquid(basename, description, alpha, viscosity, drowning, damage_per_second, post_effect_color, additional_groups)
|
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}
|
local flowing_groups = {wet=6,not_in_creative_inventory=1}
|
||||||
source_groups = {wet=6}
|
local source_groups = {wet=6}
|
||||||
for k,v in pairs(additional_groups) do
|
for k,v in pairs(additional_groups) do
|
||||||
flowing_groups[k] = v
|
flowing_groups[k] = v
|
||||||
source_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 the node is not dry, do not add it into the creative inventory
|
||||||
if wetness == 0 then noncreative = 0 else noncreative = 1 end
|
if wetness == 0 then noncreative = 0 else noncreative = 1 end
|
||||||
|
local on_construct, on_destruct
|
||||||
if pedology.USE_DRIPS == 2 then
|
if pedology.USE_DRIPS == 2 then
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
local dripper = pedology.drip_particle(pos, wetness)
|
local dripper = pedology.drip_particle(pos, wetness)
|
||||||
@ -312,7 +314,7 @@ function pedology.register_sucky(basename, description, wetness, oozing, sucky,
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
on_construct, after_destruct = nil
|
on_construct, on_destruct = nil
|
||||||
end
|
end
|
||||||
local nodedef = {
|
local nodedef = {
|
||||||
description = S(description),
|
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).
|
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)
|
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 m -- melting_point
|
||||||
local lumpdescription
|
local lumpdescription
|
||||||
local groups
|
local groups
|
||||||
|
Loading…
Reference in New Issue
Block a user