Add Landing Gear to available sequencer actions.

This commit is contained in:
2025-02-28 12:47:11 -08:00
parent 484e227f93
commit f2f4ec5395
3 changed files with 73 additions and 0 deletions

View File

@ -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}'");