фиксы апстрима
This commit is contained in:
parent
8ae86bf691
commit
24679aff6d
16 changed files with 65 additions and 32 deletions
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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<MoodEffectPrototype>(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;
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public sealed partial class CCVars
|
|||
/// <seealso cref="AdminUseCustomNamesAdminRank"/>
|
||||
/// <seealso cref="AhelpAdminPrefixWebhook"/>
|
||||
public static readonly CVarDef<bool> AhelpAdminPrefix =
|
||||
CVarDef.Create("ahelp.admin_prefix", false, CVar.SERVERONLY);
|
||||
CVarDef.Create("ahelp.admin_prefix", true, CVar.SERVERONLY); // Sunrise-Edit
|
||||
|
||||
/// <summary>
|
||||
/// Should the administrator's position be displayed in the webhook.
|
||||
|
|
@ -35,5 +35,5 @@ public sealed partial class CCVars
|
|||
/// <seealso cref="AdminUseCustomNamesAdminRank"/>
|
||||
/// <seealso cref="AhelpAdminPrefix"/>
|
||||
public static readonly CVarDef<bool> AhelpAdminPrefixWebhook =
|
||||
CVarDef.Create("ahelp.admin_prefix_webhook", false, CVar.SERVERONLY);
|
||||
CVarDef.Create("ahelp.admin_prefix_webhook", true, CVar.SERVERONLY); // Sunrise-Edit
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
/// </summary>
|
||||
public static readonly CVarDef<string>
|
||||
GameLobbyFallbackPreset = CVarDef.Create("game.fallbackpreset", "Traitor,Extended", CVar.ARCHIVE);
|
||||
GameLobbyFallbackPreset = CVarDef.Create("game.fallbackpreset", "Traitor,Extra", CVar.ARCHIVE); // Sunrise-Edit
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
public static readonly CVarDef<string>
|
||||
GameMapPool = CVarDef.Create("game.map_pool", "DefaultMapPool", CVar.SERVERONLY);
|
||||
GameMapPool = CVarDef.Create("game.map_pool", "SunriseMapPool", CVar.SERVERONLY); // Sunrise-Edit
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
public static readonly CVarDef<string> SecretWeightPrototype =
|
||||
CVarDef.Create("game.secret_weight_prototype", "Secret", CVar.SERVERONLY);
|
||||
CVarDef.Create("game.secret_weight_prototype", "SunriseSecret", CVar.SERVERONLY); // Sunrise-Edit
|
||||
|
||||
/// <summary>
|
||||
/// The id of the sound collection to randomly choose a sound from and play when the round ends.
|
||||
/// </summary>
|
||||
public static readonly CVarDef<string> RoundEndSoundCollection =
|
||||
CVarDef.Create("game.round_end_sound_collection", "RoundEnd", CVar.SERVERONLY);
|
||||
CVarDef.Create("game.round_end_sound_collection", "SunriseRoundEnd", CVar.SERVERONLY); // Sunrise-Edit
|
||||
|
||||
/// <summary>
|
||||
/// Whether or not to add every player as a global override to PVS at round end.
|
||||
|
|
|
|||
|
|
@ -14,13 +14,13 @@ public sealed partial class CCVars
|
|||
/// Allows flavor text (character descriptions)
|
||||
/// </summary>
|
||||
public static readonly CVarDef<bool> FlavorText =
|
||||
CVarDef.Create("ic.flavor_text", false, CVar.SERVER | CVar.REPLICATED);
|
||||
CVarDef.Create("ic.flavor_text", true, CVar.SERVER | CVar.REPLICATED); // Sunrise-Edit
|
||||
|
||||
/// <summary>
|
||||
/// Adds a period at the end of a sentence if the sentence ends in a letter.
|
||||
/// </summary>
|
||||
public static readonly CVarDef<bool> ChatPunctuation =
|
||||
CVarDef.Create("ic.punctuation", false, CVar.SERVER);
|
||||
CVarDef.Create("ic.punctuation", true, CVar.SERVER); // Sunrise-Edit
|
||||
|
||||
/// <summary>
|
||||
/// Enables automatically forcing IC name rules. Uppercases the first letter of the first and last words of the name
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ namespace Content.Shared.CCVar;
|
|||
public sealed partial class CCVars
|
||||
{
|
||||
public static readonly CVarDef<int> NPCMaxUpdates =
|
||||
CVarDef.Create("npc.max_updates", 128);
|
||||
CVarDef.Create("npc.max_updates", 512); // Sunrise-Edit
|
||||
|
||||
public static readonly CVarDef<bool> NPCEnabled = CVarDef.Create("npc.enabled", true);
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ public sealed partial class CCVars
|
|||
/// Whether the arrivals shuttle is enabled.
|
||||
/// </summary>
|
||||
public static readonly CVarDef<bool> ArrivalsShuttles =
|
||||
CVarDef.Create("shuttle.arrivals", true, CVar.SERVERONLY);
|
||||
CVarDef.Create("shuttle.arrivals", false, CVar.SERVERONLY); // Sunrise-Edit
|
||||
|
||||
/// <summary>
|
||||
/// The map to use for the arrivals station.
|
||||
|
|
|
|||
|
|
@ -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<string> 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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ public sealed partial class CCVars
|
|||
/// Sets the duration of the map vote timer.
|
||||
/// </summary>
|
||||
public static readonly CVarDef<int>
|
||||
VoteTimerMap = CVarDef.Create("vote.timermap", 90, CVar.SERVERONLY);
|
||||
VoteTimerMap = CVarDef.Create("vote.timermap", 30, CVar.SERVERONLY); // Sunrise-Edit
|
||||
|
||||
/// <summary>
|
||||
/// Sets the duration of the restart vote timer.
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -307,4 +307,27 @@ public sealed class SunriseCCVars
|
|||
|
||||
public static readonly CVarDef<string> BanTelegramLink =
|
||||
CVarDef.Create("cl.telegram_link", "", CVar.SERVER | CVar.REPLICATED | CVar.ARCHIVE);
|
||||
|
||||
/*
|
||||
* Lying Down.
|
||||
*/
|
||||
|
||||
public static readonly CVarDef<bool> AutoGetUp =
|
||||
CVarDef.Create("rest.auto_get_up", true, CVar.CLIENT | CVar.ARCHIVE | CVar.REPLICATED);
|
||||
|
||||
public static readonly CVarDef<bool> HoldLookUp =
|
||||
CVarDef.Create("rest.hold_look_up", true, CVar.CLIENT | CVar.ARCHIVE);
|
||||
|
||||
/*
|
||||
* Mood.
|
||||
*/
|
||||
|
||||
public static readonly CVarDef<bool> MoodEnabled =
|
||||
CVarDef.Create("mood.enabled", true, CVar.SERVER);
|
||||
|
||||
public static readonly CVarDef<bool> MoodIncreasesSpeed =
|
||||
CVarDef.Create("mood.increases_speed", true, CVar.SERVER);
|
||||
|
||||
public static readonly CVarDef<bool> MoodDecreasesSpeed =
|
||||
CVarDef.Create("mood.decreases_speed", true, CVar.SERVER);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
greenshift-title = Гриншифт
|
||||
greenshift-title = Мирный
|
||||
greenshift-description = Пресет без событий, чтобы мероприятия админов проходили без помех.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue