From 8502b780c2a37cb7807c7bb7d48d50f681afaf10 Mon Sep 17 00:00:00 2001 From: Emi Matchu Date: Sun, 29 Dec 2024 15:39:52 -0800 Subject: [PATCH] Add FORCE=1 flag to override series names in Styling Studio auto-import I ran a bad version of this job yesterday, and set a lot of the new styles to an incorrect "Prismatic" series name. This will help me fix them! There's still styles to manually fix, where TNT decided not to put the full series name in the item name. (Presumably some of the names were too long? Or maybe they just forgot?) But this is a better starting point! --- lib/tasks/neopets/import/styling_studio.rake | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/tasks/neopets/import/styling_studio.rake b/lib/tasks/neopets/import/styling_studio.rake index 88606945..8284c393 100644 --- a/lib/tasks/neopets/import/styling_studio.rake +++ b/lib/tasks/neopets/import/styling_studio.rake @@ -61,11 +61,17 @@ namespace "neopets:import" do record.series_name = new_series_name puts "✅ [#{label}]: Series name is now #{new_series_name.inspect}" elsif record.series_name != new_series_name - puts "⚠️ [#{label}: Series name may have changed, handle manually? " + - "#{record.series_name.inspect} -> #{new_series_name.inspect}" + if ENV['FORCE'] == '1' + puts "❗ [#{label}]: Series name forcibly changed: " + + "#{record.series_name.inspect} -> #{new_series_name.inspect}" + record.series_name = new_series_name + else + puts "⚠️ [#{label}]: Series name may have changed, handle manually? " + + "#{record.series_name.inspect} -> #{new_series_name.inspect}" + end end else - puts "⚠️ [#{label}: Unable to detect series name, handle manually? " + + puts "⚠️ [#{label}]: Unable to detect series name, handle manually? " + "#{record.full_name.inspect} -> #{style[:name].inspect}" end