Преглед изворни кода

feat(pkuxkx): 当房间出口信息找不到时,回滚到 GMCP 出口信息

dzp пре 1 година
родитељ
комит
83ced6e09f
1 измењених фајлова са 23 додато и 0 уклоњено
  1. 23 0
      mud/pkuxkx/plugins/lib/ui/walk.extra.tin

+ 23 - 0
mud/pkuxkx/plugins/lib/ui/walk.extra.tin

@@ -8,6 +8,29 @@
     $ui.walk.cmd $dir;
 };
 
+#alias {ui.walk.keypad.do} {
+    #local key  {%1};
+    #local type {%2};
+    #local args {%3};
+
+    #if { "$type" == "cmd" } {
+        $args;
+        #return;
+    };
+
+    #local dir {};
+    #foreach {$args} {dir} {
+        #local exits {$gMapRoom[exits]};
+        #if { "$exits" == "" } {
+            #local exits {@sset.Add{{};$gMapRoom[gmcp][出口信息][]}};
+        };
+        #if { @sset.Contains{{$exits};$dir} } {
+            ui.walk.go $dir;
+            #return;
+        };
+    };
+};
+
 option.Define {GancheMode} {Bool} {是否开启运镖模式} {false};
 
 #alias {ui.walk.Ganche.Setup} {