private Dictionary<string, Cottle.Value> createVariables(Event theEvent = null)
{
Dictionary<string, Cottle.Value> dict = new Dictionary<string, Cottle.Value>();
if (EDDI.Instance.Cmdr != null)
{
dict["cmdr"] = new ReflectionValue(EDDI.Instance.Cmdr);
}
if (EDDI.Instance.Ship != null)
{
dict["ship"] = new ReflectionValue(EDDI.Instance.Ship);
}
if (EDDI.Instance.HomeStarSystem != null)
{
dict["homesystem"] = new ReflectionValue(EDDI.Instance.HomeStarSystem);
}
if (EDDI.Instance.HomeStation != null)
{
dict["homestation"] = new ReflectionValue(EDDI.Instance.HomeStation);
}
if (EDDI.Instance.CurrentStarSystem != null)
{
dict["system"] = new ReflectionValue(EDDI.Instance.CurrentStarSystem);
}
if (EDDI.Instance.LastStarSystem != null)
{
dict["lastsystem"] = new ReflectionValue(EDDI.Instance.LastStarSystem);
}
if (EDDI.Instance.CurrentStation != null)
{
dict["station"] = new ReflectionValue(EDDI.Instance.CurrentStation);
}
if (theEvent != null)
{
dict["event"] = new ReflectionValue(theEvent);
}
return dict;
}