mirror of
https://git.rezel.net/LudoTech/traque.git
synced 2026-02-09 02:10:18 +01:00
Add out of zone handicap
This commit is contained in:
@@ -5,6 +5,10 @@ class TimeoutManager {
|
||||
this.timeouts = new Map();
|
||||
}
|
||||
|
||||
has(key) {
|
||||
return this.timeouts.has(key);
|
||||
}
|
||||
|
||||
set(key, callback, delay) {
|
||||
const newCallback = () => {
|
||||
this.timeouts.delete(key);
|
||||
@@ -32,6 +36,10 @@ export const sendPositionTimeouts = {
|
||||
timeoutManager: new TimeoutManager(),
|
||||
delay: 10, // Minutes
|
||||
|
||||
has(teamID) {
|
||||
return this.timeoutManager.has(teamID);
|
||||
},
|
||||
|
||||
set(teamID) {
|
||||
const callback = () => {
|
||||
game.sendLocation(teamID);
|
||||
@@ -58,6 +66,10 @@ export const outOfZoneTimeouts = {
|
||||
timeoutManager: new TimeoutManager(),
|
||||
delay: 10, // Minutes
|
||||
|
||||
has(teamID) {
|
||||
return this.timeoutManager.has(teamID);
|
||||
},
|
||||
|
||||
set(teamID) {
|
||||
const callback = () => {
|
||||
game.handicapTeam(teamID);
|
||||
|
||||
Reference in New Issue
Block a user