small fixes

This commit is contained in:
HybridDog 2015-03-06 19:40:51 +01:00
parent de76f5dc62
commit b9e93a8b58
3 changed files with 5 additions and 4 deletions

View File

@ -165,7 +165,7 @@ if snow.enable_snowfall then
-- Snow
minetest.register_globalstep(function(dtime)
for _, player in ipairs(minetest.get_connected_players()) do
for _, player in pairs(minetest.get_connected_players()) do
local ppos = player:getpos()
local sminp = addvectors(ppos, {x=-20, y=0, z=-20})

View File

@ -228,6 +228,7 @@ minetest.register_node("snow:star_lit", {
-- Moss
minetest.register_node("snow:moss", {
description = "Moss",
inventory_image = "snow_moss.png",
tiles = {"snow_moss.png"},
drawtype = "signlike",
paramtype = "light",

View File

@ -53,7 +53,7 @@ than I originally planned. :p ~ LazyJ
--
local function is_water(pos)
local nn = minetest.env:get_node(pos).name
local nn = minetest.get_node(pos).name
return minetest.get_item_group(nn, "water") ~= 0
end
@ -181,8 +181,8 @@ minetest.register_craftitem("snow:sled", {
local name = placer:get_player_name()
local player_pos = placer:getpos()
if not players_sled[name] then
if minetest.get_node({x=player_pos.x,y=player_pos.y, z=player_pos.z}).name == "default:snow" then
local sled = minetest.env:add_entity(pos, "snow:sled")
if minetest.get_node(player_pos).name == "default:snow" then
local sled = minetest.add_entity(pos, "snow:sled")
sled:get_luaentity():on_rightclick(placer)
end
end