From 91d3a7a24a6946a9ae3c1c80ef03cea949fba103 Mon Sep 17 00:00:00 2001 From: Joachim Stolberg Date: Mon, 3 Jan 2022 11:51:20 +0100 Subject: [PATCH] Enable test blocks via minetest.settings --- init.lua | 4 +++- internal1.lua | 2 +- tube_test.lua | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index 88d4420..509dc07 100644 --- a/init.lua +++ b/init.lua @@ -9,4 +9,6 @@ dofile(MP .. "/internal1.lua") dofile(MP .. "/tube_api.lua") dofile(MP .. "/storage.lua") -- Only for testing/demo purposes ---dofile(MP .. "/tube_test.lua") +if minetest.settings:get_bool("tubelib2_testingblocks_enabled") == true then + dofile(MP .. "/tube_test.lua") +end diff --git a/internal1.lua b/internal1.lua index daa2d2b..9902053 100644 --- a/internal1.lua +++ b/internal1.lua @@ -132,7 +132,7 @@ end -- pairing functions -------------------------------------------------------------------------------------- --- Pairing helper function +-- Pairing helper function. NOT USED (see internal2.lua)!!! function Tube:store_teleport_data(pos, peer_pos) local meta = M(pos) meta:set_string("tele_pos", S(peer_pos)) diff --git a/tube_test.lua b/tube_test.lua index fc92a51..0b40140 100644 --- a/tube_test.lua +++ b/tube_test.lua @@ -269,7 +269,7 @@ local function store_connection(pos, peer_pos) meta:set_string("peer_pos", P2S(peer_pos)) meta:set_string("channel", "") meta:set_string("formspec", "") - meta:set_string("infotext", "Connected with "..P2S(peer_pos)) + meta:set_string("infotext", "Connected to "..P2S(peer_pos)) end local function prepare_pairing(pos)