module ModifiedTheoCrystalTheoCrystal

using ..Ahorn, Maple

@mapdef Entity "ModifiedTheoCrystal/NonPersistentTheoCrystal" NonPersistentTheoCrystal(x::Integer, y::Integer, sprite::String="")

const placements = Ahorn.PlacementDict(
    "Non Persistent Theo Crystal (Theo Crystal)" => Ahorn.EntityPlacement(
        NonPersistentTheoCrystal
    ),
)

sprite = "characters/theoCrystal/idle00"

function Ahorn.selection(entity::NonPersistentTheoCrystal)
    x, y = Ahorn.position(entity)

    return Ahorn.getSpriteRectangle(sprite, x, y - 10)
end

Ahorn.render(ctx::Ahorn.Cairo.CairoContext, entity::NonPersistentTheoCrystal, room::Maple.Room) = Ahorn.drawSprite(ctx, sprite, 0, -10)

end