diff --git a/Content.Client/Options/UI/Tabs/KeyRebindTab.xaml.cs b/Content.Client/Options/UI/Tabs/KeyRebindTab.xaml.cs index a4b8e29c84..9323743730 100644 --- a/Content.Client/Options/UI/Tabs/KeyRebindTab.xaml.cs +++ b/Content.Client/Options/UI/Tabs/KeyRebindTab.xaml.cs @@ -1,5 +1,6 @@ using System.Numerics; using Content.Client.Stylesheets; +using Content.Shared._Sunrise.SunriseCCVars; using Content.Shared.CCVar; using Content.Shared.Input; using Robust.Client.AutoGenerated; @@ -100,13 +101,13 @@ namespace Content.Client.Options.UI.Tabs // Sunrise private void HandleHoldLookUp(BaseButton.ButtonToggledEventArgs args) { - _cfg.SetCVar(CCVars.HoldLookUp, args.Pressed); + _cfg.SetCVar(SunriseCCVars.HoldLookUp, args.Pressed); _cfg.SaveToFile(); } private void HandleToggleAutoGetUp(BaseButton.ButtonToggledEventArgs args) { - _cfg.SetCVar(CCVars.AutoGetUp, args.Pressed); + _cfg.SetCVar(SunriseCCVars.AutoGetUp, args.Pressed); _cfg.SaveToFile(); } // Sunrise @@ -202,8 +203,8 @@ namespace Content.Client.Options.UI.Tabs // Sunrise AddButton(ContentKeyFunctions.ToggleStanding); AddButton(ContentKeyFunctions.LookUp); - AddCheckBox("ui-options-function-auto-get-up", _cfg.GetCVar(CCVars.AutoGetUp), HandleToggleAutoGetUp); - AddCheckBox("ui-options-function-hold-look-up", _cfg.GetCVar(CCVars.HoldLookUp), HandleHoldLookUp); + AddCheckBox("ui-options-function-auto-get-up", _cfg.GetCVar(SunriseCCVars.AutoGetUp), HandleToggleAutoGetUp); + AddCheckBox("ui-options-function-hold-look-up", _cfg.GetCVar(SunriseCCVars.HoldLookUp), HandleHoldLookUp); // Sunrise AddHeader("ui-options-header-interaction-adv"); diff --git a/Content.Client/Telescope/TelescopeSystem.cs b/Content.Client/Telescope/TelescopeSystem.cs index 48595b3b56..57dd2d91f9 100644 --- a/Content.Client/Telescope/TelescopeSystem.cs +++ b/Content.Client/Telescope/TelescopeSystem.cs @@ -1,5 +1,6 @@ using System.Numerics; using Content.Client.Viewport; +using Content.Shared._Sunrise.SunriseCCVars; using Content.Shared.CCVar; using Content.Shared.Input; using Content.Shared.Telescope; @@ -33,7 +34,7 @@ public sealed class TelescopeSystem : SharedTelescopeSystem { base.Initialize(); - _cfg.OnValueChanged(CCVars.HoldLookUp, + _cfg.OnValueChanged(SunriseCCVars.HoldLookUp, val => { var input = val ? null : InputCmdHandler.FromDelegate(_ => _toggled = !_toggled); diff --git a/Content.Server/Standing/LayingDownSystem.cs b/Content.Server/Standing/LayingDownSystem.cs index 92c4decf41..27c88f056a 100644 --- a/Content.Server/Standing/LayingDownSystem.cs +++ b/Content.Server/Standing/LayingDownSystem.cs @@ -1,4 +1,5 @@ -using Content.Shared.CCVar; +using Content.Shared._Sunrise.SunriseCCVars; +using Content.Shared.CCVar; using Content.Shared.Standing; using Robust.Shared.Configuration; @@ -22,7 +23,7 @@ public sealed class LayingDownSystem : SharedLayingDownSystem if (!TryComp(uid, out LayingDownComponent? layingDown)) return; - layingDown.AutoGetUp = _cfg.GetClientCVar(args.SenderSession.Channel, CCVars.AutoGetUp); + layingDown.AutoGetUp = _cfg.GetClientCVar(args.SenderSession.Channel, SunriseCCVars.AutoGetUp); Dirty(uid, layingDown); } } diff --git a/Content.Server/_Sunrise/ChatFilter/ChatSystem.cs b/Content.Server/_Sunrise/ChatFilter/ChatSystem.cs index 23849d2df1..23742e0e64 100644 --- a/Content.Server/_Sunrise/ChatFilter/ChatSystem.cs +++ b/Content.Server/_Sunrise/ChatFilter/ChatSystem.cs @@ -260,6 +260,8 @@ public sealed partial class ChatSystem {"vigers ray","Господь"}, {"vigersray","Господь"}, {"вига","Господь"}, + // Я вам блядь дам гойду. + {"гойда","Ура"}, }; public string ReplaceWords(string message) @@ -267,11 +269,13 @@ public sealed partial class ChatSystem if (string.IsNullOrEmpty(message)) return message; - return Regex.Replace(message, "\\b(\\w+)\\b", match => + return Regex.Replace(message, + @"\b(\w+)\b", + match => { - string word = match.Value; - bool isUpperCase = word.All(Char.IsUpper); - bool isCapitalized = char.IsUpper(word[0]) && word.Skip(1).All(char.IsLower); + var word = match.Value; + var isUpperCase = word.All(Char.IsUpper); + var isCapitalized = char.IsUpper(word[0]) && word.Skip(1).All(char.IsLower); if (SlangReplace.TryGetValue(match.Value.ToLower(), out var replacement)) { diff --git a/Content.Server/_Sunrise/Mood/MoodSystem.cs b/Content.Server/_Sunrise/Mood/MoodSystem.cs index af7e03476a..6e72d8ff40 100644 --- a/Content.Server/_Sunrise/Mood/MoodSystem.cs +++ b/Content.Server/_Sunrise/Mood/MoodSystem.cs @@ -1,5 +1,6 @@ using Content.Server.Chat.Managers; using Content.Shared._Sunrise.Mood; +using Content.Shared._Sunrise.SunriseCCVars; using Content.Shared.Alert; using Content.Shared.CCVar; using Content.Shared.Chat; @@ -80,10 +81,10 @@ public sealed class MoodSystem : EntitySystem var modifier = Math.Clamp( (component.CurrentMoodLevel >= component.MoodThresholds[MoodThreshold.Neutral]) - ? _config.GetCVar(CCVars.MoodIncreasesSpeed) + ? _config.GetCVar(SunriseCCVars.MoodIncreasesSpeed) ? MathF.Pow(1.003f, component.CurrentMoodLevel - component.MoodThresholds[MoodThreshold.Neutral]) : 1 - : _config.GetCVar(CCVars.MoodDecreasesSpeed) + : _config.GetCVar(SunriseCCVars.MoodDecreasesSpeed) ? 2 - component.MoodThresholds[MoodThreshold.Neutral] / component.CurrentMoodLevel : 1, component.MinimumSpeedModifier, @@ -94,7 +95,7 @@ public sealed class MoodSystem : EntitySystem private void OnMoodEffect(EntityUid uid, MoodComponent component, MoodEffectEvent args) { - if (!_config.GetCVar(CCVars.MoodEnabled) + if (!_config.GetCVar(SunriseCCVars.MoodEnabled) || !_prototypeManager.TryIndex(args.EffectId, out var prototype)) return; @@ -222,7 +223,7 @@ public sealed class MoodSystem : EntitySystem private void SetMood(EntityUid uid, float amount, MoodComponent? component = null, bool force = false, bool refresh = false) { - if (!_config.GetCVar(CCVars.MoodEnabled) + if (!_config.GetCVar(SunriseCCVars.MoodEnabled) || !Resolve(uid, ref component) || component.CurrentMoodThreshold == MoodThreshold.Dead && !refresh) return; diff --git a/Content.Shared/CCVar/CCVars.Admin.Ahelp.cs b/Content.Shared/CCVar/CCVars.Admin.Ahelp.cs index 48f3965bb5..027f82c8dd 100644 --- a/Content.Shared/CCVar/CCVars.Admin.Ahelp.cs +++ b/Content.Shared/CCVar/CCVars.Admin.Ahelp.cs @@ -26,7 +26,7 @@ public sealed partial class CCVars /// /// public static readonly CVarDef AhelpAdminPrefix = - CVarDef.Create("ahelp.admin_prefix", false, CVar.SERVERONLY); + CVarDef.Create("ahelp.admin_prefix", true, CVar.SERVERONLY); // Sunrise-Edit /// /// Should the administrator's position be displayed in the webhook. @@ -35,5 +35,5 @@ public sealed partial class CCVars /// /// public static readonly CVarDef AhelpAdminPrefixWebhook = - CVarDef.Create("ahelp.admin_prefix_webhook", false, CVar.SERVERONLY); + CVarDef.Create("ahelp.admin_prefix_webhook", true, CVar.SERVERONLY); // Sunrise-Edit } diff --git a/Content.Shared/CCVar/CCVars.Game.cs b/Content.Shared/CCVar/CCVars.Game.cs index 19092055e3..b5ee1925f9 100644 --- a/Content.Shared/CCVar/CCVars.Game.cs +++ b/Content.Shared/CCVar/CCVars.Game.cs @@ -45,7 +45,7 @@ public sealed partial class CCVars /// The preset for the game to fall back to if the selected preset could not be used, and fallback is enabled. /// public static readonly CVarDef - GameLobbyFallbackPreset = CVarDef.Create("game.fallbackpreset", "Traitor,Extended", CVar.ARCHIVE); + GameLobbyFallbackPreset = CVarDef.Create("game.fallbackpreset", "Traitor,Extra", CVar.ARCHIVE); // Sunrise-Edit /// /// Controls if people can win the game in Suspicion or Deathmatch. @@ -82,7 +82,7 @@ public sealed partial class CCVars /// Prototype to use for map pool. /// public static readonly CVarDef - GameMapPool = CVarDef.Create("game.map_pool", "DefaultMapPool", CVar.SERVERONLY); + GameMapPool = CVarDef.Create("game.map_pool", "SunriseMapPool", CVar.SERVERONLY); // Sunrise-Edit /// /// The depth of the queue used to calculate which map is next in rotation. @@ -289,13 +289,13 @@ public sealed partial class CCVars /// The prototype to use for secret weights. /// public static readonly CVarDef SecretWeightPrototype = - CVarDef.Create("game.secret_weight_prototype", "Secret", CVar.SERVERONLY); + CVarDef.Create("game.secret_weight_prototype", "SunriseSecret", CVar.SERVERONLY); // Sunrise-Edit /// /// The id of the sound collection to randomly choose a sound from and play when the round ends. /// public static readonly CVarDef RoundEndSoundCollection = - CVarDef.Create("game.round_end_sound_collection", "RoundEnd", CVar.SERVERONLY); + CVarDef.Create("game.round_end_sound_collection", "SunriseRoundEnd", CVar.SERVERONLY); // Sunrise-Edit /// /// Whether or not to add every player as a global override to PVS at round end. diff --git a/Content.Shared/CCVar/CCVars.Ic.cs b/Content.Shared/CCVar/CCVars.Ic.cs index e149e9f3e1..3926150985 100644 --- a/Content.Shared/CCVar/CCVars.Ic.cs +++ b/Content.Shared/CCVar/CCVars.Ic.cs @@ -14,13 +14,13 @@ public sealed partial class CCVars /// Allows flavor text (character descriptions) /// public static readonly CVarDef FlavorText = - CVarDef.Create("ic.flavor_text", false, CVar.SERVER | CVar.REPLICATED); + CVarDef.Create("ic.flavor_text", true, CVar.SERVER | CVar.REPLICATED); // Sunrise-Edit /// /// Adds a period at the end of a sentence if the sentence ends in a letter. /// public static readonly CVarDef ChatPunctuation = - CVarDef.Create("ic.punctuation", false, CVar.SERVER); + CVarDef.Create("ic.punctuation", true, CVar.SERVER); // Sunrise-Edit /// /// Enables automatically forcing IC name rules. Uppercases the first letter of the first and last words of the name diff --git a/Content.Shared/CCVar/CCVars.NPC.cs b/Content.Shared/CCVar/CCVars.NPC.cs index f0d5520195..9e7544cf48 100644 --- a/Content.Shared/CCVar/CCVars.NPC.cs +++ b/Content.Shared/CCVar/CCVars.NPC.cs @@ -5,7 +5,7 @@ namespace Content.Shared.CCVar; public sealed partial class CCVars { public static readonly CVarDef NPCMaxUpdates = - CVarDef.Create("npc.max_updates", 128); + CVarDef.Create("npc.max_updates", 512); // Sunrise-Edit public static readonly CVarDef NPCEnabled = CVarDef.Create("npc.enabled", true); diff --git a/Content.Shared/CCVar/CCVars.Shuttle.cs b/Content.Shared/CCVar/CCVars.Shuttle.cs index f66fe9ca59..4fe4440d85 100644 --- a/Content.Shared/CCVar/CCVars.Shuttle.cs +++ b/Content.Shared/CCVar/CCVars.Shuttle.cs @@ -23,7 +23,7 @@ public sealed partial class CCVars /// Whether the arrivals shuttle is enabled. /// public static readonly CVarDef ArrivalsShuttles = - CVarDef.Create("shuttle.arrivals", true, CVar.SERVERONLY); + CVarDef.Create("shuttle.arrivals", false, CVar.SERVERONLY); // Sunrise-Edit /// /// The map to use for the arrivals station. diff --git a/Content.Shared/CCVar/CCVars.Sounds.cs b/Content.Shared/CCVar/CCVars.Sounds.cs index 73d9d3852f..1ba3878187 100644 --- a/Content.Shared/CCVar/CCVars.Sounds.cs +++ b/Content.Shared/CCVar/CCVars.Sounds.cs @@ -30,5 +30,5 @@ public sealed partial class CCVars CVarDef.Create("audio.admin_chat_sound_volume", -5f, CVar.ARCHIVE | CVar.CLIENT | CVar.REPLICATED); public static readonly CVarDef AHelpSound = - CVarDef.Create("audio.ahelp_sound", "/Audio/Effects/adminhelp.ogg", CVar.ARCHIVE | CVar.CLIENTONLY); + CVarDef.Create("audio.ahelp_sound", "/Audio/_Sunrise/ahelp_new.ogg", CVar.ARCHIVE | CVar.CLIENTONLY); // Sunrise-Edit } diff --git a/Content.Shared/CCVar/CCVars.Vote.cs b/Content.Shared/CCVar/CCVars.Vote.cs index ee9fee7d3d..86a0c6c81e 100644 --- a/Content.Shared/CCVar/CCVars.Vote.cs +++ b/Content.Shared/CCVar/CCVars.Vote.cs @@ -62,7 +62,7 @@ public sealed partial class CCVars /// Sets the duration of the map vote timer. /// public static readonly CVarDef - VoteTimerMap = CVarDef.Create("vote.timermap", 90, CVar.SERVERONLY); + VoteTimerMap = CVarDef.Create("vote.timermap", 30, CVar.SERVERONLY); // Sunrise-Edit /// /// Sets the duration of the restart vote timer. diff --git a/Content.Shared/Nutrition/EntitySystems/HungerSystem.cs b/Content.Shared/Nutrition/EntitySystems/HungerSystem.cs index 361beeb606..36331cb8ab 100644 --- a/Content.Shared/Nutrition/EntitySystems/HungerSystem.cs +++ b/Content.Shared/Nutrition/EntitySystems/HungerSystem.cs @@ -1,5 +1,6 @@ using System.Diagnostics.CodeAnalysis; using Content.Shared._Sunrise.Mood; +using Content.Shared._Sunrise.SunriseCCVars; using Content.Shared.Alert; using Content.Shared.CCVar; using Content.Shared.Damage; @@ -64,7 +65,7 @@ public sealed class HungerSystem : EntitySystem private void OnRefreshMovespeed(EntityUid uid, HungerComponent component, RefreshMovementSpeedModifiersEvent args) { - if (_config.GetCVar(CCVars.MoodEnabled) // Sunrise Edit + if (_config.GetCVar(SunriseCCVars.MoodEnabled) // Sunrise Edit || component.CurrentThreshold > HungerThreshold.Starving || _jetpack.IsUserFlying(uid)) return; @@ -131,7 +132,7 @@ public sealed class HungerSystem : EntitySystem if (GetMovementThreshold(component.CurrentThreshold) != GetMovementThreshold(component.LastThreshold)) { // Sunrise Edit - if (!_config.GetCVar(CCVars.MoodEnabled)) + if (!_config.GetCVar(SunriseCCVars.MoodEnabled)) _movementSpeedModifier.RefreshMovementSpeedModifiers(uid); else if (_net.IsServer) { diff --git a/Content.Shared/Nutrition/EntitySystems/ThirstSystem.cs b/Content.Shared/Nutrition/EntitySystems/ThirstSystem.cs index 331ea80913..db7c5ae327 100644 --- a/Content.Shared/Nutrition/EntitySystems/ThirstSystem.cs +++ b/Content.Shared/Nutrition/EntitySystems/ThirstSystem.cs @@ -13,6 +13,7 @@ using Robust.Shared.Random; using Robust.Shared.Timing; using Robust.Shared.Utility; using System.Diagnostics.CodeAnalysis; +using Content.Shared._Sunrise.SunriseCCVars; namespace Content.Shared.Nutrition.EntitySystems; @@ -67,7 +68,7 @@ public sealed class ThirstSystem : EntitySystem private void OnRefreshMovespeed(EntityUid uid, ThirstComponent component, RefreshMovementSpeedModifiersEvent args) { // TODO: This should really be taken care of somewhere else - if (_config.GetCVar(CCVars.MoodEnabled) + if (_config.GetCVar(SunriseCCVars.MoodEnabled) || _jetpack.IsUserFlying(uid)) return; @@ -152,7 +153,7 @@ public sealed class ThirstSystem : EntitySystem private void UpdateEffects(EntityUid uid, ThirstComponent component) { - if (!_config.GetCVar(CCVars.MoodEnabled) + if (!_config.GetCVar(SunriseCCVars.MoodEnabled) && IsMovementThreshold(component.LastThirstThreshold) != IsMovementThreshold(component.CurrentThirstThreshold) && TryComp(uid, out MovementSpeedModifierComponent? movementSlowdownComponent)) { diff --git a/Content.Shared/_Sunrise/SunriseCCVars/SunriseCCVars.cs b/Content.Shared/_Sunrise/SunriseCCVars/SunriseCCVars.cs index cb6cea26f4..a640b11edf 100644 --- a/Content.Shared/_Sunrise/SunriseCCVars/SunriseCCVars.cs +++ b/Content.Shared/_Sunrise/SunriseCCVars/SunriseCCVars.cs @@ -307,4 +307,27 @@ public sealed class SunriseCCVars public static readonly CVarDef BanTelegramLink = CVarDef.Create("cl.telegram_link", "", CVar.SERVER | CVar.REPLICATED | CVar.ARCHIVE); + + /* + * Lying Down. + */ + + public static readonly CVarDef AutoGetUp = + CVarDef.Create("rest.auto_get_up", true, CVar.CLIENT | CVar.ARCHIVE | CVar.REPLICATED); + + public static readonly CVarDef HoldLookUp = + CVarDef.Create("rest.hold_look_up", true, CVar.CLIENT | CVar.ARCHIVE); + + /* + * Mood. + */ + + public static readonly CVarDef MoodEnabled = + CVarDef.Create("mood.enabled", true, CVar.SERVER); + + public static readonly CVarDef MoodIncreasesSpeed = + CVarDef.Create("mood.increases_speed", true, CVar.SERVER); + + public static readonly CVarDef MoodDecreasesSpeed = + CVarDef.Create("mood.decreases_speed", true, CVar.SERVER); } diff --git a/Resources/Locale/ru-RU/_strings/game-ticking/game-presets/preset-greenshift.ftl b/Resources/Locale/ru-RU/_strings/game-ticking/game-presets/preset-greenshift.ftl index 0b92824e07..d7a55e8b43 100644 --- a/Resources/Locale/ru-RU/_strings/game-ticking/game-presets/preset-greenshift.ftl +++ b/Resources/Locale/ru-RU/_strings/game-ticking/game-presets/preset-greenshift.ftl @@ -1,2 +1,2 @@ -greenshift-title = Гриншифт +greenshift-title = Мирный greenshift-description = Пресет без событий, чтобы мероприятия админов проходили без помех.