Replace deprecated functions
This commit is contained in:
parent
b31a717410
commit
2f74aea6f5
29 changed files with 159 additions and 159 deletions
|
@ -736,13 +736,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
|
||||
|
@ -765,7 +765,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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue