Skip to content

Commit

Permalink
Mechs should use pickObjectFor
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Jan 29, 2024
1 parent 8942c3e commit 4f27f73
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -411,7 +411,7 @@ public static void applyPropertySet(Adjustable object, TagContext context, List<
continue;
}
String description = unescapeProperty(data.get(1));
object.safeApplyProperty(new Mechanism(data.get(0), new ElementTag(description), context));
object.safeApplyProperty(new Mechanism(data.get(0), pickObjectFor(description, context), context));
}
}

Expand Down
Expand Up @@ -481,7 +481,7 @@ public static <T extends Adjustable> void registerPropertyTagHandlers(Class<T> t
Debug.echoError("Invalid property string '" + properties.get(i) + "'!");
}
else {
instance.safeApplyProperty(new Mechanism(data.get(0), new ElementTag(data.get(1)), attribute.context));
instance.safeApplyProperty(new Mechanism(data.get(0), ObjectFetcher.pickObjectFor(data.get(1), attribute.context), attribute.context));
}
}
return instance;
Expand All @@ -505,7 +505,7 @@ public static <T extends Adjustable> void registerPropertyTagHandlers(Class<T> t
Debug.echoError("Invalid property string '" + attribute.getParam() + "'!");
}
else {
instance.safeApplyProperty(new Mechanism(data.get(0), new ElementTag(data.get(1)), attribute.context));
instance.safeApplyProperty(new Mechanism(data.get(0), ObjectFetcher.pickObjectFor(data.get(1), attribute.context), attribute.context));
}
return instance;
});
Expand Down

0 comments on commit 4f27f73

Please sign in to comment.