From 1a2627031d8a80b1d5e21fd2d13e4dc2b123c0b4 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 3 Sep 2013 19:05:54 +0100 Subject: Add pCampbot "remove behaviour" console command for removing bot behaviours during operation. Doesn't currently work very well as stopping physics, for instance, can leave bot travelling in old direction --- OpenSim/Tools/pCampBot/Bot.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'OpenSim/Tools/pCampBot/Bot.cs') diff --git a/OpenSim/Tools/pCampBot/Bot.cs b/OpenSim/Tools/pCampBot/Bot.cs index 6037516..0bd8151 100644 --- a/OpenSim/Tools/pCampBot/Bot.cs +++ b/OpenSim/Tools/pCampBot/Bot.cs @@ -184,6 +184,12 @@ namespace pCampBot CreateLibOmvClient(); } + public bool TryGetBehaviour(string abbreviatedName, out IBehaviour behaviour) + { + lock (Behaviours) + return Behaviours.TryGetValue(abbreviatedName, out behaviour); + } + public bool AddBehaviour(IBehaviour behaviour) { lock (Behaviours) @@ -200,6 +206,12 @@ namespace pCampBot return false; } + public bool RemoveBehaviour(string abbreviatedName) + { + lock (Behaviours) + return Behaviours.Remove(abbreviatedName); + } + private void CreateLibOmvClient() { GridClient newClient = new GridClient(); -- cgit v1.1