diff --git a/patches/README.md b/patches/README.md new file mode 100644 index 0000000..2252ac6 --- /dev/null +++ b/patches/README.md @@ -0,0 +1,3 @@ +# jumpdrive_compat + +Compat patch for jumpdrive mod to make transmitters and beacons work correctly on jumpdrive ships. diff --git a/patches/jumpdrive_compat/compat.lua.patch b/patches/jumpdrive_compat/compat.lua.patch new file mode 100644 index 0000000..fe20b2e --- /dev/null +++ b/patches/jumpdrive_compat/compat.lua.patch @@ -0,0 +1,28 @@ +--- compat.lua 2019-12-09 17:28:52.811852063 +0000 ++++ compat.lua 2019-12-09 17:29:24.255956113 +0000 +@@ -8,6 +8,7 @@ + local has_pipeworks_mod = minetest.get_modpath("pipeworks") + local has_beds_mod = minetest.get_modpath("beds") + local has_ropes_mod = minetest.get_modpath("ropes") ++local has_ham_radio_mod = minetest.get_modpath("ham_radio") + + dofile(MP.."/compat/travelnet.lua") + dofile(MP.."/compat/locator.lua") +@@ -18,6 +19,7 @@ + dofile(MP.."/compat/telemosaic.lua") + dofile(MP.."/compat/beds.lua") + dofile(MP.."/compat/ropes.lua") ++dofile(MP.."/compat/ham_radio.lua") + + if has_pipeworks_mod then + dofile(MP.."/compat/teleporttube.lua") +@@ -37,6 +39,9 @@ + elseif name == "telemosaic:beacon" or name == "telemosaic:beacon_protected" then + jumpdrive.telemosaic_compat(source_pos, target_pos) + ++ elseif (name == "ham_radio:transmitter" or name == "ham_radio:beacon") and has_ham_radio_mod then ++ jumpdrive.ham_radio_compat(source_pos, target_pos) ++ + end + end + diff --git a/patches/jumpdrive_compat/ham_radio.lua b/patches/jumpdrive_compat/ham_radio.lua new file mode 100644 index 0000000..dc8897f --- /dev/null +++ b/patches/jumpdrive_compat/ham_radio.lua @@ -0,0 +1,7 @@ + +jumpdrive.ham_radio_compat = function(from, to) + local meta = minetest.get_meta(to) + ham_radio.delete_transmitter(from) + ham_radio.save_transmitter(to, meta) +end +