Bug - Fixed [patch] Stick-on eyebrow piercing breakage not detected

Aankhen

Member
It seems that Mafia doesn’t recognize when a stick-on eyebrow piercing breaks (cheap studded belts are handled correctly). This should probably fix it:
Code:
diff -r f99b1b49c918 src/net/sourceforge/kolmafia/objectpool/ItemPool.java
--- a/src/net/sourceforge/kolmafia/objectpool/ItemPool.java     Fri Nov 12 12:36:00 2010 +0530
+++ b/src/net/sourceforge/kolmafia/objectpool/ItemPool.java     Sat Nov 13 20:28:15 2010 +0530
@@ -761,6 +761,7 @@
        public static final int SCINTILLATING_POWDER = 3289;
        public static final int PERSONAL_MASSAGER = 3279;
        public static final int PLASMA_BALL = 3281;
+       public static final int STICK_ON_EYEBROW_PIERCING = 3282;
        public static final int PRETTY_PINK_BOW = 3298;
        public static final int SMILEY_FACE_STICKER = 3299;
        public static final int FARFALLE_BOW_TIE = 3300;
diff -r f99b1b49c918 src/net/sourceforge/kolmafia/request/FightRequest.java
--- a/src/net/sourceforge/kolmafia/request/FightRequest.java    Fri Nov 12 12:36:00 2010 +0530
+++ b/src/net/sourceforge/kolmafia/request/FightRequest.java    Sat Nov 13 20:28:15 2010 +0530
@@ -2294,6 +2294,15 @@
                        EquipmentManager.breakEquipment( ItemPool.CHEAP_STUDDED_BELT,
                                "Your cheap studded belt broke." );
                }
+
+               // "The adhesive on the fake piercing comes loose and it falls off. Looks
+               // like those things weren't meant to withstand as much sweat as your
+               // eyebrow is capable of producing."
+               if ( responseText.indexOf( "The adhesive on the fake piercing comes loose" ) != -1 )
+               {
+                       EquipmentManager.breakEquipment( ItemPool.STICK_ON_EYEBROW_PIERCING,
+                               "Your stick-on eyebrow piercing broke." );
+               }

                if ( responseText.indexOf( "Your sugar chapeau slides" ) != -1 )
                {
 

Veracity

Developer
Staff member
Revision 8767

Edit: by the way, thanks for including a patch, but I have noticed that you indent using space characters, rather than tabs, which means your patches are unusable as is; I can insert your lines, but then I have to M-x tabify them all to conform with our coding standards...
 
Last edited:

Aankhen

Member
Thanks for the fix!
Edit: by the way, thanks for including a patch, but I have noticed that you indent using space characters, rather than tabs, which means your patches are unusable as is; I can insert your lines, but then I have to M-x tabify them all to conform with our coding standards...
Hmm, odd. I use NetBeans, which is correctly configured to use tabs for Mafia (just tested it to be sure), and the patches I’ve included as attachments in the past seem okay here. Maybe the ones I include inline lose their tabs because I copy/paste from a command prompt diff when I’m in a hurry. Sorry about that! I’ll be more careful in future.
 
Top