Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 49 additions & 21 deletions src/Client/ConfigWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ public class ConfigWindow {
private JSpinner generalPanelLimitFPSSpinner;
private JSpinner generalPanelLimitRanFPSSpinner;
private JCheckBox generalPanelAutoScreenshotCheckbox;
private JCheckBox generalPanelPerCharScreenshotCheckbox;
private JTextField generalPanelScreenshotsDirTextField;
private JCheckBox generalPanelRS2HDSkyCheckbox;
private JCheckBox generalPanelCustomSkyboxOverworldCheckbox;
Expand Down Expand Up @@ -1799,6 +1800,14 @@ public void stateChanged(ChangeEvent e) {
generalPanelAutoScreenshotCheckbox.setToolTipText(
"Takes a screenshot for you for level ups and on quest completion");

generalPanelPerCharScreenshotCheckbox =
addCheckbox(
"Organize screenshots into separate subfolders for each character", generalPanel);
generalPanelPerCharScreenshotCheckbox.setToolTipText(
"Automatically creates separate screenshot subfolders for every unique character name");
SearchUtils.addSearchMetadata(
generalPanelPerCharScreenshotCheckbox, CommonMetadata.DIR.getText());

/// Screenshots directory

float screenshotsButtonAlignment = isUsingFlatLAFTheme() ? 0.75f : 0.8f;
Expand Down Expand Up @@ -6275,6 +6284,8 @@ private void executeSynchronizeGuiValues() {
generalPanelLimitFPSSpinner.setValue(Settings.FPS_LIMIT.get(Settings.currentProfile));
generalPanelAutoScreenshotCheckbox.setSelected(
Settings.AUTO_SCREENSHOT.get(Settings.currentProfile));
generalPanelPerCharScreenshotCheckbox.setSelected(
Settings.PER_CHAR_SCREENSHOTS.get(Settings.currentProfile));
generalPanelScreenshotsDirTextField.setText(Settings.SCREENSHOTS_STORAGE_PATH.get("custom"));
generalPanelRS2HDSkyCheckbox.setSelected(Settings.RS2HD_SKY.get(Settings.currentProfile));
generalPanelCustomSkyboxOverworldCheckbox.setSelected(
Expand Down Expand Up @@ -6815,6 +6826,8 @@ private void saveSettings() {
Settings.currentProfile, generalPanelTrackpadRotationSlider.getValue());
Settings.AUTO_SCREENSHOT.put(
Settings.currentProfile, generalPanelAutoScreenshotCheckbox.isSelected());
Settings.PER_CHAR_SCREENSHOTS.put(
Settings.currentProfile, generalPanelPerCharScreenshotCheckbox.isSelected());
Settings.SCREENSHOTS_STORAGE_PATH.put(
Settings.currentProfile,
Settings.validateCustomDir(
Expand Down Expand Up @@ -7722,33 +7735,48 @@ public void updateRSCPlusDescription() {
}

public void updateAuthorTabAboutText() {
StringBuilder authorText = new StringBuilder(String.format("<html><head><style>p{font-size:%dpx; padding-top:%dpx;}ul{list-style-type:none;padding-left:0px;margin-left:0px;}</style></head>",osScaleMul(10), osScaleMul(15)));
authorText.append("<p><b>RSC</b>Plus is a RuneLite-like client ")
.append("based on the 234 RSC client.<br/> Learn more at https://rsc.plus.<br/><br/>")
.append("Thanks to the authors who made this software possible:<br/><ul>");
StringBuilder authorText =
new StringBuilder(
String.format(
"<html><head><style>p{font-size:%dpx; padding-top:%dpx;}ul{list-style-type:none;padding-left:0px;margin-left:0px;}</style></head>",
osScaleMul(10), osScaleMul(15)));
authorText
.append("<p><b>RSC</b>Plus is a RuneLite-like client ")
.append("based on the 234 RSC client.<br/> Learn more at https://rsc.plus.<br/><br/>")
.append("Thanks to the authors who made this software possible:<br/><ul>");
if (Launcher.binaryPrefix.equals("Open")) {
authorText.append("<li><b>● conker</b>, for creating the OpenRSC+ client and native binaries</li>")
.append("<li><b>● Ornox</b>, for creating the RSC+ base client & most of its features</li>");
authorText
.append("<li><b>● conker</b>, for creating the OpenRSC+ client and native binaries</li>")
.append(
"<li><b>● Ornox</b>, for creating the RSC+ base client & most of its features</li>");
} else {
authorText.append("<li><b>● Ornox</b>, for creating the RSC+ client & most of its features</li>");
authorText.append(
"<li><b>● Ornox</b>, for creating the RSC+ client & most of its features</li>");
}
authorText.append("<li><b>● Logg</b>, currently maintains the RSC+ project, new interfaces & improvements</li>");
authorText.append(
"<li><b>● Logg</b>, currently maintains the RSC+ project, new interfaces & improvements</li>");
if (Launcher.binaryPrefix.equals("Open")) {
authorText.append("<li><b>● conker again</b>, client scaling, fonts, general UX, & many other improvements</li>");
authorText.append(
"<li><b>● conker again</b>, client scaling, fonts, general UX, & many other improvements</li>");
} else if (Launcher.binaryPrefix.isEmpty()) {
authorText.append("<li><b>● conker</b>, binaries, client scaling, fonts, general UX, & many other improvements</li>");
authorText.append(
"<li><b>● conker</b>, binaries, client scaling, fonts, general UX, & many other improvements</li>");
} else {
authorText.append("<li><b>● conker</b>, server extensions, client scaling, fonts, general UX, & many other improvements</li>");
}
authorText.append("<li><b>● Brian</b>, who laid a lot of the groundwork for the user interface</li>")
.append("<li><b>● Luis</b>, who found a lot of important hooks & fixed a lot of bugs</li>")
.append("<li><b>● Talkarcabbage</b>, generic notifications, UI backend, & keybind overhaul</li>")
.append("<li><b>● nickzuber</b>, fixed some bugs, highlight/block items</li>")
.append("<li><b>● Ryan</b>, keybind to reset camera zoom, toggle statuses in corner always</li>")
.append("<li><b>● Yumeko</b>, fixed Twitch chat integration in 2023</li>")
.append("<li><b>● sammy123k</b>, added an option to center the XP progress bar</li>")
.append("<li><b>● The Jagex team of 2000 to 2004</b></li>")
.append("</ul></p></html>");
authorText.append(
"<li><b>● conker</b>, server extensions, client scaling, fonts, general UX, & many other improvements</li>");
}
authorText
.append("<li><b>● Brian</b>, who laid a lot of the groundwork for the user interface</li>")
.append("<li><b>● Luis</b>, who found a lot of important hooks & fixed a lot of bugs</li>")
.append(
"<li><b>● Talkarcabbage</b>, generic notifications, UI backend, & keybind overhaul</li>")
.append("<li><b>● nickzuber</b>, fixed some bugs, highlight/block items</li>")
.append(
"<li><b>● Ryan</b>, keybind to reset camera zoom, toggle statuses in corner always</li>")
.append("<li><b>● Yumeko</b>, fixed Twitch chat integration in 2023</li>")
.append("<li><b>● sammy123k</b>, added an option to center the XP progress bar</li>")
.append("<li><b>● The Jagex team of 2000 to 2004</b></li>")
.append("</ul></p></html>");

reindexSearch(() -> aboutText.setText(authorText.toString()));
frame.revalidate();
Expand Down
2 changes: 1 addition & 1 deletion src/Client/Extensions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ be downloaded to the user's device. Certain misconfigurations, such as the dupli
situations where RSC+ may mishandle world files. Others, such as an incorrectly-specified `server_extension`, will
outright prevent the user from attempting to submit their credentials to the server endpoint. Furthermore, it is
recommended that all JSON endpoints are hosted at the same domain, as partial download failures may block client
connections under certain conditions or otherwise break certain non-critical extension-related functionalityies.
connections under certain conditions or otherwise break certain non-critical extension-related functionalities.

Note that functionality exists to handle situations wherein a server's host domain _MUST_ change in response to an
emergency such as a domain hijacking. See the documentation for the `addFormerHostUrl` method within the
Expand Down
7 changes: 5 additions & 2 deletions src/Client/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ public class Settings {
new HashMap<String, RanOverrideEffectType>();
public static HashMap<String, Integer> RAN_EFFECT_TARGET_FPS = new HashMap<String, Integer>();
public static HashMap<String, Boolean> AUTO_SCREENSHOT = new HashMap<String, Boolean>();
public static HashMap<String, Boolean> PER_CHAR_SCREENSHOTS = new HashMap<String, Boolean>();
public static HashMap<String, String> SCREENSHOTS_STORAGE_PATH = new HashMap<String, String>();
public static HashMap<String, Boolean> RS2HD_SKY = new HashMap<String, Boolean>();
public static HashMap<String, Boolean> CUSTOM_SKYBOX_OVERWORLD_ENABLED =
Expand Down Expand Up @@ -973,6 +974,8 @@ public static void definePresets(Properties props) {
AUTO_SCREENSHOT.put(
"custom", getPropBoolean(props, "auto_screenshot", AUTO_SCREENSHOT.get("default")));

defineStaticPreset(PER_CHAR_SCREENSHOTS, getPropBoolean(props, "per_char_screenshots", true));

defineStaticPreset(
SCREENSHOTS_STORAGE_PATH,
getPropString(props, "screenshots_storage_path", sanitizeDirTextValue(Dir.SCREENSHOT)));
Expand Down Expand Up @@ -2811,8 +2814,7 @@ public static void initDir() {
JOptionPane.INFORMATION_MESSAGE,
null,
options,
null
);
null);

if (response == JOptionPane.YES_OPTION) {
String portableModeAcceptMessage =
Expand Down Expand Up @@ -3753,6 +3755,7 @@ public static synchronized void save(String preset) {
props.setProperty(
"ran_effect_target_fps", Integer.toString(RAN_EFFECT_TARGET_FPS.get(preset)));
props.setProperty("auto_screenshot", Boolean.toString(AUTO_SCREENSHOT.get(preset)));
props.setProperty("per_char_screenshots", Boolean.toString(PER_CHAR_SCREENSHOTS.get(preset)));
props.setProperty("screenshots_storage_path", SCREENSHOTS_STORAGE_PATH.get(preset));
props.setProperty("rs2hd_sky", Boolean.toString(RS2HD_SKY.get(preset)));
props.setProperty(
Expand Down
5 changes: 3 additions & 2 deletions src/Game/Renderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -2408,8 +2408,9 @@ public static void present(Image image) {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH.mm.ss");
String fbase = Settings.SCREENSHOTS_STORAGE_PATH.get("custom");

// Use a subdirectory when the player is logged in
if (!Client.player_name.isEmpty()
// Use a subdirectory when the player is logged in and has enabled the convenient option
if (Settings.PER_CHAR_SCREENSHOTS.get(Settings.currentProfile)
&& !Client.player_name.isEmpty()
&& !Client.username_login.equals(Replay.excludeUsername)) {
fbase += Util.formatPlayerName(Client.player_name);
}
Expand Down