Commit graph

16 commits

Author SHA1 Message Date
Alistair Riddoch
745d263709 Fail cleanly if a type exists
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.
2013-02-21 21:53:11 +00:00
Alistair Riddoch
4a9c7078f7 Refactor to use LocatedEntity as base class
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.
2013-01-17 10:17:07 +00:00
Alistair Riddoch
63330b34d4 Initialise Inheritance::noClass properly
Code that ends up with a reference to this object
need to check with isValid, so it's vital that it
is initialised to a null ptr.
2012-09-18 08:49:50 +01:00
Alistair Riddoch
3db3f76199 Remove unused include 2011-12-20 18:17:02 +00:00
Alistair Riddoch
577539aa6e Make installing types a little more consistent 2011-12-17 18:37:28 +00:00
Alistair Riddoch
03d012e149 Clean up reloading a bit
Add notes so we can ensure a failed reload is not disruptive
2011-12-16 19:28:45 +00:00
Alistair Riddoch
b09c73179c Fix linking and stubbing in a few tests 2011-12-16 08:33:58 +00:00
Alistair Riddoch
3d7ce6fde1 Fix tests for refectored PythonClass 2011-12-15 11:28:36 +00:00
Alistair Riddoch
e7f5ac91ea Converty ScriptFactory for Entity to a template
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
2011-12-15 01:00:28 +00:00
Alistair Riddoch
0e8f9ccc95 Replace abstract script factories with common template 2011-12-14 14:26:01 +00:00
Alistair Riddoch
325d9265f3 Remove updateChildren to updateProperties
This name makes more sense, and now the interface is more consistent.
2011-12-13 00:40:43 +00:00
Alistair Riddoch
a59c17f109 Remove now empty method 2011-12-13 00:39:08 +00:00
Alistair Riddoch
a8fb1c8c89 Fix up some tests 2011-11-08 20:32:35 +00:00
Alistair Riddoch
e0c92ebf39 Remove reference to BaseWorld in EntityBuilder 2011-09-21 12:45:18 +01:00
Alistair Riddoch
d10f667693 Finish stubbing out 3 rule handler tests 2011-09-21 11:18:55 +01:00
Alistair Riddoch
d9b3fcf4de Partly complete stubs for EntityRuleHandler test 2011-09-21 10:25:55 +01:00