raduprv / Eternal-Lands

http://www.eternal-lands.com
Other
155 stars 56 forks source link

(minor tweak) Close open bag window on #disco #165

Closed feeltheburn closed 2 years ago

feeltheburn commented 2 years ago

On using #disco command, any open window of a bag on the ground should probably close.

The bag may not be there when logging back in (without closing the window).

pjbroad commented 2 years ago

Looks like the bag is not accessible even if you reconnect so the has to be reopened anyway. The #disconnect command is no different to being disconnected for other reasons so perhaps it should be closed for all disconnects. However, leaving the bag open is a good reminder. I'm not sure....

gvissers commented 2 years ago

Haven't tested this, but if the effect is that we have an unresponsive open bag window, I'm in favour of closing on disconnect. If we don't do this, we should at least add some sort of visual clue that the bag is currently inaccesible.

feeltheburn commented 2 years ago

It's an unresponsive bag if it's gone. I #disco'ed an alt, took the bag with my main, then space-barred the alt back online. Bag was still open and there, but there was no actual bag.

(Unless there's a way to confirm the bag is actually still there, I'd say just close it.)

pjbroad commented 2 years ago

Hmm. I did agree but have changed my mind again. Currently, if you disconnect then reconnect with the bag window open and the contents are still valid, you can access the bag just as normal. If you have altered the bag then only the still valid items can be accessed the invalid ones are visible but in accessible.

How about we leave the window open on disconnect, but on reconnect: if the window is open we close it if there is no bag there. If there is a bag there, we re-open the window. This way only valid items from a valid bag will be shown.

I have a patch with this working.

pjbroad commented 2 years ago

I've committed my changes.

feeltheburn commented 2 years ago

Yeah, that sounds like the best option. It closes invalid bags when it's actually needed so that works. :)

Haven't tested but will close, reopen if an issue is seen with it when I do update.