Implemented src.utils.spawner along with a test command @spawn. This allows for spawning individualized objects based on a prototype dictionary rather than having to make a new Typeclass for small changes. Allows for setting basid properties as well as Attributes and NAttributes. Supports prototype multiple inheritance (see header of src/utils/spawner.py)

This commit is contained in:
Griatch 2014-07-01 02:14:48 +02:00
parent d05c92792c
commit 6eafe65076
3 changed files with 357 additions and 68 deletions

View file

@ -80,6 +80,7 @@ class CharacterCmdSet(CmdSet):
self.add(building.CmdScript())
self.add(building.CmdSetHome())
self.add(building.CmdTag())
self.add(building.CmdSpawn())
# Batchprocessor commands
self.add(batchprocess.CmdBatchCommands())