Replace deprecated functions (MT 5.0.0)

master
Wuzzy 2019-04-01 17:39:34 +02:00
parent a304eddbfc
commit d5985901fb
1 changed files with 3 additions and 3 deletions

View File

@ -785,13 +785,13 @@ local function create_corridor_section(waypoint, axis, sign, up_or_down, up_or_d
-- Mob spawner (at center)
if place_mob_spawners and tsm_railcorridors.nodes.spawner and not no_spawner and
webperlin_major:get3d(p) > 0.3 and webperlin_minor:get3d(p) > 0.5 then
webperlin_major:get_3d(p) > 0.3 and webperlin_minor:get_3d(p) > 0.5 then
-- Place spawner (if activated in gameconfig),
-- enclose in cobwebs and setup the spawner node.
local spawner_placed = SetNodeIfCanBuild(p, {name=tsm_railcorridors.nodes.spawner})
if spawner_placed then
local size = 1
if webperlin_major:get3d(p) > 0.5 then
if webperlin_major:get_3d(p) > 0.5 then
size = 2
end
if place_cobwebs then
@ -814,7 +814,7 @@ local function create_corridor_section(waypoint, axis, sign, up_or_down, up_or_d
if pr:next(1,5) == 1 then
local h = pr:next(0, 2) -- 3 possible cobweb heights
local cpos = {x=basepos.x+vek.x, y=basepos.y+h, z=basepos.z+vek.z}
if webperlin_major:get3d(cpos) > 0.05 and webperlin_minor:get3d(cpos) > 0.1 then
if webperlin_major:get_3d(cpos) > 0.05 and webperlin_minor:get_3d(cpos) > 0.1 then
if h == 0 then
-- No check neccessary at height offset 0 since the cobweb is on the floor
return TryPlaceCobweb(cpos)