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); } } }
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); }
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; }
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(); } }
public void ChangeType(ClothingType type, Material material, Mesh mesh, Quaternion angle) { clothingType = type; meshFilter.mesh = mesh; meshRenderer.material = material; graphicsParent.rotation = angle; }
private ClothingItem AddClothingItem(string name, ClothingType clothingType, WeatherCondition weatherCondition, Temperature temperature) { return clothingItemList[LastId++] = new ClothingItem(LastId, name, clothingType, new Weather(weatherCondition, temperature)); }
public ClothingItem(int id, string name, ClothingType clothingType, Weather weather) { Id = id; Name = name; ClothingType = clothingType; Weather = weather; }
public void ShirtBeforeHeadwear(ClothingType headwearOrJacket) { GetReadyToDress(); AssertCannotPutOn(headwearOrJacket); AssertPutOn(ClothingType.Shirt); AssertPutOn(headwearOrJacket); }
void AddToInventory(ClothingType clothingType) { for (int i = 0; i < inventoryDataHandler.wearableDictionary[clothingType].Count; i++) { inventoryContent[i].Setup(inventoryDataHandler.wearableDictionary[clothingType][i], popupWindonwUpcycleDonate); } }
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; }
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"); }
public void SocksAndPantsBeforeShoes(ClothingType socksOrPants, ClothingType pantsOrSocks) { GetReadyToDress(); AssertCannotPutOn(ClothingType.Footwear); AssertPutOn(socksOrPants); AssertPutOn(pantsOrSocks); AssertPutOn(ClothingType.Footwear); }
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); }
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)); }
public ActionResult DeleteConfirmed(int id) { ClothingType clothingType = db.ClothingTypes.Find(id); db.ClothingTypes.Remove(clothingType); db.SaveChanges(); return(RedirectToAction("Index")); }
public void UpdateType(ClothingType t) { if (t.Name != "" && t.Name != null) { dbConnection.UpdateTypes(t.Totypes()); } UpdateTypesList(); }
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)); }
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); }
public ActionResult Create([Bind(Include = "TypeID,TypeName")] ClothingType clothingType) { if (ModelState.IsValid) { db.ClothingTypes.Add(clothingType); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(clothingType)); }
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); } }
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 = ""; }
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); } }
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); } } }
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); }
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); } }
// 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)); }
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); }
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)); }
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; }
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; }
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; } }