ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Tue Aug 21, 2018 10:39 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Fri May 04, 2018 12:20 am 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1553
Location: A shallow water area south of Bree
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?

_________________
"Blessed are the yeeks, for they shall inherit Arda..."


Top
 Profile  
 
PostPosted: Fri May 04, 2018 6:15 pm 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1553
Location: A shallow water area south of Bree
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.™ :wink:

_________________
"Blessed are the yeeks, for they shall inherit Arda..."


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group