浏览代码

Remove Focus if Focus is no longer visible

Reddo 5 年之前
父节点
当前提交
54ad802a8e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/Elements/Modules/HyperlinkHandler.ts

+ 1 - 1
app/Elements/Modules/HyperlinkHandler.ts

@@ -46,7 +46,7 @@ module Elements.HyperlinkHandler {
 
     export async function hyperlinkObject (thing? : any) {
         resetAvailableActions();
-        if (thing instanceof Thing && thing != WorldState.player) {
+        if (thing instanceof Thing && thing != WorldState.player && thing.isVisibleTo(WorldState.player)) {
             await HyperlinkingRulebook.execute({noun: thing});
 
             currentActionTarget.nodeValue = thing.getPrintedName() + ": ";