()
| 893 | if (type === PlayerQueueType.ENGINE) { |
| 894 | request.delay = 0; |
| 895 | this.engineQueue.addTail(request); |
| 896 | } else if (type === PlayerQueueType.WEAK) { |
| 897 | this.weakQueue.addTail(request); |
| 898 | } else { |
| 899 | this.queue.addTail(request); |
| 900 | } |
| 901 | } |
| 902 | |
| 903 | unlinkQueuedScript(scriptId: number, type: QueueType = PlayerQueueType.NORMAL) { |
| 904 | if (type === PlayerQueueType.ENGINE) { |
| 905 | for (const request of this.engineQueue.all()) { |
| 906 | if (request.script.id === scriptId) { |
| 907 | request.unlink(); |
| 908 | } |
| 909 | } |
| 910 | } else { |
| 911 | for (const request of this.queue.all()) { |
| 912 | if (request.script.id === scriptId) { |
| 913 | request.unlink(); |
| 914 | } |
| 915 | } |
| 916 | for (const request of this.weakQueue.all()) { |
| 917 | if (request.script.id === scriptId) { |
| 918 | request.unlink(); |
| 919 | } |
| 920 | } |
| 921 | } |
no test coverage detected