Skip to content

Commit

Permalink
SQUASH: feat(pkuxkx): 优化 HP 摘要,响应式布局适配窄屏并减少不必要的刷屏
Browse files Browse the repository at this point in the history
  • Loading branch information
dzpao committed Nov 20, 2023
1 parent f5ad634 commit 1f4653e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions mud/pkuxkx/etc/ui-settings.tin
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,5 @@
{{key}{\coM} {action}{option.Toggle MapDebug; look}}
{{key}{\coV} {action}{option.Toggle ShowRoomView; look}}
};

VAR {HP摘要刷新时机,三选一:{总是|从不|自动}} char.HPSummarize.Echo {自动};
10 changes: 9 additions & 1 deletion mud/pkuxkx/plugins/basic/char/gmcp.tin
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ event.Define {char/nofight} {无参} {$MODULE} {角色脱离战斗};

#local name {$gmcp-name-map[HP次要][$key]};
#if { "$name" != "" } {
#local hasHP2 {1};
#var char[HP][$name] {$value};
#if { "$name" == "{经验|潜能}" } {
speedo.Set {$name} {$value} {true} {600};
Expand Down Expand Up @@ -178,7 +179,14 @@ event.Define {char/nofight} {无参} {$MODULE} {角色脱离战斗};
#math char[HP][$key] { $char[HP][$effName] * 100 / $char[HP][$maxName] };
};
};
#if { $hasHP1 } {char.HPSummarize};

#if { "$char.HPSummarize.Echo" == "自动" && $hasHP1 } {
char.HPSummarize;
};
#elseif { "$char.HPSummarize.Echo" == "总是" } {
char.HPSummarize;
};

event.Emit char/hpbrief;
};

Expand Down

0 comments on commit 1f4653e

Please sign in to comment.