Skip to content

Commit

Permalink
rename getdObject to getObjectTag
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Jul 18, 2019
1 parent e4b577e commit 8a622a9
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ public Object getObject(String key) {
}
}

public <T extends ObjectTag> T getdObject(String key) {
public <T extends ObjectTag> T getObjectTag(String key) {
try {
// If an ENUM, return as an Element
Object gotten = objects.get(key);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public void execute(ScriptEntry scriptEntry) {
ElementTag mechanism = scriptEntry.getElement("mechanism");
ElementTag value = scriptEntry.getElement("mechanism_value");

ListTag objects = scriptEntry.getdObject("object");
ListTag objects = scriptEntry.getObjectTag("object");

if (scriptEntry.dbCallShouldDebug()) {
Debug.report(scriptEntry, getName(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ public void execute(final ScriptEntry scriptEntry) {

final ElementTag url = scriptEntry.getElement("url");
final ElementTag postData = scriptEntry.getElement("post");
final DurationTag timeout = scriptEntry.getdObject("timeout");
final ListTag headers = scriptEntry.getdObject("headers");
final DurationTag timeout = scriptEntry.getObjectTag("timeout");
final ListTag headers = scriptEntry.getObjectTag("headers");
final ElementTag saveFile = scriptEntry.getElement("savefile");

if (scriptEntry.dbCallShouldDebug()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ public void execute(final ScriptEntry scriptEntry) {
ElementTag filename = scriptEntry.getElement("filename");
ElementTag rawText = scriptEntry.getElement("raw_text");
ElementTag key = scriptEntry.getElement("key");
ObjectTag value = scriptEntry.getdObject("value");
ObjectTag value = scriptEntry.getObjectTag("value");
ElementTag split = scriptEntry.getElement("split");
YAML_Action yaml_action = (YAML_Action) scriptEntry.getObject("yaml_action");
ElementTag actionElement = scriptEntry.getElement("action");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ else if (!scriptEntry.hasObject("value")) {
public void execute(ScriptEntry scriptEntry) {

ElementTag definition = scriptEntry.getElement("definition");
ObjectTag value = scriptEntry.getdObject("value");
ObjectTag value = scriptEntry.getObjectTag("value");
ElementTag remove = scriptEntry.getElement("remove");
Object actionObj = scriptEntry.getObject("action");
DataAction action = actionObj == null ? null : (DataAction) actionObj;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ else if (!scriptEntry.hasObject("outcome")) {
@Override
public void execute(ScriptEntry scriptEntry) {

ObjectTag outcomeObj = scriptEntry.getdObject("outcome");
ObjectTag outcomeObj = scriptEntry.getObjectTag("outcome");
ElementTag passively = scriptEntry.getElement("passively");

// Report!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,15 @@ public void execute(ScriptEntry scriptEntry) {
if (scriptEntry.dbCallShouldDebug()) {

Debug.report(scriptEntry, getName(),
(scriptEntry.hasObject("script") ? scriptEntry.getdObject("script").debug() : scriptEntry.getScript().debug())
+ (scriptEntry.hasObject("instant") ? scriptEntry.getdObject("instant").debug() : "")
(scriptEntry.hasObject("script") ? scriptEntry.getObjectTag("script").debug() : scriptEntry.getScript().debug())
+ (scriptEntry.hasObject("instant") ? scriptEntry.getObjectTag("instant").debug() : "")
+ (scriptEntry.hasObject("path") ? scriptEntry.getElement("path").debug() : "")
+ (scriptEntry.hasObject("local") ? scriptEntry.getElement("local").debug() : ""));

}

// Get the script
ScriptTag script = scriptEntry.getdObject("script");
ScriptTag script = scriptEntry.getObjectTag("script");

// Get the entries
List<ScriptEntry> entries;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,18 +136,18 @@ public void execute(ScriptEntry scriptEntry) {

if (scriptEntry.dbCallShouldDebug()) {
Debug.report(scriptEntry, getName(),
(scriptEntry.hasObject("script") ? scriptEntry.getdObject("script").debug() : scriptEntry.getScript().debug())
+ (scriptEntry.hasObject("instant") ? scriptEntry.getdObject("instant").debug() : "")
(scriptEntry.hasObject("script") ? scriptEntry.getObjectTag("script").debug() : scriptEntry.getScript().debug())
+ (scriptEntry.hasObject("instant") ? scriptEntry.getObjectTag("instant").debug() : "")
+ (scriptEntry.hasObject("path") ? scriptEntry.getElement("path").debug() : "")
+ (scriptEntry.hasObject("local") ? scriptEntry.getElement("local").debug() : "")
+ (scriptEntry.hasObject("delay") ? scriptEntry.getdObject("delay").debug() : "")
+ (scriptEntry.hasObject("id") ? scriptEntry.getdObject("id").debug() : "")
+ (scriptEntry.hasObject("definitions") ? scriptEntry.getdObject("definitions").debug() : "")
+ (scriptEntry.hasObject("speed") ? scriptEntry.getdObject("speed").debug() : ""));
+ (scriptEntry.hasObject("delay") ? scriptEntry.getObjectTag("delay").debug() : "")
+ (scriptEntry.hasObject("id") ? scriptEntry.getObjectTag("id").debug() : "")
+ (scriptEntry.hasObject("definitions") ? scriptEntry.getObjectTag("definitions").debug() : "")
+ (scriptEntry.hasObject("speed") ? scriptEntry.getObjectTag("speed").debug() : ""));
}

// Get the script
ScriptTag script = scriptEntry.getdObject("script");
ScriptTag script = scriptEntry.getObjectTag("script");

// Get the entries
List<ScriptEntry> entries;
Expand Down Expand Up @@ -186,7 +186,7 @@ else if (scriptEntry.hasObject("path") && scriptEntry.getObject("path") != null)
else {

if (scriptEntry.hasObject("speed")) {
DurationTag speed = scriptEntry.getdObject("speed");
DurationTag speed = scriptEntry.getObjectTag("speed");
queue = ((TimedQueue) new TimedQueue(id).addEntries(entries)).setSpeed(speed.getTicks());
}
else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void savedEntryTags(ReplaceableTagEvent event) {
}
else {
String attrib = CoreUtilities.toLowerCase(attribute.getAttributeWithoutContext(2));
ObjectTag got = held.getdObject(attrib);
ObjectTag got = held.getObjectTag(attrib);
if (got == null) {
if (!event.hasAlternative()) {
Debug.echoDebug(event.getScriptEntry(), "Missing saved entry object '" + attrib + "'");
Expand Down

0 comments on commit 8a622a9

Please sign in to comment.