Ejemplo n.º 1
0
 def __init__(self, frontend):
     self.frontend = frontend
     Tempsprites.__init__(self)
     self.homedir = os.path.join(os.getenv('HOME'), '.mirthless')
     self.player = Player({})
     self.cleanuplist = []
     template = load_yaml('rules','template_character.yaml')
     self.portrait = template['personal/portrait']
     self.journal = Journal()
     characters = []
Ejemplo n.º 2
0
 def __init__(self, frontend, *args):
     self._layer = 0
     super(pygame.sprite.DirtySprite, self).__init__()
     self.frontend = frontend
     size = self.frontend.mapw
     self.tilesize = self.frontend.mapscale
     self.rect = pygame.Rect(50,65, self.frontend.mapw, self.frontend.mapw)
     self.background = self.frontend.screen.subsurface(self.frontend.screensize).copy()
     self.image  = pygame.Surface((size, size))
     self.backgrounds = {}
     self.mapw = self.frontend.mapw
     Tempsprites.__init__(self)
     self.dialog = FloatDialog(self.frontend.rightwindow_rect, self.frontend, layer=1)
     self._addtemp('rightwindow', self.dialog)
     if self.frontend.mode == 'editor':
         self.loadmap({})
     else:
         loc = self.frontend.game.player.location()
         mapname = loc['map']
         self.loadmap(load_yaml('maps', mapname))
Ejemplo n.º 3
0
 def __init__(self, frontend, template, title):
     self.frontend = frontend
     self.title = title
     self.template = load_yaml('rules', template)
     self.dirname = None
     if self.title == 'Item Editor':
         self.dirname = 'items'
     elif self.title == 'NPC Editor':
         self.dirname = 'characters'
     self.rect = self.frontend.bigwindowrect
     FloatDialog.__init__(self, self.rect, frontend)
     Tempsprites.__init__(self)
     if self.title == 'Item Editor':
         self.item = Item({})
     elif self.title == 'NPC Editor':
         self.item = NPC({},1)
     debug (self.item.animations)
     self.conditional_sprites = []
     self.currentanimation = None
     self.baselayout()
     self.editorlayout()
Ejemplo n.º 4
0
 def __init__(self, rect, frontend, layer=5):
     self.frontend = frontend
     self._layer=layer
     Dialog.__init__(self, rect, self.frontend.imagecache, layer=self._layer)
     self.background = self.frontend.screen.subsurface(self.rect).copy()
     Tempsprites.__init__(self)
Ejemplo n.º 5
0
 def _addtemp(self, title, obj):
     self.cleanuplist.append(title)
     Tempsprites._addtemp(self, title, obj)