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:
Justin Clark-Casey (justincc)
2014-08-15 22:43:55 +01:00
parent 1d2933ca51
commit 3a643e2456
2 changed files with 4 additions and 1 deletions

View File

@@ -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;