generated from your-land/yl_template
52 lines
1.9 KiB
Plaintext
52 lines
1.9 KiB
Plaintext
This file holds a couple of editors notes regarding the mod.
|
|
|
|
I need sleep. Sometimes even when an event or a quest needs to be rolled over to the next stage. There also needs to be a way to tell YL what to execute.
|
|
|
|
Let's create some globalstep that compares the current time against a planned execution time and then executes a function which takes parameters.
|
|
|
|
task = {at = os.time(), func = "myfunction", params = {myparam1, myparam2, ...}, owner="myname", done = -1 or os.time(), id = "UUID", notes = "" }
|
|
|
|
tasks = {task1, taks2, task3, ... }
|
|
|
|
"at" is a number that holds the timestamp the task *should* be executed at
|
|
"func" is a string that holds the public name of the function to be exectuted. A string, because we want to serialize the table.
|
|
"params" is a table that holds all kinds of parameters to be handed over to the function
|
|
"owner" is a string of the person or quest or whatever that is responsible for the task
|
|
"done" is a number, either -1 if the task is not yet done or the timestamp the task actually was executed at
|
|
"id" is a string which holds a UUID by which a task can be identified
|
|
"notes" is an optional string
|
|
|
|
###
|
|
|
|
What's more efficient? Have an index with UUID? We often query those, but the queries are not relevant for performance. However we often iterate over the task list and need to compare the "at" value.
|
|
|
|
###
|
|
|
|
- Create example JSON files OK
|
|
- Add loading from JSON files OK
|
|
- Add Task via chatcommand <-------
|
|
- Remove Task via chatcommand
|
|
- List Task via chatcommand
|
|
- Clean Tasks via chatcommand
|
|
- API parameter defense
|
|
- Check UUID collisions
|
|
- Support other time formats
|
|
- Write scheduler :P
|
|
- Investigate AspireMint's solution of having a moving next target, recalculate when a new task is aded or executed
|
|
- Decide whether privs should be AND or OR
|
|
|
|
Example UUID
|
|
|
|
152510d3-43b3-4035-861b-a490e3900bfd
|
|
86414522-58d8-497f-bd6a-7299ed5187b6
|
|
11a47d48-4d0c-47ab-a5ef-4f56781cae03
|
|
|
|
###
|
|
|
|
TODAY:
|
|
|
|
|
|
- finish API
|
|
- defend API
|
|
|