Skip to content

Commit

Permalink
Merge pull request open-osrs#3021 from open-osrs/scrapie
Browse files Browse the repository at this point in the history
project: Add scraped ge limits, item stats and npc stats
  • Loading branch information
Owain94 authored Aug 11, 2021
2 parents c288e2e + eec1b76 commit c70bf5c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions runelite-client/src/main/resources/ge_limits.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions runelite-client/src/main/resources/item_stats.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion runelite-client/src/main/resources/npc_stats.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ private static final class NpcStats
* Looks for and parses the `Switch infobox` into a {@link MediaWikiTemplate} and then iterates over the `item#` values.
* Attempts to parse each `item#` value via `parseWikiText`, matching the `name` attribute. null values are ignored
*
* @param name only parses MediaWikiTemplates from `Switch infobox` if matches this value. (case insensitive)
* @param name only parses MediaWikiTemplates from `Switch infobox` if matches this value. (case insensitive)
* @param baseTemplate the {@link MediaWikiTemplate} representation of the `Switch infobox` to parse from
* @return List of all valid {@link MediaWikiTemplate}s matching `name` from `baseTemplate`s `item#` values
*/
Expand Down Expand Up @@ -218,7 +218,9 @@ public static void dump(final Store store, final MediaWiki wiki, final File path
}

final Set<Integer> ids = Arrays.stream(wikiIdString.split(","))
.map(s -> Integer.parseInt(s.replaceAll("[^0-9]", "").trim()))
.map(s -> s.replaceAll("[^0-9]", "").trim())
.filter(s -> !s.isEmpty())
.map(Integer::parseInt)
.collect(Collectors.toSet());

final NpcStats stats = buildNpcStats(base, variantKey);
Expand Down

0 comments on commit c70bf5c

Please sign in to comment.