|ToME: the Tales of Maj'Eyal
|Page 1 of 1|
|Author:||Zizzo [ Fri May 04, 2018 12:20 am ]|
As part of my preliminary work to update my addons for the 1.6 alpha, I'm investigating rearchitecting Restart Sustains to use callbackOnRest() and callbackOnWait() [the latter apparently new to 1.6], in hopes of avoiding conflicts like we had with Improved Auto-explore and Rest. I'm not sure I'm correctly understanding the mechanics, though.
AIUI, the callbackOnRest() callback when called with mode="check" should return true if the callback believes the player should continue resting. Combined with the module's handling of callback return values, the practical upshot is that the player will continue resting if any callback believes they should. That seems backwards, though; surely in the interest of player safety, we would want the player to stop resting if any callback believes they should stop. Am I misunderstanding?
|Author:||Zizzo [ Fri May 04, 2018 6:15 pm ]|
|Post subject:||Re: callbackOnRest(mode=check)?|
Hmm, on further consideration, it occurs to me that there's an important connotative difference between "the player does not need to continue resting" and "the player needs to stop resting". The former implies "I'm finished doing what I was doing, no need to keep resting on my account"; the latter implies "We have a situation that you need to deal with."
Closer examination of the code suggests that all of the "player needs to stop resting" cases are covered in-code in Player:restCheck() before the callback is called, and that the callback is only intended to supply additional "does the player need to continue resting?" cases. Which I think will be sufficient for my Restart Sustains needs, since its core question is "do we need to keep waiting for any more marked sustains to cool down?".
So. We Apologize for the Confusion.™
|Page 1 of 1||All times are UTC|
|Powered by phpBB® Forum Software © phpBB Group