@deafwave/osrs-botmaker-types 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/types/java/Java.d.ts +8 -0
- package/dist/src/types/java/JavaImporter.d.ts +6 -0
- package/dist/src/types/java/awt/BorderLayout.d.ts +16 -0
- package/dist/src/types/java/awt/Color.d.ts +2 -0
- package/dist/src/types/java/awt/Component.d.ts +5 -0
- package/dist/src/types/java/awt/Container.d.ts +12 -0
- package/dist/src/types/java/awt/FlowLayout.d.ts +16 -0
- package/dist/src/types/java/awt/Font.d.ts +24 -0
- package/dist/src/types/java/awt/GradientPaint.d.ts +5 -0
- package/dist/src/types/java/awt/Graphics2D.d.ts +3 -1
- package/dist/src/types/java/awt/GridBagConstraints.d.ts +56 -0
- package/dist/src/types/java/awt/GridBagLayout.d.ts +13 -0
- package/dist/src/types/java/awt/Insets.d.ts +28 -0
- package/dist/src/types/java/awt/Polygon.d.ts +14 -0
- package/dist/src/types/java/awt/Rectangle.d.ts +18 -0
- package/dist/src/types/java/awt/ToolKit.d.ts +15 -0
- package/dist/src/types/java/awt/datatransfer/Clipboard.d.ts +40 -0
- package/dist/src/types/java/awt/datatransfer/ClipboardOwner.d.ts +14 -0
- package/dist/src/types/java/awt/datatransfer/DataFlavor.d.ts +33 -0
- package/dist/src/types/java/awt/datatransfer/StringSelection.d.ts +34 -0
- package/dist/src/types/java/awt/datatransfer/Transferable.d.ts +24 -0
- package/dist/src/types/java/awt/event/ActionListener.d.ts +6 -0
- package/dist/src/types/java/awt/event/ChangeListener.d.ts +6 -0
- package/dist/src/types/java/awt/event/DocumentListener.d.ts +28 -0
- package/dist/src/types/java/awt/event/FocusListener.d.ts +15 -0
- package/dist/src/types/java/awt/event/ItemListener.d.ts +11 -0
- package/dist/src/types/java/awt/event/KeyAdapter.d.ts +9 -0
- package/dist/src/types/java/awt/event/KeyEvent.d.ts +72 -8
- package/dist/src/types/java/awt/event/KeyListener.d.ts +7 -0
- package/dist/src/types/java/awt/event/MouseAdapter.d.ts +11 -0
- package/dist/src/types/java/awt/event/MouseListener.d.ts +11 -0
- package/dist/src/types/java/awt/event/WindowListener.d.ts +25 -0
- package/dist/src/types/java/awt/geom/AffineTransform.d.ts +47 -0
- package/dist/src/types/java/index.d.ts +65 -0
- package/dist/src/types/java/lang/Object.d.ts +18 -0
- package/dist/src/types/java/swing/Border.d.ts +7 -0
- package/dist/src/types/java/swing/BorderFactory.d.ts +18 -0
- package/dist/src/types/java/swing/BoxLayout.d.ts +11 -0
- package/dist/src/types/java/swing/CustomPanel.d.ts +5 -0
- package/dist/src/types/java/swing/DefaultListModel.d.ts +15 -0
- package/dist/src/types/java/swing/DefaultTableModel.d.ts +17 -0
- package/dist/src/types/java/swing/Icon.d.ts +11 -0
- package/dist/src/types/java/swing/JButton.d.ts +36 -0
- package/dist/src/types/java/swing/JCheckBox.d.ts +17 -0
- package/dist/src/types/java/swing/JComboBox.d.ts +25 -0
- package/dist/src/types/java/swing/JComponent.d.ts +20 -0
- package/dist/src/types/java/swing/JFrame.d.ts +31 -0
- package/dist/src/types/java/swing/JLabel.d.ts +27 -0
- package/dist/src/types/java/swing/JList.d.ts +22 -0
- package/dist/src/types/java/swing/JMenu.d.ts +13 -0
- package/dist/src/types/java/swing/JMenuBar.d.ts +11 -0
- package/dist/src/types/java/swing/JMenuItem.d.ts +12 -0
- package/dist/src/types/java/swing/JPanel.d.ts +33 -0
- package/dist/src/types/java/swing/JProgressBar.d.ts +18 -0
- package/dist/src/types/java/swing/JScrollPane.d.ts +28 -0
- package/dist/src/types/java/swing/JSlider.d.ts +24 -0
- package/dist/src/types/java/swing/JSplitPane.d.ts +22 -0
- package/dist/src/types/java/swing/JTabbedPane.d.ts +16 -0
- package/dist/src/types/java/swing/JTable.d.ts +27 -0
- package/dist/src/types/java/swing/JTextArea.d.ts +29 -0
- package/dist/src/types/java/swing/JTextField.d.ts +24 -0
- package/dist/src/types/java/swing/JToggleButton.d.ts +8 -0
- package/dist/src/types/java/swing/JToolBar.d.ts +14 -0
- package/dist/src/types/java/swing/ListSelectionModel.d.ts +18 -0
- package/dist/src/types/java/swing/TableModel.d.ts +34 -0
- package/dist/src/types/java/swing/createToggleboxDropdownPanel.d.ts +10 -0
- package/dist/src/types/java/swing/event/ListSelectionEvent.d.ts +10 -0
- package/dist/src/types/java/swing/event/ListSelectionListener.d.ts +5 -0
- package/dist/src/types/java/swing/table/DefaultTableCellRenderer.d.ts +18 -0
- package/dist/src/types/java/swing/table/TableColumn.d.ts +5 -0
- package/dist/src/types/java/swing/table/TableColumnModel.d.ts +5 -0
- package/dist/src/types/java/util/index.d.ts +90 -53
- package/dist/src/types/runelite/net/runelite/api/AnimationID.d.ts +90 -22
- package/dist/src/types/runelite/net/runelite/api/EnumID.d.ts +21 -0
- package/dist/src/types/runelite/net/runelite/api/ItemID.d.ts +730 -22
- package/dist/src/types/runelite/net/runelite/api/KeyCode.d.ts +99 -6
- package/dist/src/types/runelite/net/runelite/api/NpcID.d.ts +1222 -45
- package/dist/src/types/runelite/net/runelite/api/ObjectID.d.ts +2500 -208
- package/dist/src/types/runelite/net/runelite/api/ParamID.d.ts +163 -0
- package/dist/src/types/runelite/net/runelite/api/ScriptID.d.ts +96 -7
- package/dist/src/types/runelite/net/runelite/api/SpriteID.d.ts +139 -9
- package/dist/src/types/runelite/net/runelite/api/coords/WorldPoint.d.ts +16 -72
- package/dist/src/types/runelite/net/runelite/api/widgets/ComponentID.d.ts +80 -1789
- package/dist/src/types/runelite/net/runelite/api/widgets/WidgetID.d.ts +155 -157
- package/dist/src/types/runelite/net/runelite/client/config/ConfigManager.d.ts +101 -112
- package/dist/src/types/sox/api/bot/attackStyle.d.ts +12 -0
- package/dist/src/types/sox/api/bot/bank.d.ts +144 -0
- package/dist/src/types/sox/api/bot/bmCache.d.ts +54 -0
- package/dist/src/types/sox/api/bot/bmGlobalCache.d.ts +54 -0
- package/dist/src/types/sox/api/bot/breakHandler.d.ts +15 -0
- package/dist/src/types/sox/api/bot/counters.d.ts +23 -0
- package/dist/src/types/sox/api/bot/equipment.d.ts +62 -0
- package/dist/src/types/sox/api/bot/events.d.ts +37 -0
- package/dist/src/types/sox/api/bot/grandExchange.d.ts +67 -0
- package/dist/src/types/sox/api/bot/graphicsObjects.d.ts +16 -0
- package/dist/src/types/sox/api/bot/index.d.ts +128 -0
- package/dist/src/types/sox/api/bot/inventory.d.ts +153 -0
- package/dist/src/types/sox/api/bot/magic.d.ts +122 -0
- package/dist/src/types/sox/api/bot/net.d.ts +24 -0
- package/dist/src/types/sox/api/bot/notifier.d.ts +16 -0
- package/dist/src/types/sox/api/bot/npcs.d.ts +89 -0
- package/dist/src/types/sox/api/bot/objects.d.ts +89 -0
- package/dist/src/types/sox/api/bot/players.d.ts +35 -0
- package/dist/src/types/sox/api/bot/plugins.d.ts +81 -0
- package/dist/src/types/sox/api/bot/prayer.d.ts +16 -0
- package/dist/src/types/sox/api/bot/projectiles.d.ts +16 -0
- package/dist/src/types/sox/api/bot/task.d.ts +30 -0
- package/dist/src/types/sox/api/bot/tileItems.d.ts +65 -0
- package/dist/src/types/sox/api/bot/variables.d.ts +51 -0
- package/dist/src/types/sox/api/bot/walking.d.ts +65 -0
- package/dist/src/types/sox/api/bot/widgets.d.ts +32 -0
- package/dist/src/types/sox/api/bot.d.ts +2 -115
- package/dist/src/types/sox/api/client.d.ts +1 -1
- package/dist/src/types/sox/api/clientThread.d.ts +24 -0
- package/dist/src/types/sox/api/configManager.d.ts +239 -0
- package/dist/src/types/sox/index.d.ts +2 -5
- package/package.json +53 -53
|
@@ -27,168 +27,166 @@
|
|
|
27
27
|
declare namespace net.runelite.api.widgets {
|
|
28
28
|
/** @deprecated */
|
|
29
29
|
export class WidgetID {
|
|
30
|
-
static readonly FAIRY_RING_PANEL_GROUP_ID
|
|
31
|
-
static readonly FAIRY_RING_GROUP_ID
|
|
32
|
-
static readonly LOGOUT_PANEL_ID
|
|
33
|
-
static readonly BANK_GROUP_ID
|
|
34
|
-
static readonly BANK_INVENTORY_GROUP_ID
|
|
35
|
-
static readonly GRAND_EXCHANGE_INVENTORY_GROUP_ID
|
|
36
|
-
static readonly GRAND_EXCHANGE_GROUP_ID
|
|
37
|
-
static readonly DEPOSIT_BOX_GROUP_ID
|
|
38
|
-
static readonly INVENTORY_GROUP_ID
|
|
39
|
-
static readonly PLAYER_TRADE_SCREEN_GROUP_ID
|
|
40
|
-
static readonly PLAYER_TRADE_INVENTORY_GROUP_ID
|
|
41
|
-
static readonly FRIENDS_LIST_GROUP_ID
|
|
42
|
-
static readonly IGNORE_LIST_GROUP_ID
|
|
43
|
-
static readonly RAIDING_PARTY_GROUP_ID
|
|
44
|
-
static readonly EQUIPMENT_GROUP_ID
|
|
45
|
-
static readonly EQUIPMENT_INVENTORY_GROUP_ID
|
|
46
|
-
static readonly EMOTES_GROUP_ID
|
|
47
|
-
static readonly RUNE_POUCH_GROUP_ID
|
|
48
|
-
static readonly ACHIEVEMENT_DIARY_GROUP_ID
|
|
49
|
-
static readonly PEST_CONTROL_BOAT_GROUP_ID
|
|
50
|
-
static readonly PEST_CONTROL_GROUP_ID
|
|
51
|
-
static readonly FRIENDS_CHAT_GROUP_ID
|
|
52
|
-
static readonly MINIMAP_GROUP_ID
|
|
53
|
-
static readonly LOGIN_CLICK_TO_PLAY_GROUP_ID
|
|
54
|
-
static readonly CLUE_SCROLL_GROUP_ID
|
|
55
|
-
static readonly FIXED_VIEWPORT_GROUP_ID
|
|
56
|
-
static readonly RESIZABLE_VIEWPORT_OLD_SCHOOL_BOX_GROUP_ID
|
|
57
|
-
static readonly RESIZABLE_VIEWPORT_BOTTOM_LINE_GROUP_ID
|
|
58
|
-
static readonly SHOP_GROUP_ID
|
|
59
|
-
static readonly SHOP_INVENTORY_GROUP_ID
|
|
60
|
-
static readonly SMITHING_GROUP_ID
|
|
61
|
-
static readonly GUIDE_PRICES_GROUP_ID
|
|
62
|
-
static readonly GUIDE_PRICES_INVENTORY_GROUP_ID
|
|
63
|
-
static readonly COMBAT_GROUP_ID
|
|
64
|
-
static readonly DIALOG_NPC_GROUP_ID
|
|
65
|
-
static readonly SLAYER_REWARDS_GROUP_ID
|
|
66
|
-
static readonly PRIVATE_CHAT
|
|
67
|
-
static readonly CHATBOX_GROUP_ID
|
|
68
|
-
static readonly VOLCANIC_MINE_GROUP_ID
|
|
69
|
-
static readonly BA_ATTACKER_GROUP_ID
|
|
70
|
-
static readonly BA_COLLECTOR_GROUP_ID
|
|
71
|
-
static readonly BA_DEFENDER_GROUP_ID
|
|
72
|
-
static readonly BA_HEALER_GROUP_ID
|
|
73
|
-
static readonly BA_REWARD_GROUP_ID
|
|
74
|
-
static readonly BA_TEAM_GROUP_ID
|
|
75
|
-
static readonly LEVEL_UP_GROUP_ID
|
|
76
|
-
static readonly DIALOG_SPRITE_GROUP_ID
|
|
77
|
-
static readonly DIALOG_DOUBLE_SPRITE_GROUP_ID
|
|
78
|
-
static readonly QUEST_COMPLETED_GROUP_ID
|
|
79
|
-
static readonly CLUE_SCROLL_REWARD_GROUP_ID
|
|
80
|
-
static readonly BARROWS_REWARD_GROUP_ID
|
|
81
|
-
static readonly RAIDS_GROUP_ID
|
|
82
|
-
static readonly TOB_GROUP_ID
|
|
83
|
-
static readonly MOTHERLODE_MINE_GROUP_ID
|
|
84
|
-
static readonly EXPERIENCE_DROP_GROUP_ID
|
|
85
|
-
static readonly PUZZLE_BOX_GROUP_ID
|
|
86
|
-
static readonly LIGHT_BOX_GROUP_ID
|
|
87
|
-
static readonly NIGHTMARE_ZONE_GROUP_ID
|
|
88
|
-
static readonly NIGHTMARE_PILLAR_HEALTH_GROUP_ID
|
|
89
|
-
static readonly BLAST_FURNACE_GROUP_ID
|
|
90
|
-
static readonly WORLD_MAP_GROUP_ID
|
|
91
|
-
static readonly PYRAMID_PLUNDER_GROUP_ID
|
|
92
|
-
static readonly CHAMBERS_OF_XERIC_REWARD_GROUP_ID
|
|
93
|
-
static readonly THEATRE_OF_BLOOD_REWARD_GROUP_ID
|
|
94
|
-
static readonly EXPERIENCE_TRACKER_GROUP_ID
|
|
95
|
-
static readonly TITHE_FARM_GROUP_ID
|
|
96
|
-
static readonly KINGDOM_GROUP_ID
|
|
97
|
-
static readonly BARROWS_GROUP_ID
|
|
98
|
-
static readonly BLAST_MINE_GROUP_ID
|
|
99
|
-
static readonly MTA_ALCHEMY_GROUP_ID
|
|
100
|
-
static readonly MTA_ENCHANT_GROUP_ID
|
|
101
|
-
static readonly MTA_GRAVEYARD_GROUP_ID
|
|
102
|
-
static readonly MTA_TELEKINETIC_GROUP_ID
|
|
103
|
-
static readonly CORP_DAMAGE
|
|
104
|
-
static readonly DESTROY_ITEM_GROUP_ID
|
|
105
|
-
static readonly VARROCK_MUSEUM_QUIZ_GROUP_ID
|
|
106
|
-
static readonly KILL_LOGS_GROUP_ID
|
|
107
|
-
static readonly DIARY_QUEST_GROUP_ID
|
|
108
|
-
static readonly THEATRE_OF_BLOOD_GROUP_ID
|
|
109
|
-
static readonly WORLD_SWITCHER_GROUP_ID
|
|
110
|
-
static readonly DIALOG_OPTION_GROUP_ID
|
|
111
|
-
static readonly DIALOG_PLAYER_GROUP_ID
|
|
112
|
-
static readonly DRIFT_NET_FISHING_REWARD_GROUP_ID
|
|
113
|
-
static readonly FOSSIL_ISLAND_OXYGENBAR_ID
|
|
114
|
-
static readonly
|
|
115
|
-
static readonly
|
|
116
|
-
static readonly
|
|
117
|
-
static readonly
|
|
118
|
-
static readonly
|
|
119
|
-
static readonly
|
|
120
|
-
static readonly
|
|
121
|
-
static readonly
|
|
122
|
-
static readonly
|
|
123
|
-
static readonly
|
|
124
|
-
static readonly
|
|
125
|
-
static readonly
|
|
126
|
-
static readonly
|
|
127
|
-
static readonly
|
|
128
|
-
static readonly
|
|
129
|
-
static readonly
|
|
130
|
-
static readonly
|
|
131
|
-
static readonly
|
|
132
|
-
static readonly
|
|
133
|
-
static readonly
|
|
134
|
-
static readonly
|
|
135
|
-
static readonly
|
|
136
|
-
static readonly
|
|
137
|
-
static readonly
|
|
138
|
-
static readonly
|
|
139
|
-
static readonly
|
|
140
|
-
static readonly
|
|
141
|
-
static readonly
|
|
142
|
-
static readonly
|
|
143
|
-
static readonly
|
|
144
|
-
static readonly
|
|
145
|
-
static readonly
|
|
146
|
-
static readonly
|
|
147
|
-
static readonly
|
|
148
|
-
static readonly
|
|
149
|
-
static readonly
|
|
150
|
-
static readonly
|
|
151
|
-
|
|
152
|
-
static readonly CHAMBERS_OF_XERIC_STORAGE_UNIT_SHARED_GROUP_ID
|
|
153
|
-
static readonly CHAMBERS_OF_XERIC_STORAGE_UNIT_INVENTORY_GROUP_ID
|
|
154
|
-
static readonly DUEL_INVENTORY_GROUP_ID
|
|
155
|
-
static readonly
|
|
156
|
-
static readonly
|
|
157
|
-
static readonly
|
|
158
|
-
static readonly
|
|
159
|
-
static readonly
|
|
160
|
-
static readonly
|
|
161
|
-
static readonly
|
|
162
|
-
static readonly
|
|
163
|
-
static readonly
|
|
164
|
-
static readonly
|
|
165
|
-
static readonly
|
|
166
|
-
static readonly
|
|
167
|
-
static readonly
|
|
168
|
-
static readonly TOA_REWARD_GROUP_ID: number;
|
|
30
|
+
static readonly FAIRY_RING_PANEL_GROUP_ID = InterfaceID.FAIRY_RING_PANEL;
|
|
31
|
+
static readonly FAIRY_RING_GROUP_ID = InterfaceID.FAIRY_RING;
|
|
32
|
+
static readonly LOGOUT_PANEL_ID = InterfaceID.LOGOUT_PANEL;
|
|
33
|
+
static readonly BANK_GROUP_ID = InterfaceID.BANK;
|
|
34
|
+
static readonly BANK_INVENTORY_GROUP_ID = InterfaceID.BANK_INVENTORY;
|
|
35
|
+
static readonly GRAND_EXCHANGE_INVENTORY_GROUP_ID = InterfaceID.GRAND_EXCHANGE_INVENTORY;
|
|
36
|
+
static readonly GRAND_EXCHANGE_GROUP_ID = InterfaceID.GRAND_EXCHANGE;
|
|
37
|
+
static readonly DEPOSIT_BOX_GROUP_ID = InterfaceID.DEPOSIT_BOX;
|
|
38
|
+
static readonly INVENTORY_GROUP_ID = InterfaceID.INVENTORY;
|
|
39
|
+
static readonly PLAYER_TRADE_SCREEN_GROUP_ID = InterfaceID.TRADE;
|
|
40
|
+
static readonly PLAYER_TRADE_INVENTORY_GROUP_ID = InterfaceID.TRADE_INVENTORY;
|
|
41
|
+
static readonly FRIENDS_LIST_GROUP_ID = InterfaceID.FRIEND_LIST;
|
|
42
|
+
static readonly IGNORE_LIST_GROUP_ID = InterfaceID.IGNORE_LIST;
|
|
43
|
+
static readonly RAIDING_PARTY_GROUP_ID = InterfaceID.RAIDING_PARTY;
|
|
44
|
+
static readonly EQUIPMENT_GROUP_ID = InterfaceID.EQUIPMENT;
|
|
45
|
+
static readonly EQUIPMENT_INVENTORY_GROUP_ID = InterfaceID.EQUIPMENT_INVENTORY;
|
|
46
|
+
static readonly EMOTES_GROUP_ID = InterfaceID.EMOTES;
|
|
47
|
+
static readonly RUNE_POUCH_GROUP_ID = InterfaceID.RUNE_POUCH;
|
|
48
|
+
static readonly ACHIEVEMENT_DIARY_GROUP_ID = InterfaceID.ACHIEVEMENT_DIARY;
|
|
49
|
+
static readonly PEST_CONTROL_BOAT_GROUP_ID = InterfaceID.PEST_CONTROL_BOAT;
|
|
50
|
+
static readonly PEST_CONTROL_GROUP_ID = InterfaceID.PEST_CONTROL;
|
|
51
|
+
static readonly FRIENDS_CHAT_GROUP_ID = InterfaceID.FRIENDS_CHAT;
|
|
52
|
+
static readonly MINIMAP_GROUP_ID = InterfaceID.MINIMAP;
|
|
53
|
+
static readonly LOGIN_CLICK_TO_PLAY_GROUP_ID = InterfaceID.LOGIN_CLICK_TO_PLAY_SCREEN;
|
|
54
|
+
static readonly CLUE_SCROLL_GROUP_ID = InterfaceID.CLUESCROLL;
|
|
55
|
+
static readonly FIXED_VIEWPORT_GROUP_ID = InterfaceID.FIXED_VIEWPORT;
|
|
56
|
+
static readonly RESIZABLE_VIEWPORT_OLD_SCHOOL_BOX_GROUP_ID = InterfaceID.RESIZABLE_VIEWPORT;
|
|
57
|
+
static readonly RESIZABLE_VIEWPORT_BOTTOM_LINE_GROUP_ID = InterfaceID.RESIZABLE_VIEWPORT_BOTTOM_LINE;
|
|
58
|
+
static readonly SHOP_GROUP_ID = InterfaceID.SHOP;
|
|
59
|
+
static readonly SHOP_INVENTORY_GROUP_ID = InterfaceID.SHOP_INVENTORY;
|
|
60
|
+
static readonly SMITHING_GROUP_ID = InterfaceID.SMITHING;
|
|
61
|
+
static readonly GUIDE_PRICES_GROUP_ID = InterfaceID.GUIDE_PRICES;
|
|
62
|
+
static readonly GUIDE_PRICES_INVENTORY_GROUP_ID = InterfaceID.GUIDE_PRICES_INVENTORY;
|
|
63
|
+
static readonly COMBAT_GROUP_ID = InterfaceID.COMBAT;
|
|
64
|
+
static readonly DIALOG_NPC_GROUP_ID = InterfaceID.DIALOG_NPC;
|
|
65
|
+
static readonly SLAYER_REWARDS_GROUP_ID = InterfaceID.SLAYER_REWARDS;
|
|
66
|
+
static readonly PRIVATE_CHAT = InterfaceID.PRIVATE_CHAT;
|
|
67
|
+
static readonly CHATBOX_GROUP_ID = InterfaceID.CHATBOX;
|
|
68
|
+
static readonly VOLCANIC_MINE_GROUP_ID = InterfaceID.VOLCANIC_MINE;
|
|
69
|
+
static readonly BA_ATTACKER_GROUP_ID = InterfaceID.BA_ATTACKER;
|
|
70
|
+
static readonly BA_COLLECTOR_GROUP_ID = InterfaceID.BA_COLLECTOR;
|
|
71
|
+
static readonly BA_DEFENDER_GROUP_ID = InterfaceID.BA_DEFENDER;
|
|
72
|
+
static readonly BA_HEALER_GROUP_ID = InterfaceID.BA_HEALER;
|
|
73
|
+
static readonly BA_REWARD_GROUP_ID = InterfaceID.BA_REWARD;
|
|
74
|
+
static readonly BA_TEAM_GROUP_ID = InterfaceID.BA_TEAM;
|
|
75
|
+
static readonly LEVEL_UP_GROUP_ID = InterfaceID.LEVEL_UP;
|
|
76
|
+
static readonly DIALOG_SPRITE_GROUP_ID = InterfaceID.DIALOG_SPRITE;
|
|
77
|
+
static readonly DIALOG_DOUBLE_SPRITE_GROUP_ID = InterfaceID.DIALOG_DOUBLE_SPRITE;
|
|
78
|
+
static readonly QUEST_COMPLETED_GROUP_ID = InterfaceID.QUEST_COMPLETED;
|
|
79
|
+
static readonly CLUE_SCROLL_REWARD_GROUP_ID = InterfaceID.CLUESCROLL_REWARD;
|
|
80
|
+
static readonly BARROWS_REWARD_GROUP_ID = InterfaceID.BARROWS_REWARD;
|
|
81
|
+
static readonly RAIDS_GROUP_ID = InterfaceID.RAIDS;
|
|
82
|
+
static readonly TOB_GROUP_ID = InterfaceID.TOB;
|
|
83
|
+
static readonly MOTHERLODE_MINE_GROUP_ID = InterfaceID.MLM;
|
|
84
|
+
static readonly EXPERIENCE_DROP_GROUP_ID = InterfaceID.EXPERIENCE_TRACKER;
|
|
85
|
+
static readonly PUZZLE_BOX_GROUP_ID = InterfaceID.PUZZLE_BOX;
|
|
86
|
+
static readonly LIGHT_BOX_GROUP_ID = InterfaceID.LIGHT_BOX;
|
|
87
|
+
static readonly NIGHTMARE_ZONE_GROUP_ID = InterfaceID.NMZ;
|
|
88
|
+
static readonly NIGHTMARE_PILLAR_HEALTH_GROUP_ID = InterfaceID.NIGHTMARE_PILLAR_HEALTH;
|
|
89
|
+
static readonly BLAST_FURNACE_GROUP_ID = InterfaceID.BLAST_FURNACE;
|
|
90
|
+
static readonly WORLD_MAP_GROUP_ID = InterfaceID.WORLD_MAP;
|
|
91
|
+
static readonly PYRAMID_PLUNDER_GROUP_ID = InterfaceID.PYRAMID_PLUNDER;
|
|
92
|
+
static readonly CHAMBERS_OF_XERIC_REWARD_GROUP_ID = InterfaceID.CHAMBERS_OF_XERIC_REWARD;
|
|
93
|
+
static readonly THEATRE_OF_BLOOD_REWARD_GROUP_ID = InterfaceID.TOB_REWARD;
|
|
94
|
+
static readonly EXPERIENCE_TRACKER_GROUP_ID = InterfaceID.EXPERIENCE_TRACKER;
|
|
95
|
+
static readonly TITHE_FARM_GROUP_ID = InterfaceID.TITHE_FARM;
|
|
96
|
+
static readonly KINGDOM_GROUP_ID = InterfaceID.KINGDOM;
|
|
97
|
+
static readonly BARROWS_GROUP_ID = InterfaceID.BARROWS;
|
|
98
|
+
static readonly BLAST_MINE_GROUP_ID = InterfaceID.BLAST_MINE;
|
|
99
|
+
static readonly MTA_ALCHEMY_GROUP_ID = InterfaceID.MTA_ALCHEMY;
|
|
100
|
+
static readonly MTA_ENCHANT_GROUP_ID = InterfaceID.MTA_ENCHANT;
|
|
101
|
+
static readonly MTA_GRAVEYARD_GROUP_ID = InterfaceID.MTA_GRAVEYARD;
|
|
102
|
+
static readonly MTA_TELEKINETIC_GROUP_ID = InterfaceID.MTA_TELEKINETIC;
|
|
103
|
+
static readonly CORP_DAMAGE = InterfaceID.CORP_DAMAGE;
|
|
104
|
+
static readonly DESTROY_ITEM_GROUP_ID = InterfaceID.DESTROY_ITEM;
|
|
105
|
+
static readonly VARROCK_MUSEUM_QUIZ_GROUP_ID = InterfaceID.VARROCK_MUSEUM;
|
|
106
|
+
static readonly KILL_LOGS_GROUP_ID = InterfaceID.KILL_LOG;
|
|
107
|
+
static readonly DIARY_QUEST_GROUP_ID = InterfaceID.DIARY;
|
|
108
|
+
static readonly THEATRE_OF_BLOOD_GROUP_ID = InterfaceID.TOB;
|
|
109
|
+
static readonly WORLD_SWITCHER_GROUP_ID = InterfaceID.WORLD_SWITCHER;
|
|
110
|
+
static readonly DIALOG_OPTION_GROUP_ID = InterfaceID.DIALOG_OPTION;
|
|
111
|
+
static readonly DIALOG_PLAYER_GROUP_ID = InterfaceID.DIALOG_PLAYER;
|
|
112
|
+
static readonly DRIFT_NET_FISHING_REWARD_GROUP_ID = InterfaceID.DRIFT_NET_FISHING_REWARD;
|
|
113
|
+
static readonly FOSSIL_ISLAND_OXYGENBAR_ID = InterfaceID.FOSSIL_ISLAND_OXYGEN_BAR;
|
|
114
|
+
static readonly SPELLBOOK_GROUP_ID = InterfaceID.SPELLBOOK;
|
|
115
|
+
static readonly PVP_GROUP_ID = InterfaceID.PVP;
|
|
116
|
+
static readonly FISHING_TRAWLER_GROUP_ID = InterfaceID.TRAWLER;
|
|
117
|
+
static readonly FISHING_TRAWLER_REWARD_GROUP_ID = InterfaceID.TRAWLER_REWARD;
|
|
118
|
+
static readonly ZEAH_MESS_HALL_GROUP_ID = InterfaceID.ZEAH_MESS_HALL;
|
|
119
|
+
static readonly LOOTING_BAG_GROUP_ID = InterfaceID.LOOTING_BAG;
|
|
120
|
+
static readonly SKOTIZO_GROUP_ID = InterfaceID.SKOTIZO;
|
|
121
|
+
static readonly FULLSCREEN_CONTAINER_TLI = InterfaceID.FULLSCREEN_CONTAINER_TLI;
|
|
122
|
+
static readonly CHARACTER_SUMMARY_GROUP_ID = InterfaceID.CHARACTER_SUMMARY;
|
|
123
|
+
static readonly QUESTLIST_GROUP_ID = InterfaceID.QUEST_LIST;
|
|
124
|
+
static readonly SKILLS_GROUP_ID = InterfaceID.SKILLS;
|
|
125
|
+
static readonly MUSIC_GROUP_ID = InterfaceID.MUSIC;
|
|
126
|
+
static readonly BARROWS_PUZZLE_GROUP_ID = InterfaceID.BARROWS_PUZZLE;
|
|
127
|
+
static readonly KEPT_ON_DEATH_GROUP_ID = InterfaceID.KEPT_ON_DEATH;
|
|
128
|
+
static readonly GUIDE_PRICE_GROUP_ID = InterfaceID.GUIDE_PRICES;
|
|
129
|
+
static readonly SEED_VAULT_INVENTORY_GROUP_ID = InterfaceID.SEED_VAULT_INVENTORY;
|
|
130
|
+
static readonly BEGINNER_CLUE_MAP_CHAMPIONS_GUILD = InterfaceID.CLUE_BEGINNER_MAP_CHAMPIONS_GUILD;
|
|
131
|
+
static readonly BEGINNER_CLUE_MAP_VARROCK_EAST_MINE = InterfaceID.CLUE_BEGINNER_MAP_VARROCK_EAST_MINE;
|
|
132
|
+
static readonly BEGINNER_CLUE_MAP_DRAYNOR = InterfaceID.CLUE_BEGINNER_MAP_DYANOR;
|
|
133
|
+
static readonly BEGINNER_CLUE_MAP_NORTH_OF_FALADOR = InterfaceID.CLUE_BEGINNER_MAP_NORTH_OF_FALADOR;
|
|
134
|
+
static readonly BEGINNER_CLUE_MAP_WIZARDS_TOWER = InterfaceID.CLUE_BEGINNER_MAP_WIZARDS_TOWER;
|
|
135
|
+
static readonly SEED_BOX_GROUP_ID = InterfaceID.SEED_BOX;
|
|
136
|
+
static readonly SEED_VAULT_GROUP_ID = InterfaceID.SEED_VAULT;
|
|
137
|
+
static readonly EXPLORERS_RING_ALCH_GROUP_ID = InterfaceID.EXPLORERS_RING;
|
|
138
|
+
static readonly SETTINGS_SIDE_GROUP_ID = InterfaceID.SETTINGS_SIDE;
|
|
139
|
+
static readonly SETTINGS_GROUP_ID = InterfaceID.SETTINGS;
|
|
140
|
+
static readonly GWD_KC_GROUP_ID = InterfaceID.GWD_KC;
|
|
141
|
+
static readonly LMS_GROUP_ID = InterfaceID.LMS;
|
|
142
|
+
static readonly LMS_INGAME_GROUP_ID = InterfaceID.LMS_INGAME;
|
|
143
|
+
static readonly ADVENTURE_LOG_ID = InterfaceID.ADVENTURE_LOG;
|
|
144
|
+
static readonly COLLECTION_LOG_ID = InterfaceID.COLLECTION_LOG;
|
|
145
|
+
static readonly GENERIC_SCROLL_GROUP_ID = InterfaceID.GENERIC_SCROLL;
|
|
146
|
+
static readonly GAUNTLET_TIMER_GROUP_ID = InterfaceID.GAUNTLET_TIMER;
|
|
147
|
+
static readonly HALLOWED_SEPULCHRE_TIMER_GROUP_ID = InterfaceID.HALLOWED_SEPULCHRE_TIMER;
|
|
148
|
+
static readonly BANK_PIN_GROUP_ID = InterfaceID.BANK_PIN;
|
|
149
|
+
static readonly HEALTH_OVERLAY_BAR_GROUP_ID = InterfaceID.HEALTH;
|
|
150
|
+
static readonly CHAMBERS_OF_XERIC_STORAGE_UNIT_PRIVATE_GROUP_ID =
|
|
151
|
+
InterfaceID.CHAMBERS_OF_XERIC_STORAGE_UNIT_PRIVATE;
|
|
152
|
+
static readonly CHAMBERS_OF_XERIC_STORAGE_UNIT_SHARED_GROUP_ID = InterfaceID.CHAMBERS_OF_XERIC_STORAGE_UNIT_SHARED;
|
|
153
|
+
static readonly CHAMBERS_OF_XERIC_STORAGE_UNIT_INVENTORY_GROUP_ID = InterfaceID.CHAMBERS_OF_XERIC_INVENTORY;
|
|
154
|
+
static readonly DUEL_INVENTORY_GROUP_ID = InterfaceID.DUEL_INVENTORY;
|
|
155
|
+
static readonly TRAILBLAZER_AREAS_GROUP_ID = InterfaceID.TRAILBLAZER_AREAS;
|
|
156
|
+
static readonly TEMPOROSS_GROUP_ID = InterfaceID.TEMPOROSS;
|
|
157
|
+
static readonly TEMPOROSS_LOBBY_GROUP_ID = InterfaceID.TEMPOROSS_LOBBY;
|
|
158
|
+
static readonly CLAN_GROUP_ID = InterfaceID.CLAN;
|
|
159
|
+
static readonly CLAN_GUEST_GROUP_ID = InterfaceID.CLAN_GUEST;
|
|
160
|
+
static readonly GRAVESTONE_GROUP_ID = InterfaceID.GRAVESTONE;
|
|
161
|
+
static readonly POH_TREASURE_CHEST_INVENTORY_GROUP_ID = InterfaceID.POH_TREASURE_CHEST_INV;
|
|
162
|
+
static readonly GROUP_IRON_GROUP_ID = InterfaceID.GROUP_IRON;
|
|
163
|
+
static readonly GROUP_STORAGE_INVENTORY_GROUP_ID = InterfaceID.GROUP_STORAGE_INVENTORY;
|
|
164
|
+
static readonly GROUP_STORAGE_GROUP_ID = InterfaceID.GROUP_STORAGE;
|
|
165
|
+
static readonly WILDERNESS_LOOT_CHEST = InterfaceID.WILDERNESS_LOOT_CHEST;
|
|
166
|
+
static readonly TRADE_WINDOW_GROUP_ID = InterfaceID.TRADE;
|
|
167
|
+
static readonly TOA_REWARD_GROUP_ID = InterfaceID.TOA_REWARD;
|
|
169
168
|
/**
|
|
170
169
|
* toa party interface in the raid lobby
|
|
171
170
|
*/
|
|
172
|
-
static readonly TOA_PARTY_GROUP_ID
|
|
171
|
+
static readonly TOA_PARTY_GROUP_ID = InterfaceID.TOA_PARTY;
|
|
173
172
|
/**
|
|
174
173
|
* toa raid interface in the raid
|
|
175
174
|
*/
|
|
176
|
-
static readonly TOA_RAID_GROUP_ID
|
|
177
|
-
static readonly ACHIEVEMENT_DIARY_SCROLL_GROUP_ID
|
|
178
|
-
static readonly PRAYER_GROUP_ID
|
|
179
|
-
static readonly QUICK_PRAYERS_GROUP_ID
|
|
180
|
-
static readonly GOTR_GROUP_ID
|
|
181
|
-
static readonly TROUBLE_BREWING_GROUP_ID
|
|
182
|
-
static readonly TROUBLE_BREWING_LOBBY_GROUP_ID
|
|
183
|
-
static readonly MORTTON_TEMPLE_GROUP_ID
|
|
184
|
-
static readonly BGR_RANK_DRAUGHTS_GROUP_ID
|
|
185
|
-
static readonly BGR_RANK_RUNELINK_GROUP_ID
|
|
186
|
-
static readonly BGR_RANK_RUNESQUARES_GROUP_ID
|
|
187
|
-
static readonly BGR_RANK_RUNEVERSI_GROUP_ID
|
|
188
|
-
static readonly AGILITY_ARENA_HUD_GROUP_ID
|
|
189
|
-
static readonly GNOMEBALL_SCORE_GROUP_ID
|
|
190
|
-
static readonly
|
|
191
|
-
static readonly
|
|
192
|
-
static readonly THE_STRANGLER_INFECTION_GROUP_ID: number;
|
|
175
|
+
static readonly TOA_RAID_GROUP_ID = InterfaceID.TOA_RAID;
|
|
176
|
+
static readonly ACHIEVEMENT_DIARY_SCROLL_GROUP_ID = InterfaceID.ACHIEVEMENT_DIARY_SCROLL;
|
|
177
|
+
static readonly PRAYER_GROUP_ID = InterfaceID.PRAYER;
|
|
178
|
+
static readonly QUICK_PRAYERS_GROUP_ID = InterfaceID.QUICK_PRAYER;
|
|
179
|
+
static readonly GOTR_GROUP_ID = InterfaceID.GOTR;
|
|
180
|
+
static readonly TROUBLE_BREWING_GROUP_ID = InterfaceID.TROUBLE_BREWING;
|
|
181
|
+
static readonly TROUBLE_BREWING_LOBBY_GROUP_ID = InterfaceID.TROUBLE_BREWING_LOBBY;
|
|
182
|
+
static readonly MORTTON_TEMPLE_GROUP_ID = InterfaceID.MORTTON_TEMPLE;
|
|
183
|
+
static readonly BGR_RANK_DRAUGHTS_GROUP_ID = InterfaceID.BGR_RANK_DRAUGHTS;
|
|
184
|
+
static readonly BGR_RANK_RUNELINK_GROUP_ID = InterfaceID.BGR_RANK_RUNELINK;
|
|
185
|
+
static readonly BGR_RANK_RUNESQUARES_GROUP_ID = InterfaceID.BGR_RANK_RUNESQUARES;
|
|
186
|
+
static readonly BGR_RANK_RUNEVERSI_GROUP_ID = InterfaceID.BGR_RANK_RUNEVERSI;
|
|
187
|
+
static readonly AGILITY_ARENA_HUD_GROUP_ID = InterfaceID.AGILITY_ARENA;
|
|
188
|
+
static readonly GNOMEBALL_SCORE_GROUP_ID = InterfaceID.GNOMEBALL;
|
|
189
|
+
static readonly SANITY_GROUP_ID = InterfaceID.SANITY;
|
|
190
|
+
static readonly THE_STRANGLER_INFECTION_GROUP_ID = InterfaceID.STRANGLER;
|
|
193
191
|
}
|
|
194
192
|
}
|
|
@@ -24,121 +24,110 @@
|
|
|
24
24
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
25
25
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
26
26
|
*/
|
|
27
|
+
|
|
27
28
|
declare namespace net.runelite.client.config {
|
|
28
|
-
export class ConfigManager
|
|
29
|
-
{
|
|
30
|
-
// null => we need to make a new profile
|
|
31
|
-
switchProfile(newProfile: ConfigProfile): void;
|
|
32
|
-
// Ensure existing config is saved
|
|
33
|
-
// sync the latest config revision from the server
|
|
34
|
-
getRSProfileKey(): string;
|
|
35
|
-
onSessionOpen(sessionOpen: SessionOpen): void;
|
|
36
|
-
// special case for $rsprofile since it acts as an automatically-synced profile that is always merged
|
|
37
|
-
// instead of overwritten. After a login send a PATCH for the offline $rsprofile to merge it with the
|
|
38
|
-
// remote $rsprofile so that when $rsprofile is synced later it doesn't overwrite and lose the local
|
|
39
|
-
// $rsprofile settings.
|
|
40
|
-
onSessionClose(sessionClose: SessionClose): void;
|
|
41
|
-
// remove the remote profiles
|
|
42
|
-
toggleSync(profile: ConfigProfile, sync: boolean): void;
|
|
43
|
-
// flush pending config changes first in the event the profile being
|
|
44
|
-
// synced is the active profile.
|
|
45
|
-
// sync the entire profile from disk
|
|
46
|
-
renameProfile(profile: ConfigProfile, name: string): void;
|
|
47
|
-
private migrate(): void;
|
|
48
|
-
importAndMigrate(lock: ProfileManager.Lock, from: File, targetProfile: ConfigProfile): void;
|
|
49
|
-
private static removeDuplicateProfiles(lock: ProfileManager.Lock): void;
|
|
50
|
-
private static fixRsProfileName(lock: ProfileManager.Lock): void;
|
|
51
|
-
load(): void;
|
|
52
|
-
// synced rsprofile need to be fetched if outdated
|
|
53
|
-
// --profile
|
|
54
|
-
// select a config profile associated with the display name from the jagex launcher, if available
|
|
55
|
-
// Calling getConfiguration before a profile has been loaded is usually invalid. Because
|
|
56
|
-
// rsProfile is loaded above before this is run and we are only attempting to load rsProfile
|
|
57
|
-
// keys, it is safe to be called.
|
|
58
|
-
// if creating the initial default profile
|
|
59
|
-
// synced profile need to be fetched if outdated
|
|
60
|
-
private mergeRemoteProfiles(remoteProfiles: Array<Profile>): void;
|
|
61
|
-
// convert the profile to a non-synced profile
|
|
62
|
-
private syncRemote(lock: ProfileManager.Lock, profile: ConfigProfile, remoteProfiles: Array<Profile>): void;
|
|
63
|
-
// $rsprofile is normally synced, even when logged out
|
|
64
|
-
// remote configuration replaces local
|
|
65
|
-
getConfig(clazz: any): T;
|
|
66
|
-
getConfigurationKeys(prefix: string): Array<string>;
|
|
67
|
-
getRSProfileConfigurationKeys(group: string, profile: string, keyPrefix: string): Array<string>;
|
|
68
|
-
static getWholeKey(groupName: string, profile: string, key: string): string;
|
|
69
|
-
// region get configuration
|
|
70
|
-
private getConfiguration(configData: ConfigData, groupName: string, rsProfile: string, key: string): string;
|
|
71
|
-
getConfiguration(groupName: string, key: string): string;
|
|
72
|
-
getRSProfileConfiguration(groupName: string, key: string): string;
|
|
73
|
-
getConfiguration(groupName: string, profile: string, key: string): string;
|
|
74
|
-
getConfiguration(groupName: string, key: string, clazz: Type): T;
|
|
75
|
-
getRSProfileConfiguration(groupName: string, key: string, clazz: Type): T;
|
|
76
|
-
getConfiguration(groupName: string, profile: string, key: string, type: Type): T;
|
|
77
|
-
// endregion
|
|
78
|
-
// region set configuration
|
|
79
|
-
private setConfiguration(configData: ConfigData, groupName: string, profile: string, key: string, value: string): void;
|
|
80
|
-
setConfiguration(groupName: string, profile: string, key: string, value: string): void;
|
|
81
|
-
setConfiguration(groupName: string, key: string, value: string): void;
|
|
82
|
-
setConfiguration(groupName: string, profile: string, key: string, value: T): void;
|
|
83
|
-
setConfiguration(groupName: string, key: string, value: T): void;
|
|
84
|
-
setRSProfileConfiguration(groupName: string, key: string, value: T): void;
|
|
85
|
-
// endregion
|
|
86
|
-
// region unset configuration
|
|
87
|
-
private unsetConfiguration(configData: ConfigData, groupName: string, profile: string, key: string): void;
|
|
88
|
-
unsetConfiguration(groupName: string, profile: string, key: string): void;
|
|
89
|
-
unsetConfiguration(groupName: string, key: string): void;
|
|
90
|
-
unsetRSProfileConfiguration(groupName: string, key: string): void;
|
|
91
|
-
// endregion
|
|
92
|
-
getConfigDescriptor(configurationProxy: Config): ConfigDescriptor;
|
|
93
29
|
/**
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
* @param proxy proxy instance implementing {@link Config}
|
|
30
|
+
* The core profile type used by ConfigManager.
|
|
97
31
|
*/
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
// If a config value defaults to "" and the current value is null, it will cause an extra
|
|
105
|
-
// unset to be sent, so treat them as equal
|
|
106
|
-
stringToObject(str: string, type: Type): Record<string, any>;
|
|
107
|
-
// Guice holds references to all jitted types.
|
|
108
|
-
// To allow class unloading, use a temporary child injector
|
|
109
|
-
// and use it to get the instance, and cache it a weak map.
|
|
110
|
-
objectToString(object: Record<string, any>): string | null;
|
|
111
|
-
// run after plugins, in the event they save config on shutdown
|
|
112
|
-
private onClientShutdown(e: ClientShutdown): void;
|
|
113
|
-
sendConfig(): void;
|
|
114
|
-
// since we hold references to profiles outside of the lock, they are stale.
|
|
115
|
-
// fetch the latest version.
|
|
116
|
-
private static updateProfile(lock: ProfileManager.Lock, profile: ConfigProfile): ConfigProfile;
|
|
117
|
-
// We just recreate it, with the same id, so that the ConfigData stays valid
|
|
118
|
-
// I think this is okay because while the in memory config on this client will be outdated,
|
|
119
|
-
// the version on disk and also the remote version will still be consistent
|
|
120
|
-
private saveConfiguration(lock: ProfileManager.Lock, profile: ConfigProfile, data: ConfigData): void;
|
|
121
|
-
// version on disk now mismatches the remote config. Set rev as -1 to force a reload
|
|
122
|
-
// on next start.
|
|
123
|
-
private static buildConfigPatch(profileName: string, patchChanges: Record<string, string>): ConfigPatch;
|
|
124
|
-
// Note profileName is only used for internal profiles and on initial sync, to prevent
|
|
125
|
-
// clients fighting over profile names.
|
|
126
|
-
getRSProfiles(): Array<RuneScapeProfile>;
|
|
127
|
-
private findRSProfile(profiles: Array<RuneScapeProfile>, accountHash: number, type: RuneScapeProfileType, displayName: string, create: boolean): RuneScapeProfile;
|
|
128
|
-
// generate the new key deterministically so if you "create" the same profile on 2 different clients it doesn't duplicate
|
|
129
|
-
private updateRSProfile(): void;
|
|
130
|
-
private onAccountHashChanged(ev: net.runelite.api.events.AccountHashChanged): void;
|
|
131
|
-
private onWorldChanged(ev: net.runelite.api.events.WorldChanged): void;
|
|
132
|
-
private onPlayerChanged(ev: net.runelite.api.events.PlayerChanged): void;
|
|
133
|
-
private onRuneScapeProfileChanged(ev: RuneScapeProfileChanged): void;
|
|
134
|
-
// change active profile
|
|
32
|
+
export interface RuneScapeProfile {
|
|
33
|
+
/** The display name of this profile */
|
|
34
|
+
getName(): string;
|
|
35
|
+
// …extend with other profile methods as needed…
|
|
36
|
+
}
|
|
37
|
+
|
|
135
38
|
/**
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
* @param key in form group.(rsprofile.profile.)?key
|
|
139
|
-
* @return an array of {group, profile, key}
|
|
39
|
+
* Alias so your code can use ConfigProfile everywhere without changes
|
|
140
40
|
*/
|
|
141
|
-
|
|
142
|
-
|
|
41
|
+
export type ConfigProfile = RuneScapeProfile;
|
|
42
|
+
|
|
43
|
+
export class ConfigManager {
|
|
44
|
+
// ────── Profile Management ──────
|
|
45
|
+
/** Switch to (or implicitly create) the given profile */
|
|
46
|
+
switchProfile(newProfile: ConfigProfile): void;
|
|
47
|
+
/** Rename an existing profile */
|
|
48
|
+
renameProfile(profile: ConfigProfile, name: string): void;
|
|
49
|
+
/** Enable or disable cloud-sync for a profile */
|
|
50
|
+
toggleSync(profile: ConfigProfile, sync: boolean): void;
|
|
51
|
+
/** Get the key of the current RuneScape profile */
|
|
52
|
+
getRSProfileKey(): string;
|
|
53
|
+
|
|
54
|
+
// ────── Session Events ──────
|
|
55
|
+
/** Called when the client session opens (e.g. on login) */
|
|
56
|
+
onSessionOpen(sessionOpen: SessionOpen): void;
|
|
57
|
+
/** Called when the client session closes (e.g. on logout) */
|
|
58
|
+
onSessionClose(sessionClose: SessionClose): void;
|
|
59
|
+
|
|
60
|
+
// ────── Configuration Retrieval ──────
|
|
61
|
+
/** Simple two-arg getter; returns raw string */
|
|
62
|
+
getConfiguration(groupName: string, key: string): string;
|
|
63
|
+
/** Typed two-arg getter; cast via the provided Type */
|
|
64
|
+
getConfiguration<T>(groupName: string, key: string, clazz: Type): T;
|
|
65
|
+
/** Four-arg getter: read from a non-current profile */
|
|
66
|
+
getConfiguration<T>(groupName: string, profile: string, key: string, type: Type): T;
|
|
67
|
+
/** Profile-specific getters */
|
|
68
|
+
getRSProfileConfiguration(groupName: string, key: string): string;
|
|
69
|
+
getRSProfileConfiguration<T>(groupName: string, key: string, clazz: Type): T;
|
|
70
|
+
/** List keys under this group or profile */
|
|
71
|
+
getConfigurationKeys(prefix: string): Array<string>;
|
|
72
|
+
getRSProfileConfigurationKeys(group: string, profile: string, keyPrefix: string): Array<string>;
|
|
73
|
+
/** Utility: combine group, profile, and key */
|
|
74
|
+
static getWholeKey(groupName: string, profile: string, key: string): string;
|
|
75
|
+
|
|
76
|
+
// ────── Configuration Setting ──────
|
|
77
|
+
/** Simple two-arg setter; stores as string */
|
|
78
|
+
setConfiguration(groupName: string, key: string, value: string): void;
|
|
79
|
+
/** Typed two-arg setter; stores any serializable T */
|
|
80
|
+
setConfiguration<T>(groupName: string, key: string, value: T): void;
|
|
81
|
+
/** Four-arg setter: write into a non-current profile */
|
|
82
|
+
setConfiguration(groupName: string, profile: string, key: string, value: string): void;
|
|
83
|
+
setConfiguration<T>(groupName: string, profile: string, key: string, value: T): void;
|
|
84
|
+
setRSProfileConfiguration<T>(groupName: string, key: string, value: T): void;
|
|
85
|
+
|
|
86
|
+
// ────── Configuration Removal ──────
|
|
87
|
+
unsetConfiguration(groupName: string, key: string): void;
|
|
88
|
+
unsetConfiguration(groupName: string, profile: string, key: string): void;
|
|
89
|
+
unsetRSProfileConfiguration(groupName: string, key: string): void;
|
|
90
|
+
|
|
91
|
+
// ────── Profile Listing & Lookup ──────
|
|
92
|
+
/** Returns all known profiles */
|
|
93
|
+
getRSProfiles(): Array<RuneScapeProfile>;
|
|
94
|
+
/** Internal helper to find (or create) a profile by name */
|
|
95
|
+
private findRSProfile(
|
|
96
|
+
profiles: Array<RuneScapeProfile>,
|
|
97
|
+
accountHash: number,
|
|
98
|
+
type: RuneScapeProfileType,
|
|
99
|
+
displayName: string,
|
|
100
|
+
create: boolean,
|
|
101
|
+
): RuneScapeProfile;
|
|
102
|
+
|
|
103
|
+
// ────── Migration & Internal Utilities ──────
|
|
104
|
+
importAndMigrate(lock: ProfileManager.Lock, from: File, targetProfile: ConfigProfile): void;
|
|
105
|
+
private migrate(): void;
|
|
106
|
+
private static removeDuplicateProfiles(lock: ProfileManager.Lock): void;
|
|
107
|
+
private static fixRsProfileName(lock: ProfileManager.Lock): void;
|
|
108
|
+
private mergeRemoteProfiles(remoteProfiles: Array<Profile>): void;
|
|
109
|
+
private syncRemote(lock: ProfileManager.Lock, profile: ConfigProfile, remoteProfiles: Array<Profile>): void;
|
|
110
|
+
|
|
111
|
+
// ────── Core APIs ──────
|
|
112
|
+
getConfig<T>(clazz: any): T;
|
|
113
|
+
getConfigDescriptor(configurationProxy: Config): ConfigDescriptor;
|
|
114
|
+
setDefaultConfiguration(proxy: T, override: boolean): void;
|
|
115
|
+
stringToObject(str: string, type: Type): Record<string, any>;
|
|
116
|
+
objectToString(object: Record<string, any>): string | null;
|
|
117
|
+
private onClientShutdown(e: ClientShutdown): void;
|
|
118
|
+
sendConfig(): void;
|
|
119
|
+
private static updateProfile(lock: ProfileManager.Lock, profile: ConfigProfile): ConfigProfile;
|
|
120
|
+
private saveConfiguration(lock: ProfileManager.Lock, profile: ConfigProfile, data: ConfigData): void;
|
|
121
|
+
private static buildConfigPatch(profileName: string, patchChanges: Record<string, string>): ConfigPatch;
|
|
122
|
+
|
|
123
|
+
// ────── Event Handlers ──────
|
|
124
|
+
private updateRSProfile(): void;
|
|
125
|
+
private onAccountHashChanged(ev: net.runelite.api.events.AccountHashChanged): void;
|
|
126
|
+
private onWorldChanged(ev: net.runelite.api.events.WorldChanged): void;
|
|
127
|
+
private onPlayerChanged(ev: net.runelite.api.events.PlayerChanged): void;
|
|
128
|
+
private onRuneScapeProfileChanged(ev: RuneScapeProfileChanged): void;
|
|
129
|
+
|
|
130
|
+
/** Split a config key into [group, (rsprofile.), key] */
|
|
131
|
+
static splitKey(key: string): string[] | null;
|
|
132
|
+
}
|
|
143
133
|
}
|
|
144
|
-
}
|