1
0
mirror of https://github.com/mt-mods/pipeworks.git synced 2025-05-11 05:10:22 +02:00

put teleport tube logging bethind a setting

This commit is contained in:
flux 2023-05-16 15:25:41 -07:00
parent cfc722db47
commit 11b399e471
No known key found for this signature in database
GPG Key ID: 9333B27816848A15
2 changed files with 8 additions and 3 deletions

View File

@ -84,3 +84,6 @@ pipeworks_use_real_entities (Use Real Entities) bool true
#A high value may cause issues with tube entity visuals.
#A value 0.2 or above may cause issues with accelerator tubes.
pipeworks_entity_update_interval (Entity Update Interval) float 0 0 0.8
# if set to true, items passing through teleport tubes will log log where they came from and where they went.
pipeworks_log_teleport_tubes (Log Teleport Tubes) bool false

View File

@ -246,9 +246,11 @@ local function can_go(pos, node, velocity, stack)
local src_owner = src_meta:get_string("owner")
local dst_meta = minetest.get_meta(pos)
local dst_owner = dst_meta:get_string("owner")
if minetest.settings:get_bool("pipeworks_log_teleport_tubes", false) then
minetest.log("action", string.format("[pipeworks] %s teleported from %s (owner=%s) to %s (owner=%s) via %s",
stack:to_string(), minetest.pos_to_string(pos), src_owner, minetest.pos_to_string(target), dst_owner, channel
))
end
pos.x = target.x
pos.y = target.y
pos.z = target.z