trip onadd in additional places

by request,
adds a per object-instance onadd for datablocks if an object instance *also* defines a class.
be mindful not to mix up which namespace is in use there, as you can not tag two different core class instances the same scripted class
implements the same with the same restrictions for simobjects in general
This commit is contained in:
AzaezelX 2025-12-27 09:02:21 -06:00
parent 0fb68936f9
commit 4f639a16b5
4 changed files with 25 additions and 0 deletions

View file

@ -987,6 +987,9 @@ class SimObject: public ConsoleObject, public TamlCallbacks
DECLARE_CALLBACK(void, onInspectPostApply, (SimObject* obj));
DECLARE_CALLBACK(void, onSelected, (SimObject* obj));
DECLARE_CALLBACK(void, onUnselected, (SimObject* obj));
DECLARE_CALLBACK(void, onAdd, (SimObjectId ID));
DECLARE_CALLBACK(void, onRemove, (SimObjectId ID));
static SimObject* __findObject( const char* id ) { return Sim::findObject( id ); }
static const char* __getObjectId( ConsoleObject* object )