import inanimate,display, pygame
class Chest(inanimate.inanimate):
    def __init__(self,location):
        self.image = pygame.transform.scale(pygame.image.load("Chest_.png"),(32,32))
        self.location = location
    def colliderect(self, other):
        return self.location.colliderect(other)
    def is_solid(self):
        return True
    def draw(self,screen, screen_rect):
        if display.is_on_screen(self.location,screen_rect):
            screen.blit(self.image, display.abs_to_screen(self.location,screen_rect))
    def touched_from_bottom(self,knight):
        self.image = pygame.transform.scale(pygame.image.load("Chest.png"),(32,32))
        
