Skip to content

Commit a4f0330

Browse files
committed
Update general settings and event notification settings
1 parent 8f1b219 commit a4f0330

9 files changed

+524
-126
lines changed

src/discordUtils/discordButtons.ts

+6
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,12 @@ export function getSmartAlarmButtons(guildId: types.GuildId, serverId: types.Ser
236236
style: smartAlarm.everyone ? discordjs.ButtonStyle.Success : discordjs.ButtonStyle.Danger,
237237
type: discordjs.ComponentType.Button
238238
}),
239+
getButton({
240+
customId: `SmartAlarmInGame${identifier}`,
241+
label: '@everyone',
242+
style: smartAlarm.inGame ? discordjs.ButtonStyle.Success : discordjs.ButtonStyle.Danger,
243+
type: discordjs.ComponentType.Button
244+
}),
239245
getButton({
240246
customId: `SmartAlarmEdit${identifier}`,
241247
label: lm.getIntl(language, 'buttonEdit'),

src/discordUtils/discordEmbeds.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ export function getSmartSwitchEmbed(guildId: types.GuildId, serverId: types.Serv
456456
footer: { text: serverInfo.name },
457457
fields: [{
458458
name: lm.getIntl(language, 'customCommand'),
459-
value: `\`${gInstance.generalSettings.prefix}${smartSwitch.command}\``,
459+
value: `\`${gInstance.generalSettings.inGameCommandPrefix}${smartSwitch.command}\``,
460460
inline: true
461461
}],
462462
timestamp: new Date()
@@ -489,7 +489,7 @@ export function getSmartAlarmEmbed(guildId: types.GuildId, serverId: types.Serve
489489
inline: true
490490
}, {
491491
name: lm.getIntl(language, 'customCommand'),
492-
value: `\`${gInstance.generalSettings.prefix}${smartAlarm.command}\``,
492+
value: `\`${gInstance.generalSettings.inGameCommandPrefix}${smartAlarm.command}\``,
493493
inline: false
494494
}],
495495
timestamp: new Date()

src/managers/fcmListenerManager.ts

+1
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,7 @@ async function pairingEntitySmartAlarm(flm: FcmListenerManager, steamId: types.S
549549
command: exist ? smartAlarmMap[body.entityId].command : body.entityId,
550550
img: exist ? smartAlarmMap[body.entityId].img : 'smart_alarm.png',
551551
everyone: exist ? smartAlarmMap[body.entityId].everyone : false,
552+
inGame: exist ? smartAlarmMap[body.entityId].inGame : false,
552553
lastTrigger: exist ? smartAlarmMap[body.entityId].lastTrigger : null,
553554
message: exist ? smartAlarmMap[body.entityId].message : lm.getIntl(language, 'yourBaseIsUnderAttack')
554555
};

src/managers/guildInstanceManager.ts

+362-36
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
{
2+
"vendingMachineSpawned": {
3+
"image": "vending_machine_logo.png",
4+
"discord": true,
5+
"inGame": false,
6+
"voice": true
7+
},
8+
"vendingMachineDespawned": {
9+
"image": "vending_machine_logo.png",
10+
"discord": true,
11+
"inGame": false,
12+
"voice": true
13+
},
14+
"ch47Spawned": {
15+
"image": "chinook_47_logo.png",
16+
"discord": true,
17+
"inGame": false,
18+
"voice": true
19+
},
20+
"ch47Despawned": {
21+
"image": "chinook_47_logo.png",
22+
"discord": true,
23+
"inGame": false,
24+
"voice": true
25+
},
26+
"ch47Destroyed": {
27+
"image": "chinook_47_logo.png",
28+
"discord": true,
29+
"inGame": false,
30+
"voice": true
31+
},
32+
"ch47DroppedLockedCrate": {
33+
"image": "locked_crate_logo.png",
34+
"discord": true,
35+
"inGame": false,
36+
"voice": true
37+
},
38+
"ch47HeavyScientistsCalled": {
39+
"image": "oil_rig_logo.png",
40+
"discord": true,
41+
"inGame": false,
42+
"voice": true
43+
},
44+
"ch47OilRigLockedCrateUnlocked": {
45+
"image": "locked_crate_logo.png",
46+
"discord": true,
47+
"inGame": false,
48+
"voice": true
49+
},
50+
"cargoShipSpawned": {
51+
"image": "cargoship_logo.png",
52+
"discord": true,
53+
"inGame": false,
54+
"voice": true
55+
},
56+
"cargoShipDespawned": {
57+
"image": "cargoship_logo.png",
58+
"discord": true,
59+
"inGame": false,
60+
"voice": true
61+
},
62+
"cargoShipLeaving": {
63+
"image": "cargoship_logo.png",
64+
"discord": true,
65+
"inGame": false,
66+
"voice": true
67+
},
68+
"cargoShipDocking": {
69+
"image": "cargoship_logo.png",
70+
"discord": true,
71+
"inGame": false,
72+
"voice": true
73+
},
74+
"cargoShipDocked": {
75+
"image": "cargoship_logo.png",
76+
"discord": true,
77+
"inGame": false,
78+
"voice": true
79+
},
80+
"cargoShipUndocking": {
81+
"image": "cargoship_logo.png",
82+
"discord": true,
83+
"inGame": false,
84+
"voice": true
85+
},
86+
"cargoShipLockedCrateSpawned": {
87+
"image": "locked_crate_cargoship_logo.png",
88+
"discord": true,
89+
"inGame": false,
90+
"voice": true
91+
},
92+
"patrolHelicopterSpawned": {
93+
"image": "patrol_helicopter_logo.png",
94+
"discord": true,
95+
"inGame": false,
96+
"voice": true
97+
},
98+
"patrolHelicopterDespawned": {
99+
"image": "patrol_helicopter_logo.png",
100+
"discord": true,
101+
"inGame": false,
102+
"voice": true
103+
},
104+
"patrolHelicopterDestroyed": {
105+
"image": "patrol_helicopter_destroyed_logo.png",
106+
"discord": true,
107+
"inGame": false,
108+
"voice": true
109+
},
110+
"patrolHelicopterLeaving": {
111+
"image": "patrol_helicopter_logo.png",
112+
"discord": true,
113+
"inGame": false,
114+
"voice": true
115+
},
116+
"travellingVendorSpawned": {
117+
"image": "travelling_vendor_logo.png",
118+
"discord": true,
119+
"inGame": false,
120+
"voice": true
121+
},
122+
"travellingVendorDespawned": {
123+
"image": "travelling_vendor_logo.png",
124+
"discord": true,
125+
"inGame": false,
126+
"voice": true
127+
},
128+
"travellingVendorStopped": {
129+
"image": "travelling_vendor_logo.png",
130+
"discord": true,
131+
"inGame": false,
132+
"voice": true
133+
},
134+
"travellingVendorStarted": {
135+
"image": "travelling_vendor_logo.png",
136+
"discord": true,
137+
"inGame": false,
138+
"voice": true
139+
}
140+
}

src/templates/generalSettingsTemplate.json

+13-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
11
{
22
"language": "en",
3-
"prefix": "!",
4-
"trademark": "rustplusplus",
53
"voiceGender": "male",
4+
"inGameChatFunctionalityDisabled": false,
5+
"inGameMuteBotMessages": false,
6+
"inGameTrademark": "rustplusplus",
7+
"inGameCommandPrefix": "!",
8+
"inGameCommandsEnabled": true,
9+
"inGameCommandDelay": 0,
10+
"leaderCommandEnabled": true,
11+
"leaderCommandOnlyForPaired": false,
12+
"inGameNotifySmartSwitchChangedFromDiscord": true,
13+
"inGameConnectionNotify": false,
14+
"inGameAfkNotify": false,
15+
"inGameDeathNotify": false,
16+
"mapWipeNotifyEveryone": false,
617
"fcmAlarmNotify": false,
718
"fcmAlarmNotifyEveryone": false,
819
"fcmAlarmPluginNotify": true,

src/templates/notificationSettingsTemplate.json

-86
This file was deleted.

0 commit comments

Comments
 (0)