mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-12-28 20:05:30 +01:00
Removed a few .env calls and minetest typos
This commit is contained in:
@@ -14,7 +14,7 @@ local update_healthpack = function (pos, node)
|
||||
elseif node.name == 'bobblocks:health_on' then
|
||||
nodename = 'bobblocks:health_off'
|
||||
end
|
||||
minetest.env:add_node(pos, {name = nodename})
|
||||
minetest.add_node(pos, {name = nodename})
|
||||
end
|
||||
|
||||
local toggle_healthpack = function (pos, node)
|
||||
@@ -69,12 +69,12 @@ minetest.register_abm(
|
||||
interval = 1.0,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local objs = minetest.env:get_objects_inside_radius(pos, 1)
|
||||
local objs = minetest.get_objects_inside_radius(pos, 1)
|
||||
for k, obj in pairs(objs) do
|
||||
minetest.sound_play("bobblocks_health",
|
||||
{pos = pos, gain = 1.0, max_hear_distance = 32,})
|
||||
obj:set_hp(obj:get_hp()+5) -- give 2.5HP
|
||||
minetest.env:remove_node(pos) -- remove the node after use
|
||||
minetest.remove_node(pos) -- remove the node after use
|
||||
end
|
||||
end,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user