示例#1
0
 protected override void OnBeforeInitialModuleScreenSetAsRoot() //assure player :) also myself lol
 {
     UX.ShowMessage("CustomSpawns " + version + " is now enabled. Enjoy! :)", Color.ConvertStringToColor("#001FFFFF"));
     AI.AIManager.FlushRegisteredBehaviours(); //forget old behaviours to allocate space.
     foreach (var subMod in ModIntegration.SubModManager.dependentModsArray)
     {
         UX.ShowMessage(subMod.SubModuleName + " is now integrated into the CustomSpawns API.", Color.ConvertStringToColor("#001FFFFF"));
     }
 }
示例#2
0
        public static void ShowPureErrorMessage(string errorMessage)
        {
            if (!numberOfTimesShown.ContainsKey(errorMessage))
            {
                numberOfTimesShown.Add(errorMessage, 1);
            }
            else
            {
                numberOfTimesShown[errorMessage]++;
            }

            if (numberOfTimesShown[errorMessage] > CsSettings.SameErrorShowUntil)
            {
                UX.ShowMessage(errorMessage, Color.ConvertStringToColor(UX.GetMessageColour("error")));
            }
            else
            {
                MessageBox.Show(errorMessage);
            }
        }