mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-04 00:31:54 +00:00
Astraeus Dialogue System Port (#512)
* - Marked As Deprecated
- Reorganized DialogueOptions.java so that option buttons are grouped with each interface
- Added temporary Dialogue Executor to make new Dialogue System function
- Remove Man, Woman, and Banker Dialogue and Dialogue Options
* - Refactored Dialogue.java into DialoguePacket.java
- Moved DialoguePacket.java into impl packets package
- Added Astraeus dialogue executor
* - Removed useless file
- Reorganized the Misc.java file
* - Ported Astraeus Dialogue System
- Rewrote Man, Woman, and Banker Dialogues
- Added line splitter in AstraeusDialogueFactory.java
* - Renamed Astraeus* classes to *Plugin
- Fixed an issue where the Dialogue Option buttons were not executed through the Kotlin file
(cherry picked from commit 6deaa4162a)
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
package com.rs2.game.dialogues;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
/**
|
||||
* Represents an abstract dialogue, in which extending classes will be able to construct and send
|
||||
* dialogues to a player.
|
||||
*
|
||||
* @author Vult-R
|
||||
*/
|
||||
public abstract class DialoguePlugin {
|
||||
|
||||
/**
|
||||
* The action buttons responsible for dialogues.
|
||||
*/
|
||||
public static final ImmutableList<Integer> DIALOGUE_BUTTONS = ImmutableList.of(9157, 9167, 9178, 9190,
|
||||
9158, 9168, 9179, 9191, 9169, 9180, 9192, 9181, 9193, 9194);
|
||||
|
||||
/**
|
||||
* Sends a player a dialogue.
|
||||
*
|
||||
* @param factory The factory for this dialogue.
|
||||
*/
|
||||
public abstract void sendDialogues(DialogueFactoryPlugin factory);
|
||||
|
||||
/**
|
||||
* Checks if the button triggered is an optional dialogue button.
|
||||
*
|
||||
* @param button The index of the button being checked.
|
||||
*
|
||||
* @return The result of the operation.
|
||||
*/
|
||||
public static final boolean isDialogueButton(int button) {
|
||||
return DIALOGUE_BUTTONS.stream().anyMatch(search -> search == button);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user