예제 #1
0
            private static void GetInfo(Player player, int id)
            {
                Dictionary <string, string> result = RaceCreator.GetRaceInfo(id);

                if (result.Count == 0)
                {
                    player.SendClientMessage("No race found !");
                }
                else
                {
                    var    infoList = new ListDialog("Race info", "Ok", "");
                    string str      = "";
                    foreach (KeyValuePair <string, string> kvp in result)
                    {
                        str = new Color(50, 50, 255) + kvp.Key + ": " + new Color(255, 255, 255) + kvp.Value;
                        if (str.Length >= 64)
                        {
                            infoList.AddItem(str.Substring(0, 63));
                            infoList.AddItem(str.Substring(63));
                        }
                        else
                        {
                            infoList.AddItem(str);
                        }
                    }
                    infoList.Show(player);
                }
            }
예제 #2
0
            private static void FindRace(Player player, string name)
            {
                Dictionary <string, string> result = RaceCreator.FindRace(name);

                if (result.Count == 0)
                {
                    player.SendClientMessage("No race found !");
                }
                else
                {
                    foreach (KeyValuePair <string, string> kvp in result)
                    {
                        player.SendClientMessage(string.Format("{0}: {1}", kvp.Key, kvp.Value));
                    }
                }
            }
    private void Awake()
    {
        Time.timeScale = simulationScale;
        raceCreator    = GetComponent <RaceCreator>();
        switch (initType)
        {
        case InitType.Learn:
            StartLearning();
            break;

        case InitType.Race:
            StartRace();
            break;

        case InitType.Record:
            StartDataRecording();
            break;

        default:
            break;
        }
    }
예제 #4
0
        internal static void CreateRaceBodyParts(TES3Lib.Records.RACE mwRACE)
        {
            var config = new RaceCreator.CreatorConfig();

            config.EditorId        = mwRACE.NAME.EditorId;
            config.IsBodyPartsOnly = true;
            config.IsMale          = true;
            config.EditorIdPrefix  = "SE";
            config.IsFemale        = mwRACE.NAME.EditorId.Equals("Sheogorath\0") ? false : true;
            config.ModelFolderPath = $"{Config.convertedRootFolder}\\{Config.RACEPath}\\{mwRACE.NAME.EditorId.TrimEnd('\0')}";
            config.IsBeast         = false;
            var bodyParts = RaceCreator.CreateRace(config);

            if (!ConvertedRecords.ContainsKey("BODY"))
            {
                ConvertedRecords.Add("BODY", new List <ConvertedRecordData>());
            }

            foreach (var item in bodyParts)
            {
                Helpers.ConvertedRecords["BODY"].Add(new ConvertedRecordData("generated", "BODY", item.GetEditorId(), item));
            }
        }