public static string[] ForPac(TracklistModifier modifier, CMM cmm, string filename) { filename = filename.ToLower(); string key = filename.Substring(0, filename.IndexOfAny("_.".ToCharArray())); int stageId = StageIDMap.StageIDForPac(filename); if (cmm != null && cmm.Map.TryGetValue(stageId, out IEnumerable <Song> songs)) { return(songs.Select(s => s.Filename).ToArray()); } // Tracklist Modifier 1.0 [Phantom Wings] if (cmm.TracklistModifier != null) { byte currentTracklistId = cmm.TracklistModifier[stageId]; for (int i = 0; i < CMM.StandardCMMTracklistModifierData.Length; i++) { if (CMM.StandardCMMTracklistModifierData[i] == currentTracklistId) { int originalStageId = i; // Make sure the index is a valid stage ID. Some bytes // appear more than once, the first time at an index // that's not a valid stage ID (e.g. Battlefield's 00 // at index 0 or Bridge of Eldin's 0A at index 10.) if (Stage.Stages.Any(s => s.ID == i)) { stageId = originalStageId; break; } } } } // Tracklist Modifier [standardtoaster] stageId = modifier[stageId]; if (stageId == 5 && filename.StartsWith("stgmariopast_00")) { return(new[] { "A01", "A16", "A10" }); } if (stageId == 5 && filename.StartsWith("stgmariopast_01")) { return(new[] { "A02", "A03", "A04" }); } if (dict.TryGetValue(stageId, out string[] ret))
public static List <string> Init(string appDir) { List <string> errors = new List <string>(); DirectoryInfo di = new DirectoryInfo(appDir); di.Create(); TEP = TextEditorProperties.Load(appDir); List <string> userActions = new List <string>(); errors.AddRange(CMM.LoadMaps(@".\Resources\default.ctlmap", Path.Combine(appDir, "Settings", "custom.ctlmap"), Directory.GetFiles(Path.Combine(appDir, "Actions"), "*.cs").ToList())); FontRegistry.SetFont(TEP.Font); return(errors); }
public string getEgSoap(string p_str) { string strRet = ""; /*if(logic.GlobalFunc.iMaxConns <= 0) * { * logic.GlobalFunc.iMaxConns = Int32.Parse(System.Configuration.ConfigurationSettings.AppSettings["ConnMax"].ToString()); * } * //<?xml version="1.0" encoding="utf-8"?><eg><cm>RefreshSelf</cm><UserName>jm</UserName></eg> * * if(logic.GlobalFunc.iGlobalUserNum < 0) * logic.GlobalFunc.iGlobalUserNum = 0; * * if(logic.GlobalFunc.iGlobalUserNum < logic.GlobalFunc.iMaxConns) * { * logic.GlobalFunc.iGlobalUserNum++;*/ strRet = CMM.procCmm(p_str); //} return(strRet); }