I suspect my cases are a bit simpler than what you are going for, but for my cases, I use a combination of variable-controlled logicalRank and the message suppression method I stole from you or JZ:
// Suppress disambiguation message,
// via per-obj suppressAnnounceAmbig property
//
modify libMessages
announceAmbigActionObject(obj, whichObj, action) {
if (obj.suppressAnnounceAmbig) return '';
else return inherited(obj,whichObj,action);
}
announceDefaultObject(obj, whichObj, action, resolvedAllObjects) {
if (obj.suppressAnnounceAmbig) return '';
else return inherited(obj,whichObj,action,resolvedAllObjects);
}
;
// Then in thing defs
//
sharedVocabObj : Thing 'sharedadj sharednoun' 'common thing'
suppressAnnounceAmbig = true
dobjFor(SomeVerb) {
verify() { logicalRank(thisRank, 'maybeThisOne'); }
}
;
// and of course
modify Thing
suppressAnnounceAmbig = nil
thisRank = 100 // programmatically alter based on context
;
Every now and then I get into some weird logicalRank debug, but so far this works for the cases I need it to. This probably just moves your complicated code to thisRank.
UPDATE: It was JZ.