diff --git a/src/celeste_render.jl b/src/celeste_render.jl index 8e6a59b..89ea14e 100644 --- a/src/celeste_render.jl +++ b/src/celeste_render.jl @@ -45,9 +45,9 @@ function drawTile(ctx::Cairo.CairoContext, x::Integer, y::Integer, tiles::Tiles, if tileValue != '0' quad, sprite, imagePath = getTileData(x, y, tiles, meta, states) - imagePathSprite = getSprite(imagePath, "Gameplay") + imagePathExists = imagePath !== nothing && getSprite(imagePath, "Gameplay") !== Ahorn.Assets.missingImage - if quad !== nothing && imagePathSprite.surface !== Ahorn.Assets.missingImage + if quad !== nothing && imagePathExists quadX, quadY = quad if !isempty(sprite) diff --git a/src/entities/key.jl b/src/entities/key.jl index 28ee1d9..3eff770 100644 --- a/src/entities/key.jl +++ b/src/entities/key.jl @@ -26,7 +26,7 @@ sprite = "collectables/key/idle00.png" function Ahorn.selection(entity::Maple.Key) x, y = Ahorn.position(entity) - if haskey(entity.data, "nodes") + if haskey(entity.data, "nodes") && length(entity["nodes"]) >= 2 controllX, controllY = Int.(entity.data["nodes"][1]) endX, endY = Int.(entity.data["nodes"][2])