fix many codestyle errors

This commit is contained in:
AFCMS 2021-04-17 07:42:49 +02:00
parent 457f61a532
commit 5f076d372a
7 changed files with 47 additions and 52 deletions

View File

@ -1,6 +1,7 @@
unused_args = false unused_args = false
allow_defined_top = true allow_defined_top = true
max_line_length = false max_line_length = false
redefined = false
globals = { globals = {
"minetest", "core", "minetest", "core",
@ -11,7 +12,7 @@ read_globals = {
"dump", "dump2", "dump", "dump2",
"vector", "vector",
"VoxelManip", "VoxelArea", "VoxelManip", "VoxelArea",
"PseudoRandom", "PcgRandom", "PseudoRandom", "PcgRandom", "PerlinNoise",
"ItemStack", "ItemStack",
"Settings", "Settings",
"unpack", "unpack",

View File

@ -78,4 +78,4 @@ max_height_difference = 56
-- --
-- --
half_map_chunk_size = 40 half_map_chunk_size = 40
quarter_map_chunk_size = 20 --quarter_map_chunk_size = 20

View File

@ -823,7 +823,7 @@ local function create_corridor_line(waypoint, axis, sign, length, wood, post, da
local s = sign local s = sign
local ud = false -- Up or down local ud = false -- Up or down
local udn = false -- Up or down is next local udn = false -- Up or down is next
local udp = false -- Up or down was previous local udp -- Up or down was previous
local up = false -- true if going up local up = false -- true if going up
local upp = false -- true if was going up previously local upp = false -- true if was going up previously
for i=1,length do for i=1,length do
@ -911,7 +911,7 @@ local function create_corridor_line(waypoint, axis, sign, length, wood, post, da
a="z" a="z"
elseif a=="z" then elseif a=="z" then
a="x" a="x"
end; end;
s = pr:next(1, 2) == 1 s = pr:next(1, 2) == 1
end end
end end

View File

@ -119,7 +119,7 @@ local function find_biome(pos, biomes)
local edge_dist = 0 local edge_dist = 0
local dir_step = 0 local dir_step = 0
local dir_ind = 1 local dir_ind = 1
local success = false local success
local spawn_pos local spawn_pos
local biome_ids local biome_ids
@ -166,7 +166,7 @@ local function find_biome(pos, biomes)
spawn_pos = {x = spos.x, y = spos.y, z = spos.z} spawn_pos = {x = spos.x, y = spos.y, z = spos.z}
end end
if spawn_pos then if spawn_pos then
local adjusted_pos, outside = adjust_pos_to_biome_limits(spawn_pos, biome_id) local _,outside = adjust_pos_to_biome_limits(spawn_pos, biome_id)
if is_in_world(spawn_pos) and not outside then if is_in_world(spawn_pos) and not outside then
return true return true
end end

View File

@ -22,7 +22,6 @@ local math = math
-- Internal player state -- Internal player state
local mcl_playerplus_internal = {} local mcl_playerplus_internal = {}
local def = {}
local time = 0 local time = 0
local look_pitch = 0 local look_pitch = 0
@ -376,9 +375,6 @@ minetest.register_globalstep(function(dtime)
return return
end end
-- set defaults
def.speed = 1
-- Standing on soul sand? If so, walk slower (unless player wears Soul Speed boots) -- Standing on soul sand? If so, walk slower (unless player wears Soul Speed boots)
if node_stand == "mcl_nether:soul_sand" then if node_stand == "mcl_nether:soul_sand" then
-- TODO: Tweak walk speed -- TODO: Tweak walk speed

View File

@ -500,10 +500,8 @@ function mcl_spawn.shadow_worker()
if success then if success then
local wsp_node = minetest.get_node(wsp) local wsp_node = minetest.get_node(wsp)
if wsp_node and wsp_node.name == "ignore" then if not (wsp_node and wsp_node.name == "ignore")
-- special case - respawn area unloaded from memory - it's okay, skip for now and ((not good_for_respawn(wsp)) or ((no_trees_area_counter >= 0) and not can_find_tree(wsp))) then
elseif ((not good_for_respawn(wsp)) or ((no_trees_area_counter >= 0) and not can_find_tree(wsp))) then
success = false success = false
minetest.log("action", "[mcl_spawn] World spawn position isn't safe anymore: "..minetest.pos_to_string(wsp)) minetest.log("action", "[mcl_spawn] World spawn position isn't safe anymore: "..minetest.pos_to_string(wsp))
mcl_spawn.search() mcl_spawn.search()