def _get_image(self, key, suffix, alternate=None): path = 'extensions/Worlds/ZombieWorld/resources/events' images = get_files(path) event_image = self._data.get(key) if event_image is None: for image in images: if os.path.basename(image).split('.')[0] == self.id + suffix: event_image = image return alternate if event_image is None else event_image
def get_image(self): # testing image getting system path = 'images/%s/%s' % (self._image, self.id) images = utilities.get_files(path) try: img = images[0] except IndexError: img = None return img
def get_image(self): # testing image getting system path = 'images/%s/%s' % (self.data().get('image'), self.key) images = get_files(path) try: img = images[0] except IndexError: img = None return img
def image(self): path = 'extensions/Worlds/ZombieWorld/resources/venchiles' images = get_files(path) venchile_image = self._data.get('image') if venchile_image is None: for image in images: if os.path.basename(image).split('.')[0] == self.id: venchile_image = image return venchile_image