EvMenu custom exit node runs cmd_on_exit twice
See original GitHub issueBrief summary of issue / Description of requested feature:
On Evennia 0.6 at least, using a custom exit node runs cmd_on_exit
twice.
Steps to reproduce the issue / Reasons for adding feature:
Load the following code into @py/edit
and execute.
from evennia.utils.evmenu import EvMenu
def start(caller):
return "Hello world!", {"desc": "Custom exit node", "goto": "exit"}
def exit(caller):
return None, None
EvMenu(self, {"start": start, "exit": exit}, startnode="start")
Error output / Expected result of feature
Two look commands are run by the character. This does not occur if you use the default quit
command.
Extra information, such as Evennia revision/repo/branch, operating system and ideas for how to solve / implement:
My guess is that close_menu()
is being hit twice, possibly in evtable_parse_input
and EvMenu.goto
.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Tips for Running an Exit Node | The Tor Project
Tips for Running an Exit Node · 1. Inform your potential ISP(s) In general, running an exit node from your home Internet connection...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’ll dibs this. It’s probably an unexpected result of the last PR I did on EvMenu. Previously single node EvMenus would bug out. It treats the first node differently to the rest of the nodes and didn’t expect an EvMenu to end on the first node. I suspect my solution to that problem is running close_menu() twice resulting in the doubling up of the cmd_on_exit. It should be a simple fix.
I do. The above code replicates it for me. I am definitely on the latest evennia.