public static bool CanBeSaved(bool asTemplate, MyMwcSectorIdentifier sectorId, bool fromEditor) { bool isLogged = MyClientServer.LoggedPlayer != null; // Must be logged bool isNotDemo = !MyClientServer.LoggedPlayer.IsDemoUser(); // Cannot be demo user bool sectorCanBeSaved = sectorId.CanBeCheckpointSaved(); // Sector must be savable (for story only zero plane) bool canSaveObjectives = MyMissions.CanSaveObjectives(); // Story sectors can be only on "zero" plane (Y coordinate is 0) return (isLogged && isNotDemo && sectorCanBeSaved && canSaveObjectives && (asTemplate == false || MyClientServer.LoggedPlayer.GetCanAccessEditorForStory()) && // When saving story template, must have story editor access (fromEditor == false || sectorId.SectorType != MyMwcSectorTypeEnum.STORY || MyClientServer.LoggedPlayer.GetCanAccessEditorForStory())); // To save STORY sector from editor, it's necessary to have rights }