|
|
@@ -2,17 +2,17 @@
|
|
|
|
|
|
load-module basic/title;
|
|
|
|
|
|
-VAR {当前房间ID} gMapHereID {0};
|
|
|
-VAR {当前房间信息} gMapRoom {};
|
|
|
-
|
|
|
-option.Define {ShowRoomView} {Bool} {是否显示房间风景} {false};
|
|
|
-option.Define {MapDebug} {Bool} {房间信息解析调试开关} {false};
|
|
|
-
|
|
|
-event.Define {map/GotRoomInfo} {无参} {$MODULE} {已经获取到房间信息,并储存到 gMapRoom 全局变量。};
|
|
|
event.Define {map/ArriveDock} {无参} {$MODULE} {已经抵达码头};
|
|
|
event.Define {map/ArriveCoachPark} {无参} {$MODULE} {已经抵达马车行};
|
|
|
|
|
|
-event.HandleOnce {map/init} {map/room} {map} {map.Room.Watch};
|
|
|
+event.Define {map/fix/room} {无参} {$MODULE} {修复房间信息};
|
|
|
+event.Define {map/fix/obj} {无参} {$MODULE} {修复物品信息};
|
|
|
+
|
|
|
+event.HandleOnce {map/init} {pkuxkx/map/room} {map} {pkuxkx.map.Room.init};
|
|
|
+
|
|
|
+#alias {pkuxkx.map.Room.init} {
|
|
|
+ set area_detail;
|
|
|
+};
|
|
|
|
|
|
#alias {map.Room.Watch} {
|
|
|
#local dungeon {?:\[(\S{3,10})\]|};
|
|
|
@@ -29,6 +29,10 @@ event.HandleOnce {map/init} {map/room} {map} {map.Room.Watch};
|
|
|
#action {{*UTF8}{?:^}{.{1,9}?\S}{$dungeon} -{$nation}{$terrain}{$save}{$store}{$group}{$mark}{$undef}$} {
|
|
|
#local ret {@map.GMCP.Confirm{}};
|
|
|
|
|
|
+ #if { @isFalse{$gMapRoom[allDone]} } {
|
|
|
+ map.Room.getInfo.done;
|
|
|
+ };
|
|
|
+
|
|
|
#local keep {};
|
|
|
#if { &ret[gmcp][] > 0 } {
|
|
|
#local keep[direction] {here};
|
|
|
@@ -66,129 +70,181 @@ event.HandleOnce {map/init} {map/room} {map} {map.Room.Watch};
|
|
|
$keep
|
|
|
};
|
|
|
|
|
|
+ #local room {$room};
|
|
|
+
|
|
|
+ #local here {0};
|
|
|
+ #if { "$room[direction]" == "here" } {
|
|
|
+ #local here {@map.Here{}};
|
|
|
+ };
|
|
|
+
|
|
|
+ #local header {%%99};
|
|
|
+
|
|
|
+ #if { @option.IsEnable{MapDebug} } {
|
|
|
+ #local optional {};
|
|
|
+ #if { "$room[mark]" != "" } {#cat optional { <175>标记<299> $room[mark] }};
|
|
|
+ #if { @isTrue{$room[save]} } {#cat optional { <129><存盘点><299>}};
|
|
|
+ #if { @isTrue{$room[store]} } {#cat optional { <139><储物柜><299>}};
|
|
|
+ #if { "$room[group]" != "" } {#cat optional { <175>帮派驻地<299> $room[group]}};
|
|
|
+ #if { $here > 0 } {#cat optional { <129>定位结果<299> <159>@map.Here{RID}<299>}};
|
|
|
+
|
|
|
+ #echo {<175>房间名称<299> %s <175>国家<299> %s <175>地段<299> %s%s}
|
|
|
+ {$room[name]} {$room[nation]} {$room[terrain]} $optional;
|
|
|
+ };
|
|
|
+ #elseif { $here > 0 } {
|
|
|
+ #if { "@map.FollowState{}" == "Normal" } {
|
|
|
+ #local here {<159>@map.Here{RID}<299>};
|
|
|
+ };
|
|
|
+ #else {
|
|
|
+ #local here {<259>GPS 无信号<299>};
|
|
|
+ };
|
|
|
+ #local width {@math.Min{@prompt.ScreenWidth{};90}};
|
|
|
+ #local space {@str.Space{@math.Eval{$width - @str.Width{{$header}} - @str.Width{$here}}}};
|
|
|
+ #echo {%s %s %s} {$header} {$space} {$here};
|
|
|
+ };
|
|
|
+ #else {
|
|
|
+ #echo {%s} {$header};
|
|
|
+ };
|
|
|
+
|
|
|
+ #line gag;
|
|
|
+
|
|
|
map.Room.getInfo {$room};
|
|
|
};
|
|
|
|
|
|
#class map.Room.Watch close;
|
|
|
};
|
|
|
|
|
|
-#alias {map.StopWatchRoom} {
|
|
|
- #class map.Room.Watch kill;
|
|
|
-};
|
|
|
-
|
|
|
#alias {map.Room.getInfo} {
|
|
|
#local args {%1};
|
|
|
|
|
|
#var gMapRoom {};
|
|
|
- #var gMapRoom[id] {}; #nop 房间ID;
|
|
|
- #var gMapRoom[name] {$args[name]}; #nop 房间名称;
|
|
|
- #var gMapRoom[colorName] {}; #nop 带颜色的房间名称;
|
|
|
- #var gMapRoom[dungeon] {$args[dungeon]}; #nop 房间名称;
|
|
|
- #var gMapRoom[nation] {$args[nation]}; #nop 房间国家,大宋/大理/大元/大夏;
|
|
|
- #var gMapRoom[terrain] {$args[terrain]}; #nop 房间地段,包含村落和城墙;
|
|
|
- #var gMapRoom[save] {$args[save]}; #nop 是否为存盘点;
|
|
|
- #var gMapRoom[store] {$args[store]}; #nop 是否为玩家储物柜;
|
|
|
- #var gMapRoom[group] {$args[group]}; #nop 帮派名称,非帮派驻地留空;
|
|
|
- #var gMapRoom[village] {}; #nop 村落名称(仅村落有效);
|
|
|
- #var gMapRoom[mark] {$args[mark]}; #nop 帮派名称,非帮派驻地留空;
|
|
|
- #var gMapRoom[prev] {$args[prev]}; #nop 上一个房间 ID;
|
|
|
- #var gMapRoom[entry] {$args[entry]}; #nop 房间入口,是用哪个方向指令进入本房间的;
|
|
|
- #var gMapRoom[cmd] {$args[cmd]}; #nop 本条房间信息是用何种命令获得;
|
|
|
- #var gMapRoom[look] {$args[look]}; #nop 如果是 look 命令,那么 look 的是哪个方向;
|
|
|
- #var gMapRoom[gmcp] {$args[gmcp]}; #nop GMCP.Move 信息;
|
|
|
- #var gMapRoom[area] {$args[area]}; #nop 房间所在区域;
|
|
|
- #var gMapRoom[map] {}; #nop 房间小地图;
|
|
|
- #var gMapRoom[maphere] {}; #nop 周围地形图;
|
|
|
- #var gMapRoom[desc] {}; #nop 房间文字描述;
|
|
|
- #var gMapRoom[descEnd] {false}; #nop 房间文字描述已结束(目前以空行标识);
|
|
|
- #var gMapRoom[view] {}; #nop 房间的风景(非文字描述);
|
|
|
- #var gMapRoom[fog] {false}; #nop 是否有雾;
|
|
|
- #var gMapRoom[exits] {}; #nop 出口列表;
|
|
|
- #var gMapRoom[colorExits] {}; #nop 带颜色的出口;
|
|
|
- #var gMapRoom[exitHint] {}; #nop 出口所连接的房间;
|
|
|
- #var gMapRoom[existShown] {false}; #nop 出口信息已出现;
|
|
|
- #var gMapRoom[lookable] {}; #nop 你可以看看(look)的东西;
|
|
|
- #var gMapRoom[objs] {}; #nop 房间物品,不包含生物;
|
|
|
- #var gMapRoom[items] {}; #nop 房间特殊物品;
|
|
|
- #var gMapRoom[colorItems] {}; #nop 带颜色的房间特殊物品;
|
|
|
- #var gMapRoom[dynItems] {}; #nop 房间动态物品;
|
|
|
- #var gMapRoom[npcs] {}; #nop 房间NPC, 不包含非生物和玩家;
|
|
|
- #var gMapRoom[players] {}; #nop 房间玩家,不包含非生物和NPC;
|
|
|
- #var gMapRoom[dock] {}; #nop 是否为渡口;
|
|
|
- #var gMapRoom[funcs] {}; #nop 房间功能,领悟,睡觉,吃喝,买卖,等等;
|
|
|
- #var gMapRoom[node] {$args[node]}; #nop 节点名称,非节点留空;
|
|
|
- #var gMapRoom[nodeLinks] {$args[nodeLinks]}; #nop 通过本节点可以抵达的节点列表,非节点留空;
|
|
|
- #var gMapRoom[coach] {$args[coach]}; #nop 马车行名称,非马车行留空;
|
|
|
- #var gMapRoom[coachLinks] {$args[coachLinks]};#nop 通过本车行可以抵达的车行列表,非节点留空;
|
|
|
- #var gMapRoom[direction] {$args[direction]}; #nop 该房间所在的方位,如果是当前位置则为 here;
|
|
|
+ #var gMapRoom[id] {}; #nop 房间ID;
|
|
|
+ #var gMapRoom[name] {$args[name]}; #nop 房间名称;
|
|
|
+ #var gMapRoom[colorName] {}; #nop 带颜色的房间名称;
|
|
|
+ #var gMapRoom[dungeon] {$args[dungeon]}; #nop 副本名称;
|
|
|
+ #var gMapRoom[nation] {$args[nation]}; #nop 房间国家,大宋/大理/大元/大夏;
|
|
|
+ #var gMapRoom[terrain] {$args[terrain]}; #nop 房间地段,包含村落和城墙;
|
|
|
+ #var gMapRoom[save] {$args[save]}; #nop 是否为存盘点;
|
|
|
+ #var gMapRoom[store] {$args[store]}; #nop 是否为玩家储物柜;
|
|
|
+ #var gMapRoom[group] {$args[group]}; #nop 帮派名称,非帮派驻地留空;
|
|
|
+ #var gMapRoom[village] {}; #nop 村落名称(仅村落有效);
|
|
|
+ #var gMapRoom[mark] {$args[mark]}; #nop 帮派名称,非帮派驻地留空;
|
|
|
+ #var gMapRoom[prev] {$args[prev]}; #nop 上一个房间 ID;
|
|
|
+ #var gMapRoom[entry] {$args[entry]}; #nop 房间入口,是用哪个方向指令进入本房间的;
|
|
|
+ #var gMapRoom[cmd] {$args[cmd]}; #nop 本条房间信息是用何种命令获得;
|
|
|
+ #var gMapRoom[look] {$args[look]}; #nop 如果是 look 命令,那么 look 的是哪个方向;
|
|
|
+ #var gMapRoom[gmcp] {$args[gmcp]}; #nop GMCP.Move 信息;
|
|
|
+ #var gMapRoom[area] {$args[area]}; #nop 房间所在区域;
|
|
|
+ #var gMapRoom[map] {}; #nop 房间小地图;
|
|
|
+ #var gMapRoom[maphere] {}; #nop 周围地形图;
|
|
|
+ #var gMapRoom[desc] {}; #nop 房间文字描述;
|
|
|
+ #var gMapRoom[descEnd] {false}; #nop 房间文字描述已结束(目前以空行标识);
|
|
|
+ #var gMapRoom[view] {}; #nop 房间的风景(非文字描述);
|
|
|
+ #var gMapRoom[fog] {false}; #nop 是否有雾;
|
|
|
+ #var gMapRoom[exits] {}; #nop 出口列表;
|
|
|
+ #var gMapRoom[colorExits] {}; #nop 带颜色的出口;
|
|
|
+ #var gMapRoom[exitHint] {}; #nop 出口所连接的房间;
|
|
|
+ #var gMapRoom[existShown] {false}; #nop 出口信息已出现;
|
|
|
+ #var gMapRoom[lookable] {}; #nop 你可以看看(look)的东西;
|
|
|
+ #var gMapRoom[colorItems] {}; #nop 带颜色的房间特殊物品;
|
|
|
+ #var gMapRoom[dynItems] {}; #nop 你可以获取(get)的东西;
|
|
|
+ #var gMapRoom[objs] {}; #nop 房间物品,不包含生物;
|
|
|
+ #var gMapRoom[npcs] {}; #nop 房间NPC, 不包含非生物和玩家;
|
|
|
+ #var gMapRoom[players] {}; #nop 房间玩家,不包含非生物和NPC;
|
|
|
+ #var gMapRoom[dock] {}; #nop 是否为渡口;
|
|
|
+ #var gMapRoom[funcs] {}; #nop 房间功能,领悟,睡觉,吃喝,买卖,等等;
|
|
|
+ #var gMapRoom[node] {$args[node]}; #nop 节点名称,非节点留空;
|
|
|
+ #var gMapRoom[nodeLinks] {$args[nodeLinks]}; #nop 通过本节点可以抵达的节点列表,非节点留空;
|
|
|
+ #var gMapRoom[coach] {$args[coach]}; #nop 马车行名称,非马车行留空;
|
|
|
+ #var gMapRoom[coachLinks] {$args[coachLinks]}; #nop 通过本车行可以抵达的车行列表,非节点留空;
|
|
|
+ #var gMapRoom[direction] {$args[direction]}; #nop 该房间所在的方位,如果是当前位置则为 here;
|
|
|
+ #var gMapRoom[allDone] {false}; #nop 房间信息已收集完毕;
|
|
|
|
|
|
#local color {@buffer.RawLine{}};
|
|
|
+ #replace color {<{/|}H2>} {};
|
|
|
#replace color {%S - %*$} {&1};
|
|
|
#replace color {\e[2;37;0m} {};
|
|
|
#replace color {%S[%u]} {&1};
|
|
|
#var gMapRoom[colorName] {$color};
|
|
|
|
|
|
- #if { @option.IsEnable{MapDebug} } {
|
|
|
- #local optional {};
|
|
|
- #if { "$gMapRoom[mark]" != "" } {#cat optional { <175>标记<299> $gMapRoom[mark] }};
|
|
|
- #if { @isTrue{$gMapRoom[save]} } {#cat optional { <129><存盘点><299>}};
|
|
|
- #if { @isTrue{$gMapRoom[store]} } {#cat optional { <139><储物柜><299>}};
|
|
|
- #if { "$gMapRoom[group]" != "" } {#cat optional { <175>帮派驻地<299> $gMapRoom[group]}};
|
|
|
-
|
|
|
- #echo {<175>房间名称<299> %s <175>国家<299> %s <175>地段<299> %s%s}
|
|
|
- {$gMapRoom[name]} {$gMapRoom[nation]} {$gMapRoom[terrain]} $optional;
|
|
|
-
|
|
|
- #line gag;
|
|
|
- };
|
|
|
-
|
|
|
#class map.Room.getInfo open;
|
|
|
|
|
|
event.HandleOnce {GA} {map/room} {map} {map.Room.getInfo.done};
|
|
|
|
|
|
#action {{*UTF8}{^\s{4}((.*)(\p{Han}+).*\([A-Z][a-z A-Z']*\).*)}{|ID=map/Room/getInfo/objs}$} {
|
|
|
#local obj {@ParseTitle{%%2}};
|
|
|
- #local name {$obj[name]};
|
|
|
- #local type {房间物品};
|
|
|
+ event.Emit {map/fix/obj};
|
|
|
|
|
|
#if { "$obj[title]" == "船老大" } {
|
|
|
- #list gMapRoom[npcs] add {{$obj}};
|
|
|
- #var gMapRoom[dock] {dock};
|
|
|
- #local type {房间 NPC};
|
|
|
- };
|
|
|
- #else {
|
|
|
- #list gMapRoom[objs] add {{$obj}};
|
|
|
+ #if { "$gMapRoom[river]" == "长江" } {
|
|
|
+ #var gMapRoom[dock] {GuoJiang};
|
|
|
+ };
|
|
|
+ #elseif { "$gMapRoom[river]" == "黄河" } {
|
|
|
+ #var gMapRoom[dock] {GuoHe};
|
|
|
+ };
|
|
|
+ #else {
|
|
|
+ #var gMapRoom[dock] {YellBoat};
|
|
|
+ };
|
|
|
+ #if { "$obj[type]" != "NPC" } {
|
|
|
+ #local obj[type] {NPC};
|
|
|
+ #list gMapRoom[npcs] add {{$obj}};
|
|
|
+ };
|
|
|
};
|
|
|
|
|
|
+ #list gMapRoom[objs] add {{$obj}};
|
|
|
+
|
|
|
#if { @option.IsEnable{MapDebug} } {
|
|
|
+ #local type {$obj[type]};
|
|
|
+ #switch {"$type"} {
|
|
|
+ #case {"NPC"} {#local type {<134>房间 NPC}};
|
|
|
+ #case {"物品"} {#local type {<164>房间物品}};
|
|
|
+ #case {"玩家"} {#local type {<174>房间玩家}};
|
|
|
+ };
|
|
|
#if { @isFalse{$gMapRoom[existShown]} } {
|
|
|
#var gMapRoom[existShown] {true};
|
|
|
#echo {%s} {<134>房间出口<299> @slist.JoinAs{{@slist.FromList{$gMapRoom[gmcp][出口信息]}};{<179>%s<299>};{ }}};
|
|
|
};
|
|
|
|
|
|
+ #local name {$obj[name]};
|
|
|
+ #if { "$obj[colorName]" != "" } {
|
|
|
+ #local name {$obj[colorName]};
|
|
|
+ };
|
|
|
+
|
|
|
#if { "$obj[emoji]" != "" } {
|
|
|
- #local name {$name<299>{<139>$obj[emoji]<299>}};
|
|
|
+ #local name {$name<299>{<139>$obj[emoji] <299>}};
|
|
|
};
|
|
|
|
|
|
#echo {<164>$type<299> %-18s<299> <169>%-16s<299> %s [%s] %s}
|
|
|
{$name} {$obj[id]} {{$obj[title]}} {$obj[nick]}
|
|
|
{@slist.Join{{$obj[status1];$obj[status2]}}};
|
|
|
|
|
|
+ #if { "$obj[desc]" != "" } {
|
|
|
+ #echo {<164> <070> %s} {$obj[desc]};
|
|
|
+ };
|
|
|
+
|
|
|
#line gag;
|
|
|
};
|
|
|
} {9.9};
|
|
|
|
|
|
#action {^%+4s你可以看看(look):%*。$} {
|
|
|
- #local items {@str.Split{{%%2};{{,|,}}}};
|
|
|
- #var gMapRoom[items] {$items};
|
|
|
+ #local lookable {@str.Split{{%%2};{{,|,}}}};
|
|
|
+ #var gMapRoom[lookable] {$lookable};
|
|
|
|
|
|
#local raw {@buffer.RawLine{}};
|
|
|
#replace raw {<{\e\[([0-9\e\[m;]+)m([^>]+)\e\[2;37;0m}>} {@map.Room.colorItems{colorItems;{{color}{&2}{name}{&3}}}};
|
|
|
|
|
|
+ #local item {};
|
|
|
+ #foreach {$lookable} {item} {
|
|
|
+ #list gMapRoom[objs] add {{
|
|
|
+ {id} {$item}
|
|
|
+ {type} {lookable}
|
|
|
+ }};
|
|
|
+ };
|
|
|
+
|
|
|
#class map.Room.getInfo.map kill;
|
|
|
#class map.Room.getInfo.desc kill;
|
|
|
|
|
|
#if { @option.IsEnable{MapDebug} } {
|
|
|
- #echo {%s} {<171>特殊物品<299> {$items}};
|
|
|
+ #echo {%s} {<171>特殊物品<299> {$lookable}};
|
|
|
#line gag;
|
|
|
};
|
|
|
};
|
|
|
@@ -197,6 +253,14 @@ event.HandleOnce {map/init} {map/room} {map} {map.Room.Watch};
|
|
|
#local items {@str.Split{{%%2};{{,|,}}}};
|
|
|
#var gMapRoom[dynItems] {$items};
|
|
|
|
|
|
+ #local item {};
|
|
|
+ #foreach {$items} {item} {
|
|
|
+ #list gMapRoom[objs] add {{
|
|
|
+ {id} {$item}
|
|
|
+ {type} {dynItems}
|
|
|
+ }};
|
|
|
+ };
|
|
|
+
|
|
|
#class map.Room.getInfo.map kill;
|
|
|
#class map.Room.getInfo.desc kill;
|
|
|
|
|
|
@@ -250,6 +314,7 @@ event.HandleOnce {map/init} {map/room} {map} {map.Room.Watch};
|
|
|
|
|
|
#action {^%+4s这里是%*的一段城墙。$} {
|
|
|
#var gMapRoom[terrain] {城墙};
|
|
|
+ #var gMapRoom[desc] {@str.Trim{%%0}};
|
|
|
#if { @option.IsEnable{MapDebug} } {
|
|
|
#echo {%s} {<175>城 墙<299> %%2};
|
|
|
#line gag;
|
|
|
@@ -273,15 +338,15 @@ event.HandleOnce {map/init} {map/room} {map} {map.Room.Watch};
|
|
|
};
|
|
|
|
|
|
#action {^%+4s{长江渡船|黄河渡船|渡船|羊皮筏}停在岸边,随时可以出发。$} {
|
|
|
- map.room.mark-river %2;
|
|
|
+ map.room.mark-river %%2;
|
|
|
};
|
|
|
|
|
|
#action {^%+4s{长江渡船|黄河渡船|渡船|羊皮筏}正在驶回,马上就要靠岸了。$} {
|
|
|
- map.room.mark-river %2;
|
|
|
+ map.room.mark-river %%2;
|
|
|
};
|
|
|
|
|
|
#action {^%+4s{长江渡船|黄河渡船|渡船|羊皮筏}刚刚离开驶向对岸,需要一些时间才能回来。$} {
|
|
|
- map.room.mark-river %2;
|
|
|
+ map.room.mark-river %%2;
|
|
|
};
|
|
|
|
|
|
#alias {map.room.mark-river} {
|
|
|
@@ -289,9 +354,11 @@ event.HandleOnce {map/init} {map/room} {map} {map.Room.Watch};
|
|
|
#switch {"$boat"} {
|
|
|
#case {"长江渡船"} {#var gMapRoom[river] {长江}};
|
|
|
#case {"{黄河渡船|渡船|羊皮筏}"} {#var gMapRoom[river] {黄河}};
|
|
|
+ #default {errLog 发现不明渡船「$boat」,请联系开发者。};
|
|
|
};
|
|
|
+ #var gMapRoom[dock] {YellBoat};
|
|
|
#if { @option.IsEnable{MapDebug} } {
|
|
|
- #echo {%s} {<175>大河渡口<299> $gMapRoom[river]};
|
|
|
+ #echo {%s} {<175>大河渡口<299> 此处有「<130>$boat<299>」可供渡过「<120>$gMapRoom[river]<299>」。};
|
|
|
#line gag;
|
|
|
};
|
|
|
};
|
|
|
@@ -366,7 +433,7 @@ event.HandleOnce {map/init} {map/room} {map} {map.Room.Watch};
|
|
|
|
|
|
#action {{*UTF8}{^ (\p{Han}+)等(.*)人\(users\)也在此处。$}} {
|
|
|
#if { @option.IsEnable{MapDebug} } {
|
|
|
- #echo {<164>房间玩家<299> 仍有%s等 %d 人。} {%%2} {@math.ParseCN{%%3}};
|
|
|
+ #echo {<174>房间玩家<299> 仍有%s等 %d 人。} {%%2} {@math.ParseCN{%%3}};
|
|
|
#line gag;
|
|
|
};
|
|
|
};
|
|
|
@@ -404,13 +471,32 @@ event.HandleOnce {map/init} {map/room} {map} {map.Room.Watch};
|
|
|
#class map.Room.getInfo.desc kill;
|
|
|
#unvar gMapRoom[descEnd];
|
|
|
#unvar gMapRoom[existShown];
|
|
|
+ #unvar gMapRoom[drawMap];
|
|
|
+ #var gMapRoom[allDone] {true};
|
|
|
+
|
|
|
+ #if { @slist.Contains{{$gMapRoom[lookable]};{<ferry>}} } {
|
|
|
+ #var gMapRoom[dock] {Ride};
|
|
|
+ };
|
|
|
|
|
|
- #if { @slist.Contains{{$gMapRoom[items]};{<ferry>}} } {
|
|
|
- #var gMapRoom[dock] {ride};
|
|
|
+ #if { @slist.Contains{{$gMapRoom[lookable]};{shalou}} } {
|
|
|
+ #var gMapRoom[dock] {Shalou};
|
|
|
+ };
|
|
|
+
|
|
|
+ #nop 如果有渡船,则一定可以过河,但如果没有船老大,则只能自己喊。;
|
|
|
+ #nop 如果有船老大,那么 gMapRoom[dock] 此时应该已经有值了。;
|
|
|
+ #if { "$gMapRoom[river]" == "{长江|黄河}" && "$gMapRoom[dock]" == "" } {
|
|
|
+ #var gMapRoom[dock] {YellBoat};
|
|
|
};
|
|
|
|
|
|
#nop 同步事件以允许插件修改房间信息。;
|
|
|
+ event.Emit {map/fix/room};
|
|
|
+
|
|
|
+ #nop 同步事件以确保连续行走时及时处理回调。;
|
|
|
event.Emit {map/GotRoomInfo};
|
|
|
+
|
|
|
+ #if { @option.IsEnable{DrawRoomMap} } {
|
|
|
+ map.Room.DrawMap {$gMapRoom};
|
|
|
+ };
|
|
|
};
|
|
|
|
|
|
#func {map.Room.colorItems} {
|
|
|
@@ -428,7 +514,10 @@ event.HandleOnce {map/init} {map/room} {map} {map.Room.Watch};
|
|
|
#local line {%%1};
|
|
|
#replace line {%+1..u%+1..s$} {&1};
|
|
|
#cat gMapRoom[map] {|$line|};
|
|
|
- #if { @option.IsEnable{MapDebug} } {
|
|
|
+ #if { @option.IsEnable{DrawRoomMap} } {
|
|
|
+ #line gag;
|
|
|
+ };
|
|
|
+ #elseif { @option.IsEnable{MapDebug} } {
|
|
|
#echo {%s} {<174>地图信息<299> %%1};
|
|
|
#line gag;
|
|
|
};
|
|
|
@@ -470,12 +559,15 @@ event.HandleOnce {map/init} {map/room} {map} {map.Room.Watch};
|
|
|
|
|
|
#local origLen {@str.Len{%%0}};
|
|
|
#local nonHans {@str.Len{$text}};
|
|
|
- #if { $origLen > 5 && $nonHans * 2 > $origLen } {
|
|
|
+ #if { $origLen > 5 && $nonHans * 3 / 2 > $origLen } {
|
|
|
#var gMapRoom[descEnd] {true};
|
|
|
#cat gMapRoom[view] {%%0};
|
|
|
map.Room.ShowView {%%0};
|
|
|
};
|
|
|
#else {
|
|
|
+ #if { @option.IsEnable{DrawRoomMap} && "$gMapRoom[desc]" == "" } {
|
|
|
+ map.Room.DrawMap {@map.Here{ROOM}};
|
|
|
+ };
|
|
|
#cat gMapRoom[desc] {@str.Trim{%%0}};
|
|
|
#if { @option.IsEnable{MapDebug} } {
|
|
|
#echo {%s} {<172>房间描述<299> %%0};
|
|
|
@@ -486,40 +578,3 @@ event.HandleOnce {map/init} {map/room} {map} {map.Room.Watch};
|
|
|
|
|
|
#class map.Room.getInfo.desc close;
|
|
|
};
|
|
|
-
|
|
|
-#alias {map.Room.ShowView} {
|
|
|
- #if { @option.IsDisable{ShowRoomView} } {
|
|
|
- #line gag;
|
|
|
- };
|
|
|
- #elseif { @option.IsEnable{MapDebug} } {
|
|
|
- #echo {%s} {<174>房间风景<299> @Beautify{{%1}}};
|
|
|
- #line gag;
|
|
|
- };
|
|
|
-};
|
|
|
-
|
|
|
-#func {map.Room.GetObjByName} {
|
|
|
- #local name {%1};
|
|
|
- #local title {@default{%2;%*}};
|
|
|
-
|
|
|
- #local idx {};
|
|
|
- #foreach {*gMapRoom[objs][]} {idx} {
|
|
|
- #if { "$gMapRoom[objs][$idx][title]" == "$title" && "$gMapRoom[objs][$idx][name]" == "$name" } {
|
|
|
- #return {$gMapRoom[objs][$idx]};
|
|
|
- };
|
|
|
- };
|
|
|
-
|
|
|
- #return {};
|
|
|
-};
|
|
|
-
|
|
|
-#func {map.Room.GetObjByID} {
|
|
|
- #local id {%1};
|
|
|
-
|
|
|
- #local idx {};
|
|
|
- #foreach {*gMapRoom[objs][]} {idx} {
|
|
|
- #if { "$gMapRoom[objs][$idx][id]" == "$id" } {
|
|
|
- #return {$gMapRoom[objs][$idx]};
|
|
|
- };
|
|
|
- };
|
|
|
-
|
|
|
- #return {};
|
|
|
-};
|