Skip to content

Commit

Permalink
remove some old weird tags
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Jul 1, 2019
1 parent aed1ce4 commit 1e027d9
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 140 deletions.
34 changes: 0 additions & 34 deletions src/main/java/net/aufdemrand/denizencore/objects/Duration.java
Original file line number Diff line number Diff line change
Expand Up @@ -578,40 +578,6 @@ else if (attribute.startsWith("second")) {
}
});

/////////////////////
// DEBUG ATTRIBUTES
/////////////////

// <--[tag]
// @attribute <d@duration.prefix>
// @returns Element
// @description
// Returns the prefix for this object. By default this will return 'Duration', however certain situations will
// return a finer scope. All objects fetchable by the Object Fetcher will return a valid prefix for the object
// that is fulfilling this attribute.
// -->
registerTag("prefix", new TagRunnable() {
@Override
public String run(Attribute attribute, dObject object) {
return new Element(((Duration) object).prefix).getAttribute(attribute.fulfill(1));
}
});

// <--[tag]
// @attribute <d@duration.debug>
// @returns Element
// @description
// Returns the debug entry for this object. This contains the prefix, the name of the dList object, and the
// data that is held within. All objects fetchable by the Object Fetcher will return a valid
// debug entry for the object that is fulfilling this attribute.
// -->
registerTag("debug", new TagRunnable() {
@Override
public String run(Attribute attribute, dObject object) {
return new Element(object.debug()).getAttribute(attribute.fulfill(1));
}
});

// <--[tag]
// @attribute <d@duration.type>
// @returns Element
Expand Down
34 changes: 0 additions & 34 deletions src/main/java/net/aufdemrand/denizencore/objects/Element.java
Original file line number Diff line number Diff line change
Expand Up @@ -698,40 +698,6 @@ public dObject run(Attribute attribute, dObject object) {
}
});

/////////////////////
// DEBUG ATTRIBUTES
/////////////////

// <--[tag]
// @attribute <el@element.debug>
// @returns Element
// @group debug
// @description
// Returns a standard debug representation of the Element.
// -->
registerTag("debug", new TagRunnable.ObjectForm() {
@Override
public dObject run(Attribute attribute, dObject object) {
return new Element(object.debug())
.getObjectAttribute(attribute.fulfill(1));
}
});

// <--[tag]
// @attribute <el@element.prefix>
// @returns Element
// @group debug
// @description
// Returns the prefix of the element.
// -->
registerTag("prefix", new TagRunnable.ObjectForm() {
@Override
public dObject run(Attribute attribute, dObject object) {
return new Element(object.getPrefix())
.getObjectAttribute(attribute.fulfill(1));
}
});

/////////////////////
// ELEMENT CHECKING ATTRIBUTES
/////////////////
Expand Down
36 changes: 0 additions & 36 deletions src/main/java/net/aufdemrand/denizencore/objects/dList.java
Original file line number Diff line number Diff line change
Expand Up @@ -1932,42 +1932,6 @@ public dObject run(Attribute attribute, dObject object) {
});


/////////////////
// dObject attributes
///////////////

// <--[tag]
// @attribute <li@list.prefix>
// @returns Element
// @description
// Returns the prefix for this object. By default this will return 'List', however certain situations will
// return a finer scope. All objects fetchable by the Object Fetcher will return a valid prefix for the object
// that is fulfilling this attribute.
// -->

registerTag("prefix", new TagRunnable.ObjectForm() {
@Override
public dObject run(Attribute attribute, dObject object) {
return new Element(((dList) object).prefix).getObjectAttribute(attribute.fulfill(1));
}
});

// <--[tag]
// @attribute <li@list.debug>
// @returns Element
// @description
// Returns the debug entry for this object. This contains the prefix, the name of the dList object, and the
// data that is held within. All objects fetchable by the Object Fetcher will return a valid
// debug entry for the object that is fulfilling this attribute.
// -->

registerTag("debug", new TagRunnable.ObjectForm() {
@Override
public dObject run(Attribute attribute, dObject object) {
return new Element(object.debug()).getObjectAttribute(attribute.fulfill(1));
}
});

// <--[tag]
// @attribute <li@list.type>
// @returns Element
Expand Down
36 changes: 0 additions & 36 deletions src/main/java/net/aufdemrand/denizencore/objects/dScript.java
Original file line number Diff line number Diff line change
Expand Up @@ -520,42 +520,6 @@ public String run(Attribute attribute, dObject object) {
}
});

/////////////////
// dObject attributes
///////////////

// <--[tag]
// @attribute <s@script.debug>
// @returns Element
// @description
// Returns the debug entry for this object. This contains the prefix, the name of the dScript object, and the
// type of ScriptContainer is held within. All objects fetchable by the Object Fetcher will return a valid
// debug entry for the object that is fulfilling this attribute.
// -->

registerTag("debug", new TagRunnable() {
@Override
public String run(Attribute attribute, dObject object) {
return new Element(object.debug()).getAttribute(attribute.fulfill(1));
}
});

// <--[tag]
// @attribute <s@script.prefix>
// @returns Element
// @description
// Returns the prefix for this object. By default this will return 'Script', however certain situations will
// return a finer scope. All objects fetchable by the Object Fetcher will return a valid prefix for the object
// that is fulfilling this attribute.
// -->

registerTag("prefix", new TagRunnable() {
@Override
public String run(Attribute attribute, dObject object) {
return new Element(((dScript) object).prefix).getAttribute(attribute.fulfill(1));
}
});

// <--[tag]
// @attribute <s@script.type>
// @returns Element
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ public static String unEscape(String input) {
}

public void escapeTags(ReplaceableTagEvent event) {
// TODO: Deprecate (in favor of element.escaped)
if (event.matches("escape")) {
if (!event.hasValue()) {
dB.echoError("Escape tag '" + event.raw_tag + "' does not have a value!");
Expand All @@ -118,6 +119,7 @@ public void escapeTags(ReplaceableTagEvent event) {
}

public void unEscapeTags(ReplaceableTagEvent event) {
// TODO: Deprecate (in favor of element.unescaped)
if (event.matches("unescape")) {
if (!event.hasValue()) {
dB.echoError("Unescape tag '" + event.raw_tag + "' does not have a value!");
Expand Down

0 comments on commit 1e027d9

Please sign in to comment.