From 6495a41fc341725d160a9c18208731a78365c927 Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Fri, 16 Oct 2026 20:30:31 +0300
Subject: [PATCH 85/85] anim_load(): Give deprecation warning for single sprite
 with animation tag

Give deprecation warning if an animation, even optional one,
is missing, but there's a sprite by that very tag.
Certainly the sprite is meant to be the animation.

See RM #2318

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 client/tilespec.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/client/tilespec.c b/client/tilespec.c
index 7485a835a0..40a380f069 100644
--- a/client/tilespec.c
+++ b/client/tilespec.c
@@ -3039,6 +3039,12 @@ static struct anim *anim_load(struct tileset *t, const char *tag,
   } while (sprite_exists(t, buf));
 
   if (--frames == 0) {
+    if (sprite_exists(t, tag)) {
+      log_deprecation(_("No animation \"%s\", but there's a single "
+                        "sprite by such a tag. Should it be an animation?"),
+                      tag);
+    }
+
     return nullptr;
   }
 
-- 
2.53.0

