chat command "/hyperloop_repair_tubes" added
This commit is contained in:
parent
063ee294e6
commit
a8e3ed9fb6
@ -29,6 +29,7 @@ The mod includes many different kind of blocks:
|
||||
- Hyperloop Station Book with all available stations (for builders/engineers)
|
||||
- Hyperloop Tube Crowbar to crack/repair tube lines (for admins)
|
||||
- Hyperloop WiFi Tubes for very large distances (optional)
|
||||
- chat command to repair WorldEdit placed tubes
|
||||
..and more.
|
||||
|
||||
|
||||
@ -79,10 +80,11 @@ hyperloop_free_tube_placement_enabled = true
|
||||
tubelib2 ()
|
||||
default
|
||||
intllib
|
||||
optional: worldedit
|
||||
|
||||
|
||||
# License
|
||||
Copyright (C) 2017,2018 Joachim Stolberg
|
||||
Copyright (C) 2017,2019 Joachim Stolberg
|
||||
Code: Licensed under the GNU LGPL version 2.1 or later. See LICENSE.txt and http://www.gnu.org/licenses/lgpl-2.1.txt
|
||||
Textures: CC0
|
||||
Display: Derived from the work of kaeza, sofar and others (digilines) LGPLv2.1+
|
||||
|
@ -1,3 +1,3 @@
|
||||
tubelib2
|
||||
default
|
||||
|
||||
worldedit?
|
||||
|
@ -114,3 +114,15 @@ minetest.register_privilege("hyperloop",
|
||||
{description = "Rights to remove tube nodes by means of the crowbar",
|
||||
give_to_singleplayer = false})
|
||||
|
||||
|
||||
if(minetest.get_modpath("worldedit")) ~= nil then
|
||||
minetest.register_chatcommand("hyperloop_repair_tubes", {
|
||||
description = "Repair via WorldEdit placed Hyperloop tubes by reusing WorldEdit pos1/pos2",
|
||||
privs = {worldedit=true},
|
||||
func = function(name, param)
|
||||
local pos1 = worldedit.pos1[name]
|
||||
local pos2 = worldedit.pos2[name]
|
||||
Tube:replace_tube_line(pos1, pos2)
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user