Esempio n. 1
0
 public ClothingRecordData(System.IO.BinaryReader reader)
 {
     clothingPart  = (ClothingType)reader.ReadInt32();
     weight        = reader.ReadSingle();
     value         = reader.ReadInt16();
     enchantPoints = reader.ReadInt16();
 }
        private void GetClothingIds(ClothingType type)
        {
            string PageCur;
            string BaseUrl    = $"https://catalog.roblox.com/v1/search/items?Keyword={KeywordBox.Text}&category=3&limit=100&subcategory={type}";
            string CatalogUrl = $"https://catalog.roblox.com/v1/search/items?Keyword={KeywordBox.Text}&category=3&limit=100&subcategory={type}";

            if (type == ClothingType.Accessories)
            {
                BaseUrl    = $"https://catalog.roblox.com/v1/search/items?Keyword={KeywordBox.Text}&category=11&limit=100&subcategory={type}";
                CatalogUrl = $"https://catalog.roblox.com/v1/search/items?Keyword={KeywordBox.Text}&category=11&limit=100&subcategory={type}";
            }

            LogData(LogType.Info, $"Detected type as: {type}");
            LogData(LogType.Info, "Cathering Item IDs...");

            for (int i = 1; i <= (int.Parse(ItemCount.Text) / 100); i++)
            {
                if (i == 1)
                {
                    GatherIDs(CatalogUrl);
                }
                else
                {
                    PageCur = GetNextPageCursor(CatalogUrl);
                    LogData(LogType.Info, $"Going to next page: {PageCur}");
                    CatalogUrl = BaseUrl + $"&cursor={PageCur}";
                    LogData(LogType.Info, $"New catalog URL: {CatalogUrl}");
                    GatherIDs(CatalogUrl);
                }
            }
        }
Esempio n. 3
0
        private bool CanBeStripped(ClothingType type, string clothingItem)
        {
            switch (type)
            {
            case ClothingType.Head:
            {
                switch (clothingItem)
                {
                // TODO: add female cases?
                case "Afro":
                case "Buzzcut":
                case "Mohawk":
                    return(false);
                }
                break;
            }

            case ClothingType.Accesory:
            {
                switch (clothingItem)
                {
                case "ClownMakeup":
                case "ClownMakeup_fem":
                case "Moustache":
                case "Small Moustache":
                    return(false);
                }
                break;
            }
            }

            return(true);
        }
Esempio n. 4
0
 public ClothingItem Get(ClothingType type)
 {
     ClothingItem item;
     switch (type)
     {
         case ClothingType.Top:
             item = GetClothing(1);
             item.Picture = new System.Uri("http://www.downloadclipart.net/large/12218-blue-shirt-design.png");
             break;
         case ClothingType.Bottom:
             item = GetClothing(3);
             item.Picture = new System.Uri("http://doodleslide.com/clipart/jeans.jpg");
             break;
         case ClothingType.Hat:
             item = GetClothing(9);
             item.Picture = new System.Uri("http://upload.wikimedia.org/wikipedia/commons/2/23/Texas_Tech_Red_Raiders_baseball_cap.jpg");
             break;
         case ClothingType.Shoes:
             item = GetClothing(8);
             item.Picture = new System.Uri("http://images.mytheresa.com/media/catalog/product/cache/common/image/1000x1000/b9336446c29edafc3474017303b51028/P/0/P00059051-GUM-NEON-HIGH-TOP-SNEAKERS-STANDARD.jpg");
             break;
         case ClothingType.Coat:
             item = GetClothing(6);
             item.Picture = new System.Uri("http://upload.wikimedia.org/wikipedia/commons/2/2c/Fishtail_Parka.jpg");
             break;
         default:
             item = GetClothing(1);
             break;
     }
     return item;
 }
Esempio n. 5
0
    private void OnTriggerEnter(Collider other)
    {
        Interactable interactable = other.GetComponent <Interactable>();

        if (interactable != null)
        {
            if (interactable is ClothingItem)
            {
                ClothingItem clothingItem = interactable as ClothingItem;
                ClothingType clothingType = clothingItem.ClothingType;
                if (clothingType == GameManager.CurrentClothingTypeRequired)
                {
                    WashItem();
                }
                else
                {
                    LoseALife();
                }
            }
            else if (interactable is ExtraLifeItem)
            {
                GainALife();
            }

            interactable.Interact();
        }
    }
Esempio n. 6
0
 public void ChangeType(ClothingType type, Material material, Mesh mesh, Quaternion angle)
 {
     clothingType            = type;
     meshFilter.mesh         = mesh;
     meshRenderer.material   = material;
     graphicsParent.rotation = angle;
 }
Esempio n. 7
0
 private ClothingItem AddClothingItem(string name, ClothingType clothingType, WeatherCondition weatherCondition,
                                      Temperature temperature)
 {
     return
         clothingItemList[LastId++] =
         new ClothingItem(LastId, name, clothingType, new Weather(weatherCondition, temperature));
 }
Esempio n. 8
0
 public ClothingItem(int id, string name, ClothingType clothingType, Weather weather)
 {
     Id = id;
     Name = name;
     ClothingType = clothingType;
     Weather = weather;
 }
Esempio n. 9
0
 public void ShirtBeforeHeadwear(ClothingType headwearOrJacket)
 {
     GetReadyToDress();
     AssertCannotPutOn(headwearOrJacket);
     AssertPutOn(ClothingType.Shirt);
     AssertPutOn(headwearOrJacket);
 }
Esempio n. 10
0
 void AddToInventory(ClothingType clothingType)
 {
     for (int i = 0; i < inventoryDataHandler.wearableDictionary[clothingType].Count; i++)
     {
         inventoryContent[i].Setup(inventoryDataHandler.wearableDictionary[clothingType][i], popupWindonwUpcycleDonate);
     }
 }
Esempio n. 11
0
 public ClothingChangedEventArgs(Ped ped, ClothingType clothes, byte previous, byte current)
 {
     this.Ped          = ped;
     this.ClothingType = clothes;
     this.Previous     = previous;
     this.Current      = current;
 }
 public TypesDetailsViewModel(ClothingType t, ITypesService typesService, IEventAggregator eventAggregator)
 {
     Type                 = t;
     oldName              = t.Name;
     this.typesService    = typesService;
     this.eventAggregator = eventAggregator;
 }
Esempio n. 13
0
        public static string GetReadableTypeName(ClothingType type)
        {
            switch (type)
            {
            case ClothingType.BOTTOM:
                return("bottom part");

            case ClothingType.BRA:
                return("bra");

            case ClothingType.ONEPIECE:
                return("one piece");

            case ClothingType.PANTIES:
                return("panties");

            case ClothingType.SHOES:
                return("shoes");

            case ClothingType.SOCKS:
                return("socks");

            case ClothingType.TOP:
                return("top");

            default: break;
            }

            return("Type");
        }
Esempio n. 14
0
 public void SocksAndPantsBeforeShoes(ClothingType socksOrPants, ClothingType pantsOrSocks)
 {
     GetReadyToDress();
     AssertCannotPutOn(ClothingType.Footwear);
     AssertPutOn(socksOrPants);
     AssertPutOn(pantsOrSocks);
     AssertPutOn(ClothingType.Footwear);
 }
Esempio n. 15
0
        protected virtual void AssertPutOn(ClothingType clothing)
        {
            Assume.That(_state.PutOn(clothing), "should put on " + clothing);
            Assume.That(_state.IsOn(clothing), "should be on " + clothing);

            // Only 1 piece of each type of clothing may be put on
            Assume.That(_state.PutOn(clothing), Is.False, "shouldn't put 2nd " + clothing);
        }
Esempio n. 16
0
        public void OK_On_EmptySet(ClothingType clothing)
        {
            Assume.That(clothing, Is.Not.EqualTo(ClothingType.Pajamas));

            var rule = new OffRule(clothing);

            Assert.That(rule.IsSatisfied(_state));
        }
Esempio n. 17
0
        public ActionResult DeleteConfirmed(int id)
        {
            ClothingType clothingType = db.ClothingTypes.Find(id);

            db.ClothingTypes.Remove(clothingType);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 18
0
 public void UpdateType(ClothingType t)
 {
     if (t.Name != "" && t.Name != null)
     {
         dbConnection.UpdateTypes(t.Totypes());
     }
     UpdateTypesList();
 }
Esempio n. 19
0
 public ActionResult Edit([Bind(Include = "TypeID,TypeName")] ClothingType clothingType)
 {
     if (ModelState.IsValid)
     {
         db.Entry(clothingType).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(clothingType));
 }
Esempio n. 20
0
        protected override void AssertPutOn(ClothingType clothing)
        {
            base.AssertPutOn(clothing);

            // You cannot put on socks when it is hot
            AssertCannotPutOn(ClothingType.Socks);

            // You cannot put on a jacket when it is hot
            AssertCannotPutOn(ClothingType.Jacket);
        }
Esempio n. 21
0
        public ActionResult Create([Bind(Include = "TypeID,TypeName")] ClothingType clothingType)
        {
            if (ModelState.IsValid)
            {
                db.ClothingTypes.Add(clothingType);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(clothingType));
        }
Esempio n. 22
0
        public void Fails_On_AnyMatchingSubset(ClothingType clothing)
        {
            var rule = new OffRule(clothing);

            _state.PutOn(clothing);
            Assert.That(rule.IsSatisfied(_state), Is.False);

            foreach (var item in ClothingSet.All)
            {
                _state.PutOn(item);
                Assert.That(rule.IsSatisfied(_state), Is.False);
            }
        }
Esempio n. 23
0
    private void UpdateClothingTypeRequired
        (ClothingType currentClothingTypeRequired, ClothingType nextClothingTypeRequired)
    {
        currentClothingTypeRequiredImage.sprite =
            clothingTypeRequiredSprites[(int)currentClothingTypeRequired];
        currentClothingTypeRequiredImage.SetNativeSize();
        nextClothingTypeRequiredImage.sprite =
            clothingTypeRequiredSprites[(int)nextClothingTypeRequired];
        nextClothingTypeRequiredImage.SetNativeSize();

        currentClothingTypeRequiredText.text = currentClothingTypeRequired.ToString();
        clothingTypeChangeWarningText.text   = "";
    }
Esempio n. 24
0
 private static ClientInstanceMethod <ushort, byte, byte[]> GetInstanceMethod(ClothingType clothingType)
 {
     return(clothingType switch
     {
         ClothingType.Shirt => s_SendWearShirt,
         ClothingType.Pants => s_SendWearPants,
         ClothingType.Hat => s_SendWearHat,
         ClothingType.Backpack => s_SendWearBackpack,
         ClothingType.Vest => s_SendWearVest,
         ClothingType.Mask => s_SendWearMask,
         ClothingType.Glasses => s_SendWearGlasses,
         _ => throw new InvalidOperationException("Invalid clothing type")
     });
 public void Street_Is_Immutable(ClothingType clothing)
 {
     if (ClothingSet.Street.Contains(clothing))
     {
         Assert.Throws <NotSupportedException>(() => ClothingSet.Street.Remove(clothing));
         Assert.That(ClothingSet.Street.Contains(clothing));
     }
     else
     {
         Assert.Throws <NotSupportedException>(() => ClothingSet.Street.Add(clothing));
         Assert.That(ClothingSet.Street.Contains(clothing), Is.False);
     }
 }
Esempio n. 26
0
        public void Satisfied_On_AnySuperset(ClothingType clothing)
        {
            var rule = new OnRule(clothing);

            _state.PutOn(clothing);
            Assert.That(rule.IsSatisfied(_state));

            foreach (var item in ClothingSet.Street)
            {
                _state.PutOn(item);
                Assert.That(rule.IsSatisfied(_state));
            }
        }
 void LegsClothingType(ClothingType clothingType)
 {
     if (!legsClothingTypes.Contains(clothingType))
     {
         return;
     }
     foreach (var legsClothingType in legsClothingTypes)
     {
         if (wearablesOnClient.ContainsKey(legsClothingType))
         {
             wearablesOnClient.Remove(legsClothingType);
         }
     }
 }
Esempio n. 28
0
        public void ToggleButton(ClothingType clothingType)
        {
            if (!inventoryDataHandler.wearableDictionary.ContainsKey(clothingType))
            {
                Debug.LogWarning($"No item was found in {clothingType.name}");
                return;
            }

            closeButtonText.text = clothingType.name;
            buttonHolder.SetActive(false);
            scrollView.SetActive(true);
            ContentPooling(clothingType);
            AddToInventory(clothingType);
        }
Esempio n. 29
0
        public void Fails_On_AnyNonMatchingSubset(ClothingType clothing)
        {
            var rule = new OnRule(clothing);

            foreach (var item in ClothingSet.Street)
            {
                if (item == clothing)
                {
                    continue;
                }
                _state.PutOn(item);
                Assert.That(rule.IsSatisfied(_state), Is.False);
            }
        }
Esempio n. 30
0
        // GET: ClothingTypes/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ClothingType clothingType = db.ClothingTypes.Find(id);

            if (clothingType == null)
            {
                return(HttpNotFound());
            }
            return(View(clothingType));
        }
Esempio n. 31
0
        public static List <long> GetClothesByTypeAndRoom(List <Clothing> clothes, ClothingType type, long roomId)
        {
            List <long> output = new List <long>();

            foreach (Clothing c in clothes)
            {
                if (c.CurrentRoom == roomId && type == c.Type)
                {
                    output.Add(c.Id);
                }
            }

            return(output);
        }
Esempio n. 32
0
        public void NonEmptyState(ClothingType clothing)
        {
            foreach (var item in ClothingSet.Street)
            {
                if (item == clothing)
                {
                    continue;
                }
                _state.PutOn(item);
                Assert.That(_state.IsOn(clothing), Is.False);
            }

            _state.PutOn(clothing);
            Assert.That(_state.IsOn(clothing));
        }
Esempio n. 33
0
        void Parse(Stream s)
        {
            int tgiPosn;

            BinaryReader r = new BinaryReader(s);

            version               = r.ReadUInt32();
            tgiPosn               = r.ReadInt32() + 8;
            presets               = new PresetList(OnResourceChanged, s);
            unknown1              = BigEndianUnicodeString.Read(s);
            sortPriority          = r.ReadSingle();
            unknown2              = r.ReadByte();
            clothing              = (ClothingType)r.ReadUInt32();
            dataType              = (DataTypeFlags)r.ReadUInt32();
            ageGender             = new AgeGenderFlags(0, OnResourceChanged, s);
            clothingCategory      = (ClothingCategoryFlags)r.ReadUInt32();
            casPart1Index         = r.ReadByte();
            casPart2Index         = r.ReadByte();
            blendInfoFatIndex     = r.ReadByte();
            blendInfoFitIndex     = r.ReadByte();
            blendInfoThinIndex    = r.ReadByte();
            blendInfoSpecialIndex = r.ReadByte();
            overlayPriority       = r.ReadUInt32();
            vpxyIndexes           = new ByteIndexList(OnResourceChanged, s, ReadByte, WriteByte);
            lodInfo               = new LODInfoEntryList(OnResourceChanged, s);
            diffuse1Indexes       = new ByteIndexList(OnResourceChanged, s, ReadByte, WriteByte);
            specular1Indexes      = new ByteIndexList(OnResourceChanged, s, ReadByte, WriteByte);
            diffuse2Indexes       = new ByteIndexList(OnResourceChanged, s, ReadByte, WriteByte);
            specular2Indexes      = new ByteIndexList(OnResourceChanged, s, ReadByte, WriteByte);
            bondIndexes           = new ByteIndexList(OnResourceChanged, s, ReadByte, WriteByte);
            unknown4              = BigEndianUnicodeString.Read(s);

            if (checking)
            {
                if (tgiPosn != s.Position)
                {
                    throw new InvalidDataException(String.Format("Position of TGIBlock read: 0x{0:X8}, actual: 0x{1:X8}",
                                                                 tgiPosn, s.Position));
                }
            }

            byte count = r.ReadByte();

            tgiBlocks = new CountedTGIBlockList(OnResourceChanged, "IGT", count, s);

            vpxyIndexes.ParentTGIBlocks         = diffuse1Indexes.ParentTGIBlocks = specular1Indexes.ParentTGIBlocks =
                diffuse2Indexes.ParentTGIBlocks = specular2Indexes.ParentTGIBlocks = bondIndexes.ParentTGIBlocks = tgiBlocks;
        }
Esempio n. 34
0
        public PartyPickerDialogEx(PartyType partyTypes, List<PhoneSimPicker.SimPickerInfo> sims, ThumbnailKey simThumb, bool isPartyAtHome, float curfewStart, float curfewEnd, float venueOpenTime, float venueCloseTime, ClothingType restrictClothingTypeTo, bool isHostFemale)
            : base(AdjustedTypes(partyTypes), sims, simThumb, isPartyAtHome, curfewStart, curfewEnd, venueOpenTime, venueCloseTime, restrictClothingTypeTo, isHostFemale)
        {
            mPartyTypeCombo.ValueList.Clear();

            if ((PartyType.kHouseParty & partyTypes) != PartyType.kNone)
            {
                if (isPartyAtHome)
                {
                    mPartyTypeCombo.ValueList.Add(Localization.LocalizeString("Ui/Caption/Party:House", new object[0]), PartyType.kHouseParty);
                }
                else
                {
                    mPartyTypeCombo.ValueList.Add(Localization.LocalizeString("Ui/Caption/Party:Street", new object[0]), PartyType.kHouseParty);
                }
            }
            if ((PartyType.kWedding & partyTypes) != PartyType.kNone)
            {
                mPartyTypeCombo.ValueList.Add(Localization.LocalizeString("Ui/Caption/Party:Wedding", new object[0]), PartyType.kWedding);
            }
            if ((PartyType.kBirthday & partyTypes) != PartyType.kNone)
            {
                mPartyTypeCombo.ValueList.Add(Localization.LocalizeString("Ui/Caption/Party:Birthday", new object[0]), PartyType.kBirthday);
            }
            if ((PartyType.kFuneral & partyTypes) != PartyType.kNone)
            {
                mPartyTypeCombo.ValueList.Add(Localization.LocalizeString("Ui/Caption/Party:Funeral", new object[0]), PartyType.kFuneral);
            }
            if ((PartyType.kCampaign & partyTypes) != PartyType.kNone)
            {
                mPartyTypeCombo.ValueList.Add(Localization.LocalizeString("Ui/Caption/Party:Campaign", new object[0]), PartyType.kCampaign);
            }
            if ((PartyType.kBachelorParty & partyTypes) != PartyType.kNone)
            {
                mPartyTypeCombo.ValueList.Add(Localization.LocalizeString(isHostFemale, "Ui/Caption/Party:Bachelor", new object[0]), PartyType.kBachelorParty);
            }
            if ((PartyType.kTeenParty & partyTypes) != PartyType.kNone)
            {
                mPartyTypeCombo.ValueList.Add(Localization.LocalizeString("Ui/Caption/Party:Teen", new object[0]), PartyType.kTeenParty);
            }
            if ((PartyType.kChildSlumberParty & partyTypes) != PartyType.kNone)
            {
                mPartyTypeCombo.ValueList.Add(Localization.LocalizeString(isHostFemale, "Ui/Caption/Party:Slumber", new object[0]), PartyType.kChildSlumberParty);
            }
            if ((PartyType.kTeenSlumberParty & partyTypes) != PartyType.kNone)
            {
                mPartyTypeCombo.ValueList.Add(Localization.LocalizeString(isHostFemale, "Ui/Caption/Party:Slumber", new object[0]), PartyType.kTeenSlumberParty);
            }
            if ((PartyType.kPoolParty & partyTypes) != PartyType.kNone)
            {
                mPartyTypeCombo.ValueList.Add(Localization.LocalizeString(isHostFemale, "Ui/Caption/Party:Pool", new object[0]), PartyType.kPoolParty);
            }
            if ((PartyType.kFeastParty & partyTypes) != PartyType.kNone)
            {
                mPartyTypeCombo.ValueList.Add(Localization.LocalizeString(isHostFemale, "Ui/Caption/Party:Feast", new object[0]), PartyType.kFeastParty);
            }
            if ((PartyType.kCostumeParty & partyTypes) != PartyType.kNone)
            {
                mPartyTypeCombo.ValueList.Add(Localization.LocalizeString(isHostFemale, "Ui/Caption/Party:CostumeParty", new object[0]), PartyType.kCostumeParty);
            }
            if ((PartyType.kGiftGivingParty & partyTypes) != PartyType.kNone)
            {
                mPartyTypeCombo.ValueList.Add(Localization.LocalizeString(isHostFemale, "Ui/Caption/Party:GiftGivingParty", new object[0]), PartyType.kGiftGivingParty);
            }
            if ((PartyType.kJuiceKeggerParty & partyTypes) != PartyType.kNone)
            {
                mPartyTypeCombo.ValueList.Add(Localization.LocalizeString(isHostFemale, "Ui/Caption/Party:JuiceKegger", new object[0]), PartyType.kJuiceKeggerParty);
            }
            if ((PartyType.kTailgatingParty & partyTypes) != PartyType.kNone)
            {
                mPartyTypeCombo.ValueList.Add(Common.Localize("PartyType:Tailgating", isHostFemale), PartyType.kTailgatingParty);
            }
            if ((PartyType.kBonfire & partyTypes) != PartyType.kNone)
            {
                mPartyTypeCombo.ValueList.Add(Localization.LocalizeString(isHostFemale, "Ui/Caption/Party:Bonfire", new object[0]), PartyType.kBonfire);
            }
            if ((PartyType.kVideoGameLANParty & partyTypes) != PartyType.kNone)
            {
                mPartyTypeCombo.ValueList.Add(Common.Localize("PartyType:LANParty", isHostFemale), PartyType.kVideoGameLANParty);
            }
            if ((PartyType.kMasqueradeBall & partyTypes) != PartyType.kNone)
            {
                mPartyTypeCombo.ValueList.Add(Common.Localize("PartyType:MasqueradeBall", isHostFemale), PartyType.kMasqueradeBall);
            }
            if ((PartyType.kVictoryParty & partyTypes) != PartyType.kNone)
            {
                mPartyTypeCombo.ValueList.Add(Common.Localize("PartyType:VictoryParty", isHostFemale), PartyType.kVictoryParty);
            }

            mPartyTypeCombo.SelectionChange -= OnTypeChange;
            mPartyTypeCombo.SelectionChange += OnTypeChangeEx;

            mLeftArrow.Click -= OnArrowClick;
            mLeftArrow.Click += OnArrowClickEx;

            mRightArrow.Click -= OnArrowClick;
            mRightArrow.Click += OnArrowClickEx;

            Button button = mModalDialogWindow.GetChildByID(0x5ef6bd7, true) as Button;
            button.Click -= OnFilterClick;
            button.Click += OnFilterClickEx;

            button = mModalDialogWindow.GetChildByID(0x5ef6bd8, true) as Button;
            button.Click -= OnFilterClick;
            button.Click += OnFilterClickEx;

            mInviteesTable.ItemDoubleClicked -= OnGridDoubleClicked;
            mInviteesTable.ItemDoubleClicked += OnGridDoubleClickedEx;

            mSourceTable.ItemDoubleClicked -= OnGridDoubleClicked;
            mSourceTable.ItemDoubleClicked += OnGridDoubleClickedEx;
        }
Esempio n. 35
0
        public new static PartyInfo Show(PartyType partyTypes, List<PhoneSimPicker.SimPickerInfo> sims, ThumbnailKey simThumb, bool isPartyAtHome, float curfewStart, float curfewEnd, float venueOpenTime, float venueCloseTime, ClothingType restrictClothingTypeTo, bool isHostFemale)
        {
            int originalMax = kDefaultMaxAllowed;
            kDefaultMaxAllowed = int.MaxValue;

            try
            {
                using (PartyPickerDialogEx dialog = new PartyPickerDialogEx(partyTypes, sims, simThumb, isPartyAtHome, curfewStart, curfewEnd, venueOpenTime, venueCloseTime, restrictClothingTypeTo, isHostFemale))
                {
                    dialog.StartModal();
                    if (dialog.Result == null)
                    {
                        return null;
                    }
                    return dialog.Result;
                }
            }
            finally
            {
                kDefaultMaxAllowed = originalMax;
            }
        }