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