EDIT: SOLUTION
Checked out the mod "Soul Filcher's Building Time", you can loop through context options and get the option by name:
for i,v in ipairs(context.options) do
if v.name == getText("ContextMenu_Unequip") then
unequipOption = v;
unequipOption.notAvailable = true;
end
end
I got crickets from discord too
Description
I created a mod that spawns you with named Dog Tags equipped to your neck, and I added a few sandbox options.
one of the sandbox options I wanted to include was "Prevent Unequip", but It seems the unequip menu option for Base.Necklace_DogTag is created by the ISInventoryPaneContextMenu.createMenu method in ISUI/ISInventoryPaneContextMenu.lua and I can't figure out how to make a small change to it.
My Code
What I've Tried
The code above just creates a new Unequip option on top.
so I went to look at what creates that original 'Unequip' option, and it lead me to
trying to figure out a way to modify this IF statement ( ISUI/ISInventoryPaneContextMenu.lua line 681 )
and I also tried changing this statement ( ISUI/ISInventoryPaneContextMenu.lua line 152 )
I tried copying the entire ISInventoryPaneContextMenu.createMenu method, removing all irrelevant bits, and making the change, but it overwrites the vanilla menu.
Last thing I tried was looking for a way to target and remove context menu items, but it seems like there's no "context:removeOption()" for lack of a better description.