Corrige des erreurs de syntaxe

This commit is contained in:
sys4-fr 2018-11-04 13:43:15 +01:00
parent 221c440034
commit 8f34ce940b
5 changed files with 14 additions and 14 deletions

View File

@ -51,7 +51,7 @@ local load_time_start = minetest.get_us_time()
-- Original init.lua File Broken into Smaller Files
local srcpath = minetest.get_modpath"snow".."/src/"
local srcpath = minetest.get_modpath("snow").."/src/"
dofile(srcpath.."abms.lua")
dofile(srcpath.."aliases.lua")
dofile(srcpath.."crafting.lua")

View File

@ -57,7 +57,7 @@ of snowblocks (and then use them to water-grief by melting the snow blocks).
~ LazyJ
--]]
]]
minetest.register_craft({
type = "shapeless",

View File

@ -11,7 +11,7 @@ saplings grow into trees. --]]
-- Part 1: To disable the mapgen, add the *starting* comment under this line.
--[[
local perlin_scale, nosmooth_rarity
if not snow.disable_mapgen then
print("[snow] Mapgen enabled!")
@ -60,11 +60,11 @@ if not snow.disable_mapgen then
--Identify the mapgen.
local mgname = minetest.get_mapgen_setting"mg_name"
local mgname = minetest.get_mapgen_setting("mg_name")
if not mgname then
minetest.log("error", "[MOD] Snow Biomes: WARNING! mapgen could not be identifyed!")
end
local path = minetest.get_modpath"snow"
local path = minetest.get_modpath("snow")
if mgname == "v7" then
--Load mapgen_v7 compatibility.
dofile(path.."/src/mapgen_v7.lua")
@ -75,7 +75,7 @@ if not snow.disable_mapgen then
end
-- To complete the commenting-out add the *closing* comment under this line.
]]
local pine_tree = {
axiom="TABff",
@ -202,7 +202,7 @@ function snow.voxelmanip_pine(pos,a,data)
end
-- treecapitator support
if minetest.global_exists"treecapitator" then
if minetest.global_exists("treecapitator") then
treecapitator.register_tree{
trees = {"default:pine_tree"},
leaves = {"snow:needles"},

View File

@ -67,9 +67,9 @@ end)
-- Christmas egg
if minetest.global_exists"skins" then
skins.add"character_snow_man"
end
if minetest.global_exists("skins") then
skins.add("character_snow_man")
end
-- Decorated Pine Leaves
@ -271,7 +271,7 @@ if not snow.disable_mapgen then
default.register_leafdecay{
trunks = {"default:tree"},
leaves = {"snow:apple", "snow:leaves"},
radius = minetest.get_mapgen_setting"mg_name" == "v6" and 2 or 3,
radius = minetest.get_mapgen_setting("mg_name") == "v6" and 2 or 3,
}
end

View File

@ -6,13 +6,13 @@
-- Quite a bit of trial-and-error learning here and it boiled down to a
-- small handful of code lines making the difference. ~ LazyJ
local creative_mode = minetest.settings:get_bool"creative_mode"
local creative_mode = minetest.settings:get_bool("creative_mode")
local snowball_velocity, entity_attack_delay
local function update_snowball_vel(v)
snowball_velocity = v
local walkspeed = tonumber(minetest.settings:get"movement_speed_walk") or 4
local walkspeed = tonumber(minetest.settings:get("movement_speed_walk")) or 4
entity_attack_delay = (walkspeed+1)/v
end
update_snowball_vel(snow.snowball_velocity)
@ -27,7 +27,7 @@ snow.register_on_configuring(function(name, v)
end)
local function get_gravity()
local grav = tonumber(minetest.settings:get"movement_gravity") or 9.81
local grav = tonumber(minetest.settings:get("movement_gravity")) or 9.81
return grav*snowball_gravity
end