2016-11-17 05:45:04 +01:00
|
|
|
package com.minelittlepony;
|
2015-08-02 00:36:33 +02:00
|
|
|
|
2015-11-17 06:17:35 +01:00
|
|
|
import com.google.gson.annotations.Expose;
|
2018-04-25 13:02:10 +02:00
|
|
|
import com.minelittlepony.pony.data.PonyLevel;
|
2015-11-17 06:17:35 +01:00
|
|
|
import com.mumfrey.liteloader.modconfig.ConfigStrategy;
|
2016-01-26 09:16:11 +01:00
|
|
|
import com.mumfrey.liteloader.modconfig.Exposable;
|
2015-11-17 06:17:35 +01:00
|
|
|
import com.mumfrey.liteloader.modconfig.ExposableOptions;
|
|
|
|
|
2018-04-25 21:29:49 +02:00
|
|
|
/**
|
|
|
|
* Storage contained for MineLP client settings.
|
|
|
|
*
|
|
|
|
*/
|
2015-11-17 06:17:35 +01:00
|
|
|
@ExposableOptions(filename = "minelittlepony", strategy = ConfigStrategy.Unversioned)
|
2016-01-26 09:16:11 +01:00
|
|
|
public class PonyConfig implements Exposable {
|
2015-11-17 06:17:35 +01:00
|
|
|
|
2018-04-24 14:55:32 +02:00
|
|
|
@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 villagers = true;
|
|
|
|
@Expose public boolean zombies = true;
|
|
|
|
@Expose public boolean pigzombies = true;
|
|
|
|
@Expose public boolean skeletons = true;
|
|
|
|
@Expose public boolean illagers = true;
|
2018-05-11 13:52:42 +02:00
|
|
|
@Expose public boolean guardians = true;
|
2018-04-24 14:55:32 +02:00
|
|
|
|
2018-04-25 21:29:49 +02:00
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
*/
|
2018-05-01 19:33:17 +02:00
|
|
|
public PonyLevel getEffectivePonyLevel(boolean ignorePony) {
|
2018-04-24 14:55:32 +02:00
|
|
|
return ignorePony ? PonyLevel.BOTH : getPonyLevel();
|
|
|
|
}
|
2015-11-17 06:17:35 +01:00
|
|
|
|
2018-04-25 21:29:49 +02:00
|
|
|
/**
|
|
|
|
* Actually gets the pony level value. No option to ignore reality here.
|
|
|
|
*/
|
2016-01-26 09:16:11 +01:00
|
|
|
public PonyLevel getPonyLevel() {
|
2018-05-03 14:58:05 +02:00
|
|
|
if (ponylevel == null) {
|
|
|
|
ponylevel = PonyLevel.PONIES;
|
|
|
|
}
|
2015-11-17 06:17:35 +01:00
|
|
|
return ponylevel;
|
2015-08-02 00:36:33 +02:00
|
|
|
}
|
|
|
|
|
2018-04-25 21:29:49 +02:00
|
|
|
/**
|
|
|
|
* Sets the pony level. Want MOAR PONEHS? Well here you go.
|
|
|
|
* @param ponylevel
|
|
|
|
*/
|
2016-01-26 09:16:11 +01:00
|
|
|
public void setPonyLevel(PonyLevel ponylevel) {
|
|
|
|
this.ponylevel = ponylevel;
|
2015-11-17 06:17:35 +01:00
|
|
|
}
|
2015-08-02 00:36:33 +02:00
|
|
|
}
|