Page Menu
Home
1F616EMO Bugtracker
Search
Configure Global Search
Log In
Files
F144963
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/cmd_alias/init.lua b/cmd_alias/init.lua
index 20c5124..4b4a8a9 100644
--- a/cmd_alias/init.lua
+++ b/cmd_alias/init.lua
@@ -1,45 +1,44 @@
-- twi_mods/cmd_alias/init.lua
-- Register command alias
--[[
Copyright © 2024 1F616EMO
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
]]
local S = minetest.get_translator("cmd_alias")
local cmd_alias = {
doc = "helpform",
snp = "snippets",
tp = "teleport",
lua = "/lua",
+ t = "tutorial",
+ p1 = "area_pos1",
+ p2 = "area_pos2",
}
-local function do_alias(from, to)
+for from, to in pairs(cmd_alias) do
if minetest.registered_chatcommands[to] then
local def = table.copy(minetest.registered_chatcommands[to])
def.description = S("Alias of /@1: @2", to, def.description or "")
minetest.register_chatcommand(from, def)
end
end
-
-for from, to in pairs(cmd_alias) do
- do_alias(from, to)
-end
diff --git a/cmd_alias/mod.conf b/cmd_alias/mod.conf
index c246f63..054039f 100644
--- a/cmd_alias/mod.conf
+++ b/cmd_alias/mod.conf
@@ -1,2 +1,2 @@
name = cmd_alias
-optional_depends = doc, snippets, szutil_offlinepos, worldedit_commands
+optional_depends = doc, snippets, szutil_offlinepos, worldedit_commands, areas
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Mon, Oct 27, 3:41 PM (2 d, 13 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
8f/f7/68cd722f2cadd2d9007774bf2414
Default Alt Text
(2 KB)
Attached To
Mode
rTWIMODS Survival Server Custom Modifications
Attached
Detach File
Event Timeline
Log In to Comment