From 0f8758f873225589a9d9f696731717a774f4814c Mon Sep 17 00:00:00 2001 From: dzp Date: Fri, 17 Nov 2023 20:50:53 +0800 Subject: [PATCH] =?UTF-8?q?feat(pkuxkx):=20=E4=B8=BA=E6=88=BF=E9=97=B4?= =?UTF-8?q?=E7=89=A9=E5=93=81=20ID=20=E6=B7=BB=E5=8A=A0=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mud/pkuxkx/plugins/basic/map/__init__.tin | 1 + mud/pkuxkx/plugins/basic/map/tab.tin | 36 +++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 mud/pkuxkx/plugins/basic/map/tab.tin diff --git a/mud/pkuxkx/plugins/basic/map/__init__.tin b/mud/pkuxkx/plugins/basic/map/__init__.tin index 13df997b..8891c19a 100644 --- a/mud/pkuxkx/plugins/basic/map/__init__.tin +++ b/mud/pkuxkx/plugins/basic/map/__init__.tin @@ -29,6 +29,7 @@ load-file mud/pkuxkx/plugins/basic/map/area.tin; load-file mud/pkuxkx/plugins/basic/map/node.tin; load-file mud/pkuxkx/plugins/basic/map/xiaoyao.tin; load-file mud/pkuxkx/plugins/basic/map/helper.tin; +load-file mud/pkuxkx/plugins/basic/map/tab.tin; #func {basic_map.Init} { event.Emit map/init; diff --git a/mud/pkuxkx/plugins/basic/map/tab.tin b/mud/pkuxkx/plugins/basic/map/tab.tin new file mode 100644 index 00000000..74420d79 --- /dev/null +++ b/mud/pkuxkx/plugins/basic/map/tab.tin @@ -0,0 +1,36 @@ +#nop vim: set filetype=tt:; + +/* +本文件属于 PaoTin++ 的一部分 +=========== +PaoTin++ © 2020~2023 的所有版权均由担子炮(dzp ) 享有并保留一切法律权利 +你可以在遵照 GPLv3 协议的基础之上使用、修改及重新分发本程序。 +=========== +*/ + +load-lib event; + +event.HandleOnce {map/init} {map/tab} {map} {map.tab-completion.init}; + +#alias {map.tab-completion.init} { + event.Handle {map/GotRoomInfo} {map/tab} {map} {map.tab-completion}; +}; + +#alias {map.tab-completion} { + #local idx {}; + + #class map.tab-completion kill; + #class map.tab-completion open; + + #foreach {*gMapRoom[objs][]} {idx} { + #local obj {$gMapRoom[objs][$idx]}; + #tab $obj[id]; + }; + + #local item {}; + #foreach {$gMapRoom[items]} {item} { + #tab $item; + }; + + #class map.tab-completion close; +};