2019-12-17 22:43:35 +01:00
|
|
|
local S = minetest.get_translator("mcl_ocean")
|
2019-12-18 12:43:17 +01:00
|
|
|
local mod_doc = minetest.get_modpath("doc") ~= nil
|
2019-12-17 22:43:35 +01:00
|
|
|
|
|
|
|
-- List of supported surfaces for seagrass and kelp
|
|
|
|
local surfaces = {
|
|
|
|
{ "dirt", "mcl_core:dirt" },
|
|
|
|
{ "sand", "mcl_core:sand", 1 },
|
|
|
|
{ "redsand", "mcl_core:redsand", 1 },
|
|
|
|
{ "gravel", "mcl_core:gravel", 1 },
|
|
|
|
}
|
|
|
|
|
2021-03-20 10:47:04 +01:00
|
|
|
-- Is this water?
|
|
|
|
local function is_submerged(node, nodedef)
|
|
|
|
if minetest.get_item_group(node.name, "water") ~= 0 then
|
|
|
|
local liquidtype = nodedef.liquidtype
|
|
|
|
-- TODO: is it OK to optimize this to:
|
|
|
|
-- return nodedef.liquidtype
|
|
|
|
if liquidtype == "source" then
|
|
|
|
return "source"
|
|
|
|
elseif liquidtype == "flowing" then
|
|
|
|
return "flowing"
|
|
|
|
else
|
|
|
|
minetest.chat_send_all("its NOT OK to optimize into return nodedef.liquidtype :(")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
return false
|
|
|
|
end
|
|
|
|
|
|
|
|
-- Is the water downward flowing?
|
|
|
|
-- (kelp can grow inside downward flowing water)
|
|
|
|
local function is_downward_flowing(pos, node, nodedef, is_above)
|
|
|
|
|
|
|
|
result = (math.floor(node.param2 / 8) % 2) == 1
|
|
|
|
if not (result or is_above) then
|
|
|
|
-- If not, also check node above (this is needed due a weird quirk in the definition of
|
|
|
|
-- "downwards flowing" liquids in Minetest)
|
|
|
|
local node_above = minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z})
|
|
|
|
local nodedef_above = minetest.registered_nodes[node_above.name]
|
|
|
|
result = is_submerged(node_above, nodedef_above) or is_downward_flowing(pos, node_above, nodedef_above, true)
|
|
|
|
end
|
|
|
|
return result
|
|
|
|
end
|
|
|
|
|
|
|
|
local function get_kelp_height(param2)
|
|
|
|
return math.floor(param2 / 16)
|
|
|
|
end
|
|
|
|
|
2019-12-18 15:06:35 +01:00
|
|
|
local function get_kelp_top(pos, node)
|
|
|
|
local size = math.ceil(node.param2 / 16)
|
2021-03-20 10:47:04 +01:00
|
|
|
local pos_top = table.copy(pos)
|
|
|
|
pos_top.y = pos_top.y + size
|
|
|
|
return pos_top, minetest.get_node(pos_top)
|
2019-12-18 15:06:35 +01:00
|
|
|
end
|
|
|
|
|
2021-03-20 10:47:04 +01:00
|
|
|
-- Obtain position of the first kelp unsubmerged
|
|
|
|
local function get_kelp_unsubmerged(pos, node)
|
|
|
|
local x,y,z = pos.x, pos.y, pos.z
|
|
|
|
local height = get_kelp_height(node.param2)
|
|
|
|
for i=1,height do
|
|
|
|
local walk_pos = {x=x, y=y + i, z=z}
|
|
|
|
if minetest.get_item_group(minetest.get_node(walk_pos).name, "water") == 0 then
|
|
|
|
return walk_pos
|
2019-12-18 15:06:35 +01:00
|
|
|
end
|
|
|
|
end
|
2021-03-20 10:47:04 +01:00
|
|
|
return nil
|
2019-12-18 15:06:35 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
local function grow_param2_step(param2, snap_into_grid)
|
|
|
|
local old_param2 = param2
|
|
|
|
param2 = param2 + 16
|
2021-03-20 10:47:04 +01:00
|
|
|
-- TODO: allow kelp to grow bypass this limit according to MC rules.
|
|
|
|
-- https://minecraft.gamepedia.com/Kelp
|
2019-12-18 15:06:35 +01:00
|
|
|
if param2 > 240 then
|
|
|
|
param2 = 240
|
|
|
|
end
|
|
|
|
if snap_into_grid and (param2 % 16 ~= 0) then
|
|
|
|
param2 = param2 - (param2 % 16)
|
|
|
|
end
|
|
|
|
return param2, param2 ~= old_param2
|
|
|
|
end
|
|
|
|
|
2019-12-17 22:43:35 +01:00
|
|
|
local function kelp_on_place(itemstack, placer, pointed_thing)
|
|
|
|
if pointed_thing.type ~= "node" or not placer then
|
|
|
|
return itemstack
|
|
|
|
end
|
|
|
|
|
|
|
|
local player_name = placer:get_player_name()
|
|
|
|
local pos_under = pointed_thing.under
|
|
|
|
local pos_above = pointed_thing.above
|
|
|
|
local node_under = minetest.get_node(pos_under)
|
2021-03-20 10:47:04 +01:00
|
|
|
local nu_name = node_under.name
|
2019-12-17 22:43:35 +01:00
|
|
|
local node_above = minetest.get_node(pos_above)
|
2021-03-20 10:47:04 +01:00
|
|
|
local def_under = minetest.registered_nodes[nu_name]
|
2019-12-17 22:43:35 +01:00
|
|
|
local def_above = minetest.registered_nodes[node_above.name]
|
|
|
|
|
|
|
|
if def_under and def_under.on_rightclick and not placer:get_player_control().sneak then
|
|
|
|
return def_under.on_rightclick(pos_under, node_under,
|
|
|
|
placer, itemstack, pointed_thing) or itemstack
|
|
|
|
end
|
|
|
|
|
|
|
|
if minetest.is_protected(pos_under, player_name) or
|
|
|
|
minetest.is_protected(pos_above, player_name) then
|
|
|
|
minetest.log("action", player_name
|
|
|
|
.. " tried to place " .. itemstack:get_name()
|
|
|
|
.. " at protected position "
|
|
|
|
.. minetest.pos_to_string(pos_under))
|
|
|
|
minetest.record_protection_violation(pos_under, player_name)
|
|
|
|
return itemstack
|
|
|
|
end
|
|
|
|
|
2021-03-20 10:47:04 +01:00
|
|
|
local new_kelp = false
|
|
|
|
|
|
|
|
-- When placed on kelp.
|
|
|
|
if minetest.get_item_group(nu_name, "kelp") == 1 then
|
|
|
|
node_under.param2, new_kelp = grow_param2_step(node_under.param2)
|
|
|
|
|
|
|
|
-- Kelp must not reach the height limit.
|
|
|
|
-- Kelp must be placed on top of kelp to add kelp.
|
|
|
|
if not new_kelp or
|
|
|
|
pos_under.y >= pos_above.y or pos_under.x ~= pos_above.x or pos_under.z ~= pos_above.z then
|
2019-12-18 13:37:20 +01:00
|
|
|
return itemstack
|
|
|
|
end
|
2021-03-20 10:47:04 +01:00
|
|
|
|
|
|
|
-- TODO: is this even possible???
|
|
|
|
if pos_under.y < pos_above.y and (pos_under.x ~= pos_above.x or pos_under.z ~= pos_above.z) then
|
|
|
|
minetest.chat_send_all(dump2(pos_under, "pos_under")) --DEBUG
|
2019-12-18 13:37:20 +01:00
|
|
|
end
|
2021-03-20 10:47:04 +01:00
|
|
|
|
|
|
|
-- New kelp top must also be submerged in water.
|
|
|
|
local pos_top, node_top = get_kelp_top(pos_under, node_under)
|
|
|
|
local def_top = minetest.registered_nodes[node_top.name]
|
|
|
|
if not (is_submerged(node_top, def_top) and is_downward_flowing(pos_top, node_top, def_top)) then
|
2019-12-18 13:37:20 +01:00
|
|
|
return itemstack
|
|
|
|
end
|
2021-03-20 10:47:04 +01:00
|
|
|
|
|
|
|
-- When placed on surface.
|
2019-12-18 13:37:20 +01:00
|
|
|
else
|
2021-03-20 10:47:04 +01:00
|
|
|
-- Surface must support kelp
|
|
|
|
for _,surface in pairs(surfaces) do
|
|
|
|
if nu_name == surface[2] then
|
|
|
|
node_under.name = "mcl_ocean:kelp_" ..surface[1]
|
|
|
|
new_kelp = true
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
-- The surface must support kelp
|
|
|
|
-- Kelp must be placed on top of surface to add new kelp.
|
|
|
|
if not new_kelp or pos_under.y >= pos_above.y then
|
2019-12-18 13:37:20 +01:00
|
|
|
return itemstack
|
|
|
|
end
|
2021-03-20 10:47:04 +01:00
|
|
|
|
|
|
|
-- New kelp must also be submerged in water.
|
|
|
|
if not (is_submerged(node_above, def_above) and is_downward_flowing(pos_above, node_above, def_above)) then
|
2019-12-18 13:37:20 +01:00
|
|
|
return itemstack
|
|
|
|
end
|
2021-03-20 10:47:04 +01:00
|
|
|
node_under.param2 = minetest.registered_items[nu_name].place_param2 or 16
|
2019-12-18 13:37:20 +01:00
|
|
|
end
|
2021-03-20 10:47:04 +01:00
|
|
|
|
|
|
|
-- Play sound, set surface/kelp and take away an item
|
|
|
|
local def_node = minetest.registered_items[nu_name]
|
2019-12-17 22:43:35 +01:00
|
|
|
if def_node.sounds then
|
2020-04-07 00:55:45 +02:00
|
|
|
minetest.sound_play(def_node.sounds.place, { gain = 0.5, pos = pos_under }, true)
|
2019-12-17 22:43:35 +01:00
|
|
|
end
|
|
|
|
minetest.set_node(pos_under, node_under)
|
2020-07-10 16:08:40 +02:00
|
|
|
if not minetest.is_creative_enabled(player_name) then
|
2019-12-17 22:43:35 +01:00
|
|
|
itemstack:take_item()
|
|
|
|
end
|
|
|
|
|
|
|
|
return itemstack
|
|
|
|
end
|
|
|
|
|
2021-03-20 10:47:04 +01:00
|
|
|
local function kelp_drop(pos, height)
|
|
|
|
local x,y,z = pos.x,pos.y,pos.z
|
|
|
|
for i=1,height do
|
|
|
|
minetest.add_item({x=x, y=y+i, z=z}, "mcl_ocean:kelp")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
-- Dig kelp:
|
|
|
|
-- Each kelp from broken stem until the top drop a single item
|
|
|
|
-- Kelp's height decreases to the height below dig_pos
|
|
|
|
local function kelp_dig(dig_pos, pos, node, is_drop)
|
|
|
|
local param2 = node.param2
|
|
|
|
local height = get_kelp_height(param2)
|
|
|
|
-- pos.y points to the surface, offset needed to point to the first kelp
|
|
|
|
local new_height = dig_pos.y - (pos.y+1)
|
|
|
|
|
|
|
|
-- Digs the entire kelp: invoke after_dig_node to set_node
|
|
|
|
if new_height == 0 then
|
|
|
|
if is_drop then
|
|
|
|
kelp_drop(dig_pos, height)
|
|
|
|
end
|
|
|
|
minetest.set_node(pos, {name=minetest.registered_nodes[node.name].node_dig_prediction})
|
|
|
|
|
|
|
|
-- Digs the kelp beginning at a height
|
|
|
|
else
|
|
|
|
if is_drop then
|
|
|
|
kelp_drop(dig_pos, height - new_height)
|
|
|
|
end
|
|
|
|
minetest.set_node(pos, {name=node.name, param=node.param, param2=16*new_height})
|
|
|
|
end
|
2020-12-03 14:19:37 +01:00
|
|
|
end
|
|
|
|
|
2019-12-17 22:43:35 +01:00
|
|
|
minetest.register_craftitem("mcl_ocean:kelp", {
|
|
|
|
description = S("Kelp"),
|
2020-03-08 03:18:47 +01:00
|
|
|
_tt_help = S("Grows in water on dirt, sand, gravel"),
|
2019-12-18 12:43:17 +01:00
|
|
|
_doc_items_create_entry = false,
|
2019-12-17 22:43:35 +01:00
|
|
|
inventory_image = "mcl_ocean_kelp_item.png",
|
|
|
|
wield_image = "mcl_ocean_kelp_item.png",
|
|
|
|
on_place = kelp_on_place,
|
2019-12-18 03:10:49 +01:00
|
|
|
groups = { deco_block = 1 },
|
2019-12-17 22:43:35 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
-- Kelp nodes: kelp on a surface node
|
|
|
|
|
|
|
|
for s=1, #surfaces do
|
|
|
|
local def = minetest.registered_nodes[surfaces[s][2]]
|
|
|
|
local alt
|
|
|
|
if surfaces[s][3] == 1 then
|
|
|
|
alt = surfaces[s][2]
|
|
|
|
end
|
|
|
|
local sounds = table.copy(def.sounds)
|
|
|
|
local leaf_sounds = mcl_sounds.node_sound_leaves_defaults()
|
|
|
|
sounds.dig = leaf_sounds.dig
|
|
|
|
sounds.dug = leaf_sounds.dug
|
|
|
|
sounds.place = leaf_sounds.place
|
2020-02-19 04:54:17 +01:00
|
|
|
local tt_help, doc_longdesc, doc_img, desc
|
2019-12-18 12:43:17 +01:00
|
|
|
if surfaces[s][1] == "dirt" then
|
|
|
|
doc_longdesc = S("Kelp grows inside water on top of dirt, sand or gravel.")
|
|
|
|
desc = S("Kelp")
|
|
|
|
doc_create = true
|
|
|
|
doc_img = "mcl_ocean_kelp_item.png"
|
|
|
|
else
|
|
|
|
doc_create = false
|
|
|
|
end
|
2019-12-17 22:43:35 +01:00
|
|
|
minetest.register_node("mcl_ocean:kelp_"..surfaces[s][1], {
|
2019-12-18 12:43:17 +01:00
|
|
|
_doc_items_entry_name = desc,
|
|
|
|
_doc_items_longdesc = doc_longdesc,
|
|
|
|
_doc_items_create_entry = doc_create,
|
|
|
|
_doc_items_image = doc_img,
|
2019-12-17 22:43:35 +01:00
|
|
|
drawtype = "plantlike_rooted",
|
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "leveled",
|
|
|
|
place_param2 = 16,
|
|
|
|
tiles = def.tiles,
|
|
|
|
special_tiles = {
|
|
|
|
{
|
|
|
|
image = "mcl_ocean_kelp_plant.png",
|
|
|
|
animation = {type="vertical_frames", aspect_w=16, aspect_h=16, length=2.0},
|
|
|
|
tileable_vertical = true,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
inventory_image = "("..def.tiles[1]..")^mcl_ocean_kelp_item.png",
|
|
|
|
wield_image = "mcl_ocean_kelp_item.png",
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{ -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 },
|
|
|
|
{ -0.5, 0.5, -0.5, 0.5, 1.5, 0.5 },
|
|
|
|
},
|
|
|
|
},
|
|
|
|
groups = { dig_immediate = 3, deco_block = 1, plant = 1, kelp = 1, falling_node = surfaces[s][3] },
|
|
|
|
sounds = sounds,
|
|
|
|
node_dig_prediction = surfaces[s][2],
|
|
|
|
after_dig_node = function(pos)
|
2021-03-20 10:47:04 +01:00
|
|
|
minetest.set_node(pos, {name=surface[s][2]})
|
2019-12-17 22:43:35 +01:00
|
|
|
end,
|
2021-03-20 10:47:04 +01:00
|
|
|
-- NOTE: whenever it becomes possible to fully implement kelp without the
|
|
|
|
-- plantlike_rooted limitation, please adapt the code accordingly.
|
2020-12-03 14:19:37 +01:00
|
|
|
on_dig = function(pos, node, digger)
|
2021-03-20 10:47:04 +01:00
|
|
|
local is_drop = true
|
|
|
|
if digger and minetest.is_creative_enabled(digger:get_player_name()) then
|
|
|
|
is_drop = false
|
2020-12-03 14:19:37 +01:00
|
|
|
end
|
2021-03-20 10:47:04 +01:00
|
|
|
kelp_dig(pos, pos, node, is_drop)
|
2020-12-03 14:19:37 +01:00
|
|
|
end,
|
|
|
|
drop = "", -- drops are handled in on_dig
|
2019-12-17 22:43:35 +01:00
|
|
|
_mcl_falling_node_alternative = alt,
|
|
|
|
_mcl_hardness = 0,
|
|
|
|
_mcl_blast_resistance = 0,
|
|
|
|
})
|
2019-12-18 12:43:17 +01:00
|
|
|
|
|
|
|
if mod_doc and surfaces[s][1] ~= "dirt" then
|
|
|
|
doc.add_entry_alias("nodes", "mcl_ocean:kelp_dirt", "nodes", "mcl_ocean:kelp_"..surfaces[s][1])
|
|
|
|
end
|
2019-12-17 22:43:35 +01:00
|
|
|
end
|
|
|
|
|
2019-12-18 12:43:17 +01:00
|
|
|
if mod_doc then
|
|
|
|
doc.add_entry_alias("nodes", "mcl_ocean:kelp_dirt", "craftitems", "mcl_ocean:kelp")
|
|
|
|
end
|
2019-12-17 22:43:35 +01:00
|
|
|
|
|
|
|
-- Dried kelp stuff
|
|
|
|
|
|
|
|
-- TODO: This is supposed to be eaten very fast
|
|
|
|
minetest.register_craftitem("mcl_ocean:dried_kelp", {
|
|
|
|
description = S("Dried Kelp"),
|
2019-12-18 12:43:17 +01:00
|
|
|
_doc_items_longdesc = S("Dried kelp is a food item."),
|
2019-12-17 22:43:35 +01:00
|
|
|
inventory_image = "mcl_ocean_dried_kelp.png",
|
|
|
|
wield_image = "mcl_ocean_dried_kelp.png",
|
|
|
|
groups = { food = 2, eatable = 1 },
|
|
|
|
on_place = minetest.item_eat(1),
|
|
|
|
on_secondary_use = minetest.item_eat(1),
|
|
|
|
groups = { food = 2, eatable = 1 },
|
|
|
|
_mcl_saturation = 0.6,
|
|
|
|
})
|
|
|
|
|
|
|
|
local mod_screwdriver = minetest.get_modpath("screwdriver") ~= nil
|
|
|
|
local on_rotate
|
|
|
|
if mod_screwdriver then
|
|
|
|
on_rotate = screwdriver.rotate_3way
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
minetest.register_node("mcl_ocean:dried_kelp_block", {
|
|
|
|
description = S("Dried Kelp Block"),
|
2019-12-18 12:43:17 +01:00
|
|
|
_doc_items_longdesc = S("A decorative block that serves as a great furnace fuel."),
|
2019-12-17 22:43:35 +01:00
|
|
|
tiles = { "mcl_ocean_dried_kelp_top.png", "mcl_ocean_dried_kelp_bottom.png", "mcl_ocean_dried_kelp_side.png" },
|
2020-04-18 23:24:42 +02:00
|
|
|
groups = { handy = 1, building_block = 1, flammable = 2, fire_encouragement = 30, fire_flammability = 60 },
|
2019-12-17 22:43:35 +01:00
|
|
|
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
on_place = mcl_util.rotate_axis,
|
|
|
|
on_rotate = on_rotate,
|
|
|
|
_mcl_hardness = 0.5,
|
|
|
|
_mcl_blast_resistance = 12.5,
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "cooking",
|
|
|
|
recipe = "mcl_ocean:kelp",
|
|
|
|
output = "mcl_ocean:dried_kelp",
|
|
|
|
cooktime = 10,
|
|
|
|
})
|
|
|
|
minetest.register_craft({
|
|
|
|
recipe = {
|
|
|
|
{ "mcl_ocean:dried_kelp","mcl_ocean:dried_kelp","mcl_ocean:dried_kelp" },
|
|
|
|
{ "mcl_ocean:dried_kelp","mcl_ocean:dried_kelp","mcl_ocean:dried_kelp" },
|
|
|
|
{ "mcl_ocean:dried_kelp","mcl_ocean:dried_kelp","mcl_ocean:dried_kelp" },
|
|
|
|
},
|
|
|
|
output = "mcl_ocean:dried_kelp_block",
|
|
|
|
})
|
2020-07-17 00:17:18 +02:00
|
|
|
minetest.register_craft({
|
|
|
|
recipe = {
|
|
|
|
{ "mcl_ocean:dried_kelp_block" },
|
|
|
|
},
|
|
|
|
output = "mcl_ocean:dried_kelp 9",
|
|
|
|
})
|
2019-12-17 22:43:35 +01:00
|
|
|
minetest.register_craft({
|
|
|
|
type = "fuel",
|
|
|
|
recipe = "mcl_ocean:dried_kelp_block",
|
|
|
|
burntime = 200,
|
|
|
|
})
|
2019-12-18 15:06:35 +01:00
|
|
|
|
|
|
|
-- Grow kelp
|
|
|
|
minetest.register_abm({
|
|
|
|
label = "Kelp growth",
|
|
|
|
nodenames = { "group:kelp" },
|
2021-03-20 10:47:04 +01:00
|
|
|
-- interval = 45,
|
|
|
|
-- chance = 12,
|
|
|
|
interval = 1,
|
|
|
|
chance = 1,
|
2019-12-18 15:06:35 +01:00
|
|
|
catch_up = false,
|
|
|
|
action = function(pos, node, active_object_count, active_object_count_wider)
|
|
|
|
local grown
|
|
|
|
-- Grow kelp by 1 node length if it would grow inside water
|
2021-03-20 10:47:04 +01:00
|
|
|
node.param2, grow = grow_param2_step(node.param2, true)
|
|
|
|
local pos_top, node_top = get_kelp_top(pos, node)
|
|
|
|
local def_top = minetest.registered_nodes[node_top.name]
|
|
|
|
local submerged = is_submerged(node_top, def_top)
|
|
|
|
if grow then
|
2019-12-18 15:06:35 +01:00
|
|
|
if submerged == "source" then
|
|
|
|
-- Liquid source: Grow normally
|
|
|
|
minetest.set_node(pos, node)
|
2021-03-20 10:47:04 +01:00
|
|
|
|
|
|
|
elseif submerged == "flowing" and is_downward_flowing(pos_top, node_top, def_top) then
|
2019-12-18 15:06:35 +01:00
|
|
|
-- Flowing liquid: Grow 1 step, but also turn the top node into a liquid source
|
|
|
|
minetest.set_node(pos, node)
|
2021-03-20 10:47:04 +01:00
|
|
|
local alt_liq = def_top.liquid_alternative_source
|
2019-12-18 15:06:35 +01:00
|
|
|
if alt_liq then
|
2021-03-20 10:47:04 +01:00
|
|
|
minetest.set_node(pos_top, {name=alt_liq})
|
2019-12-18 15:06:35 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end,
|
|
|
|
})
|
2021-03-20 10:47:04 +01:00
|
|
|
|
|
|
|
-- Break kelp not underwater.
|
|
|
|
minetest.register_abm({
|
|
|
|
label = "Kelp drops",
|
|
|
|
nodenames = { "group:kelp" },
|
|
|
|
interval = 0.25,
|
|
|
|
chance = 1,
|
|
|
|
catch_up = false,
|
|
|
|
action = function(pos, node)
|
|
|
|
local dig_pos = get_kelp_unsubmerged(pos, node)
|
|
|
|
if dig_pos then
|
|
|
|
kelp_dig(dig_pos, pos, node, true)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
})
|