Closed tiquis0290 closed 6 months ago
I guess I should explain this in the documentation better for the next release. To quote my last answer from some time ago:
[...] you can use the
ViewPlayer
command with the player_id, or the username. As a result, there also has to be a way to get the fetched result from the gamestate with the player_id and the username. Both of these ways are provides with thelookup_name()
andlookup_pid()
methods on OtherPlayers. If the underlying fields were public, you could easily create situations, where the lookup is no longer in sync with the vec, that contains the players and thus return you the wrong result when calling the lookup methods
Probably iam missing something, but when i used ViewPlayer command i didn't find a way to look at his stats etc. unless i forked library and made OtherPlayers.other_players public in src/gamestate/social.rs Is it necessary to have this as private, or is there another intented way to do what iam doing?