Skip to content

Commit d3b50f2

Browse files
committed
add event for hero spawn
1 parent 4d9cfab commit d3b50f2

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/log_analyser/objects/map.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,12 @@ def add_hero_swap(self, data):
124124
self.events.append({"type": "hero_swap", "timestamp": data["time"], "player": data["player_name"],
125125
"description": "{} swap on {}".format(data["player_name"], data["character_swap"])})
126126

127+
def add_hero_spawn(self, data):
128+
129+
self.add_player(data)
130+
self.events.append({"type": "hero_spawn", "timestamp": data["time"], "player": data["player_name"],
131+
"description": "{} spawn with {}".format(data["player_name"], data["character_name"])})
132+
127133
def create_if_player_and_caracter_not_exist(self, team, player_name, character_name):
128134

129135
if not player_name in self.rounds[self.actual_round].teams[team].players:

src/process_file.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@
44
for file in os.listdir("logs"):
55
if file.endswith(".txt"):
66
la = LogAnalyser('logs', file, "test")
7-
la.run()
8-
print("a")
7+
la.run()

0 commit comments

Comments
 (0)