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
allow_defined_top = true
max_line_length = false
redefined = false
globals = {
"minetest", "core",
@ -11,7 +12,7 @@ read_globals = {
"dump", "dump2",
"vector",
"VoxelManip", "VoxelArea",
"PseudoRandom", "PcgRandom",
"PseudoRandom", "PcgRandom", "PerlinNoise",
"ItemStack",
"Settings",
"unpack",

View File

@ -78,4 +78,4 @@ max_height_difference = 56
--
--
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 ud = false -- Up or down
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 upp = false -- true if was going up previously
for i=1,length do

View File

@ -119,7 +119,7 @@ local function find_biome(pos, biomes)
local edge_dist = 0
local dir_step = 0
local dir_ind = 1
local success = false
local success
local spawn_pos
local biome_ids
@ -166,7 +166,7 @@ local function find_biome(pos, biomes)
spawn_pos = {x = spos.x, y = spos.y, z = spos.z}
end
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
return true
end

View File

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

View File

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