From 59f995b8b2b3cacf6726505b619d31fba5389852 Mon Sep 17 00:00:00 2001 From: Madpeter <57852827+Madpeterz@users.noreply.github.com> Date: Thu, 22 Sep 2022 01:59:15 +0100 Subject: [PATCH] add gohome command support --- SecondBotEvents/Services/HomeboundService.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/SecondBotEvents/Services/HomeboundService.cs b/SecondBotEvents/Services/HomeboundService.cs index ab0720b..2754091 100644 --- a/SecondBotEvents/Services/HomeboundService.cs +++ b/SecondBotEvents/Services/HomeboundService.cs @@ -46,6 +46,12 @@ namespace SecondBotEvents.Services protected bool attemptedTeleportBackup = false; protected long teleportActionLockout = 0; + public void GoHome() + { + attemptedTeleportHome = true; + LogFormater.Info("Teleporting to home sim"); + GetClient().Self.Teleport(home.name, new Vector3(home.x, home.y, home.z), new Vector3(0, 0, 0)); + } protected void Tick() { if (evacWanted == true) @@ -90,9 +96,7 @@ namespace SecondBotEvents.Services teleportActionLockout = SecondbotHelpers.UnixTimeNow(); if (attemptedTeleportHome == false) { - attemptedTeleportHome = true; - LogFormater.Info("Teleporting to home sim"); - GetClient().Self.Teleport(home.name, new Vector3(home.x, home.y, home.z), new Vector3(0, 0, 0)); + GoHome(); return; } else if(attemptedTeleportBackup == false)