From a9c9f94dde28c52e54d52dd45ede23187028d8ad Mon Sep 17 00:00:00 2001 From: Emi Matchu Date: Sun, 4 Jan 2026 14:22:35 -0800 Subject: [PATCH] Fix PB item handling for Christmas Varwolf It says "This item is part of a deluxe paint brush set.", with a period instead of exclamation mark. There are also a couple cases where the paint brush item additionally has an "inspired by" credit after the first sentence. Rather than get picky about the pattern, we expand the `pb?` method to just check for the sentence as a substring, like the DB filter logic for `Item.is_pb` already does. --- app/models/item.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/item.rb b/app/models/item.rb index 45516ba6..4a53a36f 100644 --- a/app/models/item.rb +++ b/app/models/item.rb @@ -34,7 +34,7 @@ class Item < ApplicationRecord attr_writer :current_body_id, :owned, :wanted NCRarities = [0, 500] - PAINTBRUSH_SET_DESCRIPTION = 'This item is part of a deluxe paint brush set!' + PAINTBRUSH_SET_DESCRIPTION = 'This item is part of a deluxe paint brush set' scope :newest, -> { order(arel_table[:created_at].desc) if arel_table[:created_at] @@ -162,7 +162,7 @@ class Item < ApplicationRecord end def pb? - I18n.with_locale(:en) { self.description == PAINTBRUSH_SET_DESCRIPTION } + I18n.with_locale(:en) { self.description.include?(PAINTBRUSH_SET_DESCRIPTION) } end def np?