Skip to content

Commit

Permalink
special adjustables: use safe adjust logic still
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Mar 5, 2023
1 parent 826b460 commit 7f1f855
Showing 1 changed file with 6 additions and 1 deletion.
Expand Up @@ -12,7 +12,6 @@
import com.denizenscript.denizencore.utilities.CoreUtilities;
import com.denizenscript.denizencore.utilities.debugging.Debug;
import com.denizenscript.denizencore.scripts.ScriptEntry;
import com.denizenscript.denizencore.tags.core.UtilTagBase;
import com.denizenscript.denizencore.utilities.text.StringHolder;

import java.util.HashMap;
Expand Down Expand Up @@ -132,7 +131,13 @@ public ObjectTag adjust(ObjectTag object, Mechanism mechanism, ScriptEntry entry
String lowerObjectString = CoreUtilities.toLowerCase(objectString);
Consumer<Mechanism> specialAdjustable = specialAdjustables.get(lowerObjectString);
if (specialAdjustable != null) {
mechanism.adjusting = null;
mechanism.isProperty = false;
if (mechanism.shouldDebug()) {
Debug.echoDebug(mechanism.context, "Adjust mechanism '" + mechanism.getName() + "' on special adjustable '" + lowerObjectString + "'...");
}
specialAdjustable.accept(mechanism);
mechanism.autoReport();
return object;
}
if (lowerObjectString.startsWith("def:")) {
Expand Down

0 comments on commit 7f1f855

Please sign in to comment.