Squashed commit of the following:
commit f7cbf54045
Author: Anton Tarasenko <dkanus@gmail.com>
Date: Thu Jun 23 02:45:20 2022 +0700
Done
commit 3cf67a3ca5
Author: Anton Tarasenko <dkanus@gmail.com>
Date: Wed Jun 22 20:49:28 2022 +0700
Almost done
commit 6dfb9dc204
Author: Anton Tarasenko <dkanus@gmail.com>
Date: Wed Jun 22 17:03:06 2022 +0700
Now it even works
commit 2be4656f51
Author: Anton Tarasenko <dkanus@gmail.com>
Date: Wed Jun 22 16:30:35 2022 +0700
Kind of compiles now
commit 73914e9b7e
Author: Anton Tarasenko <dkanus@gmail.com>
Date: Tue Jun 21 04:24:04 2022 +0700
Daily dirty commit
`APlayer` and `ATrader` represented player and trader (`ShopVolume`)
with a single object instance. Such design, if used for all actors,
could have led to mutitute of problems rooted in need to find that
single object for any given native actor: we'd need to store
object-actor pairs separately and look through pairs lists, which is
hardly a sane design.
Now Acedia switches to a different design, where a single in-game entity
(i.e. actor) can have several interfaces referring to it. All equaly
valid. Refactoring `APlayer` and `ATrader` into `EPlayer` and `ETrader`
is a first step in that direction.
I shamefully ended up doing another mega-commit, because a lot of things
needed to be redone at once and it was easier that way on me. No one
really consistently tracks what I'm doing with these commits anyway.
This adds a whole bunch of code to deal with proper clean up for Acedia,
so it doesn't crash on map change and also replaces old event/listener
system with new signals/slots one.
This patch changes how `Feature`s configs work - they are now required
to use a separate config object (each `Feature` their own class, derived
from `FeatureConfig`) that is to be used as a `perconfigobject` storage.
`Feature`s themselves are not supposed to interact with their config
objects directly, instead using JSON-serializable type, which should
allow us a universal way to change `Feature`'s config variables during
execution.
Now Acedia collections provide functionality of `Get...ByPointer()`
method (that allows to fetch values nested into several collection by
JSON pointers) for both `JSONPointer` and `Text` classes.
Previously, each use of `Get...ByPointer()` method caused convertion of
a `Text` into `JSONPointer`, even if used `Text` value did not change.
This patch allows to create `JSONPointer` once and them use that as a
parameter, which should be much faster.
Now `LoggerAPI`, instead of simply loggin messages by itself, uses
logger objects (deriving from `Logger` class) to output log messages for
it (previous way of logging by `Log()` method is available by
`ConsoleLogger`).
Multiple loggers can be configured per each log level, which can be done
via config.
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.