
So, here's (some of) the sequence of events that happens when you pick up, say, a rod of trap detection off the floor:
- Actor:pickupFloor() puts the rod in your inventory via ActorInventory:addObject(). This triggers the :onAddObject() callback.
- :onAddObject() says, "Aha, this object can be activated, so we should create an activate-object talent for it."
- After the above, :addObject() says, "We just picked up this item from the floor, so it should go in the transmo chest."
- Actor:transmoInven() removes the object from your inventory via ActorInventory:removeObject(). This triggers the :onRemoveObject() callback.
- :onRemoveObject() says, "This object is in the transmo chest, so it can't be activated, so we don't need to clean up any activate-object talent for it."

[And since this is a bugfix addon, as per my usual procedure, I'm reluctant to include it in ZOmnibus or ZOmnibus Lite, since we'd have to claw it back out if/when the bug is fixed in the future.]
[Implementation notes:]
Code: Select all
Hooks:
ToME:runDone [to clean up orphaned activate-object talents]
Superload:
mod.class.Actor:
onRemoveObject() [to clean up behind transmo'd activatable objects]