Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .github/workflows/translate-language.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ on:
pull_request:
branches:
- master
paths:
- "src/languages/en.json"
- "src/external/translate_language_json.py"
- ".github/workflows/translate-language.yml"

permissions:
contents: write
Expand All @@ -19,7 +15,6 @@ concurrency:

jobs:
translate-language:
if: ${{ !github.event.pull_request.head.repo.fork }}
runs-on: ubuntu-latest

steps:
Expand Down
12 changes: 9 additions & 3 deletions src/discordTools/discordModals.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,15 @@ module.exports = {
style: Discord.TextInputStyle.Short
})),
new Discord.ActionRowBuilder().addComponents(TextInput.getTextInput({
customId: 'DeepSeaWipeCooldownTime',
label: Client.client.intlGet(guildId, 'customTimerEditDeepSeaWipeCooldownLabel'),
value: `${server.deepSeaWipeCooldownMs / 1000}`,
customId: 'DeepSeaMinWipeCooldownTime',
label: Client.client.intlGet(guildId, 'customTimerEditDeepSeaMinWipeCooldownLabel'),
value: `${server.deepSeaMinWipeCooldownMs / 1000}`,
style: Discord.TextInputStyle.Short
})),
new Discord.ActionRowBuilder().addComponents(TextInput.getTextInput({
customId: 'DeepSeaMaxWipeCooldownTime',
label: Client.client.intlGet(guildId, 'customTimerEditDeepSeaMaxWipeCooldownLabel'),
value: `${server.deepSeaMaxWipeCooldownMs / 1000}`,
style: Discord.TextInputStyle.Short
})),
new Discord.ActionRowBuilder().addComponents(TextInput.getTextInput({
Expand Down
12 changes: 8 additions & 4 deletions src/handlers/modalHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ module.exports = async (client, interaction) => {
const server = instance.serverList[ids.serverId];
const cargoShipEgressTime = parseInt(interaction.fields.getTextInputValue('CargoShipEgressTime'));
const oilRigCrateUnlockTime = parseInt(interaction.fields.getTextInputValue('OilRigCrateUnlockTime'));
const deepSeaWipeCooldown = parseInt(interaction.fields.getTextInputValue('DeepSeaWipeCooldownTime'));
const deepSeaMinWipeCooldown = parseInt(interaction.fields.getTextInputValue('DeepSeaMinWipeCooldownTime'));
const deepSeaMaxWipeCooldown = parseInt(interaction.fields.getTextInputValue('DeepSeaMaxWipeCooldownTime'));
const deepSeaWipeDuration = parseInt(interaction.fields.getTextInputValue('DeepSeaWipeDurationTime'));

if (!server) {
Expand All @@ -61,8 +62,11 @@ module.exports = async (client, interaction) => {
if (oilRigCrateUnlockTime && ((oilRigCrateUnlockTime * 1000) !== server.oilRigLockedCrateUnlockTimeMs)) {
server.oilRigLockedCrateUnlockTimeMs = oilRigCrateUnlockTime * 1000;
}
if (deepSeaWipeCooldown && ((deepSeaWipeCooldown * 1000) !== server.deepSeaWipeCooldownMs)) {
server.deepSeaWipeCooldownMs = deepSeaWipeCooldown * 1000;
if (deepSeaMinWipeCooldown && ((deepSeaMinWipeCooldown * 1000) !== server.deepSeaMinWipeCooldownMs)) {
server.deepSeaMinWipeCooldownMs = deepSeaMinWipeCooldown * 1000;
}
if (deepSeaMaxWipeCooldown && ((deepSeaMaxWipeCooldown * 1000) !== server.deepSeaMaxWipeCooldownMs)) {
server.deepSeaMaxWipeCooldownMs = deepSeaMaxWipeCooldown * 1000;
}
if (deepSeaWipeDuration && ((deepSeaWipeDuration * 1000) !== server.deepSeaWipeDurationMs)) {
server.deepSeaWipeDurationMs = deepSeaWipeDuration * 1000;
Expand All @@ -71,7 +75,7 @@ module.exports = async (client, interaction) => {

client.log(client.intlGet(null, 'infoCap'), client.intlGet(null, 'modalValueChange', {
id: `${verifyId}`,
value: `${server.cargoShipEgressTimeMs}, ${server.oilRigLockedCrateUnlockTimeMs}, ${server.deepSeaWipeCooldownMs}, ${server.deepSeaWipeDurationMs}`
value: `${server.cargoShipEgressTimeMs}, ${server.oilRigLockedCrateUnlockTimeMs}, ${server.deepSeaMinWipeCooldownMs}, ${server.deepSeaMaxWipeCooldownMs}, ${server.deepSeaWipeDurationMs}`
}));
}
else if (interaction.customId.startsWith('ServerEdit')) {
Expand Down
Loading