Add Landing Gear to available sequencer actions.
This commit is contained in:
@ -189,6 +189,28 @@ namespace IngameScript
|
||||
}
|
||||
return new BlockActionMerge(block as IMyShipMergeBlock, action);
|
||||
}
|
||||
else if (block is IMyLandingGear)
|
||||
{
|
||||
LandingGearAction action;
|
||||
string config = Ini.Get(key, "action").ToString("unlock").ToLower();
|
||||
switch (config)
|
||||
{
|
||||
case "enable":
|
||||
action = LandingGearAction.Enable;
|
||||
break;
|
||||
case "disable":
|
||||
action = LandingGearAction.Disable;
|
||||
break;
|
||||
case "lock":
|
||||
action = LandingGearAction.Lock;
|
||||
break;
|
||||
case "unlock":
|
||||
action = LandingGearAction.Unlock;
|
||||
break;
|
||||
}
|
||||
|
||||
return new BlockActionLandingGear(block as IMyLandingGear, action);
|
||||
}
|
||||
// TODO: there are several block types added for other scripts that we should support here.
|
||||
|
||||
Console.Print($"Can't add unsupported block '{block.CustomName}'");
|
||||
|
Reference in New Issue
Block a user