mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-12-24 17:50:37 +01:00
Removed a few .env calls and minetest typos
This commit is contained in:
parent
2b376da37b
commit
06d241c10a
@ -41,7 +41,7 @@ local update_bobblock = function (pos, node)
|
||||
elseif node.name == 'bobblocks:whitepole_off' then nodename = 'bobblocks:whitepole'
|
||||
elseif node.name == 'bobblocks:whitepole' then nodename = 'bobblocks:whitepole_off'
|
||||
end
|
||||
minetest.env:add_node(pos, {name = nodename})
|
||||
minetest.add_node(pos, {name = nodename})
|
||||
minetest.sound_play("bobblocks_glassblock",
|
||||
{pos = pos, gain = 1.0, max_hear_distance = 32,})
|
||||
end
|
||||
|
@ -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,
|
||||
|
||||
|
@ -11,7 +11,7 @@ local update_bobtrap = function (pos, node)
|
||||
elseif node.name == 'bobblocks:trap_spike_major' then nodename = 'bobblocks:trap_spike_major_set'
|
||||
elseif node.name == 'bobblocks:trap_spike_major_set' then nodename = 'bobblocks:trap_spike_major'
|
||||
end
|
||||
minetest.env:add_node(pos, {name = nodename})
|
||||
minetest.add_node(pos, {name = nodename})
|
||||
end
|
||||
|
||||
-- Punch Traps
|
||||
@ -35,7 +35,7 @@ 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
|
||||
|
||||
update_bobtrap(pos, node)
|
||||
@ -49,7 +49,7 @@ 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
|
||||
|
||||
update_bobtrap(pos, node)
|
||||
@ -158,7 +158,7 @@ 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
|
||||
obj:set_hp(obj:get_hp()-1)
|
||||
minetest.sound_play("bobblocks_trap_fall",
|
||||
@ -172,7 +172,7 @@ 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
|
||||
obj:set_hp(obj:get_hp()-100)
|
||||
minetest.sound_play("bobblocks_trap_fall",
|
||||
|
@ -714,7 +714,7 @@ snowball_VELOCITY=19
|
||||
--Shoot snowball.
|
||||
local snow_shoot_snowball=function (item, player, pointed_thing)
|
||||
local playerpos=player:getpos()
|
||||
local obj=minetest.env:add_entity({x=playerpos.x,y=playerpos.y+1.5,z=playerpos.z}, "christmas_craft:snowball_entity")
|
||||
local obj=minetestadd_entity({x=playerpos.x,y=playerpos.y+1.5,z=playerpos.z}, "christmas_craft:snowball_entity")
|
||||
local dir=player:get_look_dir()
|
||||
obj:setvelocity({x=dir.x*snowball_VELOCITY, y=dir.y*snowball_VELOCITY, z=dir.z*snowball_VELOCITY})
|
||||
obj:setacceleration({x=dir.x*-3, y=-snowball_GRAVITY, z=dir.z*-3})
|
||||
@ -742,7 +742,7 @@ snow_snowball_ENTITY={
|
||||
snow_snowball_ENTITY.on_step = function(self, dtime)
|
||||
self.timer=self.timer+dtime
|
||||
local pos = self.object:getpos()
|
||||
local node = minetest.env:get_node(pos)
|
||||
local node = minetest.get_node(pos)
|
||||
|
||||
--Become item when hitting a node.
|
||||
if self.lastpos.x~=nil then --If there is no lastpos for some reason.
|
||||
|
@ -361,7 +361,7 @@ function factions_chat.allfactions_chathandler(playername,parameter)
|
||||
|
||||
for faction,value in pairs(factions.get_factions(player)) do
|
||||
for name,value in pairs(factions.dynamic_data.membertable[faction]) do
|
||||
local object_to_check = mientest.env:get_player_by_name(name)
|
||||
local object_to_check = minetest.get_player_by_name(name)
|
||||
|
||||
if object_to_check ~= nil then
|
||||
recipients[name] = true
|
||||
@ -413,7 +413,7 @@ function factions_chat.chathandler(playername,parameter)
|
||||
if faction ~= nil and valid_faction and
|
||||
factions.dynamic_data.membertable[faction] ~= nil then
|
||||
for name,value in pairs(factions.dynamic_data.membertable[faction]) do
|
||||
local object_to_check = mientest.env:get_player_by_name(name)
|
||||
local object_to_check = minetest.get_player_by_name(name)
|
||||
factions_chat.show_help(playername)
|
||||
if object_to_check ~= nil and
|
||||
name ~= playername then
|
||||
|
Loading…
Reference in New Issue
Block a user