Quote:
Originally Posted by hmmmmm
CustomKeyValues
[...] The main aim was to get data from maps/mappers that they can implement as KeyValues from hammer, but you can also set keys/values from the plugin side.
|
Oh right, that's a thing! Didn't think about being able to dispatch keys through plugins myself.
It doesn't seem like any of the nested
StringMaps in your plugin get disposed until the next
OnLevelInit call, so if I dispatch keys to a lot of short-lived entities on a long map, it'd be a bit leaky.
I had a proof-of-concept for something similar (minus native KV dispatch) as the groundwork for a cleaner Custom Weapons-like plugin framework; never got around to finishing the API design though.
But anyways, to get back on the topic of fake objects: definitely think about whether your use-case needs completely custom object-oriented programming logic and storage; don't do OOP for the sake of it.
__________________