private void SetRowDataForItem(RecipeRow row, string alias, JsonFileData jsonFileData) { JObject json = jsonFileData.Json; JToken appeal = json.SelectToken("entity_data.stonehearth:appeal.appeal"); row.SetAppeal(appeal == null ? null : appeal.ToObject <int?>()); JToken hasVariableItemQuality = json.SelectToken("entity_data.stonehearth:item_quality.variable_quality"); row.SetIsVariableQuality(hasVariableItemQuality == null ? null : hasVariableItemQuality.ToObject <bool?>()); JToken shopLevel = json.SelectToken("entity_data.stonehearth:net_worth.shop_info.shopkeeper_level"); row.SetShopLvl(shopLevel == null ? null : shopLevel.ToObject <int?>()); JToken isBuyable = json.SelectToken("entity_data.stonehearth:net_worth.shop_info.buyable"); row.SetIsBuyable(isBuyable == null ? null : isBuyable.ToObject <bool?>()); JToken isSellable = json.SelectToken("entity_data.stonehearth:net_worth.shop_info.sellable"); row.SetIsSellable(isSellable == null ? null : isSellable.ToObject <bool?>()); row.SetAlias(alias); row.Item = jsonFileData; row.SetNetWorth(jsonFileData.NetWorth == -1 ? (int?)null : (int?)jsonFileData.NetWorth); row.SetDisplayName(GetTranslatedName(GetDisplayName(jsonFileData))); row.SetCategory(GetCategoryName(jsonFileData)); row.SetMaterialTags(GetMaterialTags(jsonFileData)); row.SetIcon(GetIcon(jsonFileData)); if (jsonFileData.GetModuleFile() != null && jsonFileData.GetModuleFile().IsDeprecated) { row.IsDeprecated = true; } }
public override bool TryDeleteCell(RecipeRow row) { row.SetIsVariableQuality(null); return(true); }