package com.minelittlepony;

import com.google.gson.annotations.Expose;
import com.minelittlepony.pony.data.PonyLevel;
import com.minelittlepony.settings.SensibleConfig;
import com.mumfrey.liteloader.modconfig.ConfigStrategy;
import com.mumfrey.liteloader.modconfig.Exposable;
import com.mumfrey.liteloader.modconfig.ExposableOptions;
import com.voxelmodpack.hdskins.HDSkinManager;

/**
 * Storage container for MineLP client settings.
 *
 */
@ExposableOptions(filename = "minelittlepony", strategy = ConfigStrategy.Unversioned)
public class PonyConfig extends SensibleConfig implements Exposable {

    @Expose private PonyLevel ponylevel = PonyLevel.PONIES;

    @Expose public boolean sizes = true;
    @Expose public boolean snuzzles = true;
    @Expose public boolean hd = true;
    @Expose public boolean showscale = true;
    @Expose public boolean fpsmagic = true;
    @Expose public boolean ponyskulls = true;

    public enum PonySettings implements Setting {
        SIZES,
        SNUZZLES,
        HD,
        SHOWSCALE,
        FPSMAGIC,
        PONYSKULLS;
    }

    @Expose public boolean villagers = true;
    @Expose public boolean zombies = true;
    @Expose public boolean pigzombies = true;
    @Expose public boolean skeletons = true;
    @Expose public boolean illagers = true;
    @Expose public boolean guardians = true;
    @Expose public boolean endermen = true;

    /**
     * Gets the current PonyLevel. That is the level of ponies you would like to see.
     * @param ignorePony true to ignore whatever value the setting has.
     */
    public PonyLevel getEffectivePonyLevel(boolean ignorePony) {
        return ignorePony ? PonyLevel.BOTH : getPonyLevel();
    }

    /**
     * Actually gets the pony level value. No option to ignore reality here.
     */
    public PonyLevel getPonyLevel() {
        if (ponylevel == null) {
            ponylevel = PonyLevel.PONIES;
        }
        return ponylevel;
    }

    /**
     * Sets the pony level. Want MOAR PONEHS? Well here you go.
     * @param ponylevel
     */
    public void setPonyLevel(PonyLevel ponylevel) {
        this.ponylevel = ponylevel;
        HDSkinManager.INSTANCE.reloadSkins();
    }

    public float getGlobalScaleFactor() {
        return showscale ? 1F : 1.3F;
    }
}

@@ -433,11 +433,8 @@
 gs.%0A
- *%0A
  */%0A
@@ -1476,16 +1476,23 @@
 to see.%0A
+     *%0A
      * @
@@ -2017,16 +2017,23 @@
 you go.%0A
+     *%0A
      * @
@@ -2048,16 +2048,16 @@
 nylevel%0A
-
      */%0A
@@ -2104,24 +2104,135 @@
 onylevel) %7B%0A
+        // only trigger reloads when the value actually changes%0A        if (ponylevel != this.ponylevel) %7B%0A    
         this
@@ -2251,24 +2251,28 @@
  ponylevel;%0A
+    
         HDSk
@@ -2301,24 +2301,34 @@
 oadSkins();%0A
+        %7D%0A
     %7D%0A%0A    p

Stop skin updates when the pony level hasn't updated