fixs
correct ResetAnimations, allow stand to call reset animations, fix start service, add a delay on startup
This commit is contained in:
parent
70d12c08d9
commit
e43dbcabc8
19 changed files with 72 additions and 23 deletions
|
|
@ -1,5 +1,7 @@
|
|||
using OpenMetaverse;
|
||||
using SecondBotEvents.Services;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace SecondBotEvents.Commands
|
||||
{
|
||||
|
|
@ -44,11 +46,15 @@ namespace SecondBotEvents.Commands
|
|||
}
|
||||
|
||||
[About("Resets the animation stack for the bot")]
|
||||
[ReturnHints("Accepted")]
|
||||
[ReturnHints("Accepted - X stopped animations")]
|
||||
public object ResetAnimations()
|
||||
{
|
||||
// @todo Reset animations function from old version
|
||||
return Failure("@todo");
|
||||
List<UUID> animations = GetClient().Self.SignaledAnimations.Copy().Keys.ToList();
|
||||
foreach (UUID anim in animations)
|
||||
{
|
||||
GetClient().Self.AnimationStop(anim, true);
|
||||
}
|
||||
return BasicReply("Accepted - "+animations.Count.ToString()+" stopped animations");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ namespace SecondBotEvents.Commands
|
|||
{
|
||||
}
|
||||
|
||||
|
||||
[About("an improved version of near me with extra details<br/>NearMeDetails is a object formated as follows<br/><ul><li>id</li><li>name</li><li>x</li><li>y</li><li>z</li><li>range</li></ul>")]
|
||||
[ReturnHints("array NearMeDetails")]
|
||||
[ReturnHintsFailure("Error not in a sim")]
|
||||
|
|
|
|||
|
|
@ -109,6 +109,7 @@ namespace SecondBotEvents.Commands
|
|||
{
|
||||
master.HomeboundService.MarkStandup();
|
||||
GetClient().Self.Stand();
|
||||
master.CommandsService.CommandInterfaceCaller("ResetAnimations", false, false, "Stand command");
|
||||
return BasicReply("ok");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -100,6 +100,8 @@ namespace SecondBotEvents
|
|||
{
|
||||
fromFolder = args[0];
|
||||
}
|
||||
LogFormater.Info("Giving SL a chance - waiting 4 secs");
|
||||
Thread.Sleep(4000);
|
||||
StartServices();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ namespace SecondBotEvents.Services
|
|||
return basicCfg.IsLoaded();
|
||||
}
|
||||
|
||||
public override void Start()
|
||||
public override void Start(bool updateEnabled = false, bool setEnabledTo = false)
|
||||
{
|
||||
running = true;
|
||||
LogFormater.Info("Client service [Starting]");
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ namespace SecondBotEvents.Services
|
|||
}
|
||||
}
|
||||
}
|
||||
public override void Start()
|
||||
public override void Start(bool updateEnabled = false, bool setEnabledTo = false)
|
||||
{
|
||||
running = true;
|
||||
master.BotClientNoticeEvent += BotClientRestart;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ namespace SecondBotEvents.Services
|
|||
return "Active";
|
||||
}
|
||||
|
||||
public override void Start()
|
||||
public override void Start(bool updateEnabled = false, bool setEnabledTo = false)
|
||||
{
|
||||
Stop();
|
||||
running = true;
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ namespace SecondBotEvents.Services
|
|||
botConnected = true;
|
||||
}
|
||||
|
||||
public override void Start()
|
||||
public override void Start(bool updateEnabled = false, bool setEnabledTo = false)
|
||||
{
|
||||
running = true;
|
||||
master.BotClientNoticeEvent += BotClientRestart;
|
||||
|
|
|
|||
|
|
@ -1093,8 +1093,12 @@ namespace SecondBotEvents.Services
|
|||
}
|
||||
}
|
||||
|
||||
public override void Start()
|
||||
public override void Start(bool updateEnabled = false, bool setEnabledTo = false)
|
||||
{
|
||||
if (updateEnabled)
|
||||
{
|
||||
myConfig.setEnabled(setEnabledTo);
|
||||
}
|
||||
Stop();
|
||||
running = true;
|
||||
master.BotClientNoticeEvent += BotClientRestart;
|
||||
|
|
|
|||
|
|
@ -245,8 +245,12 @@ namespace SecondBotEvents.Services
|
|||
GetClient().Self.ScriptDialog += DialogWindowEvent;
|
||||
}
|
||||
|
||||
public override void Start()
|
||||
public override void Start(bool updateEnabled = false, bool setEnabledTo = false)
|
||||
{
|
||||
if (updateEnabled)
|
||||
{
|
||||
myConfig.setEnabled(setEnabledTo);
|
||||
}
|
||||
Stop();
|
||||
running = true;
|
||||
master.BotClientNoticeEvent += BotClientRestart;
|
||||
|
|
|
|||
|
|
@ -524,8 +524,12 @@ namespace SecondBotEvents.Services
|
|||
return true;
|
||||
}
|
||||
|
||||
public override void Start()
|
||||
public override void Start(bool updateEnabled = false, bool setEnabledTo = false)
|
||||
{
|
||||
if (updateEnabled)
|
||||
{
|
||||
myConfig.setEnabled(setEnabledTo);
|
||||
}
|
||||
running = true;
|
||||
if (myConfig.GetEnabled() == false)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -419,8 +419,12 @@ namespace SecondBotEvents.Services
|
|||
|
||||
|
||||
|
||||
public override void Start()
|
||||
public override void Start(bool updateEnabled = false, bool setEnabledTo = false)
|
||||
{
|
||||
if (updateEnabled)
|
||||
{
|
||||
myConfig.setEnabled(setEnabledTo);
|
||||
}
|
||||
if (myConfig.GetEnabled() == false)
|
||||
{
|
||||
LogFormater.Info("Events service [Disabled]");
|
||||
|
|
|
|||
|
|
@ -319,9 +319,13 @@ namespace SecondBotEvents.Services
|
|||
LogFormater.Info("Homebound Service [Active]");
|
||||
}
|
||||
|
||||
public override void Start()
|
||||
public override void Start(bool updateEnabled = false, bool setEnabledTo = false)
|
||||
{
|
||||
if(myConfig.GetEnabled() == false)
|
||||
if (updateEnabled)
|
||||
{
|
||||
myConfig.setEnabled(setEnabledTo);
|
||||
}
|
||||
if (myConfig.GetEnabled() == false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -84,8 +84,12 @@ namespace SecondBotEvents.Services
|
|||
CreateWebServer();
|
||||
}
|
||||
|
||||
public override void Start()
|
||||
public override void Start(bool updateEnabled = false, bool setEnabledTo = false)
|
||||
{
|
||||
if (updateEnabled)
|
||||
{
|
||||
myConfig.setEnabled(setEnabledTo);
|
||||
}
|
||||
if (myConfig.GetEnabled() == false)
|
||||
{
|
||||
LogFormater.Info("HTTP service [Disabled]");
|
||||
|
|
|
|||
|
|
@ -245,8 +245,12 @@ namespace SecondBotEvents.Services
|
|||
LogFormater.Info("Interaction Service [Active]");
|
||||
}
|
||||
|
||||
public override void Start()
|
||||
public override void Start(bool updateEnabled = false, bool setEnabledTo = false)
|
||||
{
|
||||
if (updateEnabled)
|
||||
{
|
||||
myConfig.setEnabled(setEnabledTo);
|
||||
}
|
||||
if (myConfig.GetEnabled() == false)
|
||||
{
|
||||
LogFormater.Info("Interaction Service [- Not requested -]");
|
||||
|
|
|
|||
|
|
@ -128,8 +128,12 @@ namespace SecondBotEvents.Services
|
|||
}
|
||||
|
||||
|
||||
public override void Start()
|
||||
public override void Start(bool updateEnabled = false, bool setEnabledTo = false)
|
||||
{
|
||||
if(updateEnabled)
|
||||
{
|
||||
myConfig.setEnabled(setEnabledTo);
|
||||
}
|
||||
if (myConfig.GetEnabled() == false)
|
||||
{
|
||||
LogFormater.Info("Events service [Disabled]");
|
||||
|
|
|
|||
|
|
@ -245,8 +245,12 @@ namespace SecondBotEvents.Services
|
|||
}
|
||||
|
||||
|
||||
public override void Start()
|
||||
public override void Start(bool updateEnabled = false, bool setEnabledTo = false)
|
||||
{
|
||||
if (updateEnabled)
|
||||
{
|
||||
myConfig.setEnabled(setEnabledTo);
|
||||
}
|
||||
Stop();
|
||||
running = true;
|
||||
master.BotClientNoticeEvent += BotClientRestart;
|
||||
|
|
|
|||
|
|
@ -18,8 +18,7 @@ namespace SecondBotEvents.Services
|
|||
|
||||
public void enableAndStart()
|
||||
{
|
||||
myConfig.setEnabled(true);
|
||||
Restart();
|
||||
Restart(true, true);
|
||||
}
|
||||
|
||||
public void changeConfig(string configKey, string configValue)
|
||||
|
|
@ -46,7 +45,7 @@ namespace SecondBotEvents.Services
|
|||
return "";
|
||||
}
|
||||
|
||||
public virtual void Start()
|
||||
public virtual void Start(bool updateEnabled = false, bool setEnabledTo = false)
|
||||
{
|
||||
running = true;
|
||||
}
|
||||
|
|
@ -54,13 +53,13 @@ namespace SecondBotEvents.Services
|
|||
{
|
||||
running = false;
|
||||
}
|
||||
public void Restart()
|
||||
public void Restart(bool updateEnabled=false, bool setEnabledTo=false)
|
||||
{
|
||||
if (running == true)
|
||||
{
|
||||
Stop();
|
||||
}
|
||||
Start();
|
||||
Start(updateEnabled, setEnabledTo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -786,8 +786,12 @@ namespace SecondBotEvents.Services
|
|||
AttachEvents();
|
||||
}
|
||||
|
||||
public override void Start()
|
||||
public override void Start(bool updateEnabled = false, bool setEnabledTo = false)
|
||||
{
|
||||
if (updateEnabled)
|
||||
{
|
||||
myConfig.setEnabled(setEnabledTo);
|
||||
}
|
||||
if (myConfig.GetEnabled() == false)
|
||||
{
|
||||
LogFormater.Info("OnEvent Service [- Not requested -]");
|
||||
|
|
|
|||
Loading…
Reference in a new issue