mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-08-03 13:55:36 +02:00
Teleportation changes which got removed due to merge conflicts, added back
This commit is contained in:
parent
48e8febb3f
commit
19b12c812e
1 changed files with 7 additions and 1 deletions
|
@ -289,7 +289,6 @@ export class Task {
|
|||
} else {
|
||||
this.initiator = null;
|
||||
}
|
||||
await this.teleportBots();
|
||||
|
||||
//wait for a bit so bots are teleported
|
||||
await new Promise((resolve) => setTimeout(resolve, 3000));
|
||||
|
@ -324,6 +323,8 @@ export class Task {
|
|||
await this.initiator.init();
|
||||
}
|
||||
|
||||
await this.teleportBots();
|
||||
|
||||
if (this.data.agent_count && this.data.agent_count > 1) {
|
||||
// TODO wait for other bots to join
|
||||
await new Promise((resolve) => setTimeout(resolve, 10000));
|
||||
|
@ -379,6 +380,11 @@ export class Task {
|
|||
console.log(`Teleporting ${this.name} to human ${human_player_name}`)
|
||||
bot.chat(`/tp ${this.name} ${human_player_name}`)
|
||||
}
|
||||
else {
|
||||
console.log(`Teleporting ${this.name} to ${this.available_agents[0]}`)
|
||||
bot.chat(`/tp ${this.name} ${this.available_agents[0]}`);
|
||||
}
|
||||
|
||||
await new Promise((resolve) => setTimeout(resolve, 200));
|
||||
|
||||
// now all bots are teleport on top of each other (which kinda looks ugly)
|
||||
|
|
Loading…
Add table
Reference in a new issue