Beispiel #1
0
        public SimAvatar(SimAvatar old)
            : base(old.BaseSkeleton)
        {
            m_Handgroup = old.m_Handgroup;
            m_Body = old.m_Body;
            m_Head = old.m_Head;

            ReloadSkeleton();
            ReloadHead();
            ReloadBody();
            ReloadHandgroup();
        }
 public Dialog_ManageOutfitsAutoEquip(Outfit selectedOutfit)
 {
     this.forcePause = true;
     this.doCloseX = true;
     this.closeOnEscapeKey = true;
     this.doCloseButton = true;
     this.closeOnClickedOutside = true;
     this.absorbInputAroundWindow = true;
     if (Dialog_ManageOutfitsAutoEquip.apparelGlobalFilter == null)
     {
         Dialog_ManageOutfitsAutoEquip.apparelGlobalFilter = new ThingFilter();
         Dialog_ManageOutfitsAutoEquip.apparelGlobalFilter.SetAllow(ThingCategoryDefOf.Apparel, true);
     }
     this.SelectedOutfit = selectedOutfit;
 }
Beispiel #3
0
        /*
         * Build
         * Puts together the outfits using the specified pieces into a SnakeBite ready folder.
         */
        public static void Build(string outputPath, string character, string playerOutfit, string characterOutfit, string characterHead, List<string> characterHeadValues, string fcnp, List<string> sims, bool includeOutfitPftxs, bool useBody, List<string> extraList, bool includeHeadPftxs, bool useFv2)
        {
            string playerOutfitName = "";
            string fpkOutputPath = "";
            string fpkdOutputPath = "";
            string fv2Path = "";
            string headPath = "";
            bool isArmBody = false;
            List<string> arm = new List<string>(0);
            List<string> armFrdv = new List<string>(0);
            Outfit outfit = new Outfit();

            string[] faceFv2Values = { "2BEC9C7EE5A3A284", "8766FD743C88A084", "38EB424C72BDA384", "", "5F7E60E40985A284", "FCFFD59AEF2FA384", "425AEAA188A5A284" };

            GetOutfits(); //load the list of outfits.

            //determine the outfit path, fpk path and fpkd path.
            if (character == "snake")
            {
                headPath = @"\Assets\tpp\chara\sna\Scenes\sna0_face0_cov.fmdl";

                switch (playerOutfit)
                {
                    case "dla0":
                        playerOutfitName = "plparts_dla0_main0_def_v00";
                        break;
                    case "dla1":
                        playerOutfitName = "plparts_dla1_main0_def_v00";
                        break;
                    case "dlb0":
                        playerOutfitName = "plparts_dlb0_main0_def_v00";
                        break;
                    case "dld0":
                        playerOutfitName = "plparts_dld0_main0_def_v00";
                        break;
                    default:
                        playerOutfitName = "plparts_" + playerOutfit;
                        break;
                } //switch ends
            } //if ends
            else if (character == "female")
            {
                headPath = @"\Assets\tpp\chara\dds\Scenes\dds6_head_z_cov.fmdl";

                switch (playerOutfit)
                {
                    case "normal":
                        playerOutfitName = "plparts_dd_female";
                        break;
                    case "dlc0":
                        playerOutfitName = "plparts_dlc0_plyf0_def_v00";
                        break;
                    case "dlc1":
                        playerOutfitName = "plparts_dlc1_plyf0_def_v00";
                        break;
                    case "dle0":
                        playerOutfitName = "plparts_dle0_plyf0_def_v00";
                        break;
                    case "dle1":
                        playerOutfitName = "plparts_dle1_plyf0_def_v00";
                        break;
                    default:
                        playerOutfitName = "plparts_ddf_" + playerOutfit;
                        break;
                } //switch ends
            } //else if ends
            else
            {
                headPath = @"\Assets\tpp\chara\dds\Scenes\dds5_head_z_cov.fmdl";

                switch (playerOutfit)
                {
                    case "normal":
                        playerOutfitName = "plparts_dd_male";
                        break;
                    case "dla0":
                        playerOutfitName = "plparts_dla0_plym0_def_v00";
                        break;
                    case "dla1":
                        playerOutfitName = "plparts_dla1_plym0_def_v00";
                        break;
                    case "dlb0":
                        playerOutfitName = "plparts_dlb0_plym0_def_v00";
                        break;
                    case "dld0":
                        playerOutfitName = "plparts_dld0_plym0_def_v00";
                        break;
                    default:
                        playerOutfitName = "plparts_ddm_" + playerOutfit;
                        break;
                } //switch ends
            } //else ends

            outputPath += @"\Assets\tpp\pack\player\parts\" + playerOutfitName;
            fpkOutputPath = outputPath + "_fpk";
            fpkdOutputPath = fpkOutputPath + "d";
            fv2Path = fpkOutputPath + @"\Assets\tpp\fova\chara\sna";

            //find the outfit to output to.
            for (int i = 0; i < outfits.Count; i++)
                if (outfits[i].name == playerOutfitName)
                    outfit = outfits[i];

            //create the output path and copy the .fcnp there.
            Directory.CreateDirectory(Path.GetDirectoryName(fpkOutputPath + outfit.outfitPath));
            Directory.CreateDirectory(Path.GetDirectoryName(fpkOutputPath + outfit.fcnpPath));
            File.Copy(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + @"\assets\fcnp\" + fcnp + ".fcnp", fpkOutputPath + outfit.fcnpPath, true);

            //if the outfit needs a .pftxs, copy it over.
            if (includeOutfitPftxs)
                File.Copy(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + @"\assets\pftxs\" + characterOutfit + ".pftxs", Path.GetDirectoryName(fpkOutputPath) + "\\" + playerOutfitName + ".pftxs", true);

            //if the head needs a .pftxs copy it over.
            if (includeHeadPftxs)
            {
                //if there's no outfit .pftxs, copy the head one. otherwise, merge the .pftxs files.
                if (!includeOutfitPftxs)
                    File.Copy(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + @"\assets\pftxs\" + characterHead + ".pftxs", outputPath + ".pftxs", true);
                else if (characterOutfit != characterHead)
                {
                    string mainPftxs = outputPath + ".pftxs";
                    string outputFolder = outputPath + "_pftxs";
                    string extraPftxs = Path.GetDirectoryName(outputPath) + "\\" + characterHead + ".pftxs";

                    File.Copy(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + @"\assets\pftxs\" + characterHead + ".pftxs", extraPftxs, true);

                    ArchiveHandler.ExtractArchive<PftxsFile>(mainPftxs, outputFolder);
                    ArchiveHandler.ExtractArchive<PftxsFile>(extraPftxs, outputFolder);
                    ArchiveHandler.WritePftxsArchive(mainPftxs, outputFolder);

                    File.Delete(extraPftxs);
                    DeleteDirectory(outputFolder);
                } //else if ends
            } //if ends

            //determine whether we need a full model or a separate head and body model.
            if (characterOutfit == characterHead && useBody)
            {
                File.Copy(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + @"\assets\frdv\" + characterOutfit + ".frdv", fpkOutputPath + outfit.frdvPath, true);
                characterOutfit = "full-" + characterOutfit;

                for (int i = 0; i < characterHeadValues.Count; i++)
                    characterHeadValues[i] = "empty";

                arm = extraList;
                armFrdv = extraList;
            } //if ends
            else
            {
                if (useBody)
                {
                    File.Copy(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + @"\assets\frdv\" + characterOutfit + ".frdv", fpkOutputPath + outfit.frdvPath, true);
                    characterOutfit = "body-" + characterOutfit;

                    for (int i = 0; i < characterHeadValues.Count; i++)
                        characterHeadValues[i] = "head-" + characterHeadValues[i];

                    arm = extraList;
                    armFrdv = extraList;
                } //if ends
                else if (!useBody && outfit.outfitType != (int)OutfitType.HEAD_NO_ARM && outfit.outfitType != (int)OutfitType.NO_HEAD_NO_ARM)
                {
                    File.Copy(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + @"\assets\frdv\" + characterHead + ".frdv", fpkOutputPath + outfit.frdvPath, true);
                    for (int i = 0; i < 7; i++)
                        armFrdv.Add(characterOutfit);

                    for (int i = 0; i < 9; i++)
                        if (i < 7)
                            arm.Add("body-" + characterOutfit);
                        else
                            arm.Add("empty");

                    characterOutfit = "head-" + characterHead;
                    characterHeadValues = extraList;
                    isArmBody = true;
                } //else if ends
                else
                {
                    File.Copy(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + @"\assets\frdv\" + characterHead + ".frdv", fpkOutputPath + outfit.frdvPath, true);
                    string tempOutfit = characterOutfit;
                    characterOutfit = "head-" + characterHead;

                    for (int i = 0; i < characterHeadValues.Count; i++)
                        characterHeadValues[i] = "body-" + tempOutfit;

                    arm = extraList;
                    armFrdv = extraList;
                } //else ends
            } //else ends

            //copy the outfit to the output path.
            File.Copy(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + @"\assets\fmdl\" + characterOutfit + ".fmdl", fpkOutputPath + outfit.outfitPath, true);

            //copy the head if one is needed.
            if (outfit.outfitType != (int)OutfitType.NO_HEAD_ARM && outfit.outfitType != (int)OutfitType.NO_HEAD_NO_ARM)
            {
                Directory.CreateDirectory(Path.GetDirectoryName(fpkOutputPath + headPath));

                File.Copy(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + @"\assets\fmdl\" + characterHeadValues[0] + ".fmdl", fpkOutputPath + headPath, true);

                //if the character is Snake, we need to copy the head a bunch of times.
                if (character == "snake")
                {
                    int headNum = 0;
                    bool singleHeadValue = true;

                    //if there are more than six head values, remove any heads after the sixth.
                    if (characterHeadValues.Count > 6)
                        characterHeadValues.RemoveRange(6, characterHeadValues.Count - 6);

                    //if all of the head values are the same, we only need a single head.
                    for (int i = 0; i < characterHeadValues.Count; i++)
                        for (int j = 0; j < characterHeadValues.Count; j++)
                            if (characterHeadValues[i] != characterHeadValues[j])
                                singleHeadValue = false;

                    //if all of the head values are the same, remove all but one head.
                    if (singleHeadValue)
                        characterHeadValues.RemoveRange(1, characterHeadValues.Count - 1);

                    if (characterHeadValues.Count > 1)
                        headNum++;

                    for (int i = 0; i < 7; i++)
                    {
                        if (useFv2)
                        {
                            Directory.CreateDirectory(fv2Path);

                            if (i != 3)
                            {
                                File.Copy(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + @"\assets\fv2\face0.fv2", fv2Path + "\\sna0_face" + i + "_v00.fv2", true);

                                if (characterHeadValues.Count > 1)
                                    HexSwapper.Swap(fv2Path + "\\sna0_face" + i + "_v00.fv2", "2BEC9C7EE5A3A284", faceFv2Values[i]);
                            } //if ends

                        } //if ends

                        if (i != 0 && i != 3)
                        {
                            if (!useFv2 || characterHeadValues.Count > 1)
                                File.Copy(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + @"\assets\fmdl\" + characterHeadValues[headNum] + ".fmdl", Path.GetDirectoryName(fpkOutputPath + headPath) + "\\sna0_face" + i + "_cov.fmdl", true);

                            if (characterHeadValues.Count > 1)
                                headNum++;
                        } //if ends
                    } //for ends
                } //if ends
            } //if ends

            //copy the arm if one is needed.
            if (outfit.outfitType != (int)OutfitType.HEAD_NO_ARM && outfit.outfitType != (int)OutfitType.NO_HEAD_NO_ARM)
            {
                bool empty = true;

                for (int i = 0; i < arm.Count; i++)
                    if (arm[i] != "empty")
                        empty = false;

                if (!empty && !isArmBody)
                {
                    File.Copy(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + @"\assets\fmdl\" + arm[7] + ".fmdl", Path.GetDirectoryName(fpkOutputPath + headPath) + "\\sna0_rkt1_cov.fmdl", true);
                    File.Copy(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + @"\assets\fmdl\" + arm[8] + ".fmdl", Path.GetDirectoryName(fpkOutputPath + headPath) + "\\sna0_rkt2_cov.fmdl", true);
                } //if ends

                int armNum = 0;

                for (int i = 0; i < 8; i++)
                    if (i != 5)
                    {
                        if (!empty && !isArmBody)
                        {
                            File.Copy(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + @"\assets\fmdl\" + arm[armNum] + ".fmdl", Path.GetDirectoryName(fpkOutputPath + headPath) + "\\sna0_arm" + i + "_cov.fmdl", true);

                            if (arm[armNum] != "empty")
                                File.Copy(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + @"\assets\frdv\" + armFrdv[armNum] + ".frdv", Path.GetDirectoryName(fpkOutputPath + headPath) + "\\sna0_arm" + i + "_cov.frdv", true);
                        } //if ends
                        else
                        {
                            Directory.CreateDirectory(fv2Path);
                            if (i == 0)
                            {
                                File.Copy(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + @"\assets\fmdl\" + arm[armNum] + ".fmdl", Path.GetDirectoryName(fpkOutputPath + headPath) + "\\sna0_arm" + i + "_cov.fmdl", true);

                                if (!empty)
                                    File.Copy(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + @"\assets\frdv\" + armFrdv[armNum] + ".frdv", Path.GetDirectoryName(fpkOutputPath + headPath) + "\\sna0_arm" + i + "_cov.frdv", true);
                            } //if ends

                            if(i == 1 || i == 2)
                                File.Copy(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + @"\assets\fv2\arm1.fv2", fv2Path + "\\sna0_arm" + i + "_v00.fv2", true);
                            else
                                File.Copy(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + @"\assets\fv2\arm0.fv2", fv2Path + "\\sna0_arm" + i + "_v00.fv2", true);
                        } //else ends

                        armNum++;
                    } //if ends
            } //if ends

            //if there's a .sim, copy it.
            if (sims.Count != 0)
            {
                //create the directory to copy .sims to.
                Directory.CreateDirectory(Path.GetDirectoryName(fpkdOutputPath + outfit.simPath));

                File.Copy(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + @"\assets\sim\" + sims[0] + ".sim", fpkdOutputPath + outfit.simPath, true);

                //if there's a second .sim and the outfit supports a second one, copy it.
                if (sims.Count > 1 && outfit.simPath2 != "None")
                    File.Copy(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + @"\assets\sim\" + sims[1] + ".sim", fpkdOutputPath + outfit.simPath2, true);
            } //if ends

            MessageBox.Show("Done!");
        } //method Build ends
        // GET: Outfits/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Outfit outfit = db.Outfits.Find(id);

            if (outfit == null)
            {
                return(HttpNotFound());
            }

            //Create a SelectList for SUITS only
            List <Article> suitsList = new List <Article>();

            foreach (Article a in db.Articles)
            {
                if (a.ArticleType.ArticleType1.ToLower().Contains("suit"))
                {
                    suitsList.Add(a);
                }
            }

            IEnumerable <Article> Suits = suitsList;

            //Create a SelectList for SHOES only
            List <Article> shoesList = new List <Article>();

            foreach (Article a in db.Articles)
            {
                if (a.ArticleType.ArticleType1.ToLower().Contains("shoes"))
                {
                    shoesList.Add(a);
                }
            }

            IEnumerable <Article> Shoes = shoesList;

            //Create a SelectList for CAPES only
            List <Article> capesList = new List <Article>();

            foreach (Article a in db.Articles)
            {
                if (a.ArticleType.ArticleType1.ToLower().Contains("cape"))
                {
                    capesList.Add(a);
                }
            }

            IEnumerable <Article> Capes = capesList;

            //Create a SelectList for ACCESSORIES only
            List <Article> accessoriesList = new List <Article>();

            foreach (Article a in db.Articles)
            {
                if (a.ArticleType.ArticleType1.ToLower().Contains("accessories"))
                {
                    accessoriesList.Add(a);
                }
            }

            IEnumerable <Article> Accessories = accessoriesList;

            ViewBag.ArticleID1  = new SelectList(Suits, "ArticleID", "Name", outfit.ArticleID1);
            ViewBag.ArticleID2  = new SelectList(Shoes, "ArticleID", "Name", outfit.ArticleID2);
            ViewBag.ArticleID11 = new SelectList(db.Articles, "ArticleID", "Name", outfit.ArticleID11);
            ViewBag.ArticleID12 = new SelectList(db.Articles, "ArticleID", "Name", outfit.ArticleID12);
            ViewBag.ArticleID3  = new SelectList(Capes, "ArticleID", "Name", outfit.ArticleID3);
            ViewBag.ArticleID4  = new SelectList(Accessories, "ArticleID", "Name", outfit.ArticleID4);
            ViewBag.ArticleID5  = new SelectList(Accessories, "ArticleID", "Name", outfit.ArticleID5);
            ViewBag.ArticleID6  = new SelectList(Accessories, "ArticleID", "Name", outfit.ArticleID6);
            ViewBag.ArticleID7  = new SelectList(db.Articles, "ArticleID", "Name", outfit.ArticleID7);
            ViewBag.ArticleID8  = new SelectList(db.Articles, "ArticleID", "Name", outfit.ArticleID8);
            ViewBag.ArticleID9  = new SelectList(db.Articles, "ArticleID", "Name", outfit.ArticleID9);
            ViewBag.ArticleID10 = new SelectList(db.Articles, "ArticleID", "Name", outfit.ArticleID10);
            return(View(outfit));
        }
Beispiel #5
0
 public int GetOutfitPrice(Outfit outfit)
 {
     return(outfit.GetPrice());
 }
        } //method AddTextures ends

        /*
         * GetOutfits
         * Gets a list of all outfits compatible with the tool.
         */
        private static void GetOutfits()
        {
            outfits.Clear();

            Outfit plparts_normal = new Outfit();
            plparts_normal.name = "plparts_normal";
            plparts_normal.outfitPath = @"\Assets\tpp\chara\sna\Scenes\sna0_main0_def.fmdl";
            plparts_normal.hasHead = true;
            outfits.Add(plparts_normal);

            Outfit plparts_normal_scarf = new Outfit();
            plparts_normal_scarf.name = "plparts_normal_scarf";
            plparts_normal_scarf.outfitPath = @"\Assets\tpp\chara\sna\Scenes\sna0_main1_def.fmdl";
            plparts_normal_scarf.hasHead = true;
            outfits.Add(plparts_normal_scarf);

            Outfit plparts_naked = new Outfit();
            plparts_naked.name = "plparts_naked";
            plparts_naked.outfitPath = @"\Assets\tpp\chara\sna\Scenes\sna8_main0_def.fmdl";
            plparts_naked.hasHead = true;
            outfits.Add(plparts_naked);

            Outfit plparts_venom = new Outfit();
            plparts_venom.name = "plparts_venom";
            plparts_venom.outfitPath = @"\Assets\tpp\chara\sna\Scenes\sna4_main0_def.fmdl";
            plparts_venom.hasHead = true;
            outfits.Add(plparts_venom);

            Outfit plparts_battledress = new Outfit();
            plparts_battledress.name = "plparts_battledress";
            plparts_battledress.outfitPath = @"\Assets\tpp\chara\sna\Scenes\sna5_main0_def.fmdl";
            plparts_battledress.hasHead = true;
            outfits.Add(plparts_battledress);

            Outfit plparts_parasite = new Outfit();
            plparts_parasite.name = "plparts_parasite";
            plparts_parasite.outfitPath = @"\Assets\tpp\chara\sna\Scenes\sna7_main0_def.fmdl";
            plparts_parasite.hasHead = false;
            outfits.Add(plparts_parasite);

            Outfit plparts_gz_suit = new Outfit();
            plparts_gz_suit.name = "plparts_gz_suit";
            plparts_gz_suit.outfitPath = @"\Assets\tpp\chara\sna\Scenes\sna2_main1_def.fmdl";
            plparts_gz_suit.hasHead = true;
            outfits.Add(plparts_gz_suit);

            Outfit plparts_mgs1 = new Outfit();
            plparts_mgs1.name = "plparts_mgs1";
            plparts_mgs1.outfitPath = @"\Assets\tpp\chara\sna\Scenes\sna6_main0_def.fmdl";
            plparts_mgs1.hasHead = false;
            outfits.Add(plparts_mgs1);

            Outfit plparts_ninja = new Outfit();
            plparts_ninja.name = "plparts_ninja";
            plparts_ninja.outfitPath = @"\Assets\tpp\chara\nin\Scenes\sna6_main0_def.fmdl";
            plparts_ninja.hasHead = false;
            outfits.Add(plparts_ninja);

            Outfit plparts_raiden = new Outfit();
            plparts_raiden.name = "plparts_raiden";
            plparts_raiden.outfitPath = @"\Assets\tpp\chara\rai\Scenes\rai0_main0_def.fmdl";
            plparts_raiden.hasHead = false;
            outfits.Add(plparts_raiden);

            Outfit plparts_dd_female = new Outfit();
            plparts_dd_female.name = "plparts_dd_female";
            plparts_dd_female.outfitPath = @"\Assets\tpp\chara\dds\Scenes\dds6_main0_def.fmdl";
            plparts_dd_female.hasHead = true;
            outfits.Add(plparts_dd_female);

            Outfit plparts_ddf_venom = new Outfit();
            plparts_ddf_venom.name = "plparts_ddf_venom";
            plparts_ddf_venom.outfitPath = @"\Assets\tpp\chara\sna\Scenes\sna4_plyf0_def.fmdl";
            plparts_ddf_venom.hasHead = true;
            outfits.Add(plparts_ddf_venom);

            Outfit plparts_ddf_battledress = new Outfit();
            plparts_ddf_battledress.name = "plparts_ddf_battledress";
            plparts_ddf_battledress.outfitPath = @"\Assets\tpp\chara\sna\Scenes\sna5_plyf0_def.fmdl";
            plparts_ddf_battledress.hasHead = true;
            outfits.Add(plparts_ddf_battledress);

            Outfit plparts_ddf_parasite = new Outfit();
            plparts_ddf_parasite.name = "plparts_ddf_parasite";
            plparts_ddf_parasite.outfitPath = @"\Assets\tpp\chara\sna\Scenes\sna7_plyf0_def.fmdl";
            plparts_ddf_parasite.hasHead = false;
            outfits.Add(plparts_ddf_parasite);

            Outfit plparts_ddf_swimwear = new Outfit();
            plparts_ddf_swimwear.name = "plparts_ddf_swimwear";
            plparts_ddf_swimwear.outfitPath = @"\Assets\tpp\chara\dlf\Scenes\dlf0_main0_def_f.fmdl";
            plparts_ddf_swimwear.hasHead = true;
            outfits.Add(plparts_ddf_swimwear);

            Outfit plparts_dd_male = new Outfit();
            plparts_dd_male.name = "plparts_dd_male";
            plparts_dd_male.outfitPath = @"\Assets\tpp\chara\dds\Scenes\dds5_main0_def.fmdl";
            plparts_dd_male.hasHead = true;
            outfits.Add(plparts_dd_male);

            Outfit plparts_ddm_venom = new Outfit();
            plparts_ddm_venom.name = "plparts_ddm_venom";
            plparts_ddm_venom.outfitPath = @"\Assets\tpp\chara\sna\Scenes\sna4_plym0_def.fmdl";
            plparts_ddm_venom.hasHead = true;
            outfits.Add(plparts_ddm_venom);

            Outfit plparts_ddm_battledress = new Outfit();
            plparts_ddm_battledress.name = "plparts_ddm_battledress";
            plparts_ddm_battledress.outfitPath = @"\Assets\tpp\chara\sna\Scenes\sna5_plym0_def.fmdl";
            plparts_ddm_battledress.hasHead = true;
            outfits.Add(plparts_ddm_battledress);

            Outfit plparts_ddm_parasite = new Outfit();
            plparts_ddm_parasite.name = "plparts_ddm_parasite";
            plparts_ddm_parasite.outfitPath = @"\Assets\tpp\chara\sna\Scenes\sna7_plym0_def.fmdl";
            plparts_ddm_parasite.hasHead = false;
            outfits.Add(plparts_ddm_parasite);

            Outfit plparts_ddm_swimwear = new Outfit();
            plparts_ddm_swimwear.name = "plparts_ddm_swimwear";
            plparts_ddm_swimwear.outfitPath = @"\Assets\tpp\chara\dlf\Scenes\dlf1_main0_def.fmdl";
            plparts_ddm_swimwear.hasHead = true;
            outfits.Add(plparts_ddm_swimwear);

            //Standard Fatigues (NS)
            Outfit plparts_dla0_main0_def_v00 = new Outfit();
            plparts_dla0_main0_def_v00.name = "plparts_dla0_main0_def_v00";
            plparts_dla0_main0_def_v00.outfitPath = @"\Assets\tpp\chara\dla\Scenes\dla0_main0_def.fmdl";
            plparts_dla0_main0_def_v00.hasHead = true;
            outfits.Add(plparts_dla0_main0_def_v00);

            Outfit plparts_dla0_plym0_def_v00 = new Outfit();
            plparts_dla0_plym0_def_v00.name = "plparts_dla0_plym0_def_v00";
            plparts_dla0_plym0_def_v00.outfitPath = @"\Assets\tpp\chara\dla\Scenes\dla0_plym0_def.fmdl";
            plparts_dla0_plym0_def_v00.hasHead = true;
            outfits.Add(plparts_dla0_plym0_def_v00);

            //Naked Fatigues (NS)
            Outfit plparts_dla1_main0_def_v00 = new Outfit();
            plparts_dla1_main0_def_v00.name = "plparts_dla1_main0_def_v00";
            plparts_dla1_main0_def_v00.outfitPath = @"\Assets\tpp\chara\dla\Scenes\dla1_main0_def.fmdl";
            plparts_dla1_main0_def_v00.hasHead = true;
            outfits.Add(plparts_dla1_main0_def_v00);

            Outfit plparts_dla1_plym0_def_v00 = new Outfit();
            plparts_dla1_plym0_def_v00.name = "plparts_dla1_plym0_def_v00";
            plparts_dla1_plym0_def_v00.outfitPath = @"\Assets\tpp\chara\dla\Scenes\dla1_plym0_def.fmdl";
            plparts_dla1_plym0_def_v00.hasHead = true;
            outfits.Add(plparts_dla1_plym0_def_v00);

            //Sneaking Suit (NS)
            Outfit plparts_dlb0_main0_def_v00 = new Outfit();
            plparts_dlb0_main0_def_v00.name = "plparts_dlb0_main0_def_v00";
            plparts_dlb0_main0_def_v00.outfitPath = @"\Assets\tpp\chara\dlb\Scenes\dlb0_main0_def.fmdl";
            plparts_dlb0_main0_def_v00.hasHead = true;
            outfits.Add(plparts_dlb0_main0_def_v00);

            Outfit plparts_dlb0_plym0_def_v00 = new Outfit();
            plparts_dlb0_plym0_def_v00.name = "plparts_dlb0_plym0_def_v00";
            plparts_dlb0_plym0_def_v00.outfitPath = @"\Assets\tpp\chara\dlb\Scenes\dlb0_plym0_def.fmdl";
            plparts_dlb0_plym0_def_v00.hasHead = true;
            outfits.Add(plparts_dlb0_plym0_def_v00);

            //The Boss (Closed)
            Outfit plparts_dlc0_plyf0_def_v00 = new Outfit();
            plparts_dlc0_plyf0_def_v00.name = "plparts_dlc0_plyf0_def_v00";
            plparts_dlc0_plyf0_def_v00.outfitPath = @"\Assets\tpp\chara\dlc\Scenes\dlc0_plyf0_def.fmdl";
            plparts_dlc0_plyf0_def_v00.hasHead = true;
            outfits.Add(plparts_dlc0_plyf0_def_v00);

            //The Boss (Open)
            Outfit plparts_dlc1_plyf0_def_v00 = new Outfit();
            plparts_dlc1_plyf0_def_v00.name = "plparts_dlc1_plyf0_def_v00";
            plparts_dlc1_plyf0_def_v00.outfitPath = @"\Assets\tpp\chara\dlc\Scenes\dlc1_plyf0_def.fmdl";
            plparts_dlc1_plyf0_def_v00.hasHead = true;
            outfits.Add(plparts_dlc1_plyf0_def_v00);

            //Tuxedo (NS)
            Outfit plparts_dld0_main0_def_v00 = new Outfit();
            plparts_dld0_main0_def_v00.name = "plparts_dld0_main0_def_v00";
            plparts_dld0_main0_def_v00.outfitPath = @"\Assets\tpp\chara\dld\Scenes\dld0_main0_def.fmdl";
            plparts_dld0_main0_def_v00.hasHead = true;
            outfits.Add(plparts_dld0_main0_def_v00);

            Outfit plparts_dld0_plym0_def_v00 = new Outfit();
            plparts_dld0_plym0_def_v00.name = "plparts_dld0_plym0_def_v00";
            plparts_dld0_plym0_def_v00.outfitPath = @"\Assets\tpp\chara\dla\Scenes\dld0_plym0_def.fmdl";
            plparts_dld0_plym0_def_v00.hasHead = true;
            outfits.Add(plparts_dld0_plym0_def_v00);

            //EVA (Closed)
            Outfit plparts_dle0_plyf0_def_v00 = new Outfit();
            plparts_dle0_plyf0_def_v00.name = "plparts_dle0_plyf0_def_v00";
            plparts_dle0_plyf0_def_v00.outfitPath = @"\Assets\tpp\chara\dle\Scenes\dle0_plyf0_def.fmdl";
            plparts_dle0_plyf0_def_v00.hasHead = true;
            outfits.Add(plparts_dle0_plyf0_def_v00);

            //EVA (Open)
            Outfit plparts_dle1_plyf0_def_v00 = new Outfit();
            plparts_dle1_plyf0_def_v00.name = "plparts_dle1_plyf0_def_v00";
            plparts_dle1_plyf0_def_v00.outfitPath = @"\Assets\tpp\chara\dle\Scenes\dle1_plyf0_def.fmdl";
            plparts_dle1_plyf0_def_v00.hasHead = true;
            outfits.Add(plparts_dle1_plyf0_def_v00);
        } //method GetOutfits ends
Beispiel #7
0
        private void DrawOutfitApplyRemove()
        {
            var body = Target;

            GUIContent       label;
            bool             isApplyMode;
            RemoveActionType removeType = RemoveActionType.Undefined;
            var btnStyle = GUI.skin.button;

            if (body.Outfit)
            {
                m_OutfitApplyRemoveChoice = body.Outfit;
                isApplyMode = false;
                label       = new GUIContent("Remove", "Remove the outfit from the body.");

                if (OutfitterEditorUtil.IsNonDestructiveConfirmed)
                {
                    btnStyle   = LizEditorGUIUtil.YellowButton;
                    removeType = RemoveActionType.RemoveOnly;
                }
                else if (OutfitterEditorUtil.IsDestructiveConfirmed)
                {
                    btnStyle   = LizEditorGUIUtil.RedButton;
                    removeType = RemoveActionType.RemoveAndDestroy;
                }
            }
            else
            {
                isApplyMode = true;
                label       = new GUIContent("Apply", "Apply the outfit to the body.");

                if (m_OutfitApplyRemoveChoice && m_OutfitApplyRemoveChoice.Owner)
                {
                    label.tooltip += " (Current outfit owner: " + m_OutfitApplyRemoveChoice.Owner.name + ")";
                    btnStyle       = LizEditorGUIUtil.YellowButton;
                }
            }

            EditorGUILayout.BeginHorizontal();

            GUI.enabled = isApplyMode;

            var noutfit = EditorGUILayout.ObjectField(
                m_OutfitApplyRemoveChoice, typeof(Outfit), true, GUILayout.ExpandWidth(true)) as Outfit;

            if (noutfit != m_OutfitApplyRemoveChoice)
            {
                // Can only happen in apply mode.
                if (noutfit && noutfit.IsManaged)
                {
                    // Undo will become too complex if this is allowed.
                    Debug.LogErrorFormat(body,
                                         "Can't take control of an outfit that is already managed by another object."
                                         + " Outfit: {0}, Owner: {1}", noutfit.name, noutfit.Owner.name);
                }
                else
                {
                    m_OutfitApplyRemoveChoice = noutfit;
                }
            }

            GUI.enabled = m_OutfitApplyRemoveChoice;
            if (GUILayout.Button(label, btnStyle, GUILayout.MaxWidth(70)))
            {
                if (isApplyMode)
                {
                    SetOutfit(body, m_OutfitApplyRemoveChoice, OutfitterEditorUtil.AutoOffset, removeType);
                }
                else
                {
                    SetOutfit(body, null, OutfitterEditorUtil.AutoOffset, removeType);
                }
            }
            GUI.enabled = true;

            EditorGUILayout.EndHorizontal();
        }
Beispiel #8
0
 public void AddOutfit(Outfit outfit)
 {
     outfits.Add(outfit);
 }
 public BuilderJacketBeret(){
     outfit = new Outfit();
 }
Beispiel #10
0
        public static bool TryGiveJob(JobGiver_OptimizeApparel __instance, ref Job __result, Pawn pawn)
        {
            if (pawn.outfits == null)
            {
                Log.ErrorOnce(string.Concat(pawn, " tried to run JobGiver_OptimizeApparel without an OutfitTracker"), 5643897);
                __result = null;
                return(false);
            }

            if (pawn.Faction != Faction.OfPlayer)
            {
                Log.ErrorOnce(string.Concat("Non-colonist ", pawn, " tried to optimize apparel."), 764323);
                __result = null;
                return(false);
            }

            if (pawn.IsQuestLodger())
            {
                __result = null;
                return(false);
            }

            if (!DebugViewSettings.debugApparelOptimize)
            {
                if (Find.TickManager.TicksGame < pawn.mindState.nextApparelOptimizeTick)
                {
                    __result = null;
                    return(false);
                }
            }
            else
            {
                debugSb = new StringBuilder();
                debugSb.AppendLine(string.Concat("Scanning for ", pawn, " at ", pawn.Position));
            }

            Outfit         currentOutfit = pawn.outfits.CurrentOutfit;
            List <Apparel> wornApparel   = pawn.apparel.WornApparel;

            for (int num = wornApparel.Count - 1; num >= 0; num--)
            {
                if (!currentOutfit.filter.Allows(wornApparel[num]) && pawn.outfits.forcedHandler.AllowedToAutomaticallyDrop(wornApparel[num]) && !pawn.apparel.IsLocked(wornApparel[num]))
                {
                    Job job = JobMaker.MakeJob(JobDefOf.RemoveApparel, wornApparel[num]);
                    job.haulDroppedApparel = true;
                    __result = job;
                    return(false);
                }
            }

            Thing        thing = null;
            float        num2  = 0f;
            List <Thing> list  = pawn.Map.listerThings.ThingsInGroup(ThingRequestGroup.Apparel);

            if (list.Count == 0)
            {
                SetNextOptimizeTick2(pawn);
                __result = null;
                return(false);
            }

            neededWarmth = PawnApparelGenerator.CalculateNeededWarmth(pawn, pawn.Map.Tile, GenLocalDate.Twelfth(pawn));
            //wornApparelScores.Clear();
            List <float> wornApparelScores = new List <float>();

            for (int i = 0; i < wornApparel.Count; i++)
            {
                wornApparelScores.Add(JobGiver_OptimizeApparel.ApparelScoreRaw(pawn, wornApparel[i]));
            }

            for (int j = 0; j < list.Count; j++)
            {
                Apparel apparel = (Apparel)list[j];
                if (currentOutfit.filter.Allows(apparel) && apparel.IsInAnyStorage() && !apparel.IsForbidden(pawn) && !apparel.IsBurning() && (apparel.def.apparel.gender == Gender.None || apparel.def.apparel.gender == pawn.gender))
                {
                    float num3 = JobGiver_OptimizeApparel.ApparelScoreGain_NewTmp(pawn, apparel, wornApparelScores);
                    if (DebugViewSettings.debugApparelOptimize)
                    {
                        debugSb.AppendLine(apparel.LabelCap + ": " + num3.ToString("F2"));
                    }

                    if (!(num3 < 0.05f) && !(num3 < num2) && (!EquipmentUtility.IsBiocoded(apparel) || EquipmentUtility.IsBiocodedFor(apparel, pawn)) && ApparelUtility.HasPartsToWear(pawn, apparel.def) && pawn.CanReserveAndReach(apparel, PathEndMode.OnCell, pawn.NormalMaxDanger()))
                    {
                        thing = apparel;
                        num2  = num3;
                    }
                }
            }

            if (DebugViewSettings.debugApparelOptimize)
            {
                debugSb.AppendLine("BEST: " + thing);
                Log.Message(debugSb.ToString());
                debugSb = null;
            }

            if (thing == null)
            {
                SetNextOptimizeTick2(pawn);
                __result = null;
                return(false);
            }

            __result = JobMaker.MakeJob(JobDefOf.Wear, thing);
            return(false);
        }
Beispiel #11
0
 /// <summary>
 /// Sets the head for this Sim.
 /// </summary>
 /// <param name="Head">The Appearance of the head to set.</param>
 public void Head(Outfit Head, SkinType Type)
 {
     m_Avatar.SetHead(Head, Type);
 }
 public BuilderVestCap(){
     outfit = new Outfit();
 }
Beispiel #13
0
 /// <summary>
 /// Change the outfit for this Sim.
 /// </summary>
 /// <param name="Oft">The outfit to change into.</param>
 /// <param name="Skin">The sim's skin type.</param>
 public void ChangeOutfit(Outfit Oft, SkinType Skin)
 {
     m_Avatar.ChangeOutfit(Oft, Skin);
 }
        public SetOutfitOutgoingPacket(uint creatureId, Outfit outfit)
        {
            this.CreatureId = creatureId;

            this.Outfit = outfit;
        }
 public BuilderJacketCap(){
     outfit = new Outfit();
 }
 public OutfitMenuItem(Actor actor, Outfit outfit)
 {
     this.actor  = actor;
     this.outfit = outfit;
 }
 public static OutfitType GetOutfitType(Outfit outfit)
 {
     return(OutfitsForBattle.Contains(outfit) ? OutfitType.Battle : OutfitType.Civilian);
 }
 protected WomanDecorator(Outfit outfit)
 {
     this.Outfit = outfit;
 }
 public static void Outfit(Outfit __instance)
 {
     __instance.filter = new MarketValueFilter();
 }
 private static void SetSelectedOutfit(Dialog_ManageOutfits dialog, Outfit selectedOutfit)
 {
     typeof(Dialog_ManageOutfits).GetProperty("SelectedOutfit", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.GetProperty).SetValue(dialog, selectedOutfit, null);
 }
 public override object GetNew()
 {
     return(Outfit.GetNew());
 }
Beispiel #22
0
        private void DrawOutfitSwap()
        {
            var body = Target;

            if (!body.Outfit)
            {
                // Nothing to do.
                m_OutfitSwapChoice = null;
                return;
            }

            EditorGUILayout.BeginHorizontal();

            var noutfit = EditorGUILayout.ObjectField(
                m_OutfitSwapChoice, typeof(Outfit), true, GUILayout.ExpandWidth(true)) as Outfit;

            if (noutfit != m_OutfitSwapChoice)
            {
                if (noutfit == body.Outfit)
                {
                    Debug.LogWarning("Outfit is already assigned to the body: " + noutfit.name, body);
                }
                else if (noutfit && noutfit.IsManaged)
                {
                    // Undo will become too complex if this is allowed.
                    Debug.LogErrorFormat(body,
                                         "Can't take control of an outfit that is already managed by another object."
                                         + " Outfit: {0}, Owner: {1}", noutfit.name, noutfit.Owner.name);
                }
                else
                {
                    m_OutfitSwapChoice = noutfit;
                }
            }

            RemoveActionType removeType = RemoveActionType.Undefined;
            var btnStyle = GUI.skin.button;

            if (OutfitterEditorUtil.IsNonDestructiveConfirmed)
            {
                btnStyle   = LizEditorGUIUtil.YellowButton;
                removeType = RemoveActionType.RemoveOnly;
            }
            else if (OutfitterEditorUtil.IsDestructiveConfirmed)
            {
                btnStyle   = LizEditorGUIUtil.RedButton;
                removeType = RemoveActionType.RemoveAndDestroy;
            }

            GUI.enabled = m_OutfitSwapChoice;
            if (GUILayout.Button(m_SwapLabel, btnStyle, GUILayout.MaxWidth(70)))
            {
                if (SetOutfit(body, m_OutfitSwapChoice, OutfitterEditorUtil.AutoOffset, removeType, false))
                {
                    var item = m_OutfitSwapChoice;
                    m_OutfitSwapChoice        = m_OutfitApplyRemoveChoice ? m_OutfitApplyRemoveChoice : null;
                    m_OutfitApplyRemoveChoice = item;
                }
                // else there should have been an error message for the body.
            }
            GUI.enabled = true;

            EditorGUILayout.EndHorizontal();
        }
        protected override void FillTab()
        {
            SaveablePawn pawnSave = this.SelPawnForGear.GetSaveablePawn();

            // Outfit + Status button
            Rect rectStatus = new Rect(20f, 15f, 380f, ButtonHeight);

            Rect outfitRect = new Rect(rectStatus.x, rectStatus.y, 392f / 3 - Margin, ButtonHeight);

            Rect outfitEditRect = new Rect(outfitRect.xMax + Margin, outfitRect.y, outfitRect.width, ButtonHeight);

            Rect outfitJobRect = new Rect(outfitEditRect.xMax + Margin, outfitRect.y, outfitRect.width, ButtonHeight);

            // select outfit
            if (Widgets.ButtonText(outfitRect, this.SelPawnForGear.outfits.CurrentOutfit.label))
            {
                List <FloatMenuOption> options = new List <FloatMenuOption>();

                foreach (Outfit current in Current.Game.outfitDatabase.AllOutfits)
                {
                    Outfit localOut = current;
                    options.Add(
                        new FloatMenuOption(
                            localOut.label,
                            delegate { this.SelPawnForGear.outfits.CurrentOutfit = localOut; }));
                }

                FloatMenu window = new FloatMenu(options, "SelectOutfit".Translate());

                Find.WindowStack.Add(window);
            }

            // edit outfit
            if (Widgets.ButtonText(
                    outfitEditRect,
                    "OutfitterEditOutfit".Translate() + " " + this.SelPawnForGear.outfits.CurrentOutfit.label + " ..."))
            {
                Find.WindowStack.Add(new Dialog_ManageOutfits(this.SelPawnForGear.outfits.CurrentOutfit));
            }

            // job outfit
            if (Widgets.ButtonText(
                    outfitJobRect,
                    pawnSave.MainJob == MainJob.Anything
                                       ? "MainJob".Translate()
                                       : "PreferedGear".Translate() + " " + pawnSave.MainJob.ToString()
                    .Replace("00", " - ")
                    .Replace("_", " ")))
            {
                List <FloatMenuOption> options = new List <FloatMenuOption>();
                foreach (MainJob mainJob in Enum.GetValues(typeof(MainJob)))
                {
                    options.Add(
                        new FloatMenuOption(
                            mainJob.ToString().Replace("00", " - ").Replace("_", " "),
                            delegate
                    {
                        pawnSave.MainJob         = mainJob;
                        pawnSave.ForceStatUpdate = true;

                        this.SelPawnForGear.mindState.Notify_OutfitChanged();

                        if (this.SelPawnForGear.jobs.curJob != null &&
                            this.SelPawnForGear.jobs.IsCurrentJobPlayerInterruptible())
                        {
                            this.SelPawnForGear.jobs.EndCurrentJob(JobCondition
                                                                   .InterruptForced);
                        }
                    }));
                }

                FloatMenu window = new FloatMenu(options, "MainJob".Translate());

                Find.WindowStack.Add(window);
            }

            // Status checkboxes
            Rect rectCheckboxes = new Rect(rectStatus.x, rectStatus.yMax + Margin, rectStatus.width, 72f);
            Rect check1         = new Rect(rectCheckboxes.x, rectCheckboxes.y, rectCheckboxes.width, 24f);
            Rect check2         = new Rect(rectCheckboxes.x, check1.yMax, rectCheckboxes.width, 24f);
            Rect check3         = new Rect(rectCheckboxes.x, check2.yMax, rectCheckboxes.width, 24f);

            bool pawnSaveAddWorkStats       = pawnSave.AddWorkStats;
            bool pawnSaveAddIndividualStats = pawnSave.AddIndividualStats;
            bool pawnSaveAddPersonalStats   = pawnSave.AddPersonalStats;

            Widgets.CheckboxLabeled(check1, "AddWorkStats".Translate(), ref pawnSaveAddWorkStats);
            Widgets.CheckboxLabeled(check2, "AddIndividualStats".Translate(), ref pawnSaveAddIndividualStats);
            Widgets.CheckboxLabeled(check3, "AddPersonalStats".Translate(), ref pawnSaveAddPersonalStats);

            if (GUI.changed)
            {
                pawnSave.AddWorkStats       = pawnSaveAddWorkStats;
                pawnSave.AddIndividualStats = pawnSaveAddIndividualStats;
                pawnSave.AddPersonalStats   = pawnSaveAddPersonalStats;
                pawnSave.ForceStatUpdate    = true;
            }

            // main canvas
            Rect canvas = new Rect(20f, rectCheckboxes.yMax, 392f, this.size.y - rectCheckboxes.yMax - 20f);

            GUI.BeginGroup(canvas);
            Vector2 cur = Vector2.zero;

            this.DrawTemperatureStats(pawnSave, ref cur, canvas);
            cur.y += Margin;
            this.DrawApparelStats(cur, canvas);

            GUI.EndGroup();

            this.DrawApparelList();

            GUI.color   = Color.white;
            Text.Anchor = TextAnchor.UpperLeft;
        }
Beispiel #24
0
 private void SaveOutfit(XmlWriter writer, Outfit outfit)
 {
     writer.WriteStartElement("Outfit");
     writer.WriteAttributeString("Path", "resource/" + _projectService.GetRelativePath(outfit.Directory.Path).Replace('\\', '/'));
     writer.WriteEndElement();
 }
        public Saveable_Outfit GetOutfit(Outfit outfit)
        {
            foreach (Saveable_Outfit o in this.outfitCache)
                if (o.outfit == outfit)
                    return o;

            Saveable_Outfit ret = new Saveable_Outfit();
            ret.outfit = outfit;
            ret.stats.Add(new Saveable_StatDef() { statDef = StatDefOf.ArmorRating_Sharp, strength = 1.00f });
            ret.stats.Add(new Saveable_StatDef() { statDef = StatDefOf.ArmorRating_Blunt, strength = 0.75f });

            this.outfitCache.Add(ret);

            return ret;
        }
Beispiel #26
0
 public void RemoveOutfit(Outfit outfit)
 {
     outfits.Remove(outfit);
 }
Beispiel #27
0
        public PawnCalcForApparel(Saveable_Pawn saveablePawn, Month month, float temperatureAjust)
        {
            this.saveablePawn = saveablePawn;
            this.pawn = saveablePawn.pawn;
            this.outfit = pawn.outfits.CurrentOutfit;
            this.stats = saveablePawn.NormalizeCalculedStatDef().ToArray();

            float targetTemperature = GenTemperature.AverageTemperatureAtWorldCoordsForMonth(Find.Map.WorldCoords, month) + temperatureAjust;

            #region [  needWarmCurve  ]

            float stat = this.pawn.def.GetStatValueAbstract(StatDefOf.ComfyTemperatureMin, null);

            stat = targetTemperature - stat;

            Log.Message("Target: " + targetTemperature + "     Stat: " + this.pawn.def.GetStatValueAbstract(StatDefOf.ComfyTemperatureMin, null) + "    Value: " + stat);

            if (stat > 10f)
                this.needWarmCurve = new SimpleCurve { new CurvePoint(0f, 1f) };
            else
                if (stat > 3f)
                    this.needWarmCurve = new SimpleCurve
                        {
                            new CurvePoint(+10f, -1.00f),
                            new CurvePoint(+03f, +0.00f),
                            new CurvePoint(+00f, +1.00f),
                            new CurvePoint(-03f, +1.10f)
                        };
                else
                    if (stat > 0)
                        this.needWarmCurve = new SimpleCurve
                            {
                                new CurvePoint(+03f, -1.00f),
                                new CurvePoint(+01f, -1.00f),
                                new CurvePoint(+00f, +1.00f),
                                new CurvePoint(-03f, +1.20f),
                                new CurvePoint(-10f, +1.50f)
                            };
                    else
                        if (stat > -3)
                            this.needWarmCurve = new SimpleCurve
                            {
                                new CurvePoint(+03f, -1.00f),
                                new CurvePoint(+01f, -1.00f),
                                new CurvePoint(+00f, +1.00f),
                                new CurvePoint(-03f, +1.20f),
                                new CurvePoint(-100f, +2.00f)
                            };
                        else
                            this.needWarmCurve = new SimpleCurve
                                {
                                    new CurvePoint(+01f, -1.00f),
                                    new CurvePoint(+00f, +1.00f),
                                    new CurvePoint(-03f, +1.50f),
                                    new CurvePoint(-100f, +20.00f)
                                };

            #endregion

            #region [  needCoolCurve  ]

            stat = this.pawn.def.GetStatValueAbstract(StatDefOf.ComfyTemperatureMax, null);

            stat = targetTemperature - stat;

            if (stat < -10)
                this.needCoolCurve = new SimpleCurve { new CurvePoint(0f, 1f) };
            else
                if (stat < -3)
                    this.needCoolCurve = new SimpleCurve
                        {
                            new CurvePoint(-10f, -1.00f),
                            new CurvePoint(-03f, +0.00f),
                            new CurvePoint(+00f, +1.00f),
                            new CurvePoint(+03f, +1.10f)
                        };
                else
                    if (stat < 0)
                        this.needCoolCurve = new SimpleCurve
                            {
                                new CurvePoint(-03f, -1.00f),
                                new CurvePoint(-01f, -1.00f),
                                new CurvePoint(+00f, +1.00f),
                                new CurvePoint(+03f, +1.20f),
                                new CurvePoint(+10f, +1.50f)
                            };
                    else
                        this.needCoolCurve = new SimpleCurve
                            {
                                new CurvePoint(-01f, -1.00f),
                                new CurvePoint(+00f, +1.00f),
                                new CurvePoint(+03f, +1.50f),
                                new CurvePoint(+100f, +20.00f)
                            };

            #endregion
        }
Beispiel #28
0
 public void BuyOutfit(Girl girl, Outfit outfit)
 {
     girl.BuyOutfit(outfit);
 }
Beispiel #29
0
        public static bool SetOutfit(Body body, Outfit outfit, float repoOffset = 0,
                                     RemoveActionType removeType = RemoveActionType.Undefined, bool singleUndo = true,
                                     string undoLabel            = "Set Outfit")
        {
            // Design note:  It would be much simpler to just remove and add in separate transactions.  But that
            // sends the wrong type of event to observers, so have to go the messy route in order to properly
            // mimic runtime behavior.

            // Validations

            if (!CheckValidAction(body))
            {
                return(false);
            }

            if (outfit == body.Outfit)
            {
                Debug.LogWarning("No action taken. Outfit is the same as the body's current outfit: "
                                 + (outfit ? outfit.name : "null"), body);
                return(true);  // This is the correct behavior.
            }

            if (outfit && outfit.IsManaged)
            {
                Debug.LogError("Can't set outfit.  The outfit is already managed by: " + outfit.Owner.name, body);
                return(false);
            }

            // Keep last since it may involve a dialog box.
            Transform origParent = null;

            if (body.Outfit)
            {
                removeType = GetRemoveType(body, removeType);
                if (removeType == RemoveActionType.Cancel)
                {
                    return(false);
                }

                origParent = body.Outfit.transform.parent;
            }

            // Prepare for transaction.

            if (singleUndo)
            {
                Undo.IncrementCurrentGroup();
            }

            bool      isNew        = false;
            Transform outfitParent = null;

            if (outfit)
            {
                isNew = AssetDatabase.Contains(outfit);
                if (isNew)
                {
                    var name = outfit.name;
                    outfit      = outfit.Instantiate();
                    outfit.name = name;
                    // Will register the undo after success has been determined.
                }
                else
                {
                    Undo.RecordObjects(Outfit.UnsafeGetUndoObjects(outfit).ToArray(), undoLabel);
                }

                outfitParent = outfit.transform.parent;
            }

            Undo.RecordObjects(Body.UnsafeGetUndoObjects(body).ToArray(), undoLabel);

            // Set the outfit.

            var orig    = body.SetOutfit(outfit);
            var success = (orig != outfit);

            if (success)
            {
                if (orig)
                {
                    // Finalize the original outfit.

                    orig.transform.parent = origParent;
                    Undo.SetTransformParent(orig.transform, null, undoLabel);

                    if (removeType == RemoveActionType.RemoveAndDestroy)
                    {
                        orig.Destroy(DestroyType.GameObject, true);
                        Undo.DestroyObjectImmediate(orig.gameObject);
                    }
                    else if (repoOffset > 0)
                    {
                        // This extra call is needed, otherwise only **part** of the translation is recorded.  The
                        // problem might be due to the change in the parent.  Anyway, more fun with undo...
                        Undo.RecordObject(orig.transform, undoLabel);
                        orig.transform.position += body.transform.right * repoOffset;
                    }
                }

                if (outfit)
                {
                    // Finalize the outfit that was set.

                    if (isNew)
                    {
                        Undo.RegisterCreatedObjectUndo(outfit.gameObject, undoLabel);
                    }

                    var parent = outfit.transform.parent;
                    outfit.transform.parent = outfitParent;
                    Undo.SetTransformParent(outfit.transform, parent, undoLabel);

                    if (body is StandardBody)
                    {
                        // HACK: Addition of body as outfit observer is not being recorded for serialization.
                        // This fixes it until the cause and proper fix can be determined.
                        StandardOutfitEditor.AddObserverWithUndo(outfit, (StandardBody)body);
                    }
                }

                success = true;
            }
            else
            {
                if (isNew)
                {
                    outfit.gameObject.SafeDestroy();
                }

                success = false;
            }

            if (singleUndo)
            {
                Undo.CollapseUndoOperations(Undo.GetCurrentGroup());
            }

            return(success);
        }
Beispiel #30
0
        } //method Build ends

        /*
         * GetOutfits
         * Loads the list of in-game player outfits and their values.
         */
        private static void GetOutfits()
        {
            Outfit plparts_normal = new Outfit();
            plparts_normal.name = "plparts_normal";
            plparts_normal.outfitPath = @"\Assets\tpp\chara\sna\Scenes\sna0_main0_def.fmdl";
            plparts_normal.fcnpPath = @"\Assets\tpp\chara\sna\Scenes\sna0_main0_def.fcnp";
            plparts_normal.frdvPath = @"\Assets\tpp\chara\sna\Scenes\sna0_main0_def.frdv";
            plparts_normal.simPath = @"\Assets\tpp\chara\sna\Fox_files\sna0_main0_item.sim";
            plparts_normal.simPath2 = @"\Assets\tpp\chara\sna\Fox_files\sna0_main0_hair.sim";
            plparts_normal.outfitType = (int)OutfitType.HEAD_ARM;
            outfits.Add(plparts_normal);

            Outfit plparts_normal_scarf = new Outfit();
            plparts_normal_scarf.name = "plparts_normal_scarf";
            plparts_normal_scarf.outfitPath = @"\Assets\tpp\chara\sna\Scenes\sna0_main1_def.fmdl";
            plparts_normal_scarf.fcnpPath = @"\Assets\tpp\chara\sna\Scenes\sna0_main1_def.fcnp";
            plparts_normal_scarf.frdvPath = @"\Assets\tpp\chara\sna\Scenes\sna0_main1_def.frdv";
            plparts_normal_scarf.simPath = @"\Assets\tpp\chara\sna\Fox_files\sna0_main1_item.sim";
            plparts_normal_scarf.simPath2 = @"\Assets\tpp\chara\sna\Fox_files\sna0_main0_hair.sim";
            plparts_normal_scarf.outfitType = (int)OutfitType.HEAD_ARM;
            outfits.Add(plparts_normal_scarf);

            Outfit plparts_naked = new Outfit();
            plparts_naked.name = "plparts_naked";
            plparts_naked.outfitPath = @"\Assets\tpp\chara\sna\Scenes\sna8_main0_def.fmdl";
            plparts_naked.fcnpPath = @"\Assets\tpp\chara\sna\Scenes\sna8_main0_def.fcnp";
            plparts_naked.frdvPath = @"\Assets\tpp\chara\sna\Scenes\sna8_main0_def.frdv";
            plparts_naked.simPath = @"\Assets\tpp\chara\sna\Fox_files\sna0_main0_hair.sim";
            plparts_naked.simPath2 = @"\Assets\tpp\chara\sna\Fox_files\sna8_main0_item.sim";
            plparts_naked.outfitType = (int)OutfitType.HEAD_ARM;
            outfits.Add(plparts_naked);

            Outfit plparts_venom = new Outfit();
            plparts_venom.name = "plparts_venom";
            plparts_venom.outfitPath = @"\Assets\tpp\chara\sna\Scenes\sna4_main0_def.fmdl";
            plparts_venom.fcnpPath = @"\Assets\tpp\chara\sna\Scenes\sna4_main0_def.fcnp";
            plparts_venom.frdvPath = @"\Assets\tpp\chara\sna\Scenes\sna4_main0_def.frdv";
            plparts_venom.simPath = @"\Assets\tpp\chara\sna\Fox_files\sna4_main0_hair.sim";
            plparts_venom.simPath2 = @"\Assets\tpp\chara\sna\Fox_files\sna4_main0_body.sim";
            plparts_venom.outfitType = (int)OutfitType.HEAD_ARM;
            outfits.Add(plparts_venom);

            Outfit plparts_battledress = new Outfit();
            plparts_battledress.name = "plparts_battledress";
            plparts_battledress.outfitPath = @"\Assets\tpp\chara\sna\Scenes\sna5_main0_def.fmdl";
            plparts_battledress.fcnpPath = @"\Assets\tpp\chara\sna\Scenes\sna5_main0_def.fcnp";
            plparts_battledress.frdvPath = @"\Assets\tpp\chara\sna\Scenes\sna5_main0_def.frdv";
            plparts_battledress.simPath = @"\Assets\tpp\chara\sna\Fox_files\sna5_main0_body.sim";
            plparts_battledress.simPath2 = @"\Assets\tpp\chara\sna\Fox_files\sna4_main0_item.sim";
            plparts_battledress.outfitType = (int)OutfitType.HEAD_ARM;
            outfits.Add(plparts_battledress);

            Outfit plparts_parasite = new Outfit();
            plparts_parasite.name = "plparts_parasite";
            plparts_parasite.outfitPath = @"\Assets\tpp\chara\sna\Scenes\sna7_main0_def.fmdl";
            plparts_parasite.fcnpPath = @"\Assets\tpp\chara\sna\Scenes\sna7_main0_def.fcnp";
            plparts_parasite.frdvPath = @"\Assets\tpp\chara\sna\Scenes\sna7_main0_def.frdv";
            plparts_parasite.simPath = @"\Assets\tpp\chara\sna\Fox_files\sna4_main0_body.sim";
            plparts_parasite.simPath2 = @"\Assets\tpp\chara\sna\Fox_files\sna4_main0_item.sim";
            plparts_parasite.outfitType = (int)OutfitType.NO_HEAD_ARM;
            outfits.Add(plparts_parasite);

            Outfit plparts_gz_suit = new Outfit();
            plparts_gz_suit.name = "plparts_gz_suit";
            plparts_gz_suit.outfitPath = @"\Assets\tpp\chara\sna\Scenes\sna2_main1_def.fmdl";
            plparts_gz_suit.fcnpPath = @"\Assets\tpp\chara\sna\Scenes\sna2_main1_def.fcnp";
            plparts_gz_suit.frdvPath = @"\Assets\tpp\chara\sna\Scenes\sna2_main1_def.frdv";
            plparts_gz_suit.simPath = @"\Assets\tpp\chara\sna\Fox_files\sna2_main0_hair.sim";
            plparts_gz_suit.simPath2 = @"\Assets\tpp\chara\sna\Fox_files\sna2_main0_asr.sim";
            plparts_gz_suit.outfitType = (int)OutfitType.HEAD_ARM;
            outfits.Add(plparts_gz_suit);

            Outfit plparts_mgs1 = new Outfit();
            plparts_mgs1.name = "plparts_mgs1";
            plparts_mgs1.outfitPath = @"\Assets\tpp\chara\sna\Scenes\sna6_main0_def.fmdl";
            plparts_mgs1.fcnpPath = @"\Assets\tpp\chara\sna\Scenes\sna6_main0_def.fcnp";
            plparts_mgs1.frdvPath = @"\Assets\tpp\chara\sna\Scenes\sna6_main0_def.frdv";
            plparts_mgs1.simPath = @"\Assets\tpp\chara\sna\Fox_files\sna2_main0_asr.sim";
            plparts_mgs1.simPath2 = "None";
            plparts_mgs1.outfitType = (int)OutfitType.NO_HEAD_NO_ARM;
            outfits.Add(plparts_mgs1);

            Outfit plparts_ninja = new Outfit();
            plparts_ninja.name = "plparts_ninja";
            plparts_ninja.outfitPath = @"\Assets\tpp\chara\nin\Scenes\nin0_main0_def.fmdl";
            plparts_ninja.fcnpPath = @"\Assets\tpp\chara\nin\Scenes\nin0_main0_def.fcnp";
            plparts_ninja.frdvPath = @"\Assets\tpp\chara\nin\Scenes\nin0_main0_def.frdv";
            plparts_ninja.simPath = @"\Assets\tpp\chara\sna\Fox_files\sna2_main0_asr.sim";
            plparts_ninja.simPath2 = "None";
            plparts_ninja.outfitType = (int)OutfitType.NO_HEAD_NO_ARM;
            outfits.Add(plparts_ninja);

            Outfit plparts_raiden = new Outfit();
            plparts_raiden.name = "plparts_raiden";
            plparts_raiden.outfitPath = @"\Assets\tpp\chara\rai\Scenes\rai0_main0_def.fmdl";
            plparts_raiden.fcnpPath = @"\Assets\tpp\chara\rai\Scenes\rai0_main0_def.fcnp";
            plparts_raiden.frdvPath = @"\Assets\tpp\chara\rai\Scenes\rai0_main0_def.frdv";
            plparts_raiden.simPath = @"\Assets\tpp\chara\rai\Fox_files\rai0_main0_asr.sim";
            plparts_raiden.simPath2 = @"\Assets\tpp\chara\rai\Fox_files\rai0_main0_hair.sim";
            plparts_raiden.outfitType = (int)OutfitType.NO_HEAD_NO_ARM;
            outfits.Add(plparts_raiden);

            Outfit plparts_ocelot = new Outfit();
            plparts_ocelot.name = "plparts_ocelot";
            plparts_ocelot.outfitPath = @"\Assets\tpp\chara\ooc\Scenes\ooc0_main1_def.fmdl";
            plparts_ocelot.fcnpPath = @"\Assets\tpp\chara\ooc\Scenes\ooc0_main1_def.fcnp";
            plparts_ocelot.frdvPath = @"\Assets\tpp\chara\ooc\Scenes\ooc0_main1_def.frdv";
            plparts_ocelot.simPath = @"\Assets\tpp\chara\oce\Fox_files\oce0_main0_hair.sim";
            plparts_ocelot.simPath2 = @"\Assets\tpp\chara\ooc\Fox_files\ooc0_main1_asr.sim";
            plparts_ocelot.outfitType = (int)OutfitType.NO_HEAD_NO_ARM;
            outfits.Add(plparts_ocelot);

            Outfit plparts_quiet = new Outfit();
            plparts_quiet.name = "plparts_quiet";
            plparts_quiet.outfitPath = @"\Assets\tpp\chara\qui\Scenes\quip_main0_def0.fmdl";
            plparts_quiet.fcnpPath = @"\Assets\tpp\chara\qui\Scenes\quip_main0_def0.fcnp";
            plparts_quiet.frdvPath = @"\Assets\tpp\chara\qui\Scenes\quip_main0_def0.frdv";
            plparts_quiet.simPath = @"\Assets\tpp\chara\qui\Fox_files\quip_main0_def.sim.sim";
            plparts_quiet.simPath2 = @"\Assets\tpp\chara\sna\Fox_files\sna0_main0_asr.sim";
            plparts_quiet.outfitType = (int)OutfitType.NO_HEAD_NO_ARM;
            outfits.Add(plparts_quiet);

            Outfit plparts_dd_female = new Outfit();
            plparts_dd_female.name = "plparts_dd_female";
            plparts_dd_female.outfitPath = @"\Assets\tpp\chara\dds\Scenes\dds6_main0_def.fmdl";
            plparts_dd_female.fcnpPath = @"\Assets\tpp\chara\dds\Scenes\dds6_main0_def.fcnp";
            plparts_dd_female.frdvPath = @"\Assets\tpp\chara\dds\Scenes\dds6_main0_def.frdv";
            plparts_dd_female.simPath = @"\Assets\tpp\chara\sna\Fox_files\sna0_main0_asr.sim";
            plparts_dd_female.simPath2 = @"\Assets\tpp\chara\sna\Fox_files\sna0_broken_arm_r.sim";
            plparts_dd_female.outfitType = (int)OutfitType.HEAD_NO_ARM;
            outfits.Add(plparts_dd_female);

            Outfit plparts_ddf_venom = new Outfit();
            plparts_ddf_venom.name = "plparts_ddf_venom";
            plparts_ddf_venom.outfitPath = @"\Assets\tpp\chara\sna\Scenes\sna4_plyf0_def.fmdl";
            plparts_ddf_venom.fcnpPath = @"\Assets\tpp\chara\sna\Scenes\sna4_plyf0_def.fcnp";
            plparts_ddf_venom.frdvPath = @"\Assets\tpp\chara\sna\Scenes\sna4_plyf0_def.frdv";
            plparts_ddf_venom.simPath = @"\Assets\tpp\chara\sna\Fox_files\sna4_main0_item.sim";
            plparts_ddf_venom.simPath2 = @"\Assets\tpp\chara\sna\Fox_files\sna4_main0_asr.sim";
            plparts_ddf_venom.outfitType = (int)OutfitType.HEAD_NO_ARM;
            outfits.Add(plparts_ddf_venom);

            Outfit plparts_ddf_battledress = new Outfit();
            plparts_ddf_battledress.name = "plparts_ddf_battledress";
            plparts_ddf_battledress.outfitPath = @"\Assets\tpp\chara\sna\Scenes\sna5_plyf0_def.fmdl";
            plparts_ddf_battledress.fcnpPath = @"\Assets\tpp\chara\sna\Scenes\sna5_plyf0_def.fcnp";
            plparts_ddf_battledress.frdvPath = @"\Assets\tpp\chara\sna\Scenes\sna5_plyf0_def.frdv";
            plparts_ddf_battledress.simPath = @"\Assets\tpp\chara\sna\Fox_files\sna4_main0_item.sim";
            plparts_ddf_battledress.simPath2 = @"\Assets\tpp\chara\sna\Fox_files\sna4_main0_asr.sim";
            plparts_ddf_battledress.outfitType = (int)OutfitType.HEAD_NO_ARM;
            outfits.Add(plparts_ddf_battledress);

            Outfit plparts_ddf_parasite = new Outfit();
            plparts_ddf_parasite.name = "plparts_ddf_parasite";
            plparts_ddf_parasite.outfitPath = @"\Assets\tpp\chara\sna\Scenes\sna7_plyf0_def.fmdl";
            plparts_ddf_parasite.fcnpPath = @"\Assets\tpp\chara\sna\Scenes\sna7_plyf0_def.fcnp";
            plparts_ddf_parasite.frdvPath = @"\Assets\tpp\chara\sna\Scenes\sna7_plyf0_def.frdv";
            plparts_ddf_parasite.simPath = @"\Assets\tpp\chara\sna\Fox_files\sna4_main0_item.sim";
            plparts_ddf_parasite.simPath2 = @"\Assets\tpp\chara\sna\Fox_files\sna4_main0_asr.sim";
            plparts_ddf_parasite.outfitType = (int)OutfitType.NO_HEAD_NO_ARM;
            outfits.Add(plparts_ddf_parasite);

            Outfit plparts_ddf_swimwear = new Outfit();
            plparts_ddf_swimwear.name = "plparts_ddf_swimwear";
            plparts_ddf_swimwear.outfitPath = @"\Assets\tpp\chara\dlf\Scenes\dlf0_main0_def_f.fmdl";
            plparts_ddf_swimwear.fcnpPath = @"\Assets\tpp\chara\dlf\Scenes\dlf0_main0_def_f.fcnp";
            plparts_ddf_swimwear.frdvPath = @"\Assets\tpp\chara\dlf\Scenes\dlf0_main0_def_f.frdv";
            plparts_ddf_swimwear.simPath = @"\Assets\tpp\chara\sna\Fox_files\sna0_main0_asr.sim";
            plparts_ddf_swimwear.simPath2 = @"\Assets\tpp\chara\sna\Fox_files\sna0_broken_arm_r.sim";
            plparts_ddf_swimwear.outfitType = (int)OutfitType.HEAD_NO_ARM;
            outfits.Add(plparts_ddf_swimwear);

            Outfit plparts_ddf_swimwear_g = new Outfit();
            plparts_ddf_swimwear_g.name = "plparts_ddf_swimwear_g";
            plparts_ddf_swimwear_g.outfitPath = @"\Assets\tpp\chara\dlg\Scenes\dlg0_main0_def_f.fmdl";
            plparts_ddf_swimwear_g.fcnpPath = @"\Assets\tpp\chara\dlg\Scenes\dlg0_main0_def_f.fcnp";
            plparts_ddf_swimwear_g.frdvPath = @"\Assets\tpp\chara\dlg\Scenes\dlg0_main0_def_f.frdv";
            plparts_ddf_swimwear_g.simPath = @"\Assets\tpp\chara\sna\Fox_files\sna0_main0_asr.sim";
            plparts_ddf_swimwear_g.simPath2 = @"\Assets\tpp\chara\sna\Fox_files\sna0_broken_arm_r.sim";
            plparts_ddf_swimwear_g.outfitType = (int)OutfitType.HEAD_NO_ARM;
            outfits.Add(plparts_ddf_swimwear_g);

            Outfit plparts_ddf_swimwear_h = new Outfit();
            plparts_ddf_swimwear_h.name = "plparts_ddf_swimwear_h";
            plparts_ddf_swimwear_h.outfitPath = @"\Assets\tpp\chara\dlh\Scenes\dlh0_main0_def_f.fmdl";
            plparts_ddf_swimwear_h.fcnpPath = @"\Assets\tpp\chara\dlg\Scenes\dlg0_main0_def_f.fcnp";
            plparts_ddf_swimwear_h.frdvPath = @"\Assets\tpp\chara\dlg\Scenes\dlg0_main0_def_f.frdv";
            plparts_ddf_swimwear_h.simPath = @"\Assets\tpp\chara\sna\Fox_files\sna0_main0_asr.sim";
            plparts_ddf_swimwear_h.simPath2 = @"\Assets\tpp\chara\sna\Fox_files\sna0_broken_arm_r.sim";
            plparts_ddf_swimwear_h.outfitType = (int)OutfitType.HEAD_NO_ARM;
            outfits.Add(plparts_ddf_swimwear_h);

            Outfit plparts_dd_male = new Outfit();
            plparts_dd_male.name = "plparts_dd_male";
            plparts_dd_male.outfitPath = @"\Assets\tpp\chara\dds\Scenes\dds5_main0_def.fmdl";
            plparts_dd_male.fcnpPath = @"\Assets\tpp\chara\dds\Scenes\dds5_main0_def.fcnp";
            plparts_dd_male.frdvPath = @"\Assets\tpp\chara\dds\Scenes\dds5_main0_def.frdv";
            plparts_dd_male.simPath = @"\Assets\tpp\chara\sna\Fox_files\sna0_main0_asr.sim";
            plparts_dd_male.simPath2 = @"\Assets\tpp\chara\sna\Fox_files\sna0_broken_arm_r.sim";
            plparts_dd_male.outfitType = (int)OutfitType.HEAD_NO_ARM;
            outfits.Add(plparts_dd_male);

            Outfit plparts_ddm_venom = new Outfit();
            plparts_ddm_venom.name = "plparts_ddm_venom";
            plparts_ddm_venom.outfitPath = @"\Assets\tpp\chara\sna\Scenes\sna4_plym0_def.fmdl";
            plparts_ddm_venom.fcnpPath = @"\Assets\tpp\chara\sna\Scenes\sna4_plym0_def.fcnp";
            plparts_ddm_venom.frdvPath = @"\Assets\tpp\chara\sna\Scenes\sna4_plym0_def.frdv";
            plparts_ddm_venom.simPath = @"\Assets\tpp\chara\sna\Fox_files\sna4_main0_item.sim";
            plparts_ddm_venom.simPath2 = @"\Assets\tpp\chara\sna\Fox_files\sna4_main0_asr.sim";
            plparts_ddm_venom.outfitType = (int)OutfitType.HEAD_NO_ARM;
            outfits.Add(plparts_ddm_venom);

            Outfit plparts_ddm_battledress = new Outfit();
            plparts_ddm_battledress.name = "plparts_ddm_battledress";
            plparts_ddm_battledress.outfitPath = @"\Assets\tpp\chara\sna\Scenes\sna5_plym0_def.fmdl";
            plparts_ddm_battledress.fcnpPath = @"\Assets\tpp\chara\sna\Scenes\sna5_plym0_def.fcnp";
            plparts_ddm_battledress.frdvPath = @"\Assets\tpp\chara\sna\Scenes\sna5_plym0_def.frdv";
            plparts_ddm_battledress.simPath = @"\Assets\tpp\chara\sna\Fox_files\sna4_main0_item.sim";
            plparts_ddm_battledress.simPath2 = @"\Assets\tpp\chara\sna\Fox_files\sna4_main0_asr.sim";
            plparts_ddm_battledress.outfitType = (int)OutfitType.HEAD_NO_ARM;
            outfits.Add(plparts_ddm_battledress);

            Outfit plparts_ddm_parasite = new Outfit();
            plparts_ddm_parasite.name = "plparts_ddm_parasite";
            plparts_ddm_parasite.outfitPath = @"\Assets\tpp\chara\sna\Scenes\sna7_plym0_def.fmdl";
            plparts_ddm_parasite.fcnpPath = @"\Assets\tpp\chara\sna\Scenes\sna7_plym0_def.fcnp";
            plparts_ddm_parasite.frdvPath = @"\Assets\tpp\chara\sna\Scenes\sna7_plym0_def.frdv";
            plparts_ddm_parasite.simPath = @"\Assets\tpp\chara\sna\Fox_files\sna4_main0_item.sim";
            plparts_ddm_parasite.simPath2 = @"\Assets\tpp\chara\sna\Fox_files\sna4_main0_asr.sim";
            plparts_ddm_parasite.outfitType = (int)OutfitType.NO_HEAD_NO_ARM;
            outfits.Add(plparts_ddm_parasite);

            Outfit plparts_ddm_swimwear = new Outfit();
            plparts_ddm_swimwear.name = "plparts_ddm_swimwear";
            plparts_ddm_swimwear.outfitPath = @"\Assets\tpp\chara\dlf\Scenes\dlf1_main0_def.fmdl";
            plparts_ddm_swimwear.fcnpPath = @"\Assets\tpp\chara\dlf\Scenes\dlf1_main0_def.fcnp";
            plparts_ddm_swimwear.frdvPath = @"\Assets\tpp\chara\dlf\Scenes\dlf1_main0_def.frdv";
            plparts_ddm_swimwear.simPath = @"\Assets\tpp\chara\sna\Fox_files\sna0_main0_asr.sim";
            plparts_ddm_swimwear.simPath2 = @"\Assets\tpp\chara\sna\Fox_files\sna0_broken_arm_r.sim";
            plparts_ddm_swimwear.outfitType = (int)OutfitType.HEAD_NO_ARM;
            outfits.Add(plparts_ddm_swimwear);

            Outfit plparts_ddm_swimwear_g = new Outfit();
            plparts_ddm_swimwear_g.name = "plparts_ddm_swimwear_g";
            plparts_ddm_swimwear_g.outfitPath = @"\Assets\tpp\chara\dlg\Scenes\dlg1_main0_def.fmdl";
            plparts_ddm_swimwear_g.fcnpPath = @"\Assets\tpp\chara\dlg\Scenes\dlg1_main0_def.fcnp";
            plparts_ddm_swimwear_g.frdvPath = @"\Assets\tpp\chara\dlg\Scenes\dlg1_main0_def.frdv";
            plparts_ddm_swimwear_g.simPath = @"\Assets\tpp\chara\sna\Fox_files\sna0_main0_asr.sim";
            plparts_ddm_swimwear_g.simPath2 = @"\Assets\tpp\chara\sna\Fox_files\sna0_broken_arm_r.sim";
            plparts_ddm_swimwear_g.outfitType = (int)OutfitType.HEAD_NO_ARM;
            outfits.Add(plparts_ddm_swimwear_g);

            Outfit plparts_ddm_swimwear_h = new Outfit();
            plparts_ddm_swimwear_h.name = "plparts_ddm_swimwear_h";
            plparts_ddm_swimwear_h.outfitPath = @"\Assets\tpp\chara\dlh\Scenes\dlh1_main0_def.fmdl";
            plparts_ddm_swimwear_h.fcnpPath = @"\Assets\tpp\chara\dlg\Scenes\dlg1_main0_def.fcnp";
            plparts_ddm_swimwear_h.frdvPath = @"\Assets\tpp\chara\dlg\Scenes\dlg1_main0_def.frdv";
            plparts_ddm_swimwear_h.simPath = @"\Assets\tpp\chara\sna\Fox_files\sna0_main0_asr.sim";
            plparts_ddm_swimwear_h.simPath2 = @"\Assets\tpp\chara\sna\Fox_files\sna0_broken_arm_r.sim";
            plparts_ddm_swimwear_h.outfitType = (int)OutfitType.HEAD_NO_ARM;
            outfits.Add(plparts_ddm_swimwear_h);

            //Standard Fatigues (NS)
            Outfit plparts_dla0_main0_def_v00 = new Outfit();
            plparts_dla0_main0_def_v00.name = "plparts_dla0_main0_def_v00";
            plparts_dla0_main0_def_v00.outfitPath = @"\Assets\tpp\chara\dla\Scenes\dla0_main0_def.fmdl";
            plparts_dla0_main0_def_v00.fcnpPath = @"\Assets\tpp\chara\dla\Scenes\dla0_main0_def.fcnp";
            plparts_dla0_main0_def_v00.frdvPath = @"\Assets\tpp\chara\dla\Scenes\dla0_main0_def.frdv";
            plparts_dla0_main0_def_v00.simPath = @"\Assets\tpp\chara\sna\Fox_files\sna0_main0_hair.sim";
            plparts_dla0_main0_def_v00.simPath2 = @"\Assets\tpp\chara\sna\Fox_files\sna0_main0_asr.sim";
            plparts_dla0_main0_def_v00.outfitType = (int)OutfitType.HEAD_ARM;
            outfits.Add(plparts_dla0_main0_def_v00);

            Outfit plparts_dla0_plym0_def_v00 = new Outfit();
            plparts_dla0_plym0_def_v00.name = "plparts_dla0_plym0_def_v00";
            plparts_dla0_plym0_def_v00.outfitPath = @"\Assets\tpp\chara\dla\Scenes\dla0_plym0_def.fmdl";
            plparts_dla0_plym0_def_v00.fcnpPath = @"\Assets\tpp\chara\dla\Scenes\dla0_plym0_def.fcnp";
            plparts_dla0_plym0_def_v00.frdvPath = @"\Assets\tpp\chara\dla\Scenes\dla0_plym0_def.frdv";
            plparts_dla0_plym0_def_v00.simPath = @"\Assets\tpp\chara\sna\Fox_files\sna0_main0_hair.sim";
            plparts_dla0_plym0_def_v00.simPath2 = @"\Assets\tpp\chara\sna\Fox_files\sna0_main0_asr.sim";
            plparts_dla0_plym0_def_v00.outfitType = (int)OutfitType.HEAD_NO_ARM;
            outfits.Add(plparts_dla0_plym0_def_v00);

            //Naked Fatigues (NS)
            Outfit plparts_dla1_main0_def_v00 = new Outfit();
            plparts_dla1_main0_def_v00.name = "plparts_dla1_main0_def_v00";
            plparts_dla1_main0_def_v00.outfitPath = @"\Assets\tpp\chara\dla\Scenes\dla1_main0_def.fmdl";
            plparts_dla1_main0_def_v00.fcnpPath = @"\Assets\tpp\chara\dla\Scenes\dla1_main0_def.fcnp";
            plparts_dla1_main0_def_v00.frdvPath = @"\Assets\tpp\chara\dla\Scenes\dla1_main0_def.frdv";
            plparts_dla1_main0_def_v00.simPath = @"\Assets\tpp\chara\sna\Fox_files\sna0_main0_hair.sim";
            plparts_dla1_main0_def_v00.simPath2 = @"\Assets\tpp\chara\sna\Fox_files\sna0_main0_asr.sim";
            plparts_dla1_main0_def_v00.outfitType = (int)OutfitType.HEAD_ARM;
            outfits.Add(plparts_dla1_main0_def_v00);

            Outfit plparts_dla1_plym0_def_v00 = new Outfit();
            plparts_dla1_plym0_def_v00.name = "plparts_dla1_plym0_def_v00";
            plparts_dla1_plym0_def_v00.outfitPath = @"\Assets\tpp\chara\dla\Scenes\dla1_plym0_def.fmdl";
            plparts_dla1_plym0_def_v00.fcnpPath = @"\Assets\tpp\chara\dla\Scenes\dla1_plym0_def.fcnp";
            plparts_dla1_plym0_def_v00.frdvPath = @"\Assets\tpp\chara\dla\Scenes\dla1_plym0_def.frdv";
            plparts_dla1_plym0_def_v00.simPath = @"\Assets\tpp\chara\sna\Fox_files\sna0_main0_hair.sim";
            plparts_dla1_plym0_def_v00.simPath2 = @"\Assets\tpp\chara\sna\Fox_files\sna0_main0_asr.sim";
            plparts_dla1_plym0_def_v00.outfitType = (int)OutfitType.HEAD_NO_ARM;
            outfits.Add(plparts_dla1_plym0_def_v00);

            //Sneaking Suit (NS)
            Outfit plparts_dlb0_main0_def_v00 = new Outfit();
            plparts_dlb0_main0_def_v00.name = "plparts_dlb0_main0_def_v00";
            plparts_dlb0_main0_def_v00.outfitPath = @"\Assets\tpp\chara\dlb\Scenes\dlb0_main0_def.fmdl";
            plparts_dlb0_main0_def_v00.fcnpPath = @"\Assets\tpp\chara\dlb\Scenes\dlb0_main0_def.fcnp";
            plparts_dlb0_main0_def_v00.frdvPath = @"\Assets\tpp\chara\dlb\Scenes\dlb0_main0_def.frdv";
            plparts_dlb0_main0_def_v00.simPath = @"\Assets\tpp\chara\dlb\Fox_files\dlb0_main0_hair.sim";
            plparts_dlb0_main0_def_v00.simPath2 = @"\Assets\tpp\chara\dlb\Fox_files\dlb0_main0_item.sim";
            plparts_dlb0_main0_def_v00.outfitType = (int)OutfitType.HEAD_ARM;
            outfits.Add(plparts_dlb0_main0_def_v00);

            Outfit plparts_dlb0_plym0_def_v00 = new Outfit();
            plparts_dlb0_plym0_def_v00.name = "plparts_dlb0_plym0_def_v00";
            plparts_dlb0_plym0_def_v00.outfitPath = @"\Assets\tpp\chara\dlb\Scenes\dlb0_plym0_def.fmdl";
            plparts_dlb0_plym0_def_v00.fcnpPath = @"\Assets\tpp\chara\dlb\Scenes\dlb0_plym0_def.fcnp";
            plparts_dlb0_plym0_def_v00.frdvPath = @"\Assets\tpp\chara\dlb\Scenes\dlb0_plym0_def.frdv";
            plparts_dlb0_plym0_def_v00.simPath = @"\Assets\tpp\chara\dlb\Fox_files\dlb0_main0_item.sim";
            plparts_dlb0_plym0_def_v00.simPath2 = @"\Assets\tpp\chara\dlb\Fox_files\dlb0_main0_asr.sim";
            plparts_dlb0_plym0_def_v00.outfitType = (int)OutfitType.HEAD_NO_ARM;
            outfits.Add(plparts_dlb0_plym0_def_v00);

            //The Boss (Closed)
            Outfit plparts_dlc0_plyf0_def_v00 = new Outfit();
            plparts_dlc0_plyf0_def_v00.name = "plparts_dlc0_plyf0_def_v00";
            plparts_dlc0_plyf0_def_v00.outfitPath = @"\Assets\tpp\chara\dlc\Scenes\dlc0_plyf0_def.fmdl";
            plparts_dlc0_plyf0_def_v00.fcnpPath = @"\Assets\tpp\chara\dlc\Scenes\dlc0_plyf0_def.fcnp";
            plparts_dlc0_plyf0_def_v00.frdvPath = @"\Assets\tpp\chara\dlc\Scenes\dlc0_plyf0_def.frdv";
            plparts_dlc0_plyf0_def_v00.simPath = @"\Assets\tpp\chara\dlc\Fox_files\dlc0_body0_def.sim";
            plparts_dlc0_plyf0_def_v00.simPath2 = @"\Assets\tpp\chara\dlc\Fox_files\dlc0_bust0_def.sim";
            plparts_dlc0_plyf0_def_v00.outfitType = (int)OutfitType.HEAD_NO_ARM;
            outfits.Add(plparts_dlc0_plyf0_def_v00);

            //The Boss (Open)
            Outfit plparts_dlc1_plyf0_def_v00 = new Outfit();
            plparts_dlc1_plyf0_def_v00.name = "plparts_dlc1_plyf0_def_v00";
            plparts_dlc1_plyf0_def_v00.outfitPath = @"\Assets\tpp\chara\dlc\Scenes\dlc1_plyf0_def.fmdl";
            plparts_dlc1_plyf0_def_v00.fcnpPath = @"\Assets\tpp\chara\dlc\Scenes\dlc1_plyf0_def.fcnp";
            plparts_dlc1_plyf0_def_v00.frdvPath = @"\Assets\tpp\chara\dlc\Scenes\dlc1_plyf0_def.frdv";
            plparts_dlc1_plyf0_def_v00.simPath = @"\Assets\tpp\chara\dlc\Fox_files\dlc0_body0_def.sim";
            plparts_dlc1_plyf0_def_v00.simPath2 = @"\Assets\tpp\chara\dlc\Fox_files\dlc1_belt0_def.sim";
            plparts_dlc1_plyf0_def_v00.outfitType = (int)OutfitType.HEAD_NO_ARM;
            outfits.Add(plparts_dlc1_plyf0_def_v00);

            //Tuxedo (NS)
            Outfit plparts_dld0_main0_def_v00 = new Outfit();
            plparts_dld0_main0_def_v00.name = "plparts_dld0_main0_def_v00";
            plparts_dld0_main0_def_v00.outfitPath = @"\Assets\tpp\chara\dld\Scenes\dld0_main0_def.fmdl";
            plparts_dld0_main0_def_v00.fcnpPath = @"\Assets\tpp\chara\dld\Scenes\dld0_main0_def.fcnp";
            plparts_dld0_main0_def_v00.frdvPath = @"\Assets\tpp\chara\dld\Scenes\dld0_main0_def.frdv";
            plparts_dld0_main0_def_v00.simPath = @"\Assets\tpp\chara\dld\FOX_files\dld0_hair0_def.sim";
            plparts_dld0_main0_def_v00.simPath2 = @"\Assets\tpp\chara\dld\FOX_files\dld0_body0_def.sim";
            plparts_dld0_main0_def_v00.outfitType = (int)OutfitType.HEAD_ARM;
            outfits.Add(plparts_dld0_main0_def_v00);

            Outfit plparts_dld0_plym0_def_v00 = new Outfit();
            plparts_dld0_plym0_def_v00.name = "plparts_dld0_plym0_def_v00";
            plparts_dld0_plym0_def_v00.outfitPath = @"\Assets\tpp\chara\dla\Scenes\dld0_plym0_def.fmdl";
            plparts_dld0_plym0_def_v00.fcnpPath = @"\Assets\tpp\chara\dla\Scenes\dld0_plym0_def.fcnp";
            plparts_dld0_plym0_def_v00.frdvPath = @"\Assets\tpp\chara\dla\Scenes\dld0_plym0_def.frdv";
            plparts_dld0_plym0_def_v00.simPath = @"\Assets\tpp\chara\dld\FOX_files\dld0_body0_def.sim";
            plparts_dld0_plym0_def_v00.simPath2 = @"\Assets\tpp\chara\dld\FOX_files\dld0_asrt0_def.sim";
            plparts_dld0_plym0_def_v00.outfitType = (int)OutfitType.HEAD_NO_ARM;
            outfits.Add(plparts_dld0_plym0_def_v00);

            //EVA (Closed)
            Outfit plparts_dle0_plyf0_def_v00 = new Outfit();
            plparts_dle0_plyf0_def_v00.name = "plparts_dle0_plyf0_def_v00";
            plparts_dle0_plyf0_def_v00.outfitPath = @"\Assets\tpp\chara\dle\Scenes\dle0_plyf0_def.fmdl";
            plparts_dle0_plyf0_def_v00.fcnpPath = @"\Assets\tpp\chara\dle\Scenes\dle0_plyf0_def.fcnp";
            plparts_dle0_plyf0_def_v00.frdvPath = @"\Assets\tpp\chara\dle\Scenes\dle0_plyf0_def.frdv";
            plparts_dle0_plyf0_def_v00.simPath = @"\Assets\tpp\chara\dle\Fox_files\dle0_body0_def.sim";
            plparts_dle0_plyf0_def_v00.simPath2 = @"\Assets\tpp\chara\sna\Fox_files\sna0_main0_asr.sim";
            plparts_dle0_plyf0_def_v00.outfitType = (int)OutfitType.HEAD_NO_ARM;
            outfits.Add(plparts_dle0_plyf0_def_v00);

            //EVA (Open)
            Outfit plparts_dle1_plyf0_def_v00 = new Outfit();
            plparts_dle1_plyf0_def_v00.name = "plparts_dle1_plyf0_def_v00";
            plparts_dle1_plyf0_def_v00.outfitPath = @"\Assets\tpp\chara\dle\Scenes\dle1_plyf0_def.fmdl";
            plparts_dle1_plyf0_def_v00.fcnpPath = @"\Assets\tpp\chara\dle\Scenes\dle1_plyf0_def.fcnp";
            plparts_dle1_plyf0_def_v00.frdvPath = @"\Assets\tpp\chara\dle\Scenes\dle1_plyf0_def.frdv";
            plparts_dle1_plyf0_def_v00.simPath = @"\Assets\tpp\chara\dle\Fox_files\dle1_body0_def.sim";
            plparts_dle1_plyf0_def_v00.simPath2 = @"\Assets\tpp\chara\sna\Fox_files\sna0_main0_asr.sim";
            plparts_dle1_plyf0_def_v00.outfitType = (int)OutfitType.HEAD_NO_ARM;
            outfits.Add(plparts_dle1_plyf0_def_v00);
        } //method GetOutfits ends
Beispiel #31
0
 public BuilderVestBeret()
 {
     outfit = new Outfit();
 }
Beispiel #32
0
        /// <summary>
        /// Changes this avatar's outfit.
        /// </summary>
        public void ChangeOutfit(Outfit Oft, SkinType Type)
        {
            Binding[] Bindings;

            AccessoryMesh    = null;
            AccessoryTexture = null;

            if (Oft.HandgroupID.FileID != 0)
            {
                HandGroup  Hag = FileManager.GetHandgroup(Oft.HandgroupID.UniqueID);
                Appearance LeftHandApr, RightHandApr;

                switch (Type)
                {
                case SkinType.Light:
                    LeftHandApr  = FileManager.GetAppearance(Hag.Light.Left.Idle.AppearanceID.UniqueID);
                    RightHandApr = FileManager.GetAppearance(Hag.Light.Right.Idle.AppearanceID.UniqueID);
                    break;

                case SkinType.Medium:
                    LeftHandApr  = FileManager.GetAppearance(Hag.Medium.Left.Idle.AppearanceID.UniqueID);
                    RightHandApr = FileManager.GetAppearance(Hag.Medium.Right.Idle.AppearanceID.UniqueID);
                    break;

                case SkinType.Dark:
                    LeftHandApr  = FileManager.GetAppearance(Hag.Dark.Left.Idle.AppearanceID.UniqueID);
                    RightHandApr = FileManager.GetAppearance(Hag.Dark.Right.Idle.AppearanceID.UniqueID);
                    break;

                default:
                    LeftHandApr  = FileManager.GetAppearance(Hag.Light.Left.Idle.AppearanceID.UniqueID);
                    RightHandApr = FileManager.GetAppearance(Hag.Light.Right.Idle.AppearanceID.UniqueID);
                    break;
                }

                Bindings = FileManager.GetBindings(LeftHandApr.BindingIDs);

                foreach (Binding Bnd in Bindings)
                {
                    switch (Bnd.Bone)
                    {
                    case "L_HAND":
                        LeftHandMesh    = FileManager.GetMesh(Bnd.MeshID.UniqueID);
                        LeftHandTexture = FileManager.GetTexture(Bnd.TextureID.UniqueID);
                        break;
                    }
                }

                Bindings = FileManager.GetBindings(RightHandApr.BindingIDs);

                foreach (Binding Bnd in Bindings)
                {
                    switch (Bnd.Bone)
                    {
                    case "R_HAND":
                        RightHandMesh    = FileManager.GetMesh(Bnd.MeshID.UniqueID);
                        RightHandTexture = FileManager.GetTexture(Bnd.TextureID.UniqueID);
                        break;
                    }
                }
            }

            Appearance Apr;

            switch (Type)
            {
            case SkinType.Light:
                Apr = FileManager.GetAppearance(Oft.LightAppearance.UniqueID);
                break;

            case SkinType.Medium:
                Apr = FileManager.GetAppearance(Oft.MediumAppearance.UniqueID);
                break;

            case SkinType.Dark:
                Apr = FileManager.GetAppearance(Oft.DarkAppearance.UniqueID);
                break;

            default:
                Apr = FileManager.GetAppearance(Oft.LightAppearance.UniqueID);
                break;
            }

            Bindings = FileManager.GetBindings(Apr.BindingIDs);

            if (Oft.Region == OutfitRegion.Head)
            {
                HeadMesh = null; //IMPORTANT: Reset the head mesh before loading a new one.
            }
            foreach (Binding Bnd in Bindings)
            {
                switch (Bnd.Bone)
                {
                case "PELVIS":
                    BodyMesh    = FileManager.GetMesh(Bnd.MeshID.UniqueID);
                    BodyTexture = FileManager.GetTexture(Bnd.TextureID.UniqueID);
                    break;

                case "HEAD":
                    if (HeadMesh == null)
                    {
                        HeadMesh    = FileManager.GetMesh(Bnd.MeshID.UniqueID);
                        HeadTexture = FileManager.GetTexture(Bnd.TextureID.UniqueID);
                    }
                    else
                    {
                        AccessoryMesh    = FileManager.GetMesh(Bnd.MeshID.UniqueID);
                        AccessoryTexture = FileManager.GetTexture(Bnd.TextureID.UniqueID);
                    }
                    break;
                }
            }
        }
Beispiel #33
0
 /// <summary>
 /// Initializes a new instance of the <see cref="OutfitChangedPacket"/> class.
 /// </summary>
 /// <param name="newOutfit"></param>
 public OutfitChangedPacket(Outfit newOutfit)
 {
     this.Outfit = newOutfit;
 }
Beispiel #34
0
        /// <summary>
        /// User clicked on an item in the list containing available heads and bodies.
        /// </summary>
        private void LstHeads_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (m_Skeleton == null)
            {
                m_Skeleton = new Skeleton(this.Device, ContentManager.GetResourceFromLongID(0x100000005));
                m_Skeleton.AssignChildren(ref m_Skeleton);
            }

            foreach(KeyValuePair<ulong, string> Pair in ContentManager.Resources)
            {
                if ((string)LstHeads.SelectedItem == Pair.Value)
                {
                    //HAndGroup files are used to group together different hand meshes and textures.
                    if (Pair.Value.Contains(".hag"))
                    {
                        Hag HandGroup = new Hag(ContentManager.GetResourceFromLongID(Pair.Key));

                        m_CurrentAppearance = new Appearance(ContentManager.GetResourceFromLongID(
                            HandGroup.Appearances[0]));

                        LstAppearances.Items.Clear();

                        foreach (ulong AppearanceID in HandGroup.Appearances)
                            LstAppearances.Items.Add(AppearanceID);

                        List<Binding> Bindings = new List<Binding>();

                        foreach (ulong BindingID in m_CurrentAppearance.BindingIDs)
                            Bindings.Add(new Binding(ContentManager.GetResourceFromLongID(BindingID)));

                        m_Tex = Texture2D.FromFile(this.Device, new MemoryStream(
                            ContentManager.GetResourceFromLongID(Bindings[0].TextureAssetID)));

                        m_CurrentMesh = new Mesh(ContentManager.GetResourceFromLongID(Bindings[0].MeshAssetID), false);
                        LoadMesh(m_CurrentMesh);
                    }
                    else
                    {
                        PurchasableObject PO = new PurchasableObject(ContentManager.GetResourceFromLongID(Pair.Key));

                        m_CurrentOutfit = new Outfit(ContentManager.GetResourceFromLongID(PO.OutfitID));
                        m_CurrentAppearance = new Appearance(
                            ContentManager.GetResourceFromLongID(m_CurrentOutfit.LightAppearanceID));

                        LstAppearances.Items.Clear();
                        LstAppearances.Items.Add(m_CurrentOutfit.LightAppearanceID);
                        LstAppearances.Items.Add(m_CurrentOutfit.MediumAppearanceID);
                        LstAppearances.Items.Add(m_CurrentOutfit.DarkAppearanceID);

                        List<Binding> Bindings = new List<Binding>();

                        foreach (ulong BindingID in m_CurrentAppearance.BindingIDs)
                            Bindings.Add(new Binding(ContentManager.GetResourceFromLongID(BindingID)));

                        m_Tex = Texture2D.FromFile(this.Device, new MemoryStream(
                            ContentManager.GetResourceFromLongID(Bindings[0].TextureAssetID)));

                        //The file selected was most likely a body-mesh, so apply the adult skeleton to it.
                        if (Pair.Value.Contains("bodies"))
                        {
                            m_CurrentMesh = new Mesh(ContentManager.GetResourceFromLongID(Bindings[0].MeshAssetID), true);
                            m_CurrentMesh.TransformVertices2(m_Skeleton.Bones[0], ref mSimpleEffect);
                            m_CurrentMesh.BlendVertices2();
                            LoadMesh(m_CurrentMesh);
                        }
                        else
                        {
                            m_CurrentMesh = new Mesh(ContentManager.GetResourceFromLongID(Bindings[0].MeshAssetID), false);
                            LoadMesh(m_CurrentMesh);
                        }
                    }

                    m_LoadComplete = true;
                }
            }
        }
 public JsonResult updateOutfit(Outfit outfit)
 {
     throw new NotImplementedException();
 }
Beispiel #36
0
 public void AddOutfit(Outfit outfit)
 {
     AddUInt16(outfit.LookType);
     if (outfit.LookType != 0)
     {
         AddByte(outfit.Head);
         AddByte(outfit.Body);
         AddByte(outfit.Legs);
         AddByte(outfit.Feet);
         AddByte(outfit.Addons);
     }
     else
     {
         AddUInt16(outfit.LookItem);
     }
 }
Beispiel #37
0
        public static Texture2D GenHeadTex(Outfit headOft, string name)
        {
            var      skels = Content.Content.Get().AvatarSkeletons;
            Skeleton skel  = null;
            bool     pet   = false;

            if (name.StartsWith("uaa"))
            {
                //pet
                if (name.Contains("cat"))
                {
                    skel = skels.Get("cat.skel");
                }
                else
                {
                    skel = skels.Get("dog.skel");
                }
                pet = true;
            }
            else
            {
                skel = skels.Get("adult.skel");
            }

            var m_Head = new SimAvatar(skel);

            m_Head.Head = headOft;
            m_Head.ReloadSkeleton();
            //m_Head.StripAllButHead();

            var HeadCamera = new BasicCamera(GameFacade.GraphicsDevice, new Vector3(0.0f, 7.0f, -17.0f), Vector3.Zero, Vector3.Up);

            var pos2 = m_Head.Skeleton.GetBone("HEAD").AbsolutePosition;

            pos2.Y += (pet)?((name.Contains("dog"))?0.16f:0.1f):0.12f;
            HeadCamera.Position = new Vector3(0, pos2.Y, 12.5f);
            //HeadCamera.FOV = (float)Math.PI / 3f;
            HeadCamera.Target           = pos2;
            HeadCamera.ProjectionOrigin = new Vector2(66 / 2, 66 / 2);

            var HeadScene = new _3DTargetScene(GameFacade.GraphicsDevice, HeadCamera, new Point(66, 66), 0);// (GlobalSettings.Default.AntiAlias) ? 8 : 0);

            HeadScene.ID = "UIPieMenuHead";
            //HeadScene.ClearColor = new Color(49, 65, 88);

            m_Head.Scene = HeadScene;
            m_Head.Scale = new Vector3(1f);

            HeadCamera.Zoom = 19.5f;

            //rotate camera, similar to pie menu

            double xdir = 0; //Math.Atan(0);
            double ydir = 0; //Math.Atan(0);

            Vector3 off = new Vector3(0, 0, 13.5f);
            Matrix  mat = Microsoft.Xna.Framework.Matrix.CreateRotationY((float)xdir) * Microsoft.Xna.Framework.Matrix.CreateRotationX((float)ydir);

            HeadCamera.Position = new Vector3(0, pos2.Y, 0) + Vector3.Transform(off, mat);

            if (pet)
            {
                HeadCamera.Zoom *= 1.3f;
            }
            //end rotate camera

            HeadScene.Initialize(GameFacade.Scenes);
            HeadScene.Add(m_Head);

            HeadScene.Draw(GameFacade.GraphicsDevice);
            return(Common.Utils.TextureUtils.Decimate(HeadScene.Target, GameFacade.GraphicsDevice, 2, true));
        }
Beispiel #38
0
    IEnumerator DisplayCards()
    {
        WWW www2;
        Vector3 destination;
        for (int i=0; i<3; i++)
        {
            www2 = new WWW(cardData[i]["image"].ToString());
            yield return www2;

            cardSound.Play ();
            GameObject current = new GameObject();
            SpriteRenderer renderer =  current.AddComponent<SpriteRenderer>();
            renderer.sortingOrder = 100;
            Sprite sprite = new Sprite();
            float pixelsToUnits = www2.texture.width / (screenWidthUnit/1.5f);
            sprite = Sprite.Create(www2.texture, new Rect(0, 0, www2.texture.width, www2.texture.height),new Vector2(0.5f, 0.5f),pixelsToUnits);
            renderer.sprite = sprite;
            current.transform.localScale = new Vector3 (1.2f, 1.2f, 1.2f);

            GameObject brand = new GameObject();
            renderer =  brand.AddComponent<SpriteRenderer>();
            renderer.sprite = Resources.Load<Sprite>("03_hover");
            brand.transform.parent = current.transform;
            brand.transform.localPosition = new Vector3 (0,  screenWidthUnit * 0.52f , 0);
            brand.transform.localScale = new Vector3 (1.5f,0.7f,1f);
            brand.GetComponent<Renderer> ().sortingOrder = 100;

            GameObject brandname = Instantiate(tagModel2, new Vector3(0, 0, 0), Quaternion.identity) as GameObject;
            brandname.transform.parent = brand.transform;
            brandname.transform.localPosition = new Vector3 (0,  0 , 0);
            brandname.transform.localScale = new Vector3 (0.02f,0.04f,0.02f);
            brandname.GetComponent<Renderer> ().sortingOrder = 100;
            brandname.GetComponent<TextMesh> ().text =  cardData[i]["brand"].ToString() ;

            Outfit card = new Outfit(current, int.Parse(cardData[i]["sale_price"].ToString()),int.Parse(cardData[i]["retail_price"].ToString()),cardData[i]["url"].ToString(),cardData[i]["category"].ToString(),cardData[i]["brand"].ToString(),cardData[i]["image"].ToString());
            cards[i] = card;

            yield return new WaitForSeconds(1.5f);
            destination = new Vector3 (screenWidthUnit / 3.0f * (i  + 0.5f) - screenWidthUnit / 2.0f, screenWidthUnit*3.5f/2.5f/5.5f,0);
            StartCoroutine(Fade(cards[i].picture,destination,0.5f));
        }

        for (int i=0; i<3; i++)
        {
            cards[i].picture.AddComponent<BoxCollider2D>() ;
            cards[i].picture.AddComponent<ClickBehavior>() ;
        }
    }
Beispiel #39
0
        public bool FindBetterApparel(ref float baseApparelScore, ref Apparel betterApparel, Pawn pawn, Outfit currentOutfit, Building dresser)
        {
#if BETTER_OUTFIT
            Log.Warning("Begin StoredApparel.FindBetterApparel");
#endif
            bool result = false;
#if TRACE && BETTER_OUTFIT
            Log.Message("    Stored Apparel:");
#endif
            foreach (LinkedList <Apparel> ll in this.StoredApparelLookup.Values)
            {
#if TRACE && BETTER_OUTFIT
                if (ll != null)
                {
                    if (ll.Count > 0 && ll.First != null)
                    {
                        Log.Message("        Count: " + ll.Count + "    Of Type: " + ll.First.Value.def.defName);
                    }
                    else
                    {
                        Log.Message("        Count: 0");
                    }
                }
                else
                {
                    Log.Message("        <null> list");
                }
#endif
                if (ApparelUtil.FindBetterApparel(ref baseApparelScore, ref betterApparel, pawn, currentOutfit, ll, dresser))
                {
                    result = true;
                }
            }
#if BETTER_OUTFIT
            Log.Warning("End StoredApparel.FindBetterApparel    Found Better:" + result);
#endif
            return(result);

            /*
             * Apparel betterApparel = null;
             * foreach (LinkedList<Apparel> ll in this.StoredApparelLookup.Values)
             * {
             *  foreach (Apparel apparel in ll)
             *  {
             *      if (currentOutfit.filter.Allows(apparel))
             *      {
             *          if (Settings.KeepForcedApparel)
             *          {
             *              List<Apparel> wornApparel = pawn.apparel.WornApparel;
             *              for (int i = 0; i < wornApparel.Count; i++)
             *              {
             *                  if (!ApparelUtility.CanWearTogether(wornApparel[i].def, apparel.def, pawn.RaceProps.body) &&
             *                      !pawn.outfits.forcedHandler.AllowedToAutomaticallyDrop(wornApparel[i]))
             *                  {
             *                      continue;
             *                  }
             *              }
             *          }
             *
             *          if (!apparel.IsForbidden(pawn))
             *          {
             *              float gain = JobGiver_OptimizeApparel.ApparelScoreGain(pawn, apparel);
             *              if (gain >= 0.05f && gain > baseApparelScore)
             *              {
             *                  if (ApparelUtility.HasPartsToWear(pawn, apparel.def))
             *                  {
             *                      if (ReservationUtility.CanReserveAndReach(pawn, dresser, PathEndMode.OnCell, pawn.NormalMaxDanger(), 1))
             *                      {
             *                          betterApparel = apparel;
             *                          baseApparelScore = gain;
             *                      }
             *                  }
             *              }
             *          }
             *      }
             *  }
             * }
             * return betterApparel;*/
        }
        public override void DoWindowContents(Rect inRect)
        {
            float num = 0f;
            Rect rect = new Rect(0f, 0f, 150f, 35f);
            num += 150f;
            if (Widgets.TextButton(rect, "SelectOutfit".Translate(), true, false))
            {
                List<FloatMenuOption> list = new List<FloatMenuOption>();
                foreach (Outfit current in Find.Map.outfitDatabase.AllOutfits)
                {
                    Outfit localOut = current;
                    list.Add(new FloatMenuOption(localOut.label, delegate
                    {
                        this.SelectedOutfit = localOut;
                    }, MenuOptionPriority.Medium, null, null));
                }
                Find.WindowStack.Add(new FloatMenu(list, false));
            }
            num += 10f;
            rect = new Rect(num, 0f, 150f, 35f);
            num += 150f;
            if (Widgets.TextButton(rect, "NewOutfit".Translate(), true, false))
            {
                this.SelectedOutfit = Find.Map.outfitDatabase.MakeNewOutfit();
            }
            num += 10f;
            rect = new Rect(num, 0f, 150f, 35f);
            num += 150f;
            if (Widgets.TextButton(rect, "DeleteOutfit".Translate(), true, false))
            {
                List<FloatMenuOption> list2 = new List<FloatMenuOption>();
                foreach (Outfit current2 in Find.Map.outfitDatabase.AllOutfits)
                {
                    Outfit localOut = current2;
                    list2.Add(new FloatMenuOption(localOut.label, delegate
                    {
                        AcceptanceReport acceptanceReport = Find.Map.outfitDatabase.TryDelete(localOut);
                        if (!acceptanceReport.Accepted)
                        {
                            Messages.Message(acceptanceReport.Reason, MessageSound.RejectInput);
                        }
                        else
                        {
                            if (localOut == this.SelectedOutfit)
                            {
                                this.SelectedOutfit = null;
                            }
                            foreach (Saveable_Outfit s in MapComponent_AutoEquip.Get.outfitCache.Where(i => i.outfit == localOut).ToArray())
                                MapComponent_AutoEquip.Get.outfitCache.Remove(s);
                        }
                    }, MenuOptionPriority.Medium, null, null));
                }
                Find.WindowStack.Add(new FloatMenu(list2, false));
            }
            rect = new Rect(0f, 40f, 300f, inRect.height - 40f - this.CloseButSize.y).ContractedBy(10f);
            if (this.SelectedOutfit == null)
            {
                GUI.color = Color.grey;
                Text.Anchor = TextAnchor.MiddleCenter;
                Widgets.Label(rect, "NoOutfitSelected".Translate());
                Text.Anchor = TextAnchor.UpperLeft;
                GUI.color = Color.white;
                return;
            }
            GUI.BeginGroup(rect);
            Rect rect1 = new Rect(0f, 0f, 200f, 30f);
            Dialog_ManageOutfitsAutoEquip.DoNameInputRect(rect1, ref this.SelectedOutfit.label, 30);
            rect1 = new Rect(0f, 40f, rect.width, rect.height - 45f - 10f);
            ThingFilterUI.DoThingFilterConfigWindow(rect1, ref this.scrollPosition, this.SelectedOutfit.filter, Dialog_ManageOutfitsAutoEquip.apparelGlobalFilter, 16);
            GUI.EndGroup();

            rect = new Rect(300f, 40f, inRect.width - 300f, inRect.height - 40f - this.CloseButSize.y).ContractedBy(10f);
            GUI.BeginGroup(rect);

            rect1 = new Rect(0f, 0f, rect.width, 30f);
            Widgets.LabelCheckbox(rect1, "AutoEquipAppendIndividualPawnStatus".Translate(), ref MapComponent_AutoEquip.Get.GetOutfit(this.SelectedOutfit).appendIndividualPawnStatus);

            rect1 = new Rect(0f, 40f, rect.width, rect.height - 45f - 10f);
            Dialog_ManageOutfitsAutoEquip.DoStatsInput(rect1, ref this.scrollPositionStats, MapComponent_AutoEquip.Get.GetOutfit(this.SelectedOutfit).stats);
            GUI.EndGroup();
        }
Beispiel #41
0
        protected override void DrawPawnRow(Rect rect, Pawn p)
        {
            // available space for row
            Rect rowRect = new Rect(rect.x + 165f, rect.y, rect.width - 165f, rect.height);

            // response button rect
            Vector2 responsePos = new Vector2(rowRect.xMin, rowRect.yMin + (rowRect.height - 24f) / 2f);

            // offset rest of row for that button, so we don't have to mess with all the other rect calculations
            rowRect.xMin += 24f + _margin;

            // label + buttons for outfit
            Rect outfitRect = new Rect(rowRect.xMin,
                                       rowRect.yMin,
                                       rowRect.width * (1f / 4f) + (_margin + _buttonSize) / 2f,
                                       rowRect.height);

            Rect labelOutfitRect = new Rect(outfitRect.xMin,
                                            outfitRect.yMin,
                                            outfitRect.width - _margin * 3 - _buttonSize * 2,
                                            outfitRect.height)
                                   .ContractedBy(_margin / 2f);
            Rect editOutfitRect = new Rect(labelOutfitRect.xMax + _margin,
                                           outfitRect.yMin + ((outfitRect.height - _buttonSize) / 2),
                                           _buttonSize,
                                           _buttonSize);
            Rect forcedOutfitRect = new Rect(labelOutfitRect.xMax + _buttonSize + _margin * 2,
                                             outfitRect.yMin + ((outfitRect.height - _buttonSize) / 2),
                                             _buttonSize,
                                             _buttonSize);

            // drucg policy
            Rect drugRect = new Rect(outfitRect.xMax,
                                     rowRect.yMin,
                                     rowRect.width * (1f / 4f) - (_margin + _buttonSize) / 2f,
                                     rowRect.height);
            Rect labelDrugRect = new Rect(drugRect.xMin,
                                          drugRect.yMin,
                                          drugRect.width - _margin * 2 - _buttonSize,
                                          drugRect.height)
                                 .ContractedBy(_margin / 2f);
            Rect editDrugRect = new Rect(labelDrugRect.xMax + _margin,
                                         drugRect.yMin + ((drugRect.height - _buttonSize) / 2),
                                         _buttonSize,
                                         _buttonSize);

            // label + button for loadout
            Rect loadoutRect = new Rect(drugRect.xMax,
                                        rowRect.yMin,
                                        rowRect.width * (1f / 4f) - (_margin + _buttonSize) / 2f,
                                        rowRect.height);
            Rect labelLoadoutRect = new Rect(loadoutRect.xMin,
                                             loadoutRect.yMin,
                                             loadoutRect.width - _margin * 3 - _buttonSize * 2,
                                             loadoutRect.height)
                                    .ContractedBy(_margin / 2f);
            Rect editLoadoutRect = new Rect(labelLoadoutRect.xMax + _margin,
                                            loadoutRect.yMin + ((loadoutRect.height - _buttonSize) / 2),
                                            _buttonSize,
                                            _buttonSize);
            Rect forcedHoldRect = new Rect(labelLoadoutRect.xMax + _buttonSize + _margin * 2,
                                           loadoutRect.yMin + ((loadoutRect.height - _buttonSize) / 2),
                                           _buttonSize,
                                           _buttonSize);

            // fight or flight button
            HostilityResponseModeUtility.DrawResponseButton(responsePos, p);

            // weight + bulk indicators
            Rect weightRect = new Rect(loadoutRect.xMax, rowRect.yMin, rowRect.width * (1f / 8f) - _margin, rowRect.height).ContractedBy(_margin / 2f);
            Rect bulkRect   = new Rect(weightRect.xMax + _margin, rowRect.yMin, rowRect.width * (1f / 8f) - _margin, rowRect.height).ContractedBy(_margin / 2f);

            // OUTFITS
            // main button
            if (Widgets.ButtonText(labelOutfitRect, p.outfits.CurrentOutfit.label, true, false))
            {
                List <FloatMenuOption> options = new List <FloatMenuOption>();
                foreach (Outfit current in Current.Game.outfitDatabase.AllOutfits)
                {
                    // need to create a local copy for delegate
                    Outfit localOut = current;
                    options.Add(new FloatMenuOption(localOut.label, delegate
                    {
                        p.outfits.CurrentOutfit = localOut;
                    }, MenuOptionPriority.Default, null, null));
                }
                Find.WindowStack.Add(new FloatMenu(options, optionalTitle, false));
            }

            // edit button
            TooltipHandler.TipRegion(editOutfitRect, "CE_EditX".Translate("CE_outfit".Translate() + " " + p.outfits.CurrentOutfit.label));
            if (Widgets.ButtonImage(editOutfitRect, _iconEdit))
            {
                Text.Font = GameFont.Small;
                Find.WindowStack.Add(new Dialog_ManageOutfits(p.outfits.CurrentOutfit));
            }

            // clear forced button
            if (p.outfits.forcedHandler.SomethingIsForced)
            {
                TooltipHandler.TipRegion(forcedOutfitRect, "ClearForcedApparel".Translate());
                if (Widgets.ButtonImage(forcedOutfitRect, _iconClearForced))
                {
                    p.outfits.forcedHandler.Reset();
                }
                TooltipHandler.TipRegion(forcedOutfitRect, new TipSignal(delegate
                {
                    string text = "ForcedApparel".Translate() + ":\n";
                    foreach (Apparel current2 in p.outfits.forcedHandler.ForcedApparel)
                    {
                        text = text + "\n   " + current2.LabelCap;
                    }
                    return(text);
                }, p.GetHashCode() * 612));
            }

            // DRUG POLICY
            // main button
            string textDrug = p.drugs.CurrentPolicy.label;

            if (p.story != null && p.story.traits != null)
            {
                Trait trait = p.story.traits.GetTrait(TraitDefOf.DrugDesire);
                if (trait != null)
                {
                    textDrug = textDrug + " (" + trait.Label + ")";
                }
            }
            if (Widgets.ButtonText(labelDrugRect, textDrug, true, false, true))
            {
                List <FloatMenuOption> list = new List <FloatMenuOption>();
                foreach (DrugPolicy current in Current.Game.drugPolicyDatabase.AllPolicies)
                {
                    DrugPolicy localAssignedDrugs = current;
                    list.Add(new FloatMenuOption(current.label, delegate
                    {
                        p.drugs.CurrentPolicy = localAssignedDrugs;
                    }, MenuOptionPriority.Default, null, null, 0f, null));
                }
                Find.WindowStack.Add(new FloatMenu(list));
                PlayerKnowledgeDatabase.KnowledgeDemonstrated(ConceptDefOf.DrugPolicies, KnowledgeAmount.Total);
            }


            // edit button
            TooltipHandler.TipRegion(editDrugRect, "CE_EditX".Translate("CE_drugs".Translate() + " " + p.drugs.CurrentPolicy.label));
            if (Widgets.ButtonImage(editDrugRect, _iconEdit))
            {
                Text.Font = GameFont.Small;
                Find.WindowStack.Add(new Dialog_ManageDrugPolicies(p.drugs.CurrentPolicy));
                PlayerKnowledgeDatabase.KnowledgeDemonstrated(ConceptDefOf.DrugPolicies, KnowledgeAmount.Total);
            }

            // LOADOUTS
            // main button
            if (Widgets.ButtonText(labelLoadoutRect, p.GetLoadout().LabelCap, true, false))
            {
                LoadoutManager.SortLoadouts();
                List <FloatMenuOption> options = new List <FloatMenuOption>();
                foreach (Loadout loadout in LoadoutManager.Loadouts)
                {
                    // need to create a local copy for delegate
                    Loadout localLoadout = loadout;
                    options.Add(new FloatMenuOption(localLoadout.LabelCap, delegate
                    {
                        p.SetLoadout(localLoadout);
                    }, MenuOptionPriority.Default, null, null));
                }
                Find.WindowStack.Add(new FloatMenu(options, optionalTitle, false));
            }

            // edit button
            TooltipHandler.TipRegion(editLoadoutRect, "CE_EditX".Translate("CE_loadout".Translate() + " " + p.GetLoadout().LabelCap));
            if (Widgets.ButtonImage(editLoadoutRect, _iconEdit))
            {
                Find.WindowStack.Add(new Dialog_ManageLoadouts(p.GetLoadout()));
            }

            // clear forced held button
            if (p.HoldTrackerAnythingHeld())
            {
                TooltipHandler.TipRegion(forcedHoldRect, "ClearForcedApparel".Translate()); // "Clear forced" is sufficient and that's what this is at the moment.
                if (Widgets.ButtonImage(forcedHoldRect, _iconClearForced))                  // also can re-use the icon for clearing forced at the moment.
                {
                    p.HoldTrackerClear();                                                   // yes this will also delete records that haven't been picked up and thus not shown to the player...
                }
                TooltipHandler.TipRegion(forcedHoldRect, new TipSignal(delegate
                {
                    string text = "CE_ForcedHold".Translate() + ":\n";
                    foreach (HoldRecord rec in LoadoutManager.GetHoldRecords(p))
                    {
                        if (!rec.pickedUp)
                        {
                            continue;
                        }
                        text = text + "\n   " + rec.thingDef.LabelCap + " x" + rec.count;
                    }
                    return(text);
                }, p.GetHashCode() * 613));
            }

            // STATUS BARS
            // fetch the comp
            CompInventory comp = p.TryGetComp <CompInventory>();

            if (comp != null)
            {
                Utility_Loadouts.DrawBar(bulkRect, comp.currentBulk, comp.capacityBulk, "", p.GetBulkTip());
                Utility_Loadouts.DrawBar(weightRect, comp.currentWeight, comp.capacityWeight, "", p.GetWeightTip());
            }
        }
 public BuilderVestBeret(){
     outfit = new Outfit();
 }
Beispiel #43
0
        public void SetFamilyMember(int index)
        {
            if (RepresentFamily.Count <= index)
            {
                var member = (VMAvatar)vm.Context.CreateObjectInstance(0x7FD96B54, LotTilePos.OUT_OF_WORLD

                                                                       , Direction.EAST, false).BaseObject;

                RepresentFamily.Add(member);
            }

            var fam = RepresentFamily[index];

            fam.SetPosition(LotTilePos.FromBigTile(34, 31, 1) +
                            new LotTilePos((short)((((index + 1) / 2) % 2) * 8), (short)(((index % 2) * 2 - 1) * ((index + 1) / 2) * 10), 0), Direction.EAST, vm.Context, VMPlaceRequestFlags.AllowIntersection);
            var data = WIPFamily[index];

            //set this person's body and head

            fam.Name                = data.Name;
            fam.Avatar.Skeleton     = Content.Get().AvatarSkeletons.Get((data.Gender > 1) ? "child.skel" : "adult.skel").Clone();
            fam.Avatar.BaseSkeleton = fam.Avatar.Skeleton.Clone();
            fam.Avatar.ReloadSkeleton();

            fam.SetPersonData(VMPersonDataVariable.PersonsAge, (short)((data.Gender > 1) ? 12 : 21));
            fam.InitBodyData(vm.Context);

            var oft = new Outfit()
            {
                TS1AppearanceID = data.Body + ".apr", TS1TextureID = data.BodyTex
            };
            var code = (data.Gender > 1) ? "u" : ((data.Gender == 0) ? "m" : "f");
            var hg   = data.HandgroupTex;

            oft.LiteralHandgroup = new HandGroup()
            {
                TS1HandSet = true,
                LightSkin  = new HandSet()
                {
                    LeftHand = new Hand()
                    {
                        Idle = new Gesture()
                        {
                            Name = "h" + code + "lo.apr", TexName = "huao" + hg
                        },
                        Pointing = new Gesture()
                        {
                            Name = "h" + code + "lp.apr", TexName = "huap" + hg
                        },
                        Fist = new Gesture()
                        {
                            Name = "h" + code + "lc.apr", TexName = "huac" + hg
                        }
                    },
                    RightHand = new Hand()
                    {
                        Idle = new Gesture()
                        {
                            Name = "h" + code + "ro.apr", TexName = "huao" + hg
                        },
                        Pointing = new Gesture()
                        {
                            Name = "h" + code + "rp.apr", TexName = "huap" + hg
                        },
                        Fist = new Gesture()
                        {
                            Name = "h" + code + "rc.apr", TexName = "huac" + hg
                        }
                    }
                }
            };

            fam.BodyOutfit = new FSO.SimAntics.Model.VMOutfitReference(oft);
            fam.HeadOutfit = new FSO.SimAntics.Model.VMOutfitReference(new Outfit()
            {
                TS1AppearanceID = data.Head + ".apr", TS1TextureID = data.HeadTex
            });
        }