Commit graph

6573 commits

Author SHA1 Message Date
james
884fc4f21e small change to sync the doc example with imported name in game_template/commands/command.py 2021-09-28 19:09:26 -04:00
Griatch
77c16a4779 Up twisted requirement to 21.7.0 2021-09-06 21:48:09 +02:00
Griatch
125c5664fb Handle objects as keys in ndb.all(). Resolve #2378. 2021-08-16 21:36:01 +02:00
Griatch
c4806716da Give correct error on set/desc here. Resolve #2382. 2021-08-16 21:31:53 +02:00
Griatch
c425f95193 Make EvTable.add_row forward row-options correctly. Resolve #2389. 2021-08-16 21:10:44 +02:00
luciensadi
42a3d0c59c
Update evennia.js
Fix for misplaced parens-- previous code checked 'is the output of `typeof(listener === 'function')` truthy', which is equivalent of `typeof(boolean)` which is always true.
2021-08-09 10:13:59 -07:00
Griatch
76af934fd2 Another CI fix 2021-06-20 11:08:52 +02:00
Griatch
e1eec45b05 Fix CI issue for postgres with django 2.2. 2021-06-20 10:56:20 +02:00
Griatch
4f74ea2deb Fix taskhandler pickling method instances. Resolves #2439 2021-06-19 15:57:36 +02:00
Griatch
5a7e132aee Python 3.9 support. Resolves #2436. 2021-06-19 15:29:15 +02:00
Griatch
c33db6243b Fix legacy bytes conversion for older twisted 2021-06-19 15:02:26 +02:00
Griatch
89d8d46e64 Try reporting a little more info from taskhandler deserialization error 2021-06-18 19:34:44 +02:00
Griatch
5ee9e90cea Fix some broken master-doc pages 2021-06-13 22:47:44 +02:00
Griatch
298d1b589f Update obj.cmdset before examine. Resolves #2428. 2021-06-03 23:25:10 +02:00
Griatch
c6cbe28985
Merge pull request #2422 from darkruinsMUD/fix-account-priv-check-in-who
Fix priv check when displaying names in CmdWho
2021-05-30 09:18:53 +02:00
Griatch
8528bc9a7c
Merge pull request #2421 from timgates42/bugfix_typos
docs: fix a few simple typos
2021-05-30 09:15:25 +02:00
Alex Hunley
c3b1689210 Fix priv check when displaying names in CmdWho 2021-05-24 17:48:22 -04:00
Tim Gates
6d4bcd8ba9
docs: fix a few simple typos
There are small typos in:
- CODING_STYLE.md
- evennia/commands/cmdhandler.py
- evennia/commands/default/syscommands.py
- evennia/contrib/building_menu.py
- evennia/prototypes/prototypes.py

Fixes:
- Should read `traverse` rather than `traverese`.
- Should read `shortcuts` rather than `shorcuts`.
- Should read `multiple` rather than `multuple`.
- Should read `multiple` rather than `mulitple`.
- Should read `indentation` rather than `indendation`.

Closes #2420
2021-05-24 05:54:56 +10:00
Griatch
56b1c259f7
Create codeql-analysis.yml 2021-05-15 09:30:00 +02:00
Griatch
f0092f5fa4
Merge pull request #2412 from davewiththenicehat/delay_docstring_update
delay docstring update
2021-05-11 23:48:12 +02:00
davewiththenicehat
0fa5788821 utils.delay docstring update
Updated docstring to show delay returns a TaskHandlerTask instance.
2021-05-11 16:46:19 -04:00
davewiththenicehat
f724927cd3 delay docstring update
delay docstring update

The old one had not been properly updated or formatted.
2021-05-10 12:38:47 -04:00
Griatch
758094b962 Fix PEP8 in PR #2390 2021-05-09 15:43:21 +02:00
Griatch
c14334c1b5 Merge branch 'fix_ga_for_mudlet' of https://github.com/blongden/evennia into blongden-fix_ga_for_mudlet 2021-05-09 15:41:01 +02:00
Griatch
f235572cac Fix edge case in TaskHandler when un-pickleable callable supplied 2021-05-09 15:25:57 +02:00
Griatch
01b1f43baa Merge branch 'master' of https://github.com/davewiththenicehat/evennia into davewiththenicehat-master 2021-05-09 13:16:29 +02:00
davewiththenicehat
cf8052b816 doc strings updates.
doc strings updates.

Unit tests pass at default run level.
2021-04-30 11:26:49 -04:00
davewiththenicehat
bd276532a1 task handler unit test revamp & bugfix
revamped task handler unit tests

found bug when a False persistent kwarg is passed to the add method. Resolved it.

All evennia unit tests pass. Default run level and run level 2.
2021-04-26 08:59:35 -04:00
Ben Longden
6e4f7fa36f Only use GA-lite for mudlet if it's rejected NOGOAHEAD 2021-04-26 12:42:11 +01:00
Ben Longden
ca54ed31e9 For mudlet we overwrite the negotiated GA value
Suppress GA
Activate the NOPROMPTGOAHEAD flag so GA's only sent on prompts
2021-04-26 12:29:05 +01:00
Ben Longden
35ed709635 Review feedback 2021-04-26 12:04:35 +01:00
Ben Longden
cd4c92515a Move prompt logic to a flag set by TTYPE (for Mudlet, currently) 2021-04-26 10:31:42 +01:00
Ben Longden
e9c66530cd FORCEENDLINE is True by default so no need to set
Test also updated to check FORCEENDLINE after TTYPE is negotiated
2021-04-26 10:05:33 +01:00
Ben Longden
da9128dcdf Mudlet likes GA's for prompts
Don't sent GA on every message (not everything is a prompt)
Do enforce line endings for mudlet, it wont display anything without it.
2021-04-26 10:05:33 +01:00
davewiththenicehat
15371026d5 task handler update
updating taskhandler.py before updating unit tests.

All evennia unit tests pass.
2021-04-25 22:38:35 -04:00
Griatch
ff2ab3a3a5
Merge pull request #2388 from blongden/fuzzy_match_on_exact_module_prototype
Don't allow fuzzy match on db if exact match on module prototype
2021-04-24 22:51:44 +02:00
Griatch
f2e9b12c89
Merge pull request #2387 from davewiththenicehat/rpsystem_send_emote_pass_kwargs
rpsystem.send_emote passes kwargs, uses sender as from_obj
2021-04-24 22:48:34 +02:00
Griatch
22ad76b04a
Merge pull request #2360 from realkinetix/maintenance-times
Maintenance time calculations should be done in minutes, not seconds.
2021-04-24 22:45:03 +02:00
Ben Longden
4480bd6130 Don't allow fuzzy match on db if exact match on module prototype 2021-04-20 22:37:36 +01:00
davewiththenicehat
8a64ee9830 rpsystem.send_emote passes kwargs, uses sender as from_obj
rpsystem.send_emote now passes kwargs to obj.msg.
rpsystem.send_emote uses sender as from_obj when calling obj.msg

All evennia unit tests pass.
2021-04-20 16:31:30 -04:00
davewiththenicehat
33a2d6d35e task handler call_task, Task.call methods created
task handler call_task, Task.call methods created

Added unit tests for these methods.

All evennia unit tests pass
2021-04-19 17:36:42 -04:00
davewiththenicehat
58308adea6 task handler remove_all method created. task handler server restart unit test created.
Added method remove_all to task handler. (intended for unit testing)
Created a method to mimic a server restart for the purpose of task handler.

test_delay unit test passes.
2021-04-19 17:16:37 -04:00
davewiththenicehat
a61577b8f3 task handler automatic stale task cleanup
Task handler will automatically remove uncalled but canceled from task handler. By default this will not occur until a canceled task has been uncalled for 60 second after the time it should have been called. To adjust this time use TASK_HANDLER.stale_timeout. If stale_timeout is 0 stale tasks will not be automatically removed.
This is not done on a timer. I is done as new tasks are added or the load method is called.

Added unit tests to test automatic removal. Including when it should not automatically removed. Both when it is too soon, or when the stale_timeout attribute is set to 0.
2021-04-19 09:37:19 -04:00
davewiththenicehat
e65724e2a7 taskhandler.Task created
Created an object to represent a task.
This allows for the return of TASK_HANDLER.add or utils.delay to be an object that has callable methods. It has been created to mock the most common methods and attributes of a twisted deferred object.

Changed test_utils.test_delay for new usage.
Returned previously changed modules slow_exit, tutorial_world.objects and portal.telnet to their previous states. As the return of utils.delay can be used as if it were a deferred.

All evennia unit tests pass
2021-04-18 18:25:39 -04:00
davewiththenicehat
e24dbc322b TaskHandler.do_task is now state aware & can return callback's return
TaskHandler.do_task is now state aware and can be called manually.
It can now return the callbacks returns.

added unit tests to verify early callback is functional. Both persistent and non-persistent tasks.

All evennia unit tests pass.
2021-04-18 11:01:45 -04:00
davewiththenicehat
21a1c4395e TaskHandler.active method created
TaskHandler.active method created to check if a task is currently active.

test_delay unit test passes.
2021-04-18 09:59:45 -04:00
davewiththenicehat
5209a31d35 TaskHandler cancel and exists method's created
Created task handler methods to cancel a task and check if a task exists.

Modified unit tests to use these and test methods.
unit test test_delay passes.
2021-04-18 09:50:54 -04:00
davewiththenicehat
b17e47319f TaskHandler.remove() made functional
TaskHandler.remove method now functions. Previous it would have removed the task from the TaskHandler.tasks dictionary, but never canceled the task. Making the "remove a persistent task without executing it" incorrect. Previous there was no method to get a persistent tasks's deferral instance, which was likely why TaskHandler.remove was not used within the module.

Added unit tests to test TaskHandler.remove
2021-04-18 08:51:18 -04:00
davewiththenicehat
9f49eba5bd task handler, updated to only return task id
Updated task handler to only return task id.
updated code within evennia that relied on the deferral directly. Including unit test for one.

all unit tests pass.
Test server functional after restarting, no issues found would telnet web client. (delay was used in the telnet module in the portal folder.

I needed to commit this before continuing forward. There is already a high line count change.
2021-04-18 00:43:09 -04:00
davewiththenicehat
68cd21d48e taskhandler suppress cancel error
Added an errback to handle errors within task handler's deferred instance.
Without this instances of deferred cause a traceback when a deferred is canceled without errback or callback having been called.
This traceback does not end execution, and ultimately would only show to main console.
Reference cancel: https://github.com/twisted/twisted/blob/trunk/src/twisted/internet/defer.py

All evennia unit tests pass.
2021-04-16 10:55:24 -04:00