project: merge upstream
This commit is contained in:
@@ -110,6 +110,7 @@ class SoundEffectOverlay extends Overlay
|
||||
|
||||
String text =
|
||||
"Id: " + event.getSoundId() +
|
||||
" - S: " + (event.getSource() != null ? event.getSource().getName() : "<none>") +
|
||||
" - L: " + event.getSceneX() + "," + event.getSceneY() +
|
||||
" - R: " + event.getRange() +
|
||||
" - D: " + event.getDelay();
|
||||
|
||||
@@ -27,7 +27,9 @@ package net.runelite.client.plugins.gpu;
|
||||
import com.jogamp.opengl.GL4;
|
||||
import java.io.InputStream;
|
||||
import java.util.Scanner;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
class GLUtil
|
||||
{
|
||||
private static final int ERR_LEN = 1024;
|
||||
@@ -197,6 +199,7 @@ class GLUtil
|
||||
else
|
||||
{
|
||||
String err = glGetShaderInfoLog(gl, shader);
|
||||
log.info(String.valueOf(program));
|
||||
throw new ShaderException(err);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,16 @@ import net.runelite.client.config.ConfigItem;
|
||||
@ConfigGroup("music")
|
||||
public interface MusicConfig extends Config
|
||||
{
|
||||
@ConfigItem(
|
||||
keyName = "muteOtherAreaSounds",
|
||||
name = "Mute others' area sounds",
|
||||
description = "Mute area sounds caused from other players"
|
||||
)
|
||||
default boolean muteOtherAreaSounds()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "musicVolume",
|
||||
name = "",
|
||||
@@ -60,6 +70,7 @@ public interface MusicConfig extends Config
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "soundEffectVolume",
|
||||
name = "",
|
||||
|
||||
@@ -38,13 +38,16 @@ import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.Actor;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.GameState;
|
||||
import net.runelite.api.Player;
|
||||
import net.runelite.api.ScriptID;
|
||||
import net.runelite.api.SoundEffectID;
|
||||
import net.runelite.api.SpriteID;
|
||||
import net.runelite.api.VarClientInt;
|
||||
import net.runelite.api.VarPlayer;
|
||||
import net.runelite.api.events.AreaSoundEffectPlayed;
|
||||
import net.runelite.api.events.ConfigChanged;
|
||||
import net.runelite.api.events.GameStateChanged;
|
||||
import net.runelite.api.events.ScriptCallbackEvent;
|
||||
@@ -138,6 +141,7 @@ public class MusicPlugin extends Plugin
|
||||
eventBus.subscribe(VarClientIntChanged.class, this, this::onVarClientIntChanged);
|
||||
eventBus.subscribe(VolumeChanged.class, this, this::onVolumeChanged);
|
||||
eventBus.subscribe(ScriptCallbackEvent.class, this, this::onScriptCallbackEvent);
|
||||
eventBus.subscribe(AreaSoundEffectPlayed.class, this, this::onAreaSoundEffectPlayed);
|
||||
}
|
||||
|
||||
private void onGameStateChanged(GameStateChanged gameStateChanged)
|
||||
@@ -216,6 +220,7 @@ public class MusicPlugin extends Plugin
|
||||
|
||||
private void onVolumeChanged(VolumeChanged volumeChanged)
|
||||
{
|
||||
log.info(volumeChanged.getType().toString());
|
||||
applyMusicVolumeConfig();
|
||||
}
|
||||
|
||||
@@ -229,8 +234,6 @@ public class MusicPlugin extends Plugin
|
||||
|
||||
private void applyMusicVolumeConfig()
|
||||
{
|
||||
log.info("applyMusicVolumeConfig");
|
||||
|
||||
int musicVolume = musicConfig.getMusicVolume();
|
||||
if (musicVolume > 0)
|
||||
{
|
||||
@@ -546,4 +549,15 @@ public class MusicPlugin extends Plugin
|
||||
client.getIntStack()[client.getIntStackSize() - 1] = -1;
|
||||
}
|
||||
}
|
||||
|
||||
private void onAreaSoundEffectPlayed(AreaSoundEffectPlayed areaSoundEffectPlayed)
|
||||
{
|
||||
Actor source = areaSoundEffectPlayed.getSource();
|
||||
if (source != client.getLocalPlayer()
|
||||
&& source instanceof Player
|
||||
&& musicConfig.muteOtherAreaSounds())
|
||||
{
|
||||
areaSoundEffectPlayed.consume();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -203,7 +203,7 @@ public interface RaidsConfig extends Config
|
||||
)
|
||||
default boolean displayLayoutMessage()
|
||||
{
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@ConfigTitleSection(
|
||||
|
||||
@@ -41,6 +41,7 @@ import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import net.runelite.api.Client;
|
||||
import static net.runelite.api.MenuOpcode.RUNELITE_OVERLAY;
|
||||
import static net.runelite.api.MenuOpcode.RUNELITE_OVERLAY_CONFIG;
|
||||
import net.runelite.api.SpriteID;
|
||||
import net.runelite.api.widgets.WidgetInfo;
|
||||
@@ -72,6 +73,7 @@ public class RaidsOverlay extends Overlay
|
||||
private static final int SMALL_ICON_SIZE = 21;
|
||||
private static final int TITLE_COMPONENT_HEIGHT = 20;
|
||||
private static final int LINE_COMPONENT_HEIGHT = 16;
|
||||
static final String BROADCAST_ACTION = "Broadcast layout";
|
||||
private final PanelComponent panelComponent = new PanelComponent();
|
||||
private final ItemManager itemManager;
|
||||
private final SpriteManager spriteManager;
|
||||
@@ -101,6 +103,7 @@ public class RaidsOverlay extends Overlay
|
||||
this.itemManager = itemManager;
|
||||
this.spriteManager = spriteManager;
|
||||
getMenuEntries().add(new OverlayMenuEntry(RUNELITE_OVERLAY_CONFIG, OPTION_CONFIGURE, "Raids overlay"));
|
||||
getMenuEntries().add(new OverlayMenuEntry(RUNELITE_OVERLAY, BROADCAST_ACTION, "Raids overlay"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -550,21 +550,27 @@ public class RaidsPlugin extends Plugin
|
||||
private void onOverlayMenuClicked(OverlayMenuClicked event)
|
||||
{
|
||||
OverlayMenuEntry entry = event.getEntry();
|
||||
if (entry.getMenuOpcode() == MenuOpcode.RUNELITE_OVERLAY &&
|
||||
entry.getTarget().equals("Raids party overlay"))
|
||||
if (entry.getMenuOpcode() == MenuOpcode.RUNELITE_OVERLAY)
|
||||
{
|
||||
switch (entry.getOption())
|
||||
if (entry.getTarget().equals("Raids party overlay"))
|
||||
{
|
||||
case RaidsPartyOverlay.PARTY_OVERLAY_RESET:
|
||||
startingPartyMembers.clear();
|
||||
updatePartyMembers(true);
|
||||
missingPartyMembers.clear();
|
||||
break;
|
||||
case RaidsPartyOverlay.PARTY_OVERLAY_REFRESH:
|
||||
updatePartyMembers(true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
switch (entry.getOption())
|
||||
{
|
||||
case RaidsPartyOverlay.PARTY_OVERLAY_RESET:
|
||||
startingPartyMembers.clear();
|
||||
updatePartyMembers(true);
|
||||
missingPartyMembers.clear();
|
||||
break;
|
||||
case RaidsPartyOverlay.PARTY_OVERLAY_REFRESH:
|
||||
updatePartyMembers(true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (entry.getOption().equals(RaidsOverlay.BROADCAST_ACTION) && event.getOverlay() == overlay)
|
||||
{
|
||||
sendRaidLayoutMessage();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -670,7 +676,10 @@ public class RaidsPlugin extends Plugin
|
||||
raid.updateLayout(layout);
|
||||
RotationSolver.solve(raid.getCombatRooms());
|
||||
setOverlayStatus(true);
|
||||
sendRaidLayoutMessage();
|
||||
if (this.displayLayoutMessage)
|
||||
{
|
||||
sendRaidLayoutMessage();
|
||||
}
|
||||
Matcher puzzleMatch = PUZZLES.matcher(raid.getFullRotationString());
|
||||
final List<String> puzzles = new ArrayList<>();
|
||||
while (puzzleMatch.find())
|
||||
@@ -709,11 +718,6 @@ public class RaidsPlugin extends Plugin
|
||||
|
||||
private void sendRaidLayoutMessage()
|
||||
{
|
||||
if (!this.displayLayoutMessage)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final String layout = getRaid().getLayout().toCodeString();
|
||||
final String rooms = getRaid().toRoomString();
|
||||
final String raidData = "[" + layout + "]: " + rooms;
|
||||
|
||||
@@ -58,7 +58,7 @@ enum QuestStartLocation
|
||||
//Members' Quests
|
||||
ANIMAL_MAGNETISM(Quest.ANIMAL_MAGNETISM, new WorldPoint(3094, 3360, 0)),
|
||||
ANOTHER_SLICE_OF_HAM(Quest.ANOTHER_SLICE_OF_HAM, new WorldPoint(2799, 5428, 0)),
|
||||
THE_ASCENT_OF_ARCEUUS(Quest.THE_ASCENT_OF_ARCEUUS, new WorldPoint(1700, 3742, 0)),
|
||||
THE_ASCENT_OF_ARCEUUS(Quest.THE_ASCENT_OF_ARCEUUS, new WorldPoint(1699, 3742, 0)),
|
||||
BETWEEN_A_ROCK(Quest.BETWEEN_A_ROCK, new WorldPoint(2823, 10168, 0)),
|
||||
BIG_CHOMPY_BIRD_HUNTING(Quest.BIG_CHOMPY_BIRD_HUNTING, new WorldPoint(2629, 2981, 0)),
|
||||
BIOHAZARD(Quest.BIOHAZARD, new WorldPoint(2591, 3335, 0)),
|
||||
@@ -72,7 +72,7 @@ enum QuestStartLocation
|
||||
DARKNESS_OF_HALLOWVALE(Quest.DARKNESS_OF_HALLOWVALE, new WorldPoint(3494, 9628, 0)),
|
||||
DEATH_PLATEAU_TROLL_STRONGHOLD(new Quest[]{Quest.DEATH_PLATEAU, Quest.TROLL_STRONGHOLD}, new WorldPoint(2895, 3528, 0)),
|
||||
DEATH_TO_THE_DORGESHUUN(Quest.DEATH_TO_THE_DORGESHUUN, new WorldPoint(3316, 9613, 0)),
|
||||
THE_DEPTHS_OF_DESPAIR(Quest.THE_DEPTHS_OF_DESPAIR, new WorldPoint(1780, 3569, 0)),
|
||||
THE_DEPTHS_OF_DESPAIR(Quest.THE_DEPTHS_OF_DESPAIR, new WorldPoint(1781, 3570, 0)),
|
||||
DESERT_TREASURE(Quest.DESERT_TREASURE, new WorldPoint(3177, 3043, 0)),
|
||||
DEVIOUS_MINDS(Quest.DEVIOUS_MINDS, new WorldPoint(3405, 3492, 0)),
|
||||
THE_DIG_SITE(Quest.THE_DIG_SITE, new WorldPoint(3363, 3337, 0)),
|
||||
|
||||
Reference in New Issue
Block a user