AtHomeSameSimMode: Allows you to tell the @home system to only check if its in the same sim or sim+pos AtHomeSameSimRange: Allows you to tell the @home system how far away from its home pos the bot is allowed both of these values are set via config this only allows you to update the live versions!
32 lines
1 KiB
C#
32 lines
1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using System.Linq;
|
|
using OpenMetaverse;
|
|
|
|
|
|
namespace BSB.Commands.Home
|
|
{
|
|
public class AtHomeSameSimRange : CoreCommand_1arg
|
|
{
|
|
public override string[] ArgTypes { get { return new[] { "Float" }; } }
|
|
public override string[] ArgHints { get { return new[] { "Range" }; } }
|
|
public override string Helpfile { get { return "Temporary change the @home systems recovery max range from home (in m) [min 3] <br/> resets on next start up"; } }
|
|
public override bool CallFunction(string[] args)
|
|
{
|
|
if (base.CallFunction(args) == true)
|
|
{
|
|
if (float.TryParse(args[0], out float range) == true)
|
|
{
|
|
bot.TempUpdateAtHomeSimRange(range);
|
|
return true;
|
|
}
|
|
else
|
|
{
|
|
return Failed("Unable to process arg 1");
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
}
|
|
}
|