Skip to content
Permalink
Browse files

Use minetest.conf for settings

  • Loading branch information...
poikilos committed Jun 21, 2019
1 parent 9f2bbc6 commit 610853319c24d8cee99c1a1b74d67c98ac6aa4ba
Showing with 18 additions and 8 deletions.
  1. +11 −8 config.lua
  2. +7 −0 settingtypes.txt
@@ -1,22 +1,26 @@

travelnet.MAX_STATIONS_PER_NETWORK = 24;
-- maximum travelnet stations per network
travelnet.MAX_STATIONS_PER_NETWORK = tonumber(minetest.settings:get("travelnet.MAX_STATIONS_PER_NETWORK")) or 24;

-- set this to true if you want a simulated beam effect
travelnet.travelnet_effect_enabled = false;
travelnet.travelnet_effect_enabled = minetest.settings:get_bool("travelnet.travelnet_effect_enabled") or false;

-- set this to true if you want a sound to be played when the travelnet is used
travelnet.travelnet_sound_enabled = false;
travelnet.travelnet_sound_enabled = minetest.settings:get_bool("travelnet.travelnet_sound_enabled") or true;

-- if you set this to false, travelnets cannot be created
-- (this may be useful if you want nothing but the elevators on your server)
travelnet.travelnet_enabled = true;
travelnet.travelnet_enabled = minetest.settings:get_bool("travelnet.travelnet_enabled") or true;

-- if you set travelnet.elevator_enabled to false, you will not be able to
-- craft, place or use elevators
travelnet.elevator_enabled = true;
travelnet.elevator_enabled = minetest.settings:get_bool("travelnet.elevator_enabled") or true;

-- if you set this to false, doors will be disabled
travelnet.doors_enabled = true;
travelnet.doors_enabled = minetest.settings:get_bool("travelnet.doors_enabled") or true;

-- starts an abm which re-adds travelnet stations to networks in case the savefile got lost
travelnet.abm_enabled = false;
travelnet.abm_enabled = minetest.settings:get_bool("travelnet.abm_enabled") or false;

-- change these if you want other receipes for travelnet or elevator
travelnet.travelnet_recipe = {
@@ -120,4 +124,3 @@ travelnet.allow_travel = function( player_name, owner_name, network_name, statio
return true;
end

travelnet.travelnet_sound_enabled = true
@@ -0,0 +1,7 @@
travelnet.MAX_STATIONS_PER_NETWORK (Maximum travelnet stations per network) float 24
travelnet.travelnet_effect_enabled (Travelnet visual beam effect) bool false
travelnet.travelnet_sound_enabled (Travelnet sound effect) bool true
travelnet.travelnet_enabled (Allow travelnets) bool true
travelnet.elevator_enabled (Allow travelnet elevators) bool true
travelnet.doors_enabled (Travelnet elevator doors) bool true
travelnet.abm_enabled (Reconnect travelnets automatically via ABM) bool false

0 comments on commit 6108533

Please sign in to comment.
You can’t perform that action at this time.