Skip to content

Commit

Permalink
Add unique setting for disabling nude characters...
Browse files Browse the repository at this point in the history
  • Loading branch information
AntumDeluge committed Dec 21, 2021
1 parent f5b92b5 commit 874a117
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 1 deletion.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
7 changes: 6 additions & 1 deletion src/games/stendhal/client/OutfitStore.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.apache.log4j.Logger;

import games.stendhal.client.gui.OutfitColor;
import games.stendhal.client.gui.wt.core.WtWindowManager;
import games.stendhal.client.sprite.ImageSprite;
import games.stendhal.client.sprite.Sprite;
import games.stendhal.client.sprite.SpriteCache;
Expand Down Expand Up @@ -197,7 +198,11 @@ public Sprite getLayerSprite(final String layer, final int index, final OutfitCo
}
}

final String suffix = getSpriteSuffix(index);
String suffix = getSpriteSuffix(index);
if (layer.equals("body") && WtWindowManager.getInstance().getPropertyBoolean("gamescreen.nonude", true)) {
suffix = suffix + "-nonude";
}

final String ref = OUTFITS + "/" + layer + "/" + layer + "_" + suffix + ".png";

if (color == null) {
Expand Down
12 changes: 12 additions & 0 deletions src/games/stendhal/client/gui/settings/VisualSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,18 @@ public void itemStateChanged(ItemEvent e) {

});

JCheckBox noNudeToggle = SettingsComponentFactory.createSettingsToggle("gamescreen.nonude", true,
"Show undergarments", "\"Nude\" characters are covered with undergarments.");
page.add(noNudeToggle);
noNudeToggle.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
ClientSingletonRepository.getUserInterface().addEventLine(new EventLine("",
"Changes will take effect after changing maps.",
NotificationType.CLIENT));
}
});

// show creature speech bubbles
JCheckBox showCreatureSpeechToggle = SettingsComponentFactory.createSettingsToggle(GAMESCREEN_CREATURESPEECH, true,
"Show creature speech bubbles", "Show creature speech bubbles in the client display");
Expand Down

0 comments on commit 874a117

Please sign in to comment.