From 07ca95586b5230f3176920bcb04a4646c8f6c139 Mon Sep 17 00:00:00 2001 From: Lacoi Date: Wed, 30 Aug 2023 22:40:54 +0200 Subject: [PATCH 01/10] asm: update pt-BR Translation --- .../Globalization/pt-BR/pt-BR.xaml | 103 +++++++++++++++--- 1 file changed, 86 insertions(+), 17 deletions(-) diff --git a/src/ARKServerManager/Globalization/pt-BR/pt-BR.xaml b/src/ARKServerManager/Globalization/pt-BR/pt-BR.xaml index 09daebbb..6e1a3689 100644 --- a/src/ARKServerManager/Globalization/pt-BR/pt-BR.xaml +++ b/src/ARKServerManager/Globalization/pt-BR/pt-BR.xaml @@ -9,7 +9,7 @@ Atualizado pela última vez por: - bruno5011 + Bruno5011 Error @@ -319,6 +319,7 @@ Erro ao atualizar arquivos de backup Nome + Tamanho Criado Ultima atualização @@ -583,6 +584,8 @@ Se ativado, as substituições do gerador de mapa serão gerenciadas pelo ASM. Ativar substituições de Supply Crate Se habilitado, as substituições de supply crate serão gerenciadas pelo ASM. + Ativar substituições de índices de itens excluídos + Se ativado, as substituições de índices de itens excluídos serão gerenciadas pelo gerenciador do servidor. Ativar Prevenção de Substituição de Transferência Se habilitado, as substituições de transferência de prevenção serão gerenciadas pelo gerenciador do servidor. Ativar configurações do Ark PGM @@ -591,6 +594,14 @@ Se ativado, as configurações do SotF serão gerenciadas pelo ASM. AVISO: Embora qualquer uma dessas opções esteja desativada, o ASM não lerá nem gravará as configurações de substituições associadas. A reativação de qualquer uma dessas opções fará com que TODAS as substituições associadas existentes sejam removidas do arquivo de configuração. + Opções de sincronização de perfil personalizado + Habilitar sincronização para ModIDs + Se ativado, na sincronização do perfil os ModIDs ainda serão sincronizados. + Habilitar sincronização para ClusterID + Se ativado, na sincronização do perfil o ClusterID ainda estará sincronizado. + Ativar sincronização desligamento automático + Se ativado, na sincronização do perfil as configurações de tempo de desligamento automático ainda serão sincronizadas. + Opções de nível personalizado Aumento do nível do jogador: A quantidade de XP a ser aumentada ao adicionar um novo nível personalizado. @@ -914,6 +925,7 @@ Se você prosseguir, toda a pasta do SteamCMD será removida, incluindo todos os downloads de cache mod.\R\n Tem certeza de que deseja reinstalar o SteamCMD? Reinstale o erro do SteamCMD Ocorreu um erro ao tentar reinstalar o SteamCMD. Isso deixou o SteamCmd em um estado instável, tente reinstalar novamente ou informe isso.\R\nException: {0} + Chave da API da Web do Steam ausente! Atualizações, downloads e instalação de perfis podem falhar. Insira sua chave Steam Web Api nas configurações globais Discord Bot executando comandos O bot discord tem um ou mais comandos em execução. Quer continuar fechando o server manager? @@ -1194,6 +1206,14 @@ Se ativado, o URL da lista de proibições especificado será usado. O URL da lista de banimento a ser usada. Redefinir as propriedades da lista de proibição para os padrões. + Use Dynamic Config URL + Se ativado, o URL de configuração dinâmica especificado será usado. + A URL da configuração dinâmica a ser usada. + Use Custom Live Tuning URL + Se ativado, o URL de configuração do ajuste ao vivo personalizado especificado será usado. + Idioma do servidor + Substitui o idioma de saída do servidor. Não substitui o idioma dos clientes. + A URL da configuração de ajuste ao vivo personalizada a ser usada. Desabilitar Valve Anti-Cheat System (VAC) Se ativado, o sistema Valve anti-cheat será desativado. Por favor, use isso com cautela! Desativar a otimização do jogador-mover-física @@ -1233,7 +1253,9 @@ Se habilitado, habilitará o NVIDIA Ansel em Servidores. Otimizações de memória de estrutura Se ativado, habilitará as otimizações de memória da estrutura. NOTA: evite usá-lo ao executar mods relacionados à estrutura (até que sejam atualizados), pois isso pode interromper os pontos de snap dessas estruturas de mod. - Proteção contra problemas de upload de dinos + Structure Stasis Grid + Permite que a Structure Stasis Grid melhore o desempenho do servidor em bases grandes com muitos jogadores. (Esteja ciente de que isso pode ter impacto em alguns mods) + Proteção contra problemas de upload de dinos Proteção contra problema de upload de criaturas (esteja ciente de que isso pode afetar alguns mods) Proteção adicional contra Dupe Ativa proteção adicional contra dupes (Nota: isso pode afetar os mods, portanto, use com cuidado). @@ -1300,6 +1322,21 @@ Estruturas de Inimigo Destruídas da Tribo Log Se ativado, o log de destruição da estrutura do inimigo (para a tribo vítima) exibirá a tribo do atacante nos Registros da Tribo, em vez de uma mensagem de destruição da estrutura genérica. + Configurações Oficial salve + Novo formato save + É usado o novo formato de salvamento (versão 11), que é aproximadamente 4x mais rápido e 50% menor em comparação com o "formato de salvamento antigo" (versão 8). +Obsoleto desde o patch 244.6, o formato de salvamento padrão atual (versão 9) é baseado nisso. Use apenas se necessário (por exemplo: o formato de salvamento padrão falha, assim como o formato de salvamento antigo). +Esta opção deve ser usada para iniciar os backups oficiais do servidor 2023 junto com -usestore para carregar corretamente a propriedade da tribo. + Usar Store + O mesmo comportamento básico dos servidores oficiais (não legados) no tratamento de dados dos jogadores: o arquivo de perfil do personagem (.arkprofile) não é salvo separadamente do salvamento do mapa (.ark), nem seu backup. +Quando necessário (por exemplo: um personagem recém-transferido ou um novo personagem foi criado) um arquivo temporário de perfil do personagem é criado e mantido até o próximo salvamento mundial. +Os perfis da tribo são armazenados em um formato diferente (.arktributetribe). Permite a opção -BackupTransferPlayerDatas (para imitar totalmente o comportamento de salvamento dos servidores oficiais). +Use a opção -converttostore para converter dados anteriores não armazenados em dados armazenados. Esta opção deve ser usada para carregar corretamente os backups oficiais do servidor 2023 junto com -newsaveformat. + Transferência de backup do Jogador + Imita totalmente os servidores oficiais (não legados) no manuseio dos dados dos jogadores, adicionando arquivos de backup permanentes do perfil do personagem separadamente do salvamento mundial. +Requer a opção -usestore. Esta opção deve ser usada para reativar totalmente os backups de perfis de personagens ao jogar os backups oficiais de 2023 Server Saves. +Undocumented bye wildcard. + Ativar alarmes da Web Se ativado, os servidores agora podem receber notificações da Web publicadas em algum lugar quando coisas importantes acontecem a uma tribo. Chave da Web @@ -1400,7 +1437,7 @@ Ativa o modo Jogador contra Jogador (jogadores são capazes de causar dano ou matar uns aos outros. Em jogadores PvP também podem danificar ou destruir os edifícios de outra tribo ou matar seus dinossauros). Ativar o modo criativo Se ativado, permite o modo criativo. - Ativar construçoes em Caverna PvE + Ativar construção em Caverna PvE Se habilitado, permite a construção em cavernas quando o modo PVE estiver habilitado. Ativar doença criogênica do PvE Se ativado, se você liberar uma criatura domesticada de um criodo, você terá um cronômetro de doença crio quando o modo PvE estiver ativado. @@ -1414,9 +1451,15 @@ Se habilitado, fará os Supply Crates aleatórias. Impedir construção em áreas ricas em recursos Se habilitado, desabilita completamente a construção em áreas específicas e ricas em recursos, em particular construções do próprio jogo... - Desativar Fogo Amigável PvP + Habilitar configurações de jogador único + Se ativado, todas as configurações do jogo serão mais equilibradas para a experiência individual do jogador. Útil para servidores dedicados com poucos jogadores. + Desativar Fogo Amigável PvP Se habilitado, os jogadores são incapazes de causar dano ou matar outros membros da tribo, dinossauros e estruturas quando o modo PvP estiver habilitado. - Use o Localizador de Corpos + Ativar construção em cavernas PVP + Se habilitado, permite construir em cavernas quando o modo PvP estiver habilitado. + Desativar Tek Railgun PvP + Se ativado, os jogadores não poderão usar o Tek Railgun quando o modo PvP estiver ativado. + Use o Localizador de Corpos Se ativado, após a morte, um raio de luz dispara para o céu para ajudar o jogador a localizar onde morreu. Evitar animações de spawn Se habilitado, desabilitará a animação de respawn. @@ -1461,6 +1504,8 @@ Opções de Tributo do Cluster Nenhuma transferência da filtragem + Desativar pastas de tributo personalizadas + Desativa a criação de pastas nos inventários do Tribute. Se ativado, as transferências do sobrevivente, item e dino serão desativadas se o servidor não estiver no mesmo cluster. Substituir Expiração de Upload de Sobrevivente Se habilitado, permitirá que você substitua o cronômetro de expiração. @@ -1547,10 +1592,8 @@ Especifica o multiplicador na qualidade do supply crate loot. Multiplicador de Qualidade na Pesca de Loot Especifica o multiplicador na qualidade de pesca de loot. - Desativar pilhagem de peixe não-carne - Se ativado, desativa a coleta de pilhagem de peixe não-carne. Usa o multiplicador de vida útil nos cadáveres - Especifica o multiplicador para o tempo de vida dos cadáver e da caixa de depósito. + Especifica o multiplicador para o tempo de vida dos cadáver e de caixa dropadas. Tempo de Recarga no Inventário Fjordhawk Cooldown na recuperação do inventário do jogador quando morto. O padrão é 1 hora. Durabilidade global da bateria @@ -1585,6 +1628,8 @@ Se habilitado, fará com que os buffs do Mapa escalem seus benefícios multiplicativamente, ao invés de adicionar / subtrair uma quantia fixa ao valor em tempo de execução. Buff de escalonamento global Especifica a escala global para reduzir / aumentar a eficácia dos buffs mundiais (por exemplo, 1 é o padrão, 0,5 seria 50% menos eficaz, 2,0 seria 2x mais eficaz). + Multiplicador Spawn Mutagen + Por padrão, o jogo tenta gerá-los a cada 8 horas em servidores dedicados e a cada hora em servidores não dedicados e no modo single player. Aumentar esse valor aumentará o intervalo de reaparecimento, diminuir irá torná-lo mais curto. Hexagons Desativar Hexagon Store @@ -1768,10 +1813,10 @@ Se habilitado, permite upar velocidade de movimento do flyer. Desativar Bônus de companheiro Se ativado, Os dinos não receberão o bônus do companheiro, o mesmo não receberá o bônus de 33% de dano de resistência - Desativar força de Explosivos em voadores. - Se ativado, desativará o aterramento dos voadores no chão, quando explosivos forem colocados sobre eles. - Permitir Múltiplos C4 Anexados + Permitir Múltiplos C4 Anexados Se habilitado, permitirá mais de um C4 anexado por dino. + Permitir não reivindicar Dinos + Se desativado, impede que os jogadores cancelem a reivindicação de criaturas domesticadas. Desativar decaimento de Dino PvE Se habilitado, desativa o decaimento gradual da propriedade do dino no PvE; caso contrário, cada dinossauro pode ser reivindicado por qualquer jogador. Desativar decaimento de Dino PvP @@ -1784,10 +1829,14 @@ Se habilitado, QUALQUER PESSOA será capaz de cuidar de um Baby Dino (carinho etc), não apenas quem imprimiu nele. Auto destruir Dinos em decaimento Se habilitado, todos os dinossauros reivindicados com decaimento irão auto-destruir no carregamento, ao invés de tê-los permanecer como reivindicado. - Desativar Dino Domesticado + Ativar animação ao upar nível + Se desativado, os dinossauros domesticados ao subir de nível não executarão a animação. + Desativar Dino Domesticado Se ativado, todos os dinos domados não poderão ser usados. Desativar Domesticação de Dino Se ativado, todos os dinossauros selvagens não poderão ser domados. + Desativar Breeding Dino + Se ativado, impede a criação de dinos domesticados. Alterar Flyer Se ativado, permitirá que você altere os flyer para ser montados no mapa ou não; caso contrário, o padrão será usar as configurações do mapa. Ativar Flyer @@ -1812,6 +1861,7 @@ Mod Spawnavél Tamavél + Breedavel Substituir por Peso do Spawn Limite de Override @@ -1950,10 +2000,12 @@ - Estruturas + Estruturas Desativar Colisão de Estrutura Se habilitado, permitirá que os jogadores coloquem estruturas que se encaixam no terreno. - Resistência da estrutura: + Remover limite de estruturas decorativas + Remove o limite de 150 estruturas decorativas (bandeiras, letreiros, derme etc.). + Resistência da estrutura: Especifica o fator de escala para a resistência a estruturas de danos recebidas quando atacadas. Valores mais altos diminuem a resistência, aumentando o dano por ataque. Valores menores aumentam, reduzindo o dano por ataque. Dano de estrutura: Especifica o fator de escala para as estruturas de dano lidar com seus ataques (por exemplo, paredes cravadas). Valores mais altos aumentam o dano. Valores mais baixos diminuem. @@ -1978,8 +2030,6 @@ Ativar Decay de Estrutura PvE Se habilitado, habilita o decaimento das estruturas do jogador em PvE. - Período de decaimento da estrutura: - Especifica o tempo necessário para as estruturas do player decaírem no modo PvE. Multiplicador de Decaimento da Estrutura: Especifica o fator de escala para a taxa de decaimento das estruturas do player no modo PvE. @@ -2020,7 +2070,9 @@ Especifica a quantidade de tempo da duração da espera de coleta rápida, use 0 para desativar e fazer a coleta instantânea. Permitir Structures Plus Se ativado, adicionará todas as novas estruturas S +; caso contrário, desabilita todas as novas estruturas S + (destinadas principalmente a permitir que funcionários não oficiais que desejam continuar usando a versão mod S + continuem usando isso sem uma tonelada de estruturas duplicadas extras). - Desativar a construção em áreas de missão (Gênesis) + Desativar construção em áreas especiais + Se habilitado, poderá construir em áreas onde normalmente não é permitido, como ao redor dos Obeliscos de alguns mapas, no Portal de Aberration e nas áreas de Missão em Gênesis 1. Nota: No Gênesis 1 esta configuração está habilitada por padrão e há uma configuração ad hoc chamada bGenesisUseStructuresPreventionVolumes para desativá-lo. + Desativar a construção em áreas de missão (Gênesis) Se ativado, desabilitará a construção nas áreas de missão. @@ -2542,6 +2594,23 @@ Excluir item Salvar todas os supply crates Slvar supply crate + + + + Excluir ItemIDs de substituições Supply Crate + Excluir ItemIDs de Supply Crates + Excluir ItemIDs das configurações de substituição Supply Crates + NOTA: Se desejar gerenciar suas substituições manualmente ou com outro aplicativo, você pode desabilitar a opção que impedirá o gerenciador do servidor de gerenciar as substituições. Consulte as 'Opções de substituição personalizadas' nas configurações globais. + AVISO: Os itens desta lista serão excluídos dos Supply Crates. + + ItemID + Número do ID do item + + Adicionar ID do item + Excluir todos os ItemIDs + Colar dados de índices de itens excluídos + Excluir ItemID + Salvar dados de índices de itens excluídos From 7761d9b6cdf57db800490d836a5079af356cb70a Mon Sep 17 00:00:00 2001 From: Lacoi Date: Sat, 30 Sep 2023 14:39:55 +0200 Subject: [PATCH 02/10] asm: add new backup settings --- .../Globalization/en-US/en-US.xaml | 19 +++++- src/ARKServerManager/Lib/ServerProfile.cs | 62 +++++++++++++++++++ .../UserControls/ServerSettingsControl.xaml | 33 ++++++++-- 3 files changed, 107 insertions(+), 7 deletions(-) diff --git a/src/ARKServerManager/Globalization/en-US/en-US.xaml b/src/ARKServerManager/Globalization/en-US/en-US.xaml index f163e684..177770ce 100644 --- a/src/ARKServerManager/Globalization/en-US/en-US.xaml +++ b/src/ARKServerManager/Globalization/en-US/en-US.xaml @@ -1175,7 +1175,9 @@ Perform a manual world save. Restore... Restore a previous world save. - + Backup Quantity: + Set the max number of backup to keeps in the save folder. Whenever a new backup is created, the oldest ones will be deleted. Default value is 20. Since such backups take place every 2 hours and they are uncomprssed files, it is suggested to use more flexible third party solutions, especially with "big" saves. + Message of the Day The Message of the Day displayed to users when they connect to the server. Lines: @@ -1321,6 +1323,21 @@ If enabled, admin commands will be echoed to chat for admins only to see. Tribe Log Destroyed Enemy Structures If enabled, the enemy-structure destruction log (for the victim tribe) wil display the attacker tribe in the Tribe Logs, instead of a generic structure destruction message. + + Official Save Settings + New Save Game Format + The new save format (version 11) is used, which is approximately 4x faster and 50% smaller compared to "old save format" (version 8). +Deprecated since patch 244.6, the current default save format (version 9) is based on this. Use only if necessary (e.g.: the default save format fails as well the old save format). +This option must be used to start the Official 2023 Server Saves backups along with -usestore to correctly load tribe ownership. + Use Store + Same basic behaviour of official (non-legacy) servers on handling player characters data: character profile file (.arkprofile) is not saved separately from map save (.ark), nor its backup. +When necessary (e.g.: a character just transferred or a new character has been created) a temporary character profile file is created and kept until next world-save. +Tribe profiles are stored in a different format (.arktributetribe). Allows -BackupTransferPlayerDatas option (for fully mimic official servers save behaviour). +Use the option -converttostore to convert previous non stored data to stored data. This option must be used to correctly load the Official 2023 Server Saves backups along with -newsaveformat. + Backup Transfer Player Datas (Undocumented) + Fully mimic official (non-legacy) servers on handling player characters data, adding permanent character profile backup files separately from the world-save. +Requires -usestore option. This option must be used to fully re-enable character profile backups when playing the Official 2023 Server Saves backups. +Undocumented bye wildcard. Enable Web Alarms If enabled, servers can now get web notifications posted somewhere when important things happen to a tribe. diff --git a/src/ARKServerManager/Lib/ServerProfile.cs b/src/ARKServerManager/Lib/ServerProfile.cs index ce4821bd..34d432dd 100644 --- a/src/ARKServerManager/Lib/ServerProfile.cs +++ b/src/ARKServerManager/Lib/ServerProfile.cs @@ -455,6 +455,14 @@ namespace ServerManagerTool.Lib set { SetValue(AutoSavePeriodMinutesProperty, value); } } + public static readonly DependencyProperty MaxNumOfSaveBackupsProperty = DependencyProperty.Register(nameof(MaxNumOfSaveBackups), typeof(int), typeof(ServerProfile), new PropertyMetadata(20)); + [DataMember] + public int MaxNumOfSaveBackups + { + get { return (int)GetValue(MaxNumOfSaveBackupsProperty); } + set { SetValue(MaxNumOfSaveBackupsProperty, value); } + } + public static readonly DependencyProperty MOTDProperty = DependencyProperty.Register(nameof(MOTD), typeof(string), typeof(ServerProfile), new PropertyMetadata(String.Empty)); [IniFileEntry(IniFiles.GameUserSettings, IniSections.GUS_MessageOfTheDay, ServerProfileCategory.Administration, "Message", ClearSection = true, Multiline = true, QuotedString = QuotedStringType.Remove)] public string MOTD @@ -958,6 +966,30 @@ namespace ServerManagerTool.Lib get { return (bool)GetValue(LauncherArgsPrefixProperty); } set { SetValue(LauncherArgsPrefixProperty, value); } } + + public static readonly DependencyProperty NewSaveFormatProperty = DependencyProperty.Register(nameof(NewSaveFormat), typeof(bool), typeof(ServerProfile), new PropertyMetadata(false)); + [DataMember] + public bool NewSaveFormat + { + get { return (bool)GetValue(NewSaveFormatProperty); } + set { SetValue(NewSaveFormatProperty, value); } + } + + public static readonly DependencyProperty UseStoreProperty = DependencyProperty.Register(nameof(UseStore), typeof(bool), typeof(ServerProfile), new PropertyMetadata(false)); + [DataMember] + public bool UseStore + { + get { return (bool)GetValue(UseStoreProperty); } + set { SetValue(UseStoreProperty, value); } + } + + public static readonly DependencyProperty BackupTransferPlayerDatasProperty = DependencyProperty.Register(nameof(BackupTransferPlayerDatas), typeof(bool), typeof(ServerProfile), new PropertyMetadata(false)); + [DataMember] + public bool BackupTransferPlayerDatas + { + get { return (bool)GetValue(BackupTransferPlayerDatasProperty); } + set { SetValue(BackupTransferPlayerDatasProperty, value); } + } #endregion #region Automatic Management @@ -4371,6 +4403,26 @@ namespace ServerManagerTool.Lib serverArgs.Append(" -culture=").Append(this.Culture); } + if (this.NewSaveFormat) + { + serverArgs.Append(" -newsaveformat"); + } + + if (this.UseStore) + { + serverArgs.Append(" -usestore"); + } + + if (this.BackupTransferPlayerDatas) + { + serverArgs.Append(" -BackupTransferPlayerDatas"); + } + + if (this.MaxNumOfSaveBackups != 20) + { + serverArgs.Append(" -MaxNumOfSaveBackups=").Append(this.MaxNumOfSaveBackups); + } + return serverArgs.ToString(); } @@ -5683,6 +5735,7 @@ namespace ServerManagerTool.Lib this.ClearValue(ExtinctionEventUTCProperty); this.ClearValue(AutoSavePeriodMinutesProperty); + this.ClearValue(MaxNumOfSaveBackupsProperty); this.ClearValue(MOTDProperty); this.ClearValue(MOTDDurationProperty); @@ -5706,6 +5759,10 @@ namespace ServerManagerTool.Lib this.ClearValue(LauncherArgsOverrideProperty); this.ClearValue(LauncherArgsPrefixProperty); this.ClearValue(LauncherArgsProperty); + + this.ClearValue(NewSaveFormatProperty); + this.ClearValue(UseStoreProperty); + this.ClearValue(BackupTransferPlayerDatasProperty); } public void ResetChatAndNotificationSection() @@ -6286,6 +6343,7 @@ namespace ServerManagerTool.Lib } this.SetValue(AutoSavePeriodMinutesProperty, sourceProfile.AutoSavePeriodMinutes); + this.SetValue(MaxNumOfSaveBackupsProperty, sourceProfile.MaxNumOfSaveBackups); this.SetValue(EnableExtinctionEventProperty, sourceProfile.EnableExtinctionEvent); this.SetValue(ExtinctionEventTimeIntervalProperty, sourceProfile.ExtinctionEventTimeInterval); @@ -6365,6 +6423,10 @@ namespace ServerManagerTool.Lib //this.SetValue(LauncherArgsOverrideProperty, sourceProfile.LauncherArgsOverride); //this.SetValue(LauncherArgsPrefixProperty, sourceProfile.LauncherArgsPrefix); //this.SetValue(AdditionalArgsProperty, sourceProfile.AdditionalArgs); + + this.SetValue(NewSaveFormatProperty, sourceProfile.NewSaveFormat); + this.SetValue(UseStoreProperty, sourceProfile.UseStore); + this.SetValue(BackupTransferPlayerDatasProperty, sourceProfile.BackupTransferPlayerDatas); } private void SyncAutomaticManagement(ServerProfile sourceProfile) diff --git a/src/ARKServerManager/UserControls/ServerSettingsControl.xaml b/src/ARKServerManager/UserControls/ServerSettingsControl.xaml index adfc6a2e..f5ef5f87 100644 --- a/src/ARKServerManager/UserControls/ServerSettingsControl.xaml +++ b/src/ARKServerManager/UserControls/ServerSettingsControl.xaml @@ -863,6 +863,7 @@ + @@ -906,10 +907,29 @@ + - + + + + + + + + + + + + + + + + + + + @@ -990,7 +1010,7 @@ - + @@ -1006,7 +1026,7 @@ - + - + - + - + @@ -1582,6 +1602,7 @@ + From 961f52d3a629e76bd021b5371667f7ea8f022b3f Mon Sep 17 00:00:00 2001 From: Lacoi Date: Sat, 30 Sep 2023 14:41:34 +0200 Subject: [PATCH 03/10] asm update MaxTributeDinos & MaxTributeItems to more safer values --- src/ARKServerManager/UserControls/ServerSettingsControl.xaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ARKServerManager/UserControls/ServerSettingsControl.xaml b/src/ARKServerManager/UserControls/ServerSettingsControl.xaml index f5ef5f87..9703c6b6 100644 --- a/src/ARKServerManager/UserControls/ServerSettingsControl.xaml +++ b/src/ARKServerManager/UserControls/ServerSettingsControl.xaml @@ -1979,9 +1979,9 @@ - + - + From e7b742c60996df007c5ea347fb49e7c838c2ca38 Mon Sep 17 00:00:00 2001 From: Lacoi Date: Sun, 1 Oct 2023 20:23:04 +0200 Subject: [PATCH 04/10] asm: fix MutagenLevelBoost_Bred --- src/ARKServerManager/Lib/ServerProfile.cs | 20 +++++++------- .../UserControls/ServerSettingsControl.xaml | 26 +++++++++---------- .../ServerSettingsControl.xaml.cs | 2 +- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/ARKServerManager/Lib/ServerProfile.cs b/src/ARKServerManager/Lib/ServerProfile.cs index 34d432dd..5419c1e8 100644 --- a/src/ARKServerManager/Lib/ServerProfile.cs +++ b/src/ARKServerManager/Lib/ServerProfile.cs @@ -87,7 +87,7 @@ namespace ServerManagerTool.Lib this.PerLevelStatsMultiplier_DinoTamed_Add = new StatsMultiplierFloatArray(nameof(PerLevelStatsMultiplier_DinoTamed_Add), GameData.GetPerLevelStatsMultipliers_DinoTamedAdd, GameData.GetStatMultiplierInclusions_DinoTamedAdd(), true); this.PerLevelStatsMultiplier_DinoTamed_Affinity = new StatsMultiplierFloatArray(nameof(PerLevelStatsMultiplier_DinoTamed_Affinity), GameData.GetPerLevelStatsMultipliers_DinoTamedAffinity, GameData.GetStatMultiplierInclusions_DinoTamedAffinity(), true); this.MutagenLevelBoost = new StatsMultiplierIntegerArray(nameof(MutagenLevelBoost), GameData.GetPerLevelMutagenLevelBoost_DinoWild, GameData.GetMutagenLevelBoostInclusions_DinoWild(), true); - this.MutagenLevelBoostBred = new StatsMultiplierIntegerArray(nameof(MutagenLevelBoostBred), GameData.GetPerLevelMutagenLevelBoost_DinoTamed, GameData.GetMutagenLevelBoostInclusions_DinoTamed(), true); + this.MutagenLevelBoost_Bred = new StatsMultiplierIntegerArray(nameof(MutagenLevelBoost_Bred), GameData.GetPerLevelMutagenLevelBoost_DinoTamed, GameData.GetMutagenLevelBoostInclusions_DinoTamed(), true); this.HarvestResourceItemAmountClassMultipliers = new ResourceClassMultiplierList(nameof(HarvestResourceItemAmountClassMultipliers), GameData.GetResourceMultipliers); @@ -2821,12 +2821,12 @@ namespace ServerManagerTool.Lib set { SetValue(MutagenLevelBoostProperty, value); } } - public static readonly DependencyProperty MutagenLevelBoostBredProperty = DependencyProperty.Register(nameof(MutagenLevelBoostBred), typeof(StatsMultiplierIntegerArray), typeof(ServerProfile), new PropertyMetadata(null)); + public static readonly DependencyProperty MutagenLevelBoost_BredProperty = DependencyProperty.Register(nameof(MutagenLevelBoost_Bred), typeof(StatsMultiplierIntegerArray), typeof(ServerProfile), new PropertyMetadata(null)); [IniFileEntry(IniFiles.Game, IniSections.Game_ShooterGameMode, ServerProfileCategory.Dinos)] - public StatsMultiplierIntegerArray MutagenLevelBoostBred + public StatsMultiplierIntegerArray MutagenLevelBoost_Bred { - get { return (StatsMultiplierIntegerArray)GetValue(MutagenLevelBoostBredProperty); } - set { SetValue(MutagenLevelBoostBredProperty, value); } + get { return (StatsMultiplierIntegerArray)GetValue(MutagenLevelBoost_BredProperty); } + set { SetValue(MutagenLevelBoost_BredProperty, value); } } public static readonly DependencyProperty DinoSpawnsProperty = DependencyProperty.Register(nameof(DinoSpawnWeightMultipliers), typeof(AggregateIniValueList), typeof(ServerProfile), new PropertyMetadata(null)); @@ -3944,7 +3944,7 @@ namespace ServerManagerTool.Lib settings.PerLevelStatsMultiplier_DinoTamed_Affinity.Reset(); settings.PerLevelStatsMultiplier_DinoWild.Reset(); settings.MutagenLevelBoost.Reset(); - settings.MutagenLevelBoostBred.Reset(); + settings.MutagenLevelBoost_Bred.Reset(); settings.PerLevelStatsMultiplier_Player.Reset(); settings.PlayerBaseStatMultipliers.Reset(); settings.LoadServerFiles(true, true, true); @@ -5858,7 +5858,7 @@ namespace ServerManagerTool.Lib this.PerLevelStatsMultiplier_DinoTamed_Add = new StatsMultiplierFloatArray(nameof(PerLevelStatsMultiplier_DinoTamed_Add), GameData.GetPerLevelStatsMultipliers_DinoTamedAdd, GameData.GetStatMultiplierInclusions_DinoTamedAdd(), true); this.PerLevelStatsMultiplier_DinoTamed_Affinity = new StatsMultiplierFloatArray(nameof(PerLevelStatsMultiplier_DinoTamed_Affinity), GameData.GetPerLevelStatsMultipliers_DinoTamedAffinity, GameData.GetStatMultiplierInclusions_DinoTamedAffinity(), true); this.MutagenLevelBoost = new StatsMultiplierIntegerArray(nameof(MutagenLevelBoost), GameData.GetPerLevelMutagenLevelBoost_DinoWild, GameData.GetMutagenLevelBoostInclusions_DinoWild(), true); - this.MutagenLevelBoostBred = new StatsMultiplierIntegerArray(nameof(MutagenLevelBoostBred), GameData.GetPerLevelMutagenLevelBoost_DinoTamed, GameData.GetMutagenLevelBoostInclusions_DinoTamed(), true); + this.MutagenLevelBoost_Bred = new StatsMultiplierIntegerArray(nameof(MutagenLevelBoost_Bred), GameData.GetPerLevelMutagenLevelBoost_DinoTamed, GameData.GetMutagenLevelBoostInclusions_DinoTamed(), true); this.DinoSpawnWeightMultipliers = new AggregateIniValueList(nameof(DinoSpawnWeightMultipliers), GameData.GetDinoSpawns); this.PreventDinoTameClassNames = new StringIniValueList(nameof(PreventDinoTameClassNames), () => new string[0]); @@ -6593,9 +6593,9 @@ namespace ServerManagerTool.Lib this.MutagenLevelBoost.FromIniValues(sourceProfile.MutagenLevelBoost.ToIniValues()); this.MutagenLevelBoost.IsEnabled = sourceProfile.MutagenLevelBoost.IsEnabled; - this.MutagenLevelBoostBred = new StatsMultiplierIntegerArray(nameof(MutagenLevelBoostBred), GameData.GetPerLevelMutagenLevelBoost_DinoTamed, GameData.GetMutagenLevelBoostInclusions_DinoTamed(), true); - this.MutagenLevelBoostBred.FromIniValues(sourceProfile.MutagenLevelBoostBred.ToIniValues()); - this.MutagenLevelBoostBred.IsEnabled = sourceProfile.MutagenLevelBoostBred.IsEnabled; + this.MutagenLevelBoost_Bred = new StatsMultiplierIntegerArray(nameof(MutagenLevelBoost_Bred), GameData.GetPerLevelMutagenLevelBoost_DinoTamed, GameData.GetMutagenLevelBoostInclusions_DinoTamed(), true); + this.MutagenLevelBoost_Bred.FromIniValues(sourceProfile.MutagenLevelBoost_Bred.ToIniValues()); + this.MutagenLevelBoost_Bred.IsEnabled = sourceProfile.MutagenLevelBoost_Bred.IsEnabled; sourceProfile.DinoSettings.RenderToModel(); diff --git a/src/ARKServerManager/UserControls/ServerSettingsControl.xaml b/src/ARKServerManager/UserControls/ServerSettingsControl.xaml index 9703c6b6..7a7053ea 100644 --- a/src/ARKServerManager/UserControls/ServerSettingsControl.xaml +++ b/src/ARKServerManager/UserControls/ServerSettingsControl.xaml @@ -3239,7 +3239,7 @@ - + @@ -3253,20 +3253,20 @@ - - - - - - + + + + + + - - - - - - + + + + + + diff --git a/src/ARKServerManager/UserControls/ServerSettingsControl.xaml.cs b/src/ARKServerManager/UserControls/ServerSettingsControl.xaml.cs index ceaee7f0..1ef7aad2 100644 --- a/src/ARKServerManager/UserControls/ServerSettingsControl.xaml.cs +++ b/src/ARKServerManager/UserControls/ServerSettingsControl.xaml.cs @@ -4435,7 +4435,7 @@ namespace ServerManagerTool break; case ServerSettingsResetAction.DinoBredMutagenLevelBoost: - this.Settings.MutagenLevelBoostBred.Reset(); + this.Settings.MutagenLevelBoost_Bred.Reset(); break; case ServerSettingsResetAction.ItemStatClamps: From 8e8b774127a6875b53ec2adc15346719fab2fe35 Mon Sep 17 00:00:00 2001 From: Lacoi Date: Wed, 11 Oct 2023 15:22:11 +0200 Subject: [PATCH 05/10] asm: PersonalTamedDinosSaddleStructureCost could be zero --- src/ARKServerManager/UserControls/ServerSettingsControl.xaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ARKServerManager/UserControls/ServerSettingsControl.xaml b/src/ARKServerManager/UserControls/ServerSettingsControl.xaml index 7a7053ea..54bb60c5 100644 --- a/src/ARKServerManager/UserControls/ServerSettingsControl.xaml +++ b/src/ARKServerManager/UserControls/ServerSettingsControl.xaml @@ -2615,7 +2615,7 @@ - + From 466af960ae70ff022a175108da927ca784c514f3 Mon Sep 17 00:00:00 2001 From: Lacoi Date: Wed, 11 Oct 2023 15:34:48 +0200 Subject: [PATCH 06/10] asm: changelog --- src/ARKServerManager/VersionFeed.xml | 34 +++++++++++++- src/ARKServerManager/VersionFeedBeta.xml | 56 +++++------------------- 2 files changed, 44 insertions(+), 46 deletions(-) diff --git a/src/ARKServerManager/VersionFeed.xml b/src/ARKServerManager/VersionFeed.xml index c5e1d3d8..d73cd69d 100644 --- a/src/ARKServerManager/VersionFeed.xml +++ b/src/ARKServerManager/VersionFeed.xml @@ -5,7 +5,39 @@ Ark Server Manager Version Feed This is the Ark Server Manager release version feed. - 2023-08-26T00:00:00Z + 2023-10-11T00:00:00Z + + + + 1.1.445 (1.1.445.1) + 1.1.445.1 + + 2023-10-11T00:00:00Z + +
+

+ BUGFIX +
+

    +
  • Dino Settings - fix Mutagen Level Boost (Bred)
  • +
+ CHANGE +
+
    +
  • Administration - add savegame settings for official backups
  • +
  • Administration - add max backup quantity for ark auto saves
  • +
  • Rules - change MaxTributeDinos and MaxTributeItems to safer max values
  • +
  • Dino Settings - PersonalTamedDinosSaddleStructureCost could be zero
  • +
  • pt-BR Translation file updated.
  • +
+

+
+
+ + Lacoi + + +
urn:uuid:BD58740F-8C66-4B21-B73D-22BF191590AA diff --git a/src/ARKServerManager/VersionFeedBeta.xml b/src/ARKServerManager/VersionFeedBeta.xml index f678b5dd..d4d17808 100644 --- a/src/ARKServerManager/VersionFeedBeta.xml +++ b/src/ARKServerManager/VersionFeedBeta.xml @@ -5,64 +5,30 @@ Ark Server Manager Version Feed This is the Ark Server Manager beta version feed. - 2023-08-26T00:00:00Z + 2023-10-11T00:00:00Z - urn:uuid:B4BD7D87-5A36-481F-827F-52C0E293A6B1 - 1.1.444 (1.1.444.2) - 1.1.444.2 + + 1.1.445 (1.1.445.1) + 1.1.445.1 - 2023-08-26T00:00:00Z - -
-

- CHANGE -
-

    -
  • pt-BR Translation file updated.
  • -
  • ru-RU Translation file updated.
  • -
  • zh-CN Translation file updated.
  • -
-

-
-
- - bletch - bletch1971@hotmail.com - -
- - - urn:uuid:BD58740F-8C66-4B21-B73D-22BF191590AA - 1.1.444 (1.1.444.1) - 1.1.444.1 - - 2023-08-21T00:00:00Z + 2023-10-11T00:00:00Z

BUGFIX

    -
  • Chat and Notifications - fix setting for "Enable 'Player Joined' Notifications"
  • +
  • Dino Settings - fix Mutagen Level Boost (Bred)
CHANGE
    -
  • ASM Options - add setting to reenable ModIDs, CluserID and AutoShutdown Timer sync
  • -
  • Global - remove deprecated settings.
  • -
  • Global - add global info, if Steam WebApiKey is missing.
  • -
  • Administration - remove CluserID from profile sync.
  • -
  • Administration - add settings: CustomDynamicConfigUrl, CustomLiveTuningUrl, UseStructureStasisGrid, Culture
  • -
  • Administration - change default value for MaxTribeLogs
  • -
  • Automatic Management - remove AutoShutdown Timer from profile sync.
  • -
  • Rules - add settings: AllowCaveBuildingPvP, DisableRailgunPVP, DisableCustomFoldersInTributeInventories, AdjustableMutagenSpawnDelayMultiplier, bUseSingleplayerSettings
  • -
  • Rules - change default value for MaxTributeDinos, GlobalPoweredBatteryDurabilityDecreasePerSecond, MaxHexagonsPerCharacter
  • -
  • Structures - add settings: IgnoreLimitMaxStructuresInRangeTypeFlag, bIgnoreStructuresPreventionVolumes
  • -
  • Dino Settings - add settings: DisableDinoBreeding, AllowUnclaimDinos, PreventBreedingForClassNames, UseDinoLevelUpAnimations
  • -
  • Dino Settings - change default value for MaxTamedDinos
  • -
  • Exclude ItemIDs From Supply Crate Overrides - add new section
  • -
  • WorldSaveRestore - add file size
  • +
  • Administration - add savegame settings for official backups
  • +
  • Administration - add max backup quantity for ark auto saves
  • +
  • Rules - change MaxTributeDinos and MaxTributeItems to safer max values
  • +
  • Dino Settings - PersonalTamedDinosSaddleStructureCost could be zero
  • +
  • pt-BR Translation file updated.

From c9e6f2ec2689d64422a7ef751bc6cd321eec3b1b Mon Sep 17 00:00:00 2001 From: Lacoi Date: Fri, 13 Oct 2023 15:24:12 +0200 Subject: [PATCH 07/10] asm: add rcon player menu option to kick, ban or unban player --- .../Globalization/en-US/en-US.xaml | 3 ++ src/ARKServerManager/Lib/ServerRCON.cs | 3 ++ src/ARKServerManager/Windows/RCONWindow.xaml | 5 ++ .../Windows/RCONWindow.xaml.cs | 51 +++++++++++++++++++ 4 files changed, 62 insertions(+) diff --git a/src/ARKServerManager/Globalization/en-US/en-US.xaml b/src/ARKServerManager/Globalization/en-US/en-US.xaml index 177770ce..dfa71a9e 100644 --- a/src/ARKServerManager/Globalization/en-US/en-US.xaml +++ b/src/ARKServerManager/Globalization/en-US/en-US.xaml @@ -2723,6 +2723,9 @@ Undocumented bye wildcard. View Tribe... Copy ID... Copy Player ID... + Kick Player + Ban Player + Unban Player Admin Name: This is the name used to prefix serverchat messages sent from the console. diff --git a/src/ARKServerManager/Lib/ServerRCON.cs b/src/ARKServerManager/Lib/ServerRCON.cs index aae38a27..3a862bb6 100644 --- a/src/ARKServerManager/Lib/ServerRCON.cs +++ b/src/ARKServerManager/Lib/ServerRCON.cs @@ -33,6 +33,9 @@ namespace ServerManagerTool.Lib public const string RCON_COMMAND_GETCHAT = "getchat"; public const string RCON_COMMAND_SERVERCHAT = "serverchat"; public const string RCON_COMMAND_WILDDINOWIPE = "DestroyWildDinos"; + public const string RCON_COMMAND_KICKPLAYER = "KickPlayer"; + public const string RCON_COMMAND_BANPLAYER = "BanPlayer"; + public const string RCON_COMMAND_UNBANPLAYER = "UnbanPlayer"; public event EventHandler PlayersCollectionUpdated; diff --git a/src/ARKServerManager/Windows/RCONWindow.xaml b/src/ARKServerManager/Windows/RCONWindow.xaml index 5b41b84e..f2bb551b 100644 --- a/src/ARKServerManager/Windows/RCONWindow.xaml +++ b/src/ARKServerManager/Windows/RCONWindow.xaml @@ -197,6 +197,11 @@ + + + + + diff --git a/src/ARKServerManager/Windows/RCONWindow.xaml.cs b/src/ARKServerManager/Windows/RCONWindow.xaml.cs index efd139bc..9128ae74 100644 --- a/src/ARKServerManager/Windows/RCONWindow.xaml.cs +++ b/src/ARKServerManager/Windows/RCONWindow.xaml.cs @@ -645,6 +645,57 @@ namespace ServerManagerTool } } + + public ICommand KickPlayerProfileCommand + { + get + { + return new RelayCommand( + execute: (player) => + { + if (player.PlayerData != null) + { + this.ServerRCON.IssueCommand($"{ServerRcon.RCON_COMMAND_KICKPLAYER} {player.PlayerId.ToString()}"); + } + }, + canExecute: (player) => player != null + ); + } + } + + public ICommand BanPlayerProfileCommand + { + get + { + return new RelayCommand( + execute: (player) => + { + if (player.PlayerData != null) + { + this.ServerRCON.IssueCommand($"{ServerRcon.RCON_COMMAND_BANPLAYER} {player.PlayerId.ToString()}"); + } + }, + canExecute: (player) => player != null + ); + } + } + + public ICommand UnbanPlayerProfileCommand + { + get + { + return new RelayCommand( + execute: (player) => + { + if (player.PlayerData != null) + { + this.ServerRCON.IssueCommand($"{ServerRcon.RCON_COMMAND_UNBANPLAYER} {player.PlayerId.ToString()}"); + } + }, + canExecute: (player) => player != null + ); + } + } #endregion #region Events From 70ed633bc0d74e435f95ad060b7f9feda3011ad2 Mon Sep 17 00:00:00 2001 From: Lacoi Date: Fri, 3 Nov 2023 16:13:34 +0100 Subject: [PATCH 08/10] asm: add NewYear setting --- src/ARKServerManager/Lib/ServerProfile.cs | 35 +++++++++++++ .../UserControls/ServerSettingsControl.xaml | 49 ++++++++++++++++++- .../Converters/DateTimeToStringConverter.cs | 35 +++++++++++++ .../DateTimeValidationRules.cs | 40 +++++++++++++++ 4 files changed, 158 insertions(+), 1 deletion(-) create mode 100644 src/ServerManager.Common/Converters/DateTimeToStringConverter.cs create mode 100644 src/ServerManager.Common/ValidationRules/DateTimeValidationRules.cs diff --git a/src/ARKServerManager/Lib/ServerProfile.cs b/src/ARKServerManager/Lib/ServerProfile.cs index 5419c1e8..f03a05d5 100644 --- a/src/ARKServerManager/Lib/ServerProfile.cs +++ b/src/ARKServerManager/Lib/ServerProfile.cs @@ -1228,6 +1228,22 @@ namespace ServerManagerTool.Lib get { return (float)GetValue(EventColorsChanceOverrideProperty); } set { SetValue(EventColorsChanceOverrideProperty, value); } } + + public static readonly DependencyProperty NewYear1UTCProperty = DependencyProperty.Register(nameof(NewYear1UTC), typeof(DateTime), typeof(ServerProfile), new PropertyMetadata(DateTime.MinValue)); + [DataMember] + public DateTime NewYear1UTC + { + get { return (DateTime)GetValue(NewYear1UTCProperty); } + set { SetValue(NewYear1UTCProperty, value); } + } + + public static readonly DependencyProperty NewYear2UTCProperty = DependencyProperty.Register(nameof(NewYear2UTC), typeof(DateTime), typeof(ServerProfile), new PropertyMetadata(DateTime.MinValue)); + [DataMember] + public DateTime NewYear2UTC + { + get { return (DateTime)GetValue(NewYear2UTCProperty); } + set { SetValue(NewYear2UTCProperty, value); } + } #endregion #region Rules @@ -4116,6 +4132,16 @@ namespace ServerManagerTool.Lib serverArgs.Append("?EventColorsChanceOverride=").Append(this.EventColorsChanceOverride); } + if (this.NewYear1UTC != DateTime.MinValue) + { + serverArgs.Append("?NewYear1UTC=").Append((new DateTimeOffset(this.NewYear1UTC.ToUniversalTime())).ToUnixTimeSeconds().ToString()); + } + + if (this.NewYear2UTC != DateTime.MinValue) + { + serverArgs.Append("?NewYear2UTC=").Append((new DateTimeOffset(this.NewYear2UTC.ToUniversalTime())).ToUnixTimeSeconds().ToString()); + } + if (!string.IsNullOrWhiteSpace(this.AdditionalArgs)) { var addArgs = this.AdditionalArgs.TrimStart(); @@ -4423,6 +4449,11 @@ namespace ServerManagerTool.Lib serverArgs.Append(" -MaxNumOfSaveBackups=").Append(this.MaxNumOfSaveBackups); } + if (this.NewYear1UTC != DateTime.MinValue || this.NewYear2UTC != DateTime.MinValue) + { + serverArgs.Append(" -NewYearEvent"); + } + return serverArgs.ToString(); } @@ -6136,6 +6167,8 @@ namespace ServerManagerTool.Lib this.ClearValue(EventNameProperty); this.ClearValue(EventColorsChanceOverrideProperty); + this.ClearValue(NewYear1UTCProperty); + this.ClearValue(NewYear2UTCProperty); } public void ResetSOTFSection() @@ -6923,6 +6956,8 @@ namespace ServerManagerTool.Lib this.SetValue(EventNameProperty, sourceProfile.EventName); this.SetValue(EventColorsChanceOverrideProperty, sourceProfile.EventColorsChanceOverride); + this.SetValue(NewYear1UTCProperty, sourceProfile.NewYear1UTC); + this.SetValue(NewYear2UTCProperty, sourceProfile.NewYear2UTC); } private void SyncServerFiles(ServerProfile sourceProfile) diff --git a/src/ARKServerManager/UserControls/ServerSettingsControl.xaml b/src/ARKServerManager/UserControls/ServerSettingsControl.xaml index 54bb60c5..43b6cd31 100644 --- a/src/ARKServerManager/UserControls/ServerSettingsControl.xaml +++ b/src/ARKServerManager/UserControls/ServerSettingsControl.xaml @@ -1817,6 +1817,7 @@ + @@ -1832,7 +1833,53 @@ - +
diff --git a/src/ServerManager.Common/Converters/DateTimeToStringConverter.cs b/src/ServerManager.Common/Converters/DateTimeToStringConverter.cs new file mode 100644 index 00000000..cdcfa2aa --- /dev/null +++ b/src/ServerManager.Common/Converters/DateTimeToStringConverter.cs @@ -0,0 +1,35 @@ +using System; +using System.Globalization; +using System.Windows.Data; +using System.Windows.Markup; + +namespace ServerManagerTool.Common.Converters +{ + public class DateTimeToStringConverter : MarkupExtension, IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + DateTime datetime = (DateTime)value; + if (datetime == DateTime.MinValue) + return ""; + + return datetime.ToString("yyyy.MM.dd HH:mm:ss"); + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value is null || value.ToString() == string.Empty) + return DateTime.MinValue; + + if (!DateTime.TryParse(value.ToString(), out DateTime datetime)) + return DateTime.MinValue; + + return datetime; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } + } +} \ No newline at end of file diff --git a/src/ServerManager.Common/ValidationRules/DateTimeValidationRules.cs b/src/ServerManager.Common/ValidationRules/DateTimeValidationRules.cs new file mode 100644 index 00000000..92ef0446 --- /dev/null +++ b/src/ServerManager.Common/ValidationRules/DateTimeValidationRules.cs @@ -0,0 +1,40 @@ +using ServerManagerTool.Common.Extensions; +using System; +using System.Windows.Controls; + +namespace ServerManagerTool.Common.ValidationRules +{ + public class DateTimeValidationRule : ValidationRule + { + private static readonly DateTime MinUnixDate = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc); + private static readonly DateTime MaxUnixDate = new DateTime(2038, 1, 19, 3, 14, 7, 0, DateTimeKind.Utc); + + public override ValidationResult Validate(object value, System.Globalization.CultureInfo cultureInfo) + { + string strDateTime = (string)value; + + if (strDateTime.IsEmpty()) + { + return new ValidationResult(true, null); + } + + if (!DateTime.TryParse(strDateTime, out DateTime datetime)) + { + return new ValidationResult(false, "Invalid Date. Date must be formatted as yyyy.mm.dd hh:mm:ss"); + } + + if (datetime.ToUniversalTime() <= MinUnixDate) + { + return new ValidationResult(false, $"Invalid Date. The Date must be after {MinUnixDate.ToLocalTime().ToString("yyyy.MM.dd HH:mm:ss")}"); + } + + if (datetime.ToUniversalTime() >= MaxUnixDate) + { + return new ValidationResult(false, $"Invalid Date. The Date must be before {MaxUnixDate.ToLocalTime().ToString("yyyy.MM.dd HH:mm:ss")}"); + } + + + return new ValidationResult(true, null); + } + } +} From a14ee7c108e088e1cfe0abdd8317fd83647f0931 Mon Sep 17 00:00:00 2001 From: Lacoi Date: Sat, 4 Nov 2023 12:38:53 +0100 Subject: [PATCH 09/10] asm: update NewYear to nullable value --- src/ARKServerManager/Lib/ServerProfile.cs | 38 +++++++++---------- .../UserControls/ServerSettingsControl.xaml | 4 +- ...s => NullableDateTimeToStringConverter.cs} | 18 ++++----- .../DateTimeValidationRules.cs | 5 +-- 4 files changed, 32 insertions(+), 33 deletions(-) rename src/ServerManager.Common/Converters/{DateTimeToStringConverter.cs => NullableDateTimeToStringConverter.cs} (54%) diff --git a/src/ARKServerManager/Lib/ServerProfile.cs b/src/ARKServerManager/Lib/ServerProfile.cs index f03a05d5..93f76c22 100644 --- a/src/ARKServerManager/Lib/ServerProfile.cs +++ b/src/ARKServerManager/Lib/ServerProfile.cs @@ -1229,19 +1229,19 @@ namespace ServerManagerTool.Lib set { SetValue(EventColorsChanceOverrideProperty, value); } } - public static readonly DependencyProperty NewYear1UTCProperty = DependencyProperty.Register(nameof(NewYear1UTC), typeof(DateTime), typeof(ServerProfile), new PropertyMetadata(DateTime.MinValue)); + public static readonly DependencyProperty NewYear1UTCProperty = DependencyProperty.Register(nameof(NewYear1UTC), typeof(NullableValue), typeof(ServerProfile), new PropertyMetadata(new NullableValue())); [DataMember] - public DateTime NewYear1UTC + public NullableValue NewYear1UTC { - get { return (DateTime)GetValue(NewYear1UTCProperty); } + get { return (NullableValue)GetValue(NewYear1UTCProperty); } set { SetValue(NewYear1UTCProperty, value); } } - public static readonly DependencyProperty NewYear2UTCProperty = DependencyProperty.Register(nameof(NewYear2UTC), typeof(DateTime), typeof(ServerProfile), new PropertyMetadata(DateTime.MinValue)); + public static readonly DependencyProperty NewYear2UTCProperty = DependencyProperty.Register(nameof(NewYear2UTC), typeof(NullableValue), typeof(ServerProfile), new PropertyMetadata(new NullableValue())); [DataMember] - public DateTime NewYear2UTC + public NullableValue NewYear2UTC { - get { return (DateTime)GetValue(NewYear2UTCProperty); } + get { return (NullableValue)GetValue(NewYear2UTCProperty); } set { SetValue(NewYear2UTCProperty, value); } } #endregion @@ -4131,17 +4131,17 @@ namespace ServerManagerTool.Lib { serverArgs.Append("?EventColorsChanceOverride=").Append(this.EventColorsChanceOverride); } - - if (this.NewYear1UTC != DateTime.MinValue) + + if (this.NewYear1UTC.HasValue) { - serverArgs.Append("?NewYear1UTC=").Append((new DateTimeOffset(this.NewYear1UTC.ToUniversalTime())).ToUnixTimeSeconds().ToString()); + serverArgs.Append("?NewYear1UTC=").Append((new DateTimeOffset(this.NewYear1UTC.Value.ToUniversalTime())).ToUnixTimeSeconds().ToString()); } - if (this.NewYear2UTC != DateTime.MinValue) + if (this.NewYear2UTC.HasValue) { - serverArgs.Append("?NewYear2UTC=").Append((new DateTimeOffset(this.NewYear2UTC.ToUniversalTime())).ToUnixTimeSeconds().ToString()); + serverArgs.Append("?NewYear2UTC=").Append((new DateTimeOffset(this.NewYear2UTC.Value.ToUniversalTime())).ToUnixTimeSeconds().ToString()); } - + if (!string.IsNullOrWhiteSpace(this.AdditionalArgs)) { var addArgs = this.AdditionalArgs.TrimStart(); @@ -4448,12 +4448,12 @@ namespace ServerManagerTool.Lib { serverArgs.Append(" -MaxNumOfSaveBackups=").Append(this.MaxNumOfSaveBackups); } - - if (this.NewYear1UTC != DateTime.MinValue || this.NewYear2UTC != DateTime.MinValue) + + if (this.NewYear1UTC.HasValue || this.NewYear2UTC.HasValue) { serverArgs.Append(" -NewYearEvent"); } - + return serverArgs.ToString(); } @@ -6167,8 +6167,8 @@ namespace ServerManagerTool.Lib this.ClearValue(EventNameProperty); this.ClearValue(EventColorsChanceOverrideProperty); - this.ClearValue(NewYear1UTCProperty); - this.ClearValue(NewYear2UTCProperty); + this.ClearNullableValue(NewYear1UTCProperty); + this.ClearNullableValue(NewYear2UTCProperty); } public void ResetSOTFSection() @@ -6956,8 +6956,8 @@ namespace ServerManagerTool.Lib this.SetValue(EventNameProperty, sourceProfile.EventName); this.SetValue(EventColorsChanceOverrideProperty, sourceProfile.EventColorsChanceOverride); - this.SetValue(NewYear1UTCProperty, sourceProfile.NewYear1UTC); - this.SetValue(NewYear2UTCProperty, sourceProfile.NewYear2UTC); + this.SetNullableValue(NewYear1UTCProperty, sourceProfile.NewYear1UTC); + this.SetNullableValue(NewYear2UTCProperty, sourceProfile.NewYear2UTC); } private void SyncServerFiles(ServerProfile sourceProfile) diff --git a/src/ARKServerManager/UserControls/ServerSettingsControl.xaml b/src/ARKServerManager/UserControls/ServerSettingsControl.xaml index 43b6cd31..679b9f6b 100644 --- a/src/ARKServerManager/UserControls/ServerSettingsControl.xaml +++ b/src/ARKServerManager/UserControls/ServerSettingsControl.xaml @@ -1847,7 +1847,7 @@ - + @@ -1870,7 +1870,7 @@ - + diff --git a/src/ServerManager.Common/Converters/DateTimeToStringConverter.cs b/src/ServerManager.Common/Converters/NullableDateTimeToStringConverter.cs similarity index 54% rename from src/ServerManager.Common/Converters/DateTimeToStringConverter.cs rename to src/ServerManager.Common/Converters/NullableDateTimeToStringConverter.cs index cdcfa2aa..294267af 100644 --- a/src/ServerManager.Common/Converters/DateTimeToStringConverter.cs +++ b/src/ServerManager.Common/Converters/NullableDateTimeToStringConverter.cs @@ -1,30 +1,30 @@ -using System; +using ServerManagerTool.Common.Model; +using System; using System.Globalization; using System.Windows.Data; using System.Windows.Markup; namespace ServerManagerTool.Common.Converters { - public class DateTimeToStringConverter : MarkupExtension, IValueConverter + public class NullableDateTimeToStringConverter : MarkupExtension, IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { - DateTime datetime = (DateTime)value; - if (datetime == DateTime.MinValue) - return ""; + if (value != null && value is NullableValue && ((NullableValue)value).Value != DateTime.MinValue) + return ((NullableValue)value).Value.ToString("yyyy.MM.dd HH:mm:ss"); - return datetime.ToString("yyyy.MM.dd HH:mm:ss"); + return ""; } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { if (value is null || value.ToString() == string.Empty) - return DateTime.MinValue; + return (new NullableValue()); if (!DateTime.TryParse(value.ToString(), out DateTime datetime)) - return DateTime.MinValue; + return (new NullableValue()); - return datetime; + return (new NullableValue(datetime)); } public override object ProvideValue(IServiceProvider serviceProvider) diff --git a/src/ServerManager.Common/ValidationRules/DateTimeValidationRules.cs b/src/ServerManager.Common/ValidationRules/DateTimeValidationRules.cs index 92ef0446..8e1f6505 100644 --- a/src/ServerManager.Common/ValidationRules/DateTimeValidationRules.cs +++ b/src/ServerManager.Common/ValidationRules/DateTimeValidationRules.cs @@ -23,17 +23,16 @@ namespace ServerManagerTool.Common.ValidationRules return new ValidationResult(false, "Invalid Date. Date must be formatted as yyyy.mm.dd hh:mm:ss"); } - if (datetime.ToUniversalTime() <= MinUnixDate) + if (datetime.ToUniversalTime() < MinUnixDate) { return new ValidationResult(false, $"Invalid Date. The Date must be after {MinUnixDate.ToLocalTime().ToString("yyyy.MM.dd HH:mm:ss")}"); } - if (datetime.ToUniversalTime() >= MaxUnixDate) + if (datetime.ToUniversalTime() > MaxUnixDate) { return new ValidationResult(false, $"Invalid Date. The Date must be before {MaxUnixDate.ToLocalTime().ToString("yyyy.MM.dd HH:mm:ss")}"); } - return new ValidationResult(true, null); } } From 4f6651494ec34906bd095485aaed3550e474dfa0 Mon Sep 17 00:00:00 2001 From: Lacoi Date: Sat, 4 Nov 2023 12:44:54 +0100 Subject: [PATCH 10/10] asm: update changelog --- src/ARKServerManager/Globalization/en-US/en-US.xaml | 4 ++++ src/ARKServerManager/VersionFeed.xml | 6 ++++-- src/ARKServerManager/VersionFeedBeta.xml | 6 ++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/ARKServerManager/Globalization/en-US/en-US.xaml b/src/ARKServerManager/Globalization/en-US/en-US.xaml index dfa71a9e..5ac076fd 100644 --- a/src/ARKServerManager/Globalization/en-US/en-US.xaml +++ b/src/ARKServerManager/Globalization/en-US/en-US.xaml @@ -1429,6 +1429,10 @@ Undocumented bye wildcard. The name of the event to enable (leave blank to disable the event). Dino Color Chance: Dino event color chance. + New Year Event 1: + The New Year Date must be entered as "yyyy.mm.dd hh:mm:ss" (though other formats are recognized and changed to this format). ASM will automatically convert the date to the value required by the game. + New Year Event 2: + The New Year Date must be entered as "yyyy.mm.dd hh:mm:ss" (though other formats are recognized and changed to this format). ASM will automatically convert the date to the value required by the game. diff --git a/src/ARKServerManager/VersionFeed.xml b/src/ARKServerManager/VersionFeed.xml index d73cd69d..a4e185d5 100644 --- a/src/ARKServerManager/VersionFeed.xml +++ b/src/ARKServerManager/VersionFeed.xml @@ -5,14 +5,14 @@ Ark Server Manager Version Feed This is the Ark Server Manager release version feed. - 2023-10-11T00:00:00Z + 2023-11-04T00:00:00Z 1.1.445 (1.1.445.1) 1.1.445.1 - 2023-10-11T00:00:00Z + 2023-11-04T00:00:00Z

@@ -24,8 +24,10 @@ CHANGE

    +
  • RCON - add player menu options to kick, ban or unban a player
  • Administration - add savegame settings for official backups
  • Administration - add max backup quantity for ark auto saves
  • +
  • Server Details - add NewYear Event Settings
  • Rules - change MaxTributeDinos and MaxTributeItems to safer max values
  • Dino Settings - PersonalTamedDinosSaddleStructureCost could be zero
  • pt-BR Translation file updated.
  • diff --git a/src/ARKServerManager/VersionFeedBeta.xml b/src/ARKServerManager/VersionFeedBeta.xml index d4d17808..8abb0b55 100644 --- a/src/ARKServerManager/VersionFeedBeta.xml +++ b/src/ARKServerManager/VersionFeedBeta.xml @@ -5,14 +5,14 @@ Ark Server Manager Version Feed This is the Ark Server Manager beta version feed. - 2023-10-11T00:00:00Z + 2023-11-04T00:00:00Z 1.1.445 (1.1.445.1) 1.1.445.1 - 2023-10-11T00:00:00Z + 2023-11-04T00:00:00Z

    @@ -24,8 +24,10 @@ CHANGE

      +
    • RCON - add player menu options to kick, ban or unban a player
    • Administration - add savegame settings for official backups
    • Administration - add max backup quantity for ark auto saves
    • +
    • Server Details - add NewYear Event Settings
    • Rules - change MaxTributeDinos and MaxTributeItems to safer max values
    • Dino Settings - PersonalTamedDinosSaddleStructureCost could be zero
    • pt-BR Translation file updated.