Commit graph

21 commits

Author SHA1 Message Date
Erik Ogenvik
1415c3dbaa Fixed bug with spawn default data.
The first entity created on the spawn would actually alter the default
data of the spawn.
2015-05-02 23:15:14 +02:00
Erik Ogenvik
ae4ae79d75 Handle case with archetypes in the spawn.
If an archetype is specified in the spawn, but the user sends a regular
Entity definition, we need to move the attributes defined by the user to
the first entity in the archetype. This is because once the spawn has
operated on the entity, it will also be of type "archetype" and any
extra properties in the root entity will be ignored by the archetype
factory.
2013-11-18 22:59:22 +01:00
Erik Ogenvik
0d251d8692 Check for null shape and prevent segfault. 2013-11-17 00:17:03 +01:00
Erik Ogenvik
328ba969fe Make spawns use entities and archetypes.
There's no reason to use the hacked in "contains" feature for creating
inventory. Instead we can rely on the Archtype features. Any entity
declaration for which we also want inventory created should use an
archetype.
The change is that the "contains" and "character_types" attributes are
removed. Instead there's a "entities" attribute, which is a map. The
keys are the names of the entities as seen to the client, and the values
are the entity specifications.
2013-11-16 22:55:47 +01:00
Erik Ogenvik
edc5fd604b Added property for respawning entity.
The "respawning" property makes an entity respawn instead of being
deleted. It intercepts the Delete op and instead of deleting the entity
it moves it to the specified spawn point.
A typical use case of this is to place the property on any user
controlled entity, thus making sure that it's never deleted and istead
respawned when killed or defeated.
2013-11-16 21:05:45 +01:00
Olek Wojnar
7f9ff2246d Remove CVS $Id tags
The legacy tags are causing build issues in Debian.
2013-07-15 20:31:59 +02:00
Alistair Riddoch
901001deb0 Remove unneeded Entity.h include 2013-01-18 19:52:04 +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
d67e092a0e Separate spawn setup code from the constructor 2012-12-27 23:02:04 +00:00
Alistair Riddoch
c8e57d01a6 Re-work all the shape code to be clearer 2012-03-31 02:18:33 +01:00
Alistair Riddoch
24ef842faa Re-work AreaProperty to use standard shapes
This means we have changed the code to use our shape classes to store the
data, and modified the expected Atlas format to match the more standard
way of expressing shapes in Atlas which the shape classes expect.
2012-01-10 14:11:19 +00:00
Alistair Riddoch
0723a690f6 Add support for simple configurable inventory to spawn points. 2010-01-03 02:16:35 +00:00
Alistair Riddoch
d2c1f251b1 Generate random positions in the spawn area. 2010-01-02 02:17:31 +00:00
Alistair Riddoch
c3309e478f Set the spawn area to a sensible shape. 2010-01-02 02:06:16 +00:00
Alistair Riddoch
9d03108950 Add code to check for area property on the spawn point. 2009-12-31 15:10:07 +00:00
Alistair Riddoch
2d7c33289a Fix a bug in the character type checking. 2009-12-30 15:22:37 +00:00
Alistair Riddoch
eb6853bcab Hack in proof of concept inventory. 2009-12-30 11:44:35 +00:00
Alistair Riddoch
69b369d1c9 Set the location in the spawn point. 2009-12-30 11:35:08 +00:00
Alistair Riddoch
309905fedf Extend Spawn interface to support richer Atlas descriptions. 2009-12-30 11:29:12 +00:00
Alistair Riddoch
7660afe705 Modify the interface of the Spawn base class for postprocessing. 2009-12-30 11:12:33 +00:00
Alistair Riddoch
1edcf786c6 Add concept classes for handling spawn points. 2009-12-30 01:32:31 +00:00