Bladeren bron

refactor: 规范 xtt.Send 的调用方式

dzp 1 jaar geleden
bovenliggende
commit
3be086d672

+ 2 - 2
mud/pkuxkx/framework/online.extra.tin

@@ -21,13 +21,13 @@ PaoTin++ © 2020~2023 的所有版权均由担子炮(dzp <danzipao@gmail.com>) 
     #else {
         #if { $char[HP][食物] < $char[HP][最大食物] / 3 } {
             #if { "$char[favorite][food]" != "{NOTHING|}" } {
-                xtt.Send eat $char[favorite][food];
+                xtt.Send {eat $char[favorite][food]};
                 #local blankly {false};
             };
         };
         #if { $char[HP][饮水] < $char[HP][最大饮水] / 3 } {
             #if { "$char[favorite][water]" != "NOTHING" } {
-                xtt.Send drink $char[favorite][water];
+                xtt.Send {drink $char[favorite][water]};
                 #local blankly {false};
             };
         };

+ 1 - 1
mud/pkuxkx/plugins/basic/char/hp.tin

@@ -557,7 +557,7 @@ hp -neili 格式:
         char.GetHP %0;
     };
     #else {
-        xtt.Send hp %0;
+        xtt.Send {hp %0};
     };
 };
 

+ 1 - 1
mud/pkuxkx/plugins/basic/char/jifa.tin

@@ -55,7 +55,7 @@ event.Define {char/jifa}    {无参}  {$MODULE} {已经获取到 jifa/enable 命
 
     #class char.Jifa close;
 
-    xtt.Send jifa;
+    xtt.Send {jifa};
 };
 
 #alias {char.jifa.parse.output} {

+ 2 - 2
mud/pkuxkx/plugins/basic/char/sachet.tin

@@ -47,7 +47,7 @@ PaoTin++ © 2020~2024 的所有版权均由担子炮(dzp <danzipao@gmail.com>) 
     #local id {%0};
 
     #if { "$id" == "" } {
-        xtt.Send jiancha;
+        xtt.Send {jiancha};
         #return;
     };
 
@@ -66,7 +66,7 @@ PaoTin++ © 2020~2024 的所有版权均由担子炮(dzp <danzipao@gmail.com>) 
         char.sachet.parse.output;
     };
 
-    xtt.Send jiancha $id;
+    xtt.Send {jiancha $id};
 };
 
 #alias {char.sachet.parse.output} {

+ 1 - 1
mud/pkuxkx/plugins/basic/char/skills.tin

@@ -71,7 +71,7 @@ event.Define {char/skbrief} {无参}  {$MODULE} {已经获取到 skbrief 命令
         };
     };
 
-    xtt.Send skills %0;
+    xtt.Send {skills %0};
 };
 
 #alias {char.skills.parse.output} {

+ 1 - 1
mud/pkuxkx/plugins/basic/char/special.tin

@@ -73,7 +73,7 @@ VAR {角色特技列表,表格} {char.Special} {};
 
     #class char.Special close;
 
-    xtt.Send special;
+    xtt.Send {special};
 };
 
 #alias {special}    {char.Special gag {%0}};

+ 1 - 1
mud/pkuxkx/plugins/basic/char/status.tin

@@ -167,7 +167,7 @@ event.Define {char/status}    {无参}  {$MODULE} {已经获取到 status_me 命
 
     #class char.GetStatusMe close;
 
-    xtt.Send status_me %2;
+    xtt.Send {status_me %2};
 };
 
 #alias {status_me}  {char.GetStatusMe gag   {%0}};

+ 1 - 1
mud/pkuxkx/plugins/basic/cmds/finger.tin

@@ -25,5 +25,5 @@
 
     #class finger-parse close;
 
-    xtt.Send finger;
+    xtt.Send {finger};
 };

+ 2 - 2
mud/pkuxkx/plugins/basic/login.extra.tin

@@ -40,7 +40,7 @@ PaoTin++ © 2020~2023 的所有版权均由担子炮(dzp <danzipao@gmail.com>) 
 
     #line oneshot #action {^您的英文名字(要注册新人物请输入new。):$} {
         #if { "$session[UTF8]" == "false" } {
-            #delay 0 #send {2};
+            #delay 0 {xtt.Send {2}};
         };
 
         #config {charset} {UTF-8};
@@ -87,7 +87,7 @@ PaoTin++ © 2020~2023 的所有版权均由担子炮(dzp <danzipao@gmail.com>) 
         #local args {@str.Trim{%%1}};
         #info environ save;
         #if { @isTrue{$info[ENVIRON][PKUXKX_AUTO_AGREE]} } {
-            #send {agree $args};
+            xtt.Send {agree $args};
         };
         #else {
             #undelay {login.login-success};

+ 2 - 2
mud/pkuxkx/plugins/basic/map/area.tin

@@ -89,7 +89,7 @@ event.HandleOnce {map/init} {map/area} {map} {map.area.Init};
     #local args {%2};
 
     #if { "$args" != "" } {
-        xtt.Send localmaps $args;
+        xtt.Send {localmaps $args};
         #return;
     };
 
@@ -122,7 +122,7 @@ event.HandleOnce {map/init} {map/area} {map} {map.area.Init};
 
     #class map.Localmaps close;
 
-    xtt.Send localmaps;
+    xtt.Send {localmaps};
 
     sync.Wait {
         #class map.Localmaps kill;

+ 3 - 3
mud/pkuxkx/plugins/basic/map/xiaoyao.tin

@@ -167,7 +167,7 @@ event.HandleOnce {map/init} {map/xiaoyao} {map} {xiaoyao.Init};
     #local args  {%2};
 
     #if { "$args" != "" } {
-        xtt.Send map $args;
+        xtt.Send {map $args};
         #return;
     };
 
@@ -185,7 +185,7 @@ event.HandleOnce {map/init} {map/xiaoyao} {map} {xiaoyao.Init};
 
     #local here {@xiaoyao.locate{}};
     #if { "$here" == "" } {
-        xtt.Send map;
+        xtt.Send {map};
         #return;
     };
 
@@ -209,7 +209,7 @@ event.HandleOnce {map/init} {map/xiaoyao} {map} {xiaoyao.Init};
         };
         #else {
             errLog 缺少 data/map.txt 文件。;
-            xtt.Send map;
+            xtt.Send {map};
         };
     };
 

+ 1 - 1
mud/pkuxkx/plugins/lib/sync.tin

@@ -64,7 +64,7 @@ PaoTin++ © 2020~2023 的所有版权均由担子炮(dzp <danzipao@gmail.com>) 
 
     sync.handle {$uuid} {$callback};
 
-    xtt.Send response R:sync-$uuid;
+    xtt.Send {response R:sync-$uuid};
 };
 
 ///=== {

+ 4 - 4
mud/pkuxkx/plugins/shortcut.tin

@@ -31,7 +31,7 @@
     #alias {bwcx.return}    {#class bwcx kill};
     #class bwcx close;
 
-    xtt.Send bwcx;
+    xtt.Send {bwcx};
 };
 
 #alias chat-ren-song {
@@ -133,9 +133,9 @@ load-lib sync;
 
 #alias tichun {
     #class tichun open;
-    #action {^你目前的修为还可以再转换%%1点内力变为真气。$E} {#delay 0 {xtt.Send tichun %%1}} {9.500};
+    #action {^你目前的修为还可以再转换%%1点内力变为真气。$E} {#delay 0 {xtt.Send {tichun %%1}}} {9.500};
     #class tichun close;
-    #delay 1 {xtt.Send tichun $char[HP][当前内力]};
+    #delay 1 {xtt.Send {tichun $char[HP][当前内力]}};
 };
 
 #gag {向红豆打听有关『%*』的消息。$E};
@@ -170,7 +170,7 @@ load-lib sync;
 #action {^你从%*搜出一把玉石子。$E}     {put shi zi in lupi dai} {9.500};
 
 #action {^没有经过通传,任何人等不得擅闯都统治府。$E} {ask shiwei about 通传} {9.999};
-#action {^你因为种种原因停了下来,可以用walk继续进行。$E} {#delay 1 xtt.Send walk} {9.500};
+#action {^你因为种种原因停了下来,可以用walk继续进行。$E} {#delay 1 {xtt.Send {walk}}} {9.500};
 #action {^艄公说“到啦,上岸吧”,随即把一块踏脚板搭上堤岸。$E} {out} {9.500};
 #action {^大车停稳了下来,你可以下车(xia)了。$} {xia} {9.500};
 

+ 1 - 1
mud/thuxyj/plugins/basic/login.extra.tin

@@ -34,7 +34,7 @@ PaoTin++ © 2020~2023 的所有版权均由担子炮(dzp <danzipao@gmail.com>) 
     };
 
     #line oneshot #action {^您是否是中小学学生或年龄更小?(yes/no)$} {
-        #delay 0 #send no;
+        #delay 0 {xtt.Send no};
     };
 
     #line oneshot #action {^您的英文名字:(新玩家请键入 new 注册)$} {