Disable Crippling Shrines with Telekinesis
Disable Crippling Shrines = 1 will not work when using Telekinesis. So there is still a unintended workaround. ;-)
The fact that telekinesis works points to a lack of abstraction IMHO. There should be a central point where the decision to "highlight" or "activate" an object is made, and it should be possible to control the behavior globally with a single change instead of handling "mouse" and "spell targeting" separately (which is probably what has been done here).
I'd suggest an approach here where the shrine is "disabled" on load based on the flag, which will then prevent it from ever being interacted with no matter what means one tries to use.
It should work similar to how an opened chest or any other "already activated" object works (in the sense of, we should try to use the same mechanism to avoid special casing).
aaand what if someone changes ini? then the shrine will be disabled anyway despite wanting it enabled
Not sure what you mean @qndel . The ini flag controls the behavior globally. If you disable it in the ini, it should disable all interactions with the shrine no matter the way.
The problem now is that when the shrine is disabled in the ini, you can still interact with it using Telekinesis. That's a poor implementation.
I think the current implementation of disabling shrines is not optimal: cauldrons and goat shrines are completely deactivated. it would be much more logical to just protect the player from the bad effect by intervention on the effect level.
I tried to implement this on a branch: https://github.com/vladtepesch/devilutionX/tree/DisableBadShrines this also would fix the telekineses bug.
- cauldrons and goat shrines work as normal, but on disabled effects another message appears and the effect is not triggered
- currently the named shrines are still disabled (may be this deactivation can be removed - it somehow disturbs the game world in my opintion)
- addtionally to this (not on the branch yet) I would suggest to disable the
MurphyandTaintedshrines.
The reason for how it's implemented for shrines is so that it don't affect multiplayer one way or the other
I see - if not all clients have the same ini setting this would cause problems.
But this could be handled by silently ignore the action in the operateShrine (also not reset _oSelFlag). So the other clients does not get the CMD_PLROPOBJ command and also the local client does not think it already was operated, if it gets this command from another client.
Alternatively the cauldron and goat effect could be determined on creation (since its based on the objects own seed - there will be no difference) and the deactivation for theese two object types could be also be done on shrine-effect rather than object type. (although this would not fix the telekinesis bug, but enables the usage of cauldrons and goat shrines without effectively removing them)
+1 for enabling non-crippling cauldrons and goat shrines and disabling Murphy and Tainted shrines.