mirror of
https://github.com/Splizard/minetest-mod-snow.git
synced 2024-12-28 07:30:17 +01:00
Remove unused variables and do some whitespace fixes
This commit is contained in:
parent
dc799f344f
commit
76981af958
@ -4,7 +4,7 @@ minetest.register_abm({
|
||||
nodenames = {"default:dirt_with_snow"},
|
||||
interval = 2,
|
||||
chance = 20,
|
||||
action = function(pos, node)
|
||||
action = function(pos)
|
||||
local name = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name
|
||||
local nodedef = minetest.registered_nodes[name]
|
||||
if name ~= "ignore"
|
||||
@ -144,7 +144,7 @@ minetest.register_abm({
|
||||
nodenames = {"snow:sapling_pine"},
|
||||
interval = 10,
|
||||
chance = 50,
|
||||
action = function(pos, node)
|
||||
action = function(pos)
|
||||
|
||||
-- Check if there is enough vertical-space for the sapling to grow without
|
||||
-- hitting anything else. ~ LazyJ, 2014_04_10
|
||||
@ -177,7 +177,7 @@ minetest.register_abm({
|
||||
nodenames = {"snow:xmas_tree"},
|
||||
interval = 10,
|
||||
chance = 50,
|
||||
action = function(pos, node)
|
||||
action = function(pos)
|
||||
|
||||
-- 'If' there is air in each of the 8 nodes dirctly above the sapling,... ~LazyJ
|
||||
for i = 1,8 do
|
||||
|
@ -1,6 +1,6 @@
|
||||
-- Parameters
|
||||
|
||||
function snow_fall(pos, player, animate)
|
||||
function snow_fall(pos)
|
||||
local ground_y = nil
|
||||
for y=pos.y+10,pos.y+20,1 do
|
||||
local n = minetest.get_node({x=pos.x,y=y,z=pos.z}).name
|
||||
@ -184,7 +184,7 @@ if snow.enable_snowfall then
|
||||
}, true)
|
||||
end
|
||||
|
||||
for flake = 1, FLAKES do
|
||||
for _ = 1, FLAKES do
|
||||
|
||||
x, y, z = pposx - 24 + math.random(0, 48), pposy + 12, pposz - 24 + math.random(0, 48)
|
||||
|
||||
|
@ -577,7 +577,7 @@ local biome_strings = {
|
||||
{"snowy", "plain", "alpine", "normal", "normal"},
|
||||
{"cool", "icebergs", "icesheet", "icecave", "icehole"}
|
||||
}
|
||||
function biome_to_string(num,num2)
|
||||
function biome_to_string(num)
|
||||
local biome = biome_strings[1][num] or "unknown "..num
|
||||
return biome
|
||||
end
|
||||
|
@ -156,7 +156,7 @@ function sled:on_rightclick(player)
|
||||
on_sled_click(self, player)
|
||||
end
|
||||
|
||||
function sled:on_activate(staticdata, dtime_s)
|
||||
function sled:on_activate(staticdata)
|
||||
self.object:set_armor_groups({immortal=1})
|
||||
self.object:setacceleration({x=0, y=-10, z=0})
|
||||
if staticdata then
|
||||
|
Loading…
Reference in New Issue
Block a user