mirror of
https://github.com/technix/ham_radio.git
synced 2024-12-02 11:53:45 +01:00
Add jumpdrive patch
This commit is contained in:
parent
ddf97636bc
commit
8ede886425
3
patches/README.md
Normal file
3
patches/README.md
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# jumpdrive_compat
|
||||||
|
|
||||||
|
Compat patch for jumpdrive mod to make transmitters and beacons work correctly on jumpdrive ships.
|
28
patches/jumpdrive_compat/compat.lua.patch
Normal file
28
patches/jumpdrive_compat/compat.lua.patch
Normal file
@ -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
|
||||||
|
|
7
patches/jumpdrive_compat/ham_radio.lua
Normal file
7
patches/jumpdrive_compat/ham_radio.lua
Normal file
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user