public static bool Prefix(SeaMoth __instance) { // Suppress powered on if a seamoth´s default is set to false GameObject gameObject = __instance.gameObject; NitroxId id = NitroxEntity.GetId(gameObject); Optional <SeamothModel> model = NitroxServiceLocator.LocateService <Vehicles>().TryGetVehicle <SeamothModel>(id); if (!model.HasValue) { Log.Error($"{nameof(Seamoth_SubConstructionComplete_Patch)}: Could not find {nameof(CyclopsModel)} by Nitrox id {id}.\nGO containing wrong id: {__instance.GetFullHierarchyPath()}"); return(false); } // Set lights of seamoth Validate.NotNull(__instance.toggleLights, $"toggleLights is Null on {__instance.gameObject.name} {__instance.transform.position}"); __instance.toggleLights.SetLightsActive(model.Value.LightOn); return(model.Value.LightOn); }