Added more conversion methods from primitive types (`bool`, `byte`,
`int`, `float`) into `Text` and `MutableText` into the standart
`TextAPI`. Made `JSONAPI` use these methods instead.
This is a giga commit, something that should not really be done with
git, but I messed up.
This commit brings a great amount of changes, most important is
reworking `TextAPI` and alsmost complete replacement of `string` with
`Text`/`MutableText`.
Another huge change is introduction of command system that allows to
define commands in a centralized manner, handles auto-parsing of
their parameters and auto generates help info.
Lastly, JSON data types were replaced with new
`DynamicArray`/`AssociativeArray` that are better designed and more
generic.
Refactors `User` to simply store persistent data, while making `APlayer`
represent a connecte playr with appropriate links to `User` and (in
future) his in-game pawn representation.
To avoid needless creation of `APlayerID` classes we need to provide a
separate static method `GetSteamDataFromSteamID64()` that will generate
raw `SteamData` that we can then compare to existing instances of
`APlayerID`.
`GetActiveConnections()` by default returns all connections currently
recorded in `ConnectionService`, which might include broken player
connections, if player disconnected recently and it still was not
properly handled.
Optional parameter was added to clean connections before returning them,
which might cause a change in state of `ConnectionService`.
When `ConnectionService` was before killed and respawned it would cause
a new connection events for every online player, regardless of whether
they were generated before.
Now list of registered players is also saved in default variables for
`ConnectionService` and quick restart will not cause any issues.
Some of the broadcasting events only properly work with full injection
method (`BHIJ_Root`) and some additional work was required to implement
them for `BHIJ_Registered`.
Althought support for `HandleText()` and `HandleLocalized()` events
cannot be perfect with `BHIJ_Registered`, current method should work
good enough for most cases.
Give it a more meaningful name `BroadcastEventsObserver` and teach it to
support 3 different way to add itself into the chain of
`BroadcastHandler`s: at the very beginning, through a regular
`RegisterBroadcastHandler()` method or simply do not add it at all.
Addition of cloning also allows us to add regular setters for JSON
object and arrays that would clone a passed object to ensure each object
can only have one parent.