Skip to content

Commit

Permalink
Fix annoying dInventory debug bug
Browse files Browse the repository at this point in the history
No, we're not trying to adjust the property, silly.
  • Loading branch information
Morphan1 committed Oct 12, 2014
1 parent 9efede7 commit 0a9cf42
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
9 changes: 6 additions & 3 deletions src/main/java/net/aufdemrand/denizen/objects/dInventory.java
Expand Up @@ -1462,9 +1462,12 @@ public String getAttribute(Attribute attribute) {
private ArrayList<Mechanism> mechanisms = new ArrayList<Mechanism>();

public void applyProperty(Mechanism mechanism) {
if (idType == null) mechanisms.add(mechanism);
else if (idType.equals("generic") || mechanism.matches("holder")) adjust(mechanism);
else dB.echoError("Cannot apply properties to non-generic inventory!");
if (idType == null)
mechanisms.add(mechanism);
else if (idType.equals("generic") || mechanism.matches("holder"))
adjust(mechanism);
else if (!(idType.equals("location") && mechanism.matches("title")))
dB.echoError("Cannot apply properties to non-generic inventory!");
}

@Override
Expand Down
Expand Up @@ -50,7 +50,13 @@ else if (!title.startsWith("container."))

@Override
public String getPropertyString() {
return getTitle();
// Only show a property string for titles that can actually change
if (inventory.isUnique()
|| inventory.getIdType().equals("generic")
|| inventory.getIdType().equals("location"))
return getTitle();
else
return null;
}

@Override
Expand Down

0 comments on commit 0a9cf42

Please sign in to comment.