Commit graph

84 commits

Author SHA1 Message Date
Griatch
298b2c23c6 Cleanup/refactoring of olc menus 2018-08-11 11:49:10 +02:00
Griatch
696cb3942b Further cleanup and debugging of olc menu 2018-07-29 20:58:56 +02:00
Griatch
6126391406 Refactor spawn, update remaining in olc 2018-07-29 16:53:54 +02:00
Griatch
e1cc36e4d4 Complete refactoring of main nodes. Remain spawn/load/save 2018-07-28 19:58:20 +02:00
Griatch
e5f63f8431 Add search-object functionality to olc menu 2018-07-28 18:26:00 +02:00
Griatch
50c54501f1 Refactor menu up until attrs 2018-07-26 23:41:00 +02:00
Griatch
e4016e435e Start improve OLC menu docs and help texts 2018-07-21 19:06:15 +02:00
Griatch
f57192f9f1 Fix error if sending string to list_node select callback 2018-04-22 13:39:47 +02:00
Griatch
acc651b2fe Inject selection in list_node decorator if select kwarg is a string 2018-04-21 15:31:30 +02:00
Griatch
b571d6fdd4 Fix unittests 2018-04-20 19:51:12 +02:00
Griatch
bee7fa174d Cherry-pick EvMenu list_node decorator from olc branch 2018-04-19 22:47:13 +02: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