Skip to content

Commit

Permalink
Probable fix for #1672
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Oct 9, 2017
1 parent ea51242 commit de40a56
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Expand Up @@ -77,6 +77,7 @@ public boolean matches(ScriptContainer scriptContainer, String s) {
"\0";
if (!inv.equals("") && !inv.equals("inventory")
&& !inv.equals(CoreUtilities.toLowerCase(dInv.getInventoryType().name()))
&& !inv.equals(CoreUtilities.toLowerCase(dInv.bestName()))
&& !inv.equals(nname)) {
return false;
}
Expand Down
Expand Up @@ -1236,14 +1236,25 @@ public String identify() {
}


public String bestName() {
if (isUnique()) {
return NotableManager.getSavedId(this);
}
else {
return (getIdType().equals("script") || getIdType().equals("notable")
? idHolder : (idType));
}
}


@Override
public String identifySimple() {
if (isUnique()) {
return "in@" + NotableManager.getSavedId(this);
}
else {
return "in@" + (getIdType().equals("script") || getIdType().equals("notable")
? idHolder : (idType + "[" + idHolder + ']'));
? idHolder : (idType + "[" + idHolder + "]"));
}
}

Expand Down

0 comments on commit de40a56

Please sign in to comment.