@@ -13,7 +13,7 @@ The task in the example of below runs with an interval of `2`, i.e. it will be e
1313``` ts
1414this .taskScheduler .addTask (new class extends Task {
1515 public constructor () {
16- super (2 );
16+ super ({ interval: 2 } );
1717 }
1818
1919 public execute(): void {
@@ -24,46 +24,68 @@ this.taskScheduler.addTask(new class extends Task {
2424
2525Every two times that ` taskScheduler.tick() ` is called, it will run the ` execute ` function of your task.
2626
27- jkm progress notes below:
27+ # Implementing this into RuneJS
2828
29- ## Features
29+ ## Task System
3030
3131- Tick-based task scheduler :heavy_check_mark :
3232- Delay task :heavy_check_mark :
3333- Repeating task :heavy_check_mark :
3434- Schedule tasks on world :heavy_check_mark :
3535- Schedule tasks on players/npcs :heavy_check_mark :
3636- Task stacking :heavy_check_mark :
37- - Task breaking on walking :x :
38- - Task delay until arriving :x :
37+ - Task breaking on walking :heavy_check_mark :
38+ - Task delay until arriving :heavy_check_mark :
3939
4040### Subtasks
4141
42- - Actor task :yellow_square :
43- - Handle break on move :x :
42+ #### Actor
43+
44+ - Actor task :heavy_check_mark :
45+ - Handle break on move :heavy_check_mark :
4446- Actor to actor interaction task :think: :x :
45- - Handle walkto
46- - Keep track of interaction distance and stop if exceeded
47- - Actor to world item interaction task :think: :x :
48- - as above
47+ - Handle walkto :x :
48+ - Keep track of interaction distance and stop if exceeded :x :
49+ - Actor to world item interaction task :heavy_check_mark :
50+ - Handle walkto :heavy_check_mark :
51+ - Keep track of interaction distance and stop if exceeded :heavy_check_mark :
4952- Actor to object interaction task :think: :x :
50- - as above (maybe need some generic Actor to entity interaction task)
53+ - (maybe need some generic Actor to entity interaction task)
54+ - Handle walkto :x :
55+ - Keep track of interaction distance and stop if exceeded :x :
56+
57+ #### World
5158
52- - world abstraction for spawnObject, removeObject, spawnItem
59+ - World task :yellow_square :
60+ - Spawn game object task :x :
61+ - Remove game object task :x :
62+ - Spawn world item task :x :
63+ - Remove world item task :x :
5364
5465### Content
5566
56- Migrate the below content to use task system
67+ Highest priority is to convert pieces of content which make use of the old ` task ` system. These are:
68+
69+ - Magic attack :x :
70+ - Magic teleports :x :
71+ - Prayer :yellow_square :
72+ - ensure that one-tick pray flicking works. Speak to @jameskmonger if you want to implement this and need guidance
73+ - Combat :x :
74+ - this one is quite broken and may not be so easy to port across
75+ - Forging (smithing) :x :
76+ - Woodcutting :yellow_square :
77+ - Time to cut :heavy_check_mark :
78+ - Replace tree with treestump :yellow_square :
79+ - Replace treestump with tree :yellow_square :
80+
81+ The following areas will make interesting use of the task system and would serve as a good demonstration:
82+
5783- Health regen :x :
5884- NPC movement :x :
5985- Firemaking :yellow_square :
6086 - logs in inventory :heavy_check_mark :
6187 - logs on ground :heavy_check_mark :
6288 - all log types :yellow_square :
63- - Woodcutting :x :
64- - Melee combat :x :
65- - Home teleport :x :
66-
67- also don't forget
89+ - spawn ashes :x :
6890
69- - Anything @gruckion is working on : yellow_square : : wink :
91+ Also any content @gruckion is working on will be using the new Task system to aid with development of the API
0 commit comments