mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
Don't allow the last behavior to be removed from a pCampbot bot
If you want to stop existing behavious, add the None behaviour.
This commit is contained in:
@@ -208,6 +208,9 @@ namespace pCampBot
|
||||
|
||||
public bool RemoveBehaviour(string abbreviatedName)
|
||||
{
|
||||
if (Behaviours.Count <= 0)
|
||||
return false;
|
||||
|
||||
Dictionary<string, IBehaviour> updatedBehaviours = new Dictionary<string, IBehaviour>(Behaviours);
|
||||
IBehaviour behaviour;
|
||||
|
||||
|
||||
@@ -628,7 +628,7 @@ namespace pCampBot
|
||||
}
|
||||
|
||||
MainConsole.Instance.OutputFormat(
|
||||
"Removed behaviours {0} to bot {1}",
|
||||
"Removed behaviours {0} from bot {1}",
|
||||
string.Join(", ", behavioursRemoved.ConvertAll<string>(b => b.Name).ToArray()), bot.Name);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user