alterNERDtive-base: added some parameter checking for contexts that didn’t have it
This commit is contained in:
parent
69b097d7c3
commit
9d8eedd581
1 changed files with 3 additions and 3 deletions
|
@ -66,7 +66,7 @@ namespace alterNERDtive
|
||||||
|
|
||||||
private static void Context_Config_SetVariables(dynamic vaProxy)
|
private static void Context_Config_SetVariables(dynamic vaProxy)
|
||||||
{
|
{
|
||||||
string trigger = vaProxy.GetText("~trigger");
|
string trigger = vaProxy.GetText("~trigger") ?? throw new ArgumentNullException("~trigger");
|
||||||
Log.Debug($"Loading variables for trigger '{trigger}' …");
|
Log.Debug($"Loading variables for trigger '{trigger}' …");
|
||||||
Config.SetVariablesForTrigger(vaProxy, trigger);
|
Config.SetVariablesForTrigger(vaProxy, trigger);
|
||||||
}
|
}
|
||||||
|
@ -166,8 +166,8 @@ namespace alterNERDtive
|
||||||
|
|
||||||
private static void Context_DistanceBetween(dynamic vaProxy)
|
private static void Context_DistanceBetween(dynamic vaProxy)
|
||||||
{
|
{
|
||||||
string fromSystem = vaProxy.GetText("~fromSystem");
|
string fromSystem = vaProxy.GetText("~fromSystem") ?? throw new ArgumentNullException("~fromSystem");
|
||||||
string toSystem = vaProxy.GetText("~toSystem");
|
string toSystem = vaProxy.GetText("~toSystem") ?? throw new ArgumentNullException("~toSystem");
|
||||||
int roundTo = vaProxy.GetInt("~roundTo") ?? 2;
|
int roundTo = vaProxy.GetInt("~roundTo") ?? 2;
|
||||||
|
|
||||||
string path = $"{vaProxy.GetText("Python.ScriptPath")}\\explorationtools.exe";
|
string path = $"{vaProxy.GetText("Python.ScriptPath")}\\explorationtools.exe";
|
||||||
|
|
Loading…
Reference in a new issue