PREMISE: this is a repost, my previous comment had a mistake so I took it down as soon as I noticed it. This one has been corrected.
Hey mate, while I was trying to fix a vanilla bug I discovered there is no way to implement the fix while also maintaining compatbility with tooltip mods such as yours. So I though of letting you know of the bug (and the fix) in case you want to include it in your mod. Here it is:
I think Fireaxis messed up the script execution order in a specific case: currently, the plot-tooltip script likely runs after the interface-mode-acquire-tile script, which is clearly not intended because interface-mode-acquire-tile includes its own cursor-icon-chaning logic (for valid or invalid hovered plots, like with the interface-mode-place-building, which works because it likely runs after plot-tooltip). This is causing the intended behavior from interface-mode-acquire-tile to be completely overridden by the cursor changes from the plot-tooltip script. I don't think we, as modders, can mess with script execution order, but I though of adding some code to check whether the aforementioned interface-mode is on, and in that case skip the cursor changes in the tooltip-plot.
The reason this can't be done without breaking compatbility with your mod (or any other tooltip mod), is that the cursor-changing-logic from plot-tooltip is not a distinct and well encapsulated function, and it is instead inside the generic update function, so I can't even monkey-patch this either. Of course such a tiny fix is not worth renouncing an awesome tooltip mod (like yours!) but...
if by any chance you want to include this fix in your mod, I'm glad to share code that fixes it according to my tests:
The original update function has the following piece of code:
JavaScript:
if (showHostileCursor) {
UI.setCursorByURL("fs://game/core/ui/cursors/enemy.ani");
}
else {
UI.setCursorByType(UIHTMLCursorTypes.Default);
}
By simply wrapping it inside an additional check you can fix Fireaxis mistake:
JavaScript:
if (InterfaceMode.getCurrent() && InterfaceMode.getCurrent() === 'INTERFACEMODE_ACQUIRE_TILE') {
// When in Acquire Tile mode, let that mode control the cursor..
}
else {
if (showHostileCursor) {
UI.setCursorByURL("fs://game/core/ui/cursors/enemy.ani");
}
else {
UI.setCursorByType(UIHTMLCursorTypes.Default);
}
}
This also requires adding the following import of course:
JavaScript:
import { InterfaceMode } from '/core/ui/interface-modes/interface-modes.js';
Feel free to do whatever you want with this information and this code!