Skip to content

Commit f04dbdc

Browse files
committed
Include anonymous units in replay.objects
Replay.objects is THE lookup for objects and should really store any object accessible from any point. If you don't want to deal with anonymous units you'll need to filter on unit.id.
1 parent b4125f0 commit f04dbdc

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

sc2reader/events.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,7 @@ def load_context(self, replay):
162162
else:
163163
unit_class = replay.datapack.types[self.target_type]
164164
self.target = unit_class(self.target_id)
165-
166-
# For units behind the fog of war, don't make an entry
167-
if self.target.id:
168-
replay.objects[uid] = self.target
165+
replay.objects[uid] = self.target
169166

170167
def __str__(self):
171168
if self.target:

0 commit comments

Comments
 (0)