Skip to content

Commit 46b8228

Browse files
committed
Display player name in game stats
Note that this needs more work to function correctly in multiplayer Closes #420
1 parent fe2d6ac commit 46b8228

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/player/player.gd

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -228,12 +228,10 @@ func is_able_to_research(element: Element.enm) -> bool:
228228
return is_able
229229

230230

231+
# TODO: sync this info in multiplayer. Players need to tell
232+
# their names to other players.
231233
func get_player_name() -> String:
232-
var player_name: String
233-
if Config.enable_auth():
234-
player_name = W4Manager.current_username
235-
else:
236-
player_name = "Player %d" % _id
234+
var player_name: String = Settings.get_setting(Settings.PLAYER_NAME)
237235

238236
return player_name
239237

0 commit comments

Comments
 (0)