Add a debug setting to help with testing races

This commit is contained in:
Sollace 2022-11-03 00:47:49 +01:00
parent 968237a218
commit c8fde38ee7
4 changed files with 13 additions and 0 deletions

View file

@ -98,6 +98,9 @@ public class GuiPonySettings extends GameGui {
content.addButton(new Label(LEFT, row += 30)).getStyle().setText("minelp.debug.size"); content.addButton(new Label(LEFT, row += 30)).getStyle().setText("minelp.debug.size");
content.addButton(new EnumSlider<>(LEFT, row += 15, config.sizeOverride.get()) content.addButton(new EnumSlider<>(LEFT, row += 15, config.sizeOverride.get())
.onChange(config.sizeOverride::set)); .onChange(config.sizeOverride::set));
content.addButton(new Label(LEFT, row += 30)).getStyle().setText("minelp.debug.race");
content.addButton(new EnumSlider<>(LEFT, row += 15, config.raceOverride.get())
.onChange(config.raceOverride::set));
} }
row += 20; row += 20;

View file

@ -253,6 +253,12 @@ public class Pony implements IPony {
* PonyLevel.PONIES (should) return a pony if this is a human. Don't be fooled, though. It doesn't. * PonyLevel.PONIES (should) return a pony if this is a human. Don't be fooled, though. It doesn't.
*/ */
public static Race getEffectiveRace(Race race, boolean ignorePony) { public static Race getEffectiveRace(Race race, boolean ignorePony) {
Race override = MineLittlePony.getInstance().getConfig().raceOverride.get();
if (override != Race.HUMAN) {
return override;
}
if (MineLittlePony.getInstance().getConfig().getEffectivePonyLevel(ignorePony) == PonyLevel.HUMANS) { if (MineLittlePony.getInstance().getConfig().getEffectivePonyLevel(ignorePony) == PonyLevel.HUMANS) {
return Race.HUMAN; return Race.HUMAN;
} }

View file

@ -46,6 +46,9 @@ public class PonyConfig extends Config {
.addComment("Overrides pony sizes") .addComment("Overrides pony sizes")
.addComment("Possible values: TALL, BULKY, LANKY, NORMAL, YEARLING, FOAL, UNSET (default)"); .addComment("Possible values: TALL, BULKY, LANKY, NORMAL, YEARLING, FOAL, UNSET (default)");
public final Setting<Race> raceOverride = value("debug", "raceOverride", Race.HUMAN)
.addComment("Overrides pony races")
.addComment("Possible values: HUMAN (default), EARTH, PEGASUS, UNICORN, ALICORN, CHANGELING, ZEBRA, CHANGEDLING, GRYPHON, HIPPOGRIFF, KIRIN, BAYPONT, SEAPONY");
public final Setting<Boolean> flappyElytras = value("customisation", "flappyElytras", false) public final Setting<Boolean> flappyElytras = value("customisation", "flappyElytras", false)
.addComment("Pegasi will use their wings to fly even when they're wearing an elytra"); .addComment("Pegasi will use their wings to fly even when they're wearing an elytra");

View file

@ -49,6 +49,7 @@
"minelp.debug.scale.sa": "Show Accurate", "minelp.debug.scale.sa": "Show Accurate",
"minelp.debug.scale.min": "Miniscule", "minelp.debug.scale.min": "Miniscule",
"minelp.debug.size": "Size Override", "minelp.debug.size": "Size Override",
"minelp.debug.race": "Race Override",
"hdskins.mode.minelp_seapony": "Seapony (in water)" "hdskins.mode.minelp_seapony": "Seapony (in water)"
} }