screenshot: Add clan member death screenshotting (#14052)

This commit is contained in:
Patrick Watts
2021-09-21 11:41:54 +04:00
committed by Owain van Brakel
parent 0d0e75b825
commit 3a64e1063e
2 changed files with 24 additions and 9 deletions

View File

@@ -181,11 +181,23 @@ public interface ScreenshotConfig extends Config
return false;
}
@ConfigItem(
keyName = "clanDeath",
name = "Screenshot Clan Deaths",
description = "Configures whether or not screenshots are automatically taken when clan members die.",
position = 12,
section = whatSection
)
default boolean screenshotClanDeath()
{
return false;
}
@ConfigItem(
keyName = "duels",
name = "Screenshot Duels",
description = "Configures whether or not screenshots are automatically taken of the duel end screen.",
position = 12,
position = 13,
section = whatSection
)
default boolean screenshotDuels()
@@ -197,7 +209,7 @@ public interface ScreenshotConfig extends Config
keyName = "valuableDrop",
name = "Screenshot Valuable drops",
description = "Configures whether or not screenshots are automatically taken when you receive a valuable drop.",
position = 13,
position = 14,
section = whatSection
)
default boolean screenshotValuableDrop()
@@ -209,7 +221,7 @@ public interface ScreenshotConfig extends Config
keyName = "valuableDropThreshold",
name = "Valuable Threshold",
description = "The minimum value to save screenshots of valuable drops.",
position = 14,
position = 15,
section = whatSection
)
default int valuableDropThreshold()
@@ -221,7 +233,7 @@ public interface ScreenshotConfig extends Config
keyName = "untradeableDrop",
name = "Screenshot Untradeable drops",
description = "Configures whether or not screenshots are automatically taken when you receive an untradeable drop.",
position = 15,
position = 16,
section = whatSection
)
default boolean screenshotUntradeableDrop()
@@ -233,7 +245,7 @@ public interface ScreenshotConfig extends Config
keyName = "ccKick",
name = "Screenshot Kicks from FC",
description = "Take a screenshot when you kick a user from a friends chat.",
position = 16,
position = 17,
section = whatSection
)
default boolean screenshotKick()
@@ -245,7 +257,7 @@ public interface ScreenshotConfig extends Config
keyName = "baHighGamble",
name = "Screenshot BA high gambles",
description = "Take a screenshot of your reward from a high gamble at Barbarian Assault.",
position = 17,
position = 18,
section = whatSection
)
default boolean screenshotHighGamble()
@@ -257,7 +269,7 @@ public interface ScreenshotConfig extends Config
keyName = "collectionLogEntries",
name = "Screenshot collection log entries",
description = "Take a screenshot when completing an entry in the collection log",
position = 18,
position = 19,
section = whatSection
)
default boolean screenshotCollectionLogEntries()
@@ -269,7 +281,7 @@ public interface ScreenshotConfig extends Config
keyName = "hotkey",
name = "Screenshot hotkey",
description = "When you press this key a screenshot will be taken",
position = 19
position = 20
)
default Keybind hotkey()
{

View File

@@ -308,7 +308,10 @@ public class ScreenshotPlugin extends Plugin
{
takeScreenshot("Death", SD_DEATHS);
}
else if (player != client.getLocalPlayer() && (player.isFriendsChatMember() || player.isFriend()) && config.screenshotFriendDeath() && player.getCanvasTilePoly() != null)
else if (player != client.getLocalPlayer()
&& player.getCanvasTilePoly() != null
&& (((player.isFriendsChatMember() || player.isFriend()) && config.screenshotFriendDeath())
|| (player.isClanMember() && config.screenshotClanDeath())))
{
takeScreenshot("Death " + player.getName(), SD_DEATHS);
}