This required the EntityKit to be refactored, so that most fields are
pushed into EntityFactory. Due to the nature of how the rule handlers
and the factories interact the code is pretty messy. It works, but it's
tangled and not really clean.
The code would segfault if installing a new entity class failed at the last
stage in Inheritance. Inheritance would return null, which would be assigned
to the factory's m_type. addProperties() assumes the pointer is not null.
This fix adds a check, and reports a failure undoing the whole process.
All IG code should use the interface of LocatedEntity when dealing
with any entity, rather than sometimes requiring Entity. Add virtual
functions to the interface where required, and modify all other interfaces
to stop them using Entity. This makes the code way cleaner, and much better
de-coupled.
This class is now completely generic except for the type pointers for
the class being wrapped, so this starts the codebase moving to using
it for all server objects that should be scriptable