Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Citrinate committed Feb 20, 2024
1 parent 26fbf8f commit fc0f846
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 18 deletions.
2 changes: 1 addition & 1 deletion CS2Interface/Data/GameDataItems.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ internal List<KeyValue>? this[string? key] {
return null;
}

return Data.Search(key);
return Data.Children.Where(x => x.Name == key).SelectMany(x => x.Children).ToList();
}
}

Expand Down
4 changes: 2 additions & 2 deletions CS2Interface/Data/GameDataText.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ internal class GameDataText : GameDataResource {
internal GameDataText(string url) : base(url) {}

internal async Task<bool> Update() {
List<KeyValue>? data = (await FetchKVResource().ConfigureAwait(false))?.Search("Tokens");
KeyValue? data = await FetchKVResource().ConfigureAwait(false);
if (data == null) {
ASF.ArchiLogger.LogGenericError(String.Format("Couldn't load game data from: {0}", Url));

return false;
}

Data = data;
Data = data.Children.Where(x => x.Name == "Tokens").SelectMany(x => x.Children).ToList();
Updated = true;

return true;
Expand Down
4 changes: 0 additions & 4 deletions CS2Interface/Data/InventoryItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,6 @@ private bool ParseAttributes(List<CSOEconItemAttribute>? attributes) {
return false;
}

if (attribute_def["attribute_type"].Value == "vector") {
ASF.ArchiLogger.LogGenericError(String.Format("zzzz vector for: {0}", attribute_name));
}

switch (attribute_def["attribute_type"].Value) {
case "uint32":
case null when attribute_def["stored_as_integer"].Value == "1":
Expand Down
11 changes: 0 additions & 11 deletions CS2Interface/Helpers/UtilExtensions.cs

This file was deleted.

0 comments on commit fc0f846

Please sign in to comment.