comparison demos/rpg/scripts/actors/questgiver.py @ 546:8fee2d2286e9

Rewrote the object serializing routines to use a "template" idea for loading an object from disk. This allows for multiple objects to load the same base object template but be unique on the scene AND have different values. Useful for say more than one gold stack on the ground with different gold values. TODO: fix the "spawn" console command.
author prock@33b003aa-7bff-0310-803a-e67f0ece8222
date Thu, 03 Jun 2010 21:35:06 +0000
parents cb7ec12214a9
children d0282579668c
comparison
equal deleted inserted replaced
545:bc7e3c3122d7 546:8fee2d2286e9
30 30
31 from scripts.objects.baseobject import BaseGameObject, GameObjectTypes 31 from scripts.objects.baseobject import BaseGameObject, GameObjectTypes
32 from scripts.actors.baseactor import Actor 32 from scripts.actors.baseactor import Actor
33 33
34 class QuestGiver(Actor): 34 class QuestGiver(Actor):
35 def __init__(self, gamecontroller, layer, typename, instancename, instanceid=None, createInstance=False): 35 def __init__(self, gamecontroller, layer, typename, baseobjectname, instancename, instanceid=None, createInstance=False):
36 super(QuestGiver, self).__init__(gamecontroller, layer, typename, instancename, instanceid, createInstance) 36 super(QuestGiver, self).__init__(gamecontroller, layer, typename, baseobjectname, instancename, instanceid, createInstance)
37 self._type = GameObjectTypes["QUESTGIVER"] 37 self._type = GameObjectTypes["QUESTGIVER"]
38 38
39 self._quests = [] 39 self._quests = []
40 40
41 self._activequest = None 41 self._activequest = None