Check for valid power names
This commit is contained in:
parent
77347734c4
commit
8ec727498a
|
@ -62,8 +62,13 @@ public class GameScriptHandler : IScriptHandler
|
|||
break;
|
||||
|
||||
case "orders":
|
||||
if (World.Powers.Any(p => p.Name == args[1]))
|
||||
{
|
||||
var handler = new OrderSetScriptHandler(this, World, input);
|
||||
return handler;
|
||||
}
|
||||
Console.WriteLine("Unrecognized power");
|
||||
break;
|
||||
|
||||
default:
|
||||
Console.WriteLine("Unrecognized command");
|
||||
|
|
Loading…
Reference in New Issue