Commit graph

20 commits

Author SHA1 Message Date
Erik Ogenvik
3b70e9c3cb Regularly persist thoughts to database.
Instead as before only persisting at shutdown.
2015-05-26 22:27:39 +02:00
Erik Ogenvik
311fc9cd2f Fixed issues with tying accounts to entities.
Since entries in the database tying entities to accounts only can be
created if the entity already is created in the database we need to make
sure the relation in "accounts_entities" isn't created until the entry in
"entities". This is done by letting the StorageManager handle it.
The way to interface between the Persistance and the StorageManager
classes isn't obvious, so we'll have to do it by signals.
2014-09-20 22:13:49 +02:00
Erik Ogenvik
f46a1104d8 Reordered restoration order.
We now first create all of the entities, in order, but without setting
any properties. Once that's done we then go through all entities again,
in order, and set their properties. This is to make sure that
1) We don't set any properties until all child entities are created.
This is crucial for things like outfits to work.
2) We first set the properties of the parent, and then the properties of
the children. This is crucial for things like terrain modifiers to work.
2014-09-09 20:46:30 +02:00
Erik Ogenvik
2210d320c5 Removed further references to now removed classes. 2014-02-03 12:21:35 +01:00
Erik Ogenvik
efada4d5ea Only send thoughts to entities with minds. 2013-08-22 10:43:03 +02:00
Erik Ogenvik
65dba3c5d6 Added feature for async mind persistence.
This is done through the MindInspector which queries entities for their
minds, and asynchronously emits a signal when thoughts arrive.
2013-08-21 20:56:09 +02: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
Erik Ogenvik
1d62c0f8fa Persist containment changes. 2013-06-15 22:54:09 +02:00
Erik Ogenvik
d523b3083c Allow user to abort shutdown.
This is mainly a way to jump out of the shutdown process if it hangs.
2013-04-07 23:20:23 +02:00
Erik Ogenvik
873a6d7ffb Store and restore thoughts.
Currently thoughts are only stored when the server is shut down. A more
proper way would probably be to query character and store their thoughts
at regular intervals while the simulation is running.
2013-04-07 23:20:23 +02: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
Al Riddoch
ecff89aba1 2008-11-17 Al Riddoch <alriddoch@googlemail.com>
* server/StorageManager.cpp, server/StorageManager.h: Sketch out
	  the algorithm for reading entity data from the database.
2008-11-17 02:14:59 +00:00
Al Riddoch
fd3adb5c78 2008-11-03 Al Riddoch <alriddoch@googlemail.com>
* server/StorageManager.cpp, server/StorageManager.h: Add a bunch
	  of metrics about the database performance.
2008-11-03 01:13:36 +00:00
Al Riddoch
60ae81e4a1 2008-09-03 Al Riddoch <alriddoch@googlemail.com>
* server/StorageManager.cpp, server/StorageManager.h: Add a queue
	  of deleted entity IDs, and implement deleting entries from
	  this queue from the database.
2008-09-04 09:39:04 +00:00
Al Riddoch
977c0ec4d7 2008-09-01 Al Riddoch <alriddoch@googlemail.com>
* server/EntityFactory.cpp, server/PersistantThingFactory.cpp,
	  server/PersistantThingFactory.h,
	  server/PersistantThingFactory_impl.h:
	  Add a count to each factory of the number of entities
	  it has created, and add a monitor watch to each one.

	* server/StorageManager.cpp, server/StorageManager.h: Add counters
	  for the various types of database query, and add monitor watches
	  for them.
2008-09-01 17:45:59 +00:00
Al Riddoch
0285deded5 2008-08-27 Al Riddoch <alriddoch@googlemail.com>
* server/StorageManager.cpp, server/StorageManager.h: Encode
	  properties as rather messy Atlas, and store them in the
	  database.
2008-08-27 15:46:14 +00:00
Al Riddoch
d87a7cd4dc 2008-08-26 Al Riddoch <alriddoch@googlemail.com>
* server/StorageManager.cpp, server/StorageManager.h: Move code
	  that inserts and updates Entities in the database into their own
	  functions.
2008-08-26 14:26:25 +00:00
Al Riddoch
e3aafac169 2008-08-25 Al Riddoch <alriddoch@googlemail.com>
* server/StorageManager.cpp, server/StorageManager.h,
	  server/servery.cpp: Add a stub function to be used to bootstrap
	  world persistence.
2008-08-25 15:47:11 +00:00
Al Riddoch
4b7b7c6ccc 2008-08-22 Al Riddoch <alriddoch@googlemail.com>
* server/IdleConnector.cpp, server/IdleConnector.h: A generic sigc++
	  based class for functions which need to be called regularly.

	* server/StorageManager.cpp, server/StorageManager.h: Add a method
	  to be called once a second from the idler.

	* server/server.cpp: Hook the idler up to storage manager.
2008-08-22 18:59:06 +00:00
Al Riddoch
689092a700 2008-08-17 Al Riddoch <alriddoch@googlemail.com>
* server/StorageManager.cpp, server/StorageManager.h: Add a new
	  class to coordinate storing the world state in a persistent store.
2008-08-17 21:12:50 +00:00