Commit graph

80 commits

Author SHA1 Message Date
Griatch
ed3e57edd0 Start add edit_node decorator (untested) 2018-04-02 18:46:55 +02:00
Griatch
34b8c0dbce New list_node decorator for evmenu. Tested with olc menu 2018-03-31 21:10:20 +02:00
Griatch
3c5d00ac3d Almost working list_node evmenu decorator 2018-03-28 23:56:23 +02:00
Griatch
0f17e73b8c Start add list_node EvMenu node decorator 2018-03-28 00:02:00 +02:00
Griatch
5ed765d664 Refactor spawner menu 2018-03-24 17:28:56 +01:00
Griatch
2c2bd127b8 [fix] Add better error reporting from EvMenu 2018-03-19 20:27:55 +01:00
Griatch
2d791252e3 Start adding menu OLC mechanic for spawner.
The EvMenu behaves strangely; going from desc->tags by
setting the description means that the back-option no
longer works, giving an error that the desc-node is not
defined ...
2018-03-18 21:16:45 +01:00
Griatch
0ae76233ee Resolve merge conflicts 2018-01-29 00:16:30 +01:00
Griatch
2e17d344e4 Remove superfluous close_menu call leading to two exit-cmds being called when exiting via custom end node. Resolves #1428. 2018-01-29 00:02:14 +01:00
Griatch
d05495cc52 Add testing framework for EvMenu. Implements #1484 2017-10-28 22:33:58 +02:00
Griatch
b6b112b70a Make an empty evmenu desc option just show the key 2017-10-28 14:31:09 +02:00
Griatch
931e42082c Make persistent evmenu's store node kwargs correctly 2017-10-28 13:29:51 +02:00
Griatch
7b295fa98b Add working **kwargs support to nodes/callbacks in evmenu 2017-10-28 12:05:32 +02:00
Griatch
2475d14691 Almost finished with kwargs-support for evmenu 2017-10-28 00:13:40 +02:00
Griatch
98ab831437 Fix evmenu persistence loading for 0.7 2017-10-27 09:16:46 +02:00
Griatch
b278337172 Make PEP8 cleanup of line spaces and character distances as well as indents 2017-08-19 23:16:36 +02:00
Griatch
7ff783fea1 Resolve merge conflicts with master. 2017-08-19 21:30:42 +02:00
CloudKeeper1
c8131eab80 Add EvMenu support for ending on start node.
Currently, if the start node has options of None then any input causes a "Choose an option or try 'help'." message to display and then ending the menu. This supports ending the menu without eating input.
2017-07-26 23:53:53 +10:00
Griatch
5590ee2258 Rename all instances of Player->Account. 2017-07-07 23:47:21 +02:00
Griatch
0ff1718437 Resolve django 1.11 migration errors. 2017-06-17 22:15:00 +02:00
Griatch
6a621af4d7 Remove spurious whitespace from sources. 2017-04-23 14:06:27 +02:00
CloudKeeper1
9c37665f00 Updated documentation.
Updated documentation explaining use. Also mentioned the result of chaining get_inputs.
2017-04-23 14:06:27 +02:00
CloudKeeper1
4327bc48d3 Extended get_input to accept *args & **kwargs
Calling get_input with args and kwargs passes them to the callback function. Does not affect previous use so no changed required to existing code.
2017-04-23 14:06:27 +02:00
Griatch
a648433db8 Merge conflicts against master, including cmdhandler support for direct cmdobject input together with prefix-ignore mechanism from devel. 2017-04-01 16:08:23 +02:00
CloudKeeper1
a83ea62df8 Fixed Typo in code.
...cdmset... to ...cmdset...
2017-03-21 22:14:36 +11:00
BlauFeuer
37984adc58 Markup, whitespace, docstring and comment updates 2017-02-20 02:21:49 -05:00
Griatch
865ab131bb Fix reference error in get_input. Resolves #1219. 2017-02-18 19:21:43 +01:00
Griatch
ccfcf37e33 Convert EvMenu to use overridable methods instead of plugin functions. Implements #1205. 2017-02-17 21:18:15 +01:00
Griatch
74eebfed6d Refactor code to remove alerts as per lgtm and #1176. 2017-01-29 19:02:00 +01:00
Griatch
5960985e65 Remove mention of long-dead contrib/menusystem from evmenu docstring. 2017-01-25 00:08:47 +01:00
Griatch
ae3af20cd7 Update evmenu docstring. 2017-01-21 23:06:56 +01:00
Griatch
0aebbf6975 Make evmenu 'goto' option argument accept a callable for deciding the next node. 2017-01-21 22:59:43 +01:00
Griatch
55d956a799 In Evmenu, make sure to not assign the Session from the Command until the caller has been correctly identified. 2017-01-16 18:12:18 +01:00
Griatch
edbc8afca4 Fix reversed order of arguments to isinstance. 2017-01-15 20:44:03 +01:00
Griatch
f7936df104 Make EvMenu nodes-options' 'exec' callbacks able to return a string for dynamic goto replacement. 2017-01-14 18:49:29 +01:00
Griatch
44bd403cc8 Add session-awareness to EvMenu through parsing the command (making it persistent-safe). Also accept an optional session keyword for the very first output. This is only really important if caller is a player and multisession_mode>2. Made as an alternative to #1162." 2017-01-14 12:06:23 +01:00
CloudKeeper1
495db52f75 Changed example use of _menutree
Docstring left out ndb reference.
2017-01-10 18:17:23 +01:00
Griatch
4a71a70af4 Remove automatic allocation of numbers to option; it clashed with _default states looking for numbers. An automatic number-key will now only be allocated if no option key is given. Resolves #1121. 2016-11-20 22:15:35 +01:00
Griatch
596bfff35a Do further cleanups in evmenu color handling; relates to #1117. 2016-11-15 01:07:16 +01:00
Griatch
6a7431d784 Add startnode_input kwarg to EvMenu for sending input text to the startnode as if coming from a virtual previous node. This is used by the persistent save mechanism, to re-run the last node with exactly the same input. Resolves #969. 2016-10-22 18:31:22 +02:00
Griatch
1981f8073f Lots of debug messages. 2016-10-15 22:48:38 +02:00
Griatch
e2e6f35d11 Let EvMenu accept arbitrary kwargs as initialization properties (available through caller.ndb._menutree). 2016-10-04 18:16:00 +02:00
Griatch
ce0bfe8a0d Made some corrections to the if tree. Resolves #1042. 2016-09-07 23:49:30 +02:00
Dan Feeney
4330d37f20 fixed error occurring when caller does not have a player attribute 2016-09-07 23:49:30 +02:00
Griatch
f6286accea Make chardelete work also if switching ic/ooc state. Made the same fix to evmenu itself. Resolves #1035. 2016-09-03 15:47:14 +02:00
Griatch
46ac4d3928 Add chardelete command to ooc menu for MULTISESSION_MODEs > 1. Also strip the result string from get_input helper to get rid of the carriage return always sent due to the user committing the command string. 2016-08-28 23:15:46 +02:00
Griatch
fc08fc0970 Updated evmenu to use the |-form of mxp links. 2016-05-22 20:49:45 +02:00
Griatch
910d539d45 Made evmenu stop echoing 'None' when ending the menu with a None, None return from the node. 2016-05-22 20:49:45 +02:00
Griatch
8141935a9b Cleaned up docstrings for evmenu and eveditor. Also, rev 74a3395 referred to EvEditor, not EvMenu (both now support persistent saving) 2016-05-22 20:49:44 +02:00
Griatch
039eb8c824 Added proper error handling to evmenu when trying to use persistent mode with callables that cannot be pickled, such as methods and functions defined inside other functions. 2016-05-22 20:49:44 +02:00