Баффы (#510)

* Moodsystem cleanups

* remove overhydrated and overfed mood debuffs

* admins now join game deadmined + new player timers

* faster arrivals

* recharging rcd with metal, glass, plastic or cable coils

* better timings and costs + building apc and camera

* preparing for rpd

* RPD + make RCD more generic

* add rpd to atmos lockers, rcd to engivend

* rcd and rpd to technologies

* dont deadmin me in debug

* rcd ammo buff

* add ChargeCountModifier logic for non stackable items

* increase time to become experienced player

* Dynamic Radial Menus (#29678)

* fix

* Clean Some Code

* Some Commentaries

* Update Content.Client/UserInterface/Controls/RadialContainer.cs

* Update Content.Client/UserInterface/Controls/RadialContainer.cs

---------

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>

* more dynamically parameters

---------

Co-authored-by: Rinary <72972221+Rinary1@users.noreply.github.com>
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
ThereDrD0
2024-07-29 06:04:21 +03:00
committed by GitHub
parent 0f641a46d2
commit d627758826
44 changed files with 1082 additions and 315 deletions

View File

@@ -217,7 +217,6 @@ namespace Content.Server.GameTicking
var readyPlayers = new List<ICommonSession>();
var readyPlayerProfiles = new Dictionary<NetUserId, HumanoidCharacterProfile>();
var autoDeAdmin = _cfg.GetCVar(CCVars.AdminDeadminOnJoin);
var stalinBunkerEnabled = _configurationManager.GetCVar(WhiteCVars.StalinEnabled);
foreach (var (userId, status) in _playerGameStatuses)
@@ -225,11 +224,17 @@ namespace Content.Server.GameTicking
if (LobbyEnabled && status != PlayerGameStatus.ReadyToPlay) continue;
if (!_playerManager.TryGetSessionById(userId, out var session)) continue;
#if FULL_RELEASE // dont deadmin me in debug
var autoDeAdmin = _cfg.GetCVar(CCVars.AdminDeadminOnJoin);
if (autoDeAdmin && _adminManager.IsAdmin(session))
{
_adminManager.DeAdmin(session);
}
#endif
if (stalinBunkerEnabled)
{
await _stalinManager.RefreshUsersData();

View File

@@ -8,13 +8,13 @@ namespace Content.Server._White.Mood;
[RegisterComponent]
public sealed partial class MoodComponent : Component
{
[DataField("currentMoodLevel"), ViewVariables(VVAccess.ReadOnly)]
[DataField, ViewVariables(VVAccess.ReadOnly)]
public float CurrentMoodLevel;
[DataField("currentMoodThreshold"), ViewVariables(VVAccess.ReadOnly)]
[DataField, ViewVariables(VVAccess.ReadOnly)]
public MoodThreshold CurrentMoodThreshold;
[DataField("lastThreshold"), ViewVariables(VVAccess.ReadOnly)]
[DataField, ViewVariables(VVAccess.ReadOnly)]
public MoodThreshold LastThreshold;
[ViewVariables(VVAccess.ReadOnly)]
@@ -23,22 +23,22 @@ public sealed partial class MoodComponent : Component
[ViewVariables(VVAccess.ReadOnly)]
public readonly Dictionary<string, float> UncategorisedEffects = new();
[DataField("slowdownSpeedModifier"), ViewVariables(VVAccess.ReadWrite)]
[DataField, ViewVariables(VVAccess.ReadWrite)]
public float SlowdownSpeedModifier = 0.75f;
[DataField("increaseSpeedModifier"), ViewVariables(VVAccess.ReadWrite)]
[DataField, ViewVariables(VVAccess.ReadWrite)]
public float IncreaseSpeedModifier = 1.15f;
[DataField("increaseCritThreshold"), ViewVariables(VVAccess.ReadWrite)]
[DataField, ViewVariables(VVAccess.ReadWrite)]
public float IncreaseCritThreshold = 1.2f;
[DataField("decreaseCritThreshold"), ViewVariables(VVAccess.ReadWrite)]
[DataField, ViewVariables(VVAccess.ReadWrite)]
public float DecreaseCritThreshold = 0.9f;
[ViewVariables(VVAccess.ReadOnly)]
public FixedPoint2 CritThresholdBeforeModify;
[DataField("moodThresholds", customTypeSerializer: typeof(DictionarySerializer<MoodThreshold, float>))]
[DataField(customTypeSerializer: typeof(DictionarySerializer<MoodThreshold, float>))]
public Dictionary<MoodThreshold, float> MoodThresholds = new()
{
{ MoodThreshold.VeryVeryGood, 10.0f },
@@ -53,7 +53,7 @@ public sealed partial class MoodComponent : Component
{ MoodThreshold.Dead, 0.0f }
};
[DataField("moodThresholdsAlerts", customTypeSerializer: typeof(DictionarySerializer<MoodThreshold, AlertType>))]
[DataField(customTypeSerializer: typeof(DictionarySerializer<MoodThreshold, AlertType>))]
public Dictionary<MoodThreshold, AlertType> MoodThresholdsAlerts = new()
{
{ MoodThreshold.Dead, AlertType.MoodDead },
@@ -69,7 +69,7 @@ public sealed partial class MoodComponent : Component
{ MoodThreshold.Insane, AlertType.Insane }
};
[DataField("moodChangeValues", customTypeSerializer: typeof(DictionarySerializer<Enum, float>))]
[DataField(customTypeSerializer: typeof(DictionarySerializer<Enum, float>))]
public Dictionary<Enum, float> MoodChangeValues = new()
{
{ MoodChangeLevel.None , 0.0f },
@@ -80,7 +80,7 @@ public sealed partial class MoodComponent : Component
{ MoodChangeLevel.Large , 2f }
};
[DataField("healthMoodEffectsThresholds", customTypeSerializer: typeof(DictionarySerializer<string, float>))]
[DataField(customTypeSerializer: typeof(DictionarySerializer<string, float>))]
public Dictionary<string, float> HealthMoodEffectsThresholds = new()
{
{ "HealthHeavyDamage", 80f },

View File

@@ -108,8 +108,8 @@ public sealed class MoodSystem : EntitySystem
if (!component.MoodChangeValues.TryGetValue(oldPrototype.MoodChange, out var oldValue))
return;
amount += (oldPrototype.PositiveEffect ? -oldValue : oldValue) +
(prototype.PositiveEffect ? value : -value);
amount += (oldPrototype.Positive ? -oldValue : oldValue) +
(prototype.Positive ? value : -value);
component.CategorisedEffects[prototype.Category] = prototype.ID;
}
@@ -117,7 +117,7 @@ public sealed class MoodSystem : EntitySystem
else
{
component.CategorisedEffects.Add(prototype.Category, prototype.ID);
amount += prototype.PositiveEffect ? value : -value;
amount += prototype.Positive ? value : -value;
}
if (prototype.Timeout != 0)
@@ -132,7 +132,7 @@ public sealed class MoodSystem : EntitySystem
if (component.UncategorisedEffects.TryGetValue(prototype.ID, out _))
return;
var effectValue = prototype.PositiveEffect ? value : -value;
var effectValue = prototype.Positive ? value : -value;
component.UncategorisedEffects.Add(prototype.ID, effectValue);
amount += effectValue;
@@ -173,7 +173,7 @@ public sealed class MoodSystem : EntitySystem
if (!comp.MoodChangeValues.TryGetValue(currentProto.MoodChange, out var value))
return;
amount += currentProto.PositiveEffect ? -value : value;
amount += currentProto.Positive ? -value : value;
comp.CategorisedEffects.Remove(category);
}
@@ -205,7 +205,7 @@ public sealed class MoodSystem : EntitySystem
if (!component.MoodChangeValues.TryGetValue(prototype.MoodChange, out var value))
return;
amount += prototype.PositiveEffect ? value : -value;
amount += prototype.Positive ? value : -value;
}
foreach (var (_, value) in component.UncategorisedEffects)
@@ -438,7 +438,7 @@ public sealed partial class ShowMoodEffects : IAlertClick
{
var chatManager = IoCManager.Resolve<IChatManager>();
var color = proto.PositiveEffect ? "#008000" : "#BA0000";
var color = proto.Positive ? "#008000" : "#BA0000";
var msg = $"[font size=10][color={color}]{proto.Description}[/color][/font]";
chatManager.ChatMessageToOne(ChatChannel.Emotes, msg, msg, EntityUid.Invalid, false,