Skip to content

Commit

Permalink
feat(pkuxkx): 为房间物品 ID 添加自动完成
Browse files Browse the repository at this point in the history
  • Loading branch information
dzpao committed Nov 17, 2023
1 parent 67c661c commit 0f8758f
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
1 change: 1 addition & 0 deletions mud/pkuxkx/plugins/basic/map/__init__.tin
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
36 changes: 36 additions & 0 deletions mud/pkuxkx/plugins/basic/map/tab.tin
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#nop vim: set filetype=tt:;

/*
本文件属于 PaoTin++ 的一部分
===========
PaoTin++ © 2020~2023 的所有版权均由担子炮(dzp <[email protected]>) 享有并保留一切法律权利
你可以在遵照 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;
};

0 comments on commit 0f8758f

Please sign in to comment.