summaryrefslogtreecommitdiff
path: root/doc/scripting/agenda.texi
diff options
context:
space:
mode:
Diffstat (limited to 'doc/scripting/agenda.texi')
-rw-r--r--doc/scripting/agenda.texi37
1 files changed, 37 insertions, 0 deletions
diff --git a/doc/scripting/agenda.texi b/doc/scripting/agenda.texi
new file mode 100644
index 0000000..2954c15
--- /dev/null
+++ b/doc/scripting/agenda.texi
@@ -0,0 +1,37 @@
+@node Agendas
+@section Agendas
+
+Agendas are used to schedule procedures to be called at distinct
+points in game time.
+
+@anchor{2d agenda make-agenda}@defun make-agenda
+Create a new, empty agenda.
+
+@end defun
+
+@anchor{2d agenda with-agenda}@defspec with-agenda agenda body ...
+@end defspec
+
+@anchor{2d agenda agenda-schedule}@defun agenda-schedule thunk [delay]
+Schedule THUNK in the current agenda to run after DELAY updates (1 by
+default).
+
+@end defun
+
+@anchor{2d agenda agenda-schedule-interval}@defun agenda-schedule-interval thunk [interval] [delay]
+Schedule THUNK in the current agenda to run after DELAY updates and run
+every INTERVAL updates thereafter. Both DELAY and INTERVAL default to
+1. Simply pass THUNK and nothing else to schedule THUNK to be run upon
+every update.
+
+@end defun
+
+@anchor{2d agenda update-agenda}@defun update-agenda
+Update the current agenda.
+
+@end defun
+
+@anchor{2d agenda clear-agenda}@defun clear-agenda
+Clear the current agenda.
+
+@end defun