add settings for rope lengths

This commit is contained in:
FaceDeer 2017-01-29 11:41:02 -07:00
parent 072bd59dc2
commit e2eb4c6db3
2 changed files with 20 additions and 2 deletions

@ -1,9 +1,19 @@
vines = { vines = {
name = 'vines', name = 'vines',
ropeLadderLength = 50,
ropeLength = 50,
} }
local rope_length = minetest.setting_get("vines_rope_length")
if not rope_length then
rope_length = 50
end
vines.ropeLength = rope_length
local rope_ladder_length = minetest.setting_get("vines_rope_ladder_length")
if not rope_ladder_length then
rope_ladder_length = 50
end
vines.ropeLadderLength = rope_ladder_length
dofile( minetest.get_modpath( vines.name ) .. "/functions.lua" ) dofile( minetest.get_modpath( vines.name ) .. "/functions.lua" )
dofile( minetest.get_modpath( vines.name ) .. "/aliases.lua" ) dofile( minetest.get_modpath( vines.name ) .. "/aliases.lua" )
dofile( minetest.get_modpath( vines.name ) .. "/crafts.lua" ) dofile( minetest.get_modpath( vines.name ) .. "/crafts.lua" )

8
settingtypes.txt Normal file

@ -0,0 +1,8 @@
#The shortest rope will extend for this many meters. Longer ropes come in
#multiples of this length.
#Changing this value will not affect ropes that already exist in-world.
vines_rope_length (Rope length) int 50 1 30000
#Rope ladders will extend this far at maximum.
#Changing this value will not affect rope ladders that already exist in-world.
vines_rope_ladder_length (Rope ladder length) int 50 1 30000