Browse Source

Rename `GetPlayers()` as `GetAll()` in PlayersAPI

pull/8/head
Anton Tarasenko 3 years ago
parent
commit
ef064ab2be
  1. 2
      docs/objects.md
  2. 2
      sources/Players/PlayersAPI.uc

2
docs/objects.md

@ -44,7 +44,7 @@ not *hard rules*.
### Exceptions
First guideline, for example, can be broken if returned object is supposed to
be shared: `_.players.GetPlayers()` returns `array<APLayer>` with references to
be shared: `_.players.GetAll()` returns `array<APLayer>` with references to
*player objects* that aren't supposed to ever be deallocated.
Similarly, Acedia's collections operate by different rules:
they might still consider themselves responsible for objects returned with

2
sources/Players/PlayersAPI.uc

@ -83,7 +83,7 @@ public final function ConsoleWriter Console()
* @return Current array of all players.
* Guaranteed to not contain `none` values.
*/
public final function array<APlayer> GetPlayers()
public final function array<APlayer> GetAll()
{
local PlayerService service;
local array<APlayer> emptyResult;

Loading…
Cancel
Save