Age | Commit message (Collapse) | Author |
|
|
|
* thx @joschiwald for noticing.
(cherry picked from commit 836ec5a6e6109abe9491e204c1221e21ba9fcc81)
|
|
callback.
* makes it possible to block tasks if there is an active spellcast.
* requested by @joschiwald
(cherry picked from commit 3d95aba2b3d58057f3eeed6d4dd6e51ea49b77f6)
|
|
* use . operator instead of -> to access the TaskContext now.
* Add TaskContext::IsExpired to check whether the owner has expired.
(cherry picked from commit 151a0f5c5e1133a21c46a8d55c834ff52061c3fa)
|
|
techniques.
* Use std::function as callback (methods, lamdas & std::bind).
* Uses std::chrono::duration as duration type (Milliseconds, Seconds...)
- With c++11 user defined literals we could just write "11s" for example (MSVS 2015, gcc & clang).
* Provides a lot of overloads for easier usage:
- Static durations or random durations between min and max.
- Named (with group ids - group id 0 is possible) or anonymous tasks.
- Asynchronous tasks.
* Is adapted to the current needs of scripting:
- Repeat tasks through the TaskContext
- Schedule new tasks from the context.
- Provides access to the times repeat counter of a task,
this will help to schedule multi step events (dialogs for example).
See https://gist.github.com/Naios/6d143538abdc3d32fd2b for usage examples.
(cherry picked from commit da77a90aa98bc6e34c001ca871700cec7c6e5017)
|