aboutsummaryrefslogtreecommitdiff
path: root/advtrains/couple.lua
diff options
context:
space:
mode:
authorMaverick2797 <git.maverick2797@gmail.com>2024-11-02 15:36:34 +0800
committerorwell <orwell@bleipb.de>2024-11-09 22:33:18 +0100
commit3d2d19f6f7eba90f0d19b002824b2ff466567608 (patch)
treeed1799bf459a5073838503a52e9bc20151913d92 /advtrains/couple.lua
parent19d8e8c1a7dc82fa0ca1f65f04936e22c8b6e2a7 (diff)
downloadadvtrains-3d2d19f6f7eba90f0d19b002824b2ff466567608.tar.gz
advtrains-3d2d19f6f7eba90f0d19b002824b2ff466567608.tar.bz2
advtrains-3d2d19f6f7eba90f0d19b002824b2ff466567608.zip
Add setting to bypass coupler type checks when couplingHEADrelease-2.4.7master
Allows a server to disable the coupler checks when multiple coupler types are present, making everything effectively a universal coupler
Diffstat (limited to 'advtrains/couple.lua')
-rw-r--r--advtrains/couple.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/advtrains/couple.lua b/advtrains/couple.lua
index 795419c..4933dd8 100644
--- a/advtrains/couple.lua
+++ b/advtrains/couple.lua
@@ -335,7 +335,7 @@ function advtrains.check_matching_coupler_types(t1, t1_front, t2, t2_front)
--atdebug("CMCT: t1",t1_cplt,"t2",t2_cplt,"")
-- if at least one of the trains has no couplers table, it always couples (fallback behavior and mode for universal shunters)
- if not t1_cplt or not t2_cplt then
+ if minetest.settings:get_bool("advtrains_universal_couplers", false) or not t1_cplt or not t2_cplt then
return true
end