def desc_fixed_floor_tile(tile): attrs = [] attrs.append(_("Floor") if not tile.is_secondary_terrain() else _("Secondary")) if tile.trap_id < 25: trap = MappaTrapType(tile.trap_id) attrs.append(' '.join([x.capitalize() for x in trap.name.split('_')])) if tile.trap_is_visible(): attrs.append(_("Vis.")) # TRANSLATORS: Visible (trap) if not tile.can_be_broken(): attrs.append(_("Unb.")) # TRANSLATORS: Unbreakable (trap) return ", ".join(attrs)
def _fill_tiles(self): # Init Tiles Store store: Gtk.ListStore = self.builder.get_object('model_tiles') store.clear() for idx, tile in enumerate(self.lst_tile): name = _('None') if tile.trap_id < 25: trap = MappaTrapType(tile.trap_id) name = ' '.join([x.capitalize() for x in trap.name.split('_')]) store.append([ str(idx), name, *(bool(tile.trap_data >> i & 1) for i in range(8)), str(tile.room_id), *(bool(tile.flags >> i & 1) for i in range(8)) ])
def _trap_name(self, trap_id): return MappaTrapType(trap_id).name