diff --git a/init.lua b/init.lua index b2c5a94..e5a7a4c 100644 --- a/init.lua +++ b/init.lua @@ -1,9 +1,19 @@ 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 ) .. "/aliases.lua" ) dofile( minetest.get_modpath( vines.name ) .. "/crafts.lua" ) diff --git a/settingtypes.txt b/settingtypes.txt new file mode 100644 index 0000000..9e267c1 --- /dev/null +++ b/settingtypes.txt @@ -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