From 921f49fa34b3f363757f53d05f640023c143a287 Mon Sep 17 00:00:00 2001
From: stuebinm
Date: Thu, 23 Dec 2021 23:23:38 +0100
Subject: extra lint for people confused by badges

tbh I'm confused by them as well
---
 lib/Properties.hs | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

(limited to 'lib')

diff --git a/lib/Properties.hs b/lib/Properties.hs
index daedabc..7425a08 100644
--- a/lib/Properties.hs
+++ b/lib/Properties.hs
@@ -227,7 +227,6 @@ checkLayer = do
     "group" -> pure ()
     "objectgroup" -> do
 
-
       -- check object properties
       objs <- forM (layerObjects layer) $ mapM $ \object -> do
         -- this is a confusing constant zoom ...
@@ -328,8 +327,10 @@ checkObjectProperty p@(Property name _) = do
 
 -- | Checks a single (custom) property of an objectgroup layer
 checkObjectGroupProperty :: Property -> LintWriter Layer
-checkObjectGroupProperty (Property name _) =
-  warn $ "unknown property " <> prettyprint name <> " for objectgroup layers"
+checkObjectGroupProperty (Property name _) = case name of
+  "getBadge" -> warn $ "the property \"getBadge\" must be set on individual objects, \
+                       \not the object layer."
+  _ -> warn $ "unknown property " <> prettyprint name <> " for objectgroup layers"
 
 
 -- | Checks a single (custom) property of a "normal" tile layer
-- 
cgit v1.2.3