Skip to content
This repository has been archived by the owner on Jan 4, 2024. It is now read-only.

Commit

Permalink
fixed class notes
Browse files Browse the repository at this point in the history
  • Loading branch information
SunakazeKun committed May 14, 2022
1 parent d261b67 commit f48e111
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion data/objectdb.json

Large diffs are not rendered by default.

14 changes: 11 additions & 3 deletions src/whitehole/db/ObjectDB.java
Original file line number Diff line number Diff line change
Expand Up @@ -346,18 +346,26 @@ public static final class ClassInfo {

void parse(JSONObject info) {
internalName = info.optString("InternalName", internalName);
description = info.optString("Notes", internalName);
description = info.optString("Notes", description);
games = info.optInt("Games", games);
progress = info.optInt("Progress", progress);

JSONObject rawParameters = info.optJSONObject("Parameters");

if (rawParameters != null && !rawParameters.isEmpty()) {
properties = new HashMap(rawParameters.length());
if (properties == null) {
properties = new HashMap(rawParameters.length());
}

for (String key : rawParameters.keySet()) {
JSONObject rawProperty = rawParameters.getJSONObject(key);
properties.put(key, new PropertyInfo(key, rawProperty));

if (properties.containsKey(key)) {
properties.get(key).parse(rawProperty);
}
else {
properties.put(key, new PropertyInfo(key, rawProperty));
}
}
}
}
Expand Down

0 comments on commit f48e111

Please sign in to comment.