Skip to content

Commit a3153db

Browse files
committed
Remove map specific attributes from the listing.
People that want map attribute information can run the relevant s2gs files through and get proper mappings for their use case.
1 parent e672168 commit a3153db

File tree

2 files changed

+5
-32
lines changed

2 files changed

+5
-32
lines changed

sc2reader/data/attributes.json

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,5 @@
11
{
22
"attributes": {
3-
"0001": [
4-
"Korhal (Urban)",
5-
{
6-
"0001": "Unclassified game type.",
7-
"0002": "4v4 Team Monobattles",
8-
"0003": "Work with your team to select a strong composition of units",
9-
"0004": "Each player must select a single combat unit at the start of the game."
10-
}
11-
],
12-
"0002": [
13-
"Rated",
14-
{
15-
"0001": "Yes",
16-
"0002": "No"
17-
}
18-
],
19-
"0003": [
20-
"Balance Teams",
21-
{
22-
"0001": "Yes",
23-
"0002": "No"
24-
}
25-
],
26-
"0004": [
27-
"Ship Limit",
28-
{
29-
"0001": "No",
30-
"0002": "Yes"
31-
}
32-
],
333
"0500": [
344
"Controller",
355
{
@@ -1046,4 +1016,4 @@
10461016
]
10471017
},
10481018
"decisions": "(dp0\nc__builtin__\nfrozenset\np1\n((lp2\nS'Hard'\np3\naVHarder\np4\na(I3004\nS'Hard'\np5\ntp6\natp7\nRp8\ng4\nsg1\n((lp9\n(I2001\nS'1v1'\np10\ntp11\naS'1 v 1'\np12\naV1v1\np13\natp14\nRp15\ng13\nsg1\n((lp16\n(I3104\nS'AB04'\np17\ntp18\naS'Agressive Push'\np19\naVAggressive Push\np20\natp21\nRp22\ng20\nsg1\n((lp23\nS'Agressive Push'\np24\naVAggressive Push\np25\na(I3199\nS'AB04'\np26\ntp27\natp28\nRp29\ng25\nsg1\n((lp30\nV6v6\np31\naS'6 v 6'\np32\na(I2001\nS'6v6'\np33\ntp34\natp35\nRp36\ng31\nsg1\n((lp37\nS'Agressive Push'\np38\na(I3102\nS'AB04'\np39\ntp40\naVAggressive Push\np41\natp42\nRp43\ng41\nsg1\n((lp44\nI2003\naVTeams2v2\np45\naS'Team'\np46\natp47\nRp48\ng45\nsg1\n((lp49\nVLadder\np50\na(I3009\nS'Amm'\np51\ntp52\naS'Automated Match Making'\np53\natp54\nRp55\ng50\nsg1\n((lp56\n(I2001\nS'5v5'\np57\ntp58\naS'5 v 5'\np59\naV5v5\np60\natp61\nRp62\ng60\nsg1\n((lp63\nI3141\naVAI Build (Terran)\np64\naS'AI Build'\np65\natp66\nRp67\ng64\nsg1\n((lp68\n(I2001\nS'3v3'\np69\ntp70\naS'3 v 3'\np71\naV3v3\np72\natp73\nRp74\ng72\nsg1\n((lp75\nI3142\naVAI Build (Terran)\np76\naS'AI Build'\np77\natp78\nRp79\ng76\nsg1\n((lp80\n(I3200\nS'AB04'\np81\ntp82\naS'Agressive Push'\np83\naVAggressive Push\np84\natp85\nRp86\ng84\nsg1\n((lp87\nVAI Build (Protoss)\np88\naI3174\naS'AI Build'\np89\natp90\nRp91\ng88\nsg1\n((lp92\nS'Very Hard'\np93\naVElite\np94\na(I3004\nS'VyHd'\np95\ntp96\natp97\nRp98\ng94\nsg1\n((lp99\nS'Agressive Push'\np100\naVAggressive Push\np101\na(I3167\nS'AB04'\np102\ntp103\natp104\nRp105\ng101\nsg1\n((lp106\nI3204\naVAI Build (Zerg)\np107\naS'AI Build'\np108\natp109\nRp110\ng107\nsg1\n((lp111\nVInsane\np112\naS'Cheater 3 (Insane)'\np113\na(I3004\nS'Insa'\np114\ntp115\natp116\nRp117\ng112\nsg1\n((lp118\n(I3007\nS'Watc'\np119\ntp120\naS'Observer'\np121\naS'Watcher'\np122\natp123\nRp124\ng121\nsg1\n((lp125\nI3205\naVAI Build (Zerg)\np126\naS'AI Build'\np127\natp128\nRp129\ng126\nsg1\n((lp130\nVTeams5v5\np131\naI2007\naS'Team'\np132\natp133\nRp134\ng131\nsg1\n((lp135\n(I2001\nS'FFA'\np136\ntp137\naVFFA\np138\naS'Free For All'\np139\natp140\nRp141\ng138\nsg1\n((lp142\nS'Unknown'\np143\naI2012\naS'Team'\np144\natp145\nRp146\ng144\nsg1\n((lp147\nI3206\naVAI Build (Zerg)\np148\naS'AI Build'\np149\natp150\nRp151\ng148\nsg1\n((lp152\n(I3168\nS'AB04'\np153\ntp154\naS'Agressive Push'\np155\naVAggressive Push\np156\natp157\nRp158\ng156\nsg1\n((lp159\nI3172\naVAI Build (Protoss)\np160\naS'AI Build'\np161\natp162\nRp163\ng160\nsg1\n((lp164\nS'Level 1 (Very Easy)'\np165\na(I3004\nS'VyEy'\np166\ntp167\naVVery Easy\np168\natp169\nRp170\ng168\nsg1\n((lp171\nS'Agressive Push'\np172\naVAggressive Push\np173\na(I3135\nS'AB04'\np174\ntp175\natp176\nRp177\ng173\nsg1\n((lp178\nV2v2\np179\naS'2 v 2'\np180\na(I2001\nS'2v2'\np181\ntp182\natp183\nRp184\ng179\nsg1\n((lp185\nS'Agressive Push'\np186\na(I3166\nS'AB04'\np187\ntp188\naVAggressive Push\np189\natp190\nRp191\ng189\nsg1\n((lp192\nVTeamsFFA\np193\naI2006\naS'Team'\np194\natp195\nRp196\ng193\nsg1\n((lp197\nVAI Build (Terran)\np198\naS'AI Build'\np199\naI3143\natp200\nRp201\ng198\nsg1\n((lp202\nVTeams7v7\np203\naI2011\naS'Team'\np204\natp205\nRp206\ng203\nsg1\n((lp207\nVMedium\np208\naS'Level 3 (Medium)'\np209\na(I3004\nS'Medi'\np210\ntp211\natp212\nRp213\ng208\nsg1\n((lp214\nI3140\naVAI Build (Terran)\np215\naS'AI Build'\np216\natp217\nRp218\ng215\nsg1\n((lp219\nS'Level 2 (Easy)'\np220\na(I3004\nS'Easy'\np221\ntp222\naVEasy\np223\natp224\nRp225\ng223\nsg1\n((lp226\n(I3136\nS'AB04'\np227\ntp228\naS'Agressive Push'\np229\naVAggressive Push\np230\natp231\nRp232\ng230\nsg1\n((lp233\nI2008\naVTeams6v6\np234\naS'Team'\np235\natp236\nRp237\ng234\nsg1\n((lp238\nS'Agressive Push'\np239\naVAggressive Push\np240\na(I3103\nS'AB04'\np241\ntp242\natp243\nRp244\ng240\nsg1\n((lp245\nV4v4\np246\naS'4 v 4'\np247\na(I2001\nS'4v4'\np248\ntp249\natp250\nRp251\ng246\nsg1\n((lp252\nS'Agressive Push'\np253\na(I3134\nS'AB04'\np254\ntp255\naVAggressive Push\np256\natp257\nRp258\ng256\nsg1\n((lp259\nVTeams1v1\np260\naI2002\naS'Team'\np261\natp262\nRp263\ng260\nsg1\n((lp264\nI3139\naVAI Build (Terran)\np265\naS'AI Build'\np266\natp267\nRp268\ng265\nsg1\n((lp269\nVAI Build (Zerg)\np270\naS'AI Build'\np271\naI3207\natp272\nRp273\ng270\nsg1\n((lp274\nI3171\naVAI Build (Protoss)\np275\naS'AI Build'\np276\natp277\nRp278\ng275\nsg1\n((lp279\nI3173\naS'AI Build'\np280\naVAI Build (Protoss)\np281\natp282\nRp283\ng281\nsg1\n((lp284\nVTeams3v3\np285\naI2004\naS'Team'\np286\natp287\nRp288\ng285\nsg1\n((lp289\nVAI Build (Protoss)\np290\naS'AI Build'\np291\naI3175\natp292\nRp293\ng290\nsg1\n((lp294\nVTeams4v4\np295\naI2005\naS'Team'\np296\natp297\nRp298\ng295\nsg1\n((lp299\nI3203\naVAI Build (Zerg)\np300\naS'AI Build'\np301\natp302\nRp303\ng300\nsg1\n((lp304\nS'Agressive Push'\np305\na(I3198\nS'AB04'\np306\ntp307\naVAggressive Push\np308\natp309\nRp310\ng308\ns."
1049-
}
1019+
}

sc2reader/objects.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ def __repr__(self):
6262
return str(self)
6363

6464

65+
@log_utils.loggable
6566
class Attribute(object):
6667

6768
def __init__(self, header, attr_id, player, value):
@@ -70,7 +71,9 @@ def __init__(self, header, attr_id, player, value):
7071
self.player = player
7172

7273
if self.id not in LOBBY_PROPERTIES:
73-
raise ValueError("Unknown attribute id: "+self.id)
74+
self.logger.info("Unknown attribute id: {0}".format(self.id))
75+
self.name = "Unknown"
76+
self.value = None
7477
else:
7578
self.name, lookup = LOBBY_PROPERTIES[self.id]
7679
self.value = lookup[value.strip("\x00 ")[::-1]]

0 commit comments

Comments
 (0)