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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Content.Client/Backmen/Blob/BlobObserverSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public override void Initialize()
SubscribeNetworkEvent<RoundRestartCleanupEvent>(RoundRestartCleanup);
}

private readonly ProtoId<FactionIconPrototype> BlobFaction = "BlobFaction";
private static readonly ProtoId<FactionIconPrototype> BlobFaction = "BlobFaction";

private void OnShowBlobIcon<T>(Entity<T> ent, ref GetStatusIconsEvent args) where T : Component
{
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Backmen/Flesh/FleshCultist.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public override void Initialize()
SubscribeLocalEvent<FleshCultistComponent, GetStatusIconsEvent>(OnShowCultIcon);
}

private readonly ProtoId<FactionIconPrototype> FleshcultistFaction = "FleshcultistFaction";
private static readonly ProtoId<FactionIconPrototype> FleshcultistFaction = "FleshcultistFaction";

private void OnShowCultIcon(Entity<FleshCultistComponent> ent, ref GetStatusIconsEvent args)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public sealed class EtherealOverlay : Overlay
public override OverlaySpace Space => OverlaySpace.WorldSpaceBelowFOV;
private readonly ShaderInstance _shader;

private readonly ProtoId<ShaderPrototype> Ethereal = "Ethereal";
private static readonly ProtoId<ShaderPrototype> Ethereal = "Ethereal";

public EtherealOverlay()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public override void Initialize()
_overlay = new Overlays.NearsightedOverlay();
}

private readonly ProtoId<TagPrototype> TagName = "GlassesNearsight";
private static readonly ProtoId<TagPrototype> TagName = "GlassesNearsight";

public override void Update(float frameTime)
{
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Backmen/StationAI/AiEnemySystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public override void Initialize()
_ghostQuery = GetEntityQuery<GhostComponent>();
}

private readonly ProtoId<SecurityIconPrototype> AiEnemyStatus = "AiIconEnemyTarget";
private static readonly ProtoId<SecurityIconPrototype> AiEnemyStatus = "AiIconEnemyTarget";
private void GetIcon(Entity<AIEnemyNTComponent> target, ref GetStatusIconsEvent args)
{
var ent = _player.LocalSession?.AttachedEntity ?? EntityUid.Invalid;
Expand Down
6 changes: 3 additions & 3 deletions Content.Client/Backmen/Teams/TdmTeamSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ protected override void SetTeam(Entity<TdmMemberComponent?> target, StationTeamM
// do nothing on client
}

private readonly ProtoId<FactionIconPrototype> TeamA = "TeamAFaction";
private readonly ProtoId<FactionIconPrototype> TeamB = "TeamBFaction";
private readonly ProtoId<FactionIconPrototype> TeamNoTeam = "Team0Faction";
private static readonly ProtoId<FactionIconPrototype> TeamA = "TeamAFaction";
private static readonly ProtoId<FactionIconPrototype> TeamB = "TeamBFaction";
private static readonly ProtoId<FactionIconPrototype> TeamNoTeam = "Team0Faction";

private void OnGetTeamIcon(Entity<TdmMemberComponent> ent, ref GetStatusIconsEvent args)
{
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Backmen/Vampiric/BloodSuckerSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public override void Initialize()
SubscribeLocalEvent<BkmVampireComponent, GetStatusIconsEvent>(OnShowVampireIcon);
}

private readonly ProtoId<FactionIconPrototype> VampireFaction = "VampireFaction";
private static readonly ProtoId<FactionIconPrototype> VampireFaction = "VampireFaction";

private void OnShowVampireIcon(Entity<BkmVampireComponent> ent, ref GetStatusIconsEvent args)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ namespace Content.Server.Administration.Systems;

public sealed partial class AdminVerbSystem
{
private readonly ProtoId<PolymorphPrototype> LizardSmite = "AdminLizardSmite";
private readonly ProtoId<PolymorphPrototype> VulpkaninSmite = "AdminVulpSmite";
private static readonly ProtoId<PolymorphPrototype> LizardSmite = "AdminLizardSmite";
private static readonly ProtoId<PolymorphPrototype> VulpkaninSmite = "AdminVulpSmite";

[Dependency] private readonly SharedActionsSystem _actions = default!;
[Dependency] private readonly IRobustRandom _random = default!;
Expand Down Expand Up @@ -95,7 +95,7 @@ public sealed partial class AdminVerbSystem
[Dependency] private readonly SlipperySystem _slipperySystem = default!;

private readonly EntProtoId _actionViewLawsProtoId = "ActionViewLaws";
private readonly ProtoId<SiliconLawsetPrototype> _crewsimovLawset = "Crewsimov";
private static readonly ProtoId<SiliconLawsetPrototype> _crewsimovLawset = "Crewsimov";

private readonly EntProtoId _siliconMindRole = "MindRoleSiliconBrain";
private const string SiliconLawBoundUserInterface = "SiliconLawBoundUserInterface";
Expand Down
16 changes: 10 additions & 6 deletions Content.Server/Animals/Systems/ParrotMemorySystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@
using Content.Server.Vocalization.Systems;
using Content.Shared.Animals.Components;
using Content.Shared.Animals.Systems;
using Content.Shared.Backmen.Language;
using Content.Shared.Database;
using Content.Shared.Mobs.Systems;
using Content.Shared.Speech;
using Content.Shared.Speech.Components;
using Content.Shared.Whitelist;
using Robust.Shared.Network;
using Robust.Shared.Prototypes;
using Robust.Shared.Random;
using Robust.Shared.Timing;
using Robust.Shared.Utility;
Expand Down Expand Up @@ -63,15 +65,15 @@ private void ListenerOnMapInit(Entity<ParrotListenerComponent> entity, ref MapIn
private void OnListen(Entity<ParrotListenerComponent> entity, ref ListenEvent args)
{

TryLearn(entity.Owner, args.Message, args.Source);
TryLearn(entity.Owner, args.Message, args.Source, args.Language?.ID ?? "Universal");
}

private void OnHeadsetReceive(Entity<ParrotListenerComponent> entity, ref HeadsetRadioReceiveRelayEvent args)
{
var message = args.RelayedEvent.Message;
var source = args.RelayedEvent.MessageSource;

TryLearn(entity.Owner, message, source);
TryLearn(entity.Owner, message, source, args.RelayedEvent.Language?.ID ?? "Universal");
}

/// <summary>
Expand Down Expand Up @@ -102,7 +104,8 @@ private void OnTryVocalize(Entity<ParrotMemoryComponent> entity, ref TryVocalize
/// <param name="entity">Entity learning a new word</param>
/// <param name="incomingMessage">Message to learn</param>
/// <param name="source">Source EntityUid of the message</param>
public void TryLearn(Entity<ParrotMemoryComponent?, ParrotListenerComponent?> entity, string incomingMessage, EntityUid source)
/// <param name="lang"></param>
public void TryLearn(Entity<ParrotMemoryComponent?, ParrotListenerComponent?> entity, string incomingMessage, EntityUid source, ProtoId<LanguagePrototype> lang) // backmen
{
if (!Resolve(entity, ref entity.Comp1, ref entity.Comp2))
return;
Expand Down Expand Up @@ -142,7 +145,7 @@ public void TryLearn(Entity<ParrotMemoryComponent?, ParrotListenerComponent?> en
return;

// actually commit this message to memory
Learn((entity, entity.Comp1), message, source);
Learn((entity, entity.Comp1), message, source, lang);
}

/// <summary>
Expand All @@ -151,7 +154,8 @@ public void TryLearn(Entity<ParrotMemoryComponent?, ParrotListenerComponent?> en
/// <param name="entity">Entity learning a new word</param>
/// <param name="message">Message to learn</param>
/// <param name="source">Source EntityUid of the message</param>
private void Learn(Entity<ParrotMemoryComponent> entity, string message, EntityUid source)
/// <param name="lang"></param>
private void Learn(Entity<ParrotMemoryComponent> entity, string message, EntityUid source, ProtoId<LanguagePrototype> lang) // backmen
{
// log a low-priority chat type log to the admin logger
// specifies what message was learnt by what entity, and who taught the message to that entity
Expand All @@ -163,7 +167,7 @@ private void Learn(Entity<ParrotMemoryComponent> entity, string message, EntityU
sourceNetUserId = mind.UserId;
}

var newMemory = new SpeechMemory(sourceNetUserId, message);
var newMemory = new SpeechMemory(sourceNetUserId, message, lang);

// add a new message if there is space in the memory
if (entity.Comp.SpeechMemories.Count < entity.Comp.MaxSpeechMemory)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
using Content.Shared.Backmen.Psionics.Events;
using Content.Shared.Body.Components;
using Content.Shared.Body.Systems;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.Examine;
using Robust.Server.Audio;
using static Content.Shared.Examine.ExamineSystemShared;
Expand Down Expand Up @@ -90,6 +91,8 @@ private void OnDispelled(EntityUid uid, PsionicRegenerationPowerComponent compon
args.Handled = true;
}

private static readonly ProtoId<ReagentPrototype> PsionicRegenerationEssence = "PsionicRegenerationEssence";

private void OnDoAfter(EntityUid uid, PsionicRegenerationPowerComponent component, PsionicRegenerationDoAfterEvent args)
{
component.DoAfter = null;
Expand All @@ -104,7 +107,7 @@ private void OnDoAfter(EntityUid uid, PsionicRegenerationPowerComponent componen
var percentageComplete = Math.Min(1f, (_gameTiming.CurTime - args.StartedAt).TotalSeconds / component.UseDelay);

var solution = new Solution();
solution.AddReagent("PsionicRegenerationEssence", FixedPoint2.New(component.EssenceAmount * percentageComplete));
solution.AddReagent(PsionicRegenerationEssence, FixedPoint2.New(component.EssenceAmount * percentageComplete));
_bloodstreamSystem.TryAddToBloodstream((uid, stream), solution);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public void AddPsionics(EntityUid uid, string powerComp)
AddComp(uid, newComponent);
}

private readonly ProtoId<WeightedRandomPrototype> RandomPsionicPowerPool = "RandomPsionicPowerPool";
private static readonly ProtoId<WeightedRandomPrototype> RandomPsionicPowerPool = "RandomPsionicPowerPool";

public void AddRandomPsionicPower(EntityUid uid)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ private async Task FillLogs(EventGptFunctionCall ev)
ev.Handled = true;
}

private readonly ProtoId<GuideEntryPrototype> DefaultRuleset = "DefaultRuleset";
private static readonly ProtoId<GuideEntryPrototype> DefaultRuleset = "DefaultRuleset";

public GuideEntryPrototype GetCoreRuleEntry(string rule)
{
Expand Down
2 changes: 1 addition & 1 deletion Content.Server/Backmen/Antag/SuperPsi/AutoPsiSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public override void Initialize()
});
}

private readonly ProtoId<JobPrototype> JobPrisoner = "Prisoner";
private static readonly ProtoId<JobPrototype> JobPrisoner = "Prisoner";

public IEnumerable<(EntityCoordinates Pos, EntityUid? Marker)> GetPrisonersSpawningEntities(EntityUid? stationId)
{
Expand Down
4 changes: 2 additions & 2 deletions Content.Server/Backmen/Arrivals/CentcommSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@ private void OnCleanup(RoundRestartCleanupEvent ev)
ShuttleIndex = 0;
}

private readonly ProtoId<WeightedRandomPrototype> StationCentComMapPool = "DefaultCentcomPool";
private readonly ProtoId<GameMapPrototype> StationCentComMapDefault = "CentComm";
private static readonly ProtoId<WeightedRandomPrototype> StationCentComMapPool = "DefaultCentcomPool";
private static readonly ProtoId<GameMapPrototype> StationCentComMapDefault = "CentComm";


public void EnsureCentcom(bool force = false)
Expand Down
2 changes: 1 addition & 1 deletion Content.Server/Backmen/Blob/Systems/BlobCarrierSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public override void Initialize()
}

private readonly EntProtoId ActionTransformToBlob = "ActionTransformToBlob";
private readonly ProtoId<LanguagePrototype> BlobLang = "Blob";
private static readonly ProtoId<LanguagePrototype> BlobLang = "Blob";

private void OnApplyLang(Entity<BlobCarrierComponent> ent, ref DetermineEntityLanguagesEvent args)
{
Expand Down
6 changes: 3 additions & 3 deletions Content.Server/Backmen/Blob/Systems/BlobCoreSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ public sealed class BlobCoreSystem : EntitySystem
private EntityQuery<BlobFactoryComponent> _factory;
private EntityQuery<BlobNodeComponent> _node;

private readonly ProtoId<AlertPrototype> BlobHealth = "BlobHealth";
private readonly ProtoId<AlertPrototype> BlobResource = "BlobResource";
private readonly ProtoId<CurrencyPrototype> BlobMoney = "BlobPoint";
private static readonly ProtoId<AlertPrototype> BlobHealth = "BlobHealth";
private static readonly ProtoId<AlertPrototype> BlobResource = "BlobResource";
private static readonly ProtoId<CurrencyPrototype> BlobMoney = "BlobPoint";

private readonly ReaderWriterLockSlim _pointsChange = new();

Expand Down
16 changes: 8 additions & 8 deletions Content.Server/Backmen/Blob/Systems/BlobFactorySystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ private void OnProduceBlobbernaut(EntityUid uid, BlobFactoryComponent component,
}
}

private readonly ProtoId<ReagentPrototype> Phlogiston = "Phlogiston";
private readonly ProtoId<ReagentPrototype> TearGas = "TearGas";
private readonly ProtoId<ReagentPrototype> Lexorin = "Lexorin";
private readonly ProtoId<ReagentPrototype> Mold = "Mold";
private readonly ProtoId<ReagentPrototype> Bicaridine = "Bicaridine";
private readonly ProtoId<ReagentPrototype> Aluminium = "Aluminium";
private readonly ProtoId<ReagentPrototype> Iron = "Iron";
private readonly ProtoId<ReagentPrototype> Uranium = "Uranium";
private static readonly ProtoId<ReagentPrototype> Phlogiston = "Phlogiston";
private static readonly ProtoId<ReagentPrototype> TearGas = "TearGas";
private static readonly ProtoId<ReagentPrototype> Lexorin = "Lexorin";
private static readonly ProtoId<ReagentPrototype> Mold = "Mold";
private static readonly ProtoId<ReagentPrototype> Bicaridine = "Bicaridine";
private static readonly ProtoId<ReagentPrototype> Aluminium = "Aluminium";
private static readonly ProtoId<ReagentPrototype> Iron = "Iron";
private static readonly ProtoId<ReagentPrototype> Uranium = "Uranium";

private void FillSmokeGas(Entity<BlobPodComponent> ent, BlobChemType currentChem)
{
Expand Down
47 changes: 46 additions & 1 deletion Content.Server/Backmen/Blob/Systems/BlobMobSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@
using Content.Server.Radio.EntitySystems;
using Content.Shared.Backmen.Blob;
using Content.Shared.Backmen.Blob.Components;
using Content.Shared.Backmen.EntityEffects.Effects;
using Content.Shared.Backmen.Language;
using Content.Shared.Backmen.Surgery.Traumas;
using Content.Shared.Backmen.Targeting;
using Content.Shared.Body.Systems;
using Content.Shared.Chat;
using Content.Shared.Damage;
using Content.Shared.Damage.Systems;
using Content.Shared.EntityEffects;
using Content.Shared.EntityEffects.Effects.Body;
using Content.Shared.Radio.Components;
using Content.Shared.Speech;
using Robust.Shared.Network;
Expand All @@ -22,6 +27,8 @@ public sealed class BlobMobSystem : SharedBlobMobSystem
[Dependency] private readonly DamageableSystem _damageableSystem = default!;
[Dependency] private readonly INetManager _netMan = default!;
[Dependency] private readonly RadioSystem _radioSystem = default!;
[Dependency] private readonly SharedEntityEffectsSystem _effectsSystem = default!;
[Dependency] private readonly SharedBodySystem _bodySystem = default!;

public override void Initialize()
{
Expand Down Expand Up @@ -107,10 +114,48 @@ private void OnSpokeAdd(Entity<BlobSpeakComponent> ent, ref ComponentStartup arg
radio.Channels.Add(ent.Comp.Channel);
}

private static readonly EntityEffect[] HealingEffects =
[
new AdjustTraumas
{
Amount = -1,
ModifierIdentifier = "BlobHeal",
TraumaType = TraumaType.BoneDamage
},
new AdjustTraumas
{
Amount = -1,
ModifierIdentifier = "BlobHeal",
TraumaType = TraumaType.VeinsDamage
},
new AdjustTraumas
{
Amount = -1,
ModifierIdentifier = "BlobHeal",
TraumaType = TraumaType.NerveDamage
},
new AdjustTraumas
{
Amount = -1,
ModifierIdentifier = "BlobHeal",
TraumaType = TraumaType.Dismemberment
},
new EyeDamage()
];
private void OnPulsed(EntityUid uid, BlobMobComponent component, BlobMobGetPulseEvent args)
{
_damageableSystem.ChangeDamage(uid, component.HealthOfPulse, targetPart: TargetBodyPart.All);
}
_effectsSystem.ApplyEffects(uid, HealingEffects); // healing wounds

if(component.CureBodyInterval <= 0)
return;

// blob restore body part
component.CureTick++;
if (component.CureTick > component.CureBodyInterval)
{
component.CureTick = 0;
_bodySystem.ForceRestoreBody(uid, false);
}
}
}
3 changes: 2 additions & 1 deletion Content.Server/Backmen/Blob/Systems/BlobTileSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using Content.Shared.Damage;
using Content.Shared.Damage.Systems;
using Content.Shared.Destructible;
using Content.Shared.EntityEffects;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check for EntityEffects usage in the file
rg 'EntityEffect' Content.Server/Backmen/Blob/Systems/BlobTileSystem.cs

Repository: Rxup/space-station-14

Length of output: 100


🏁 Script executed:

#!/bin/bash
# Read the file to check actual usage
cat -n Content.Server/Backmen/Blob/Systems/BlobTileSystem.cs

Repository: Rxup/space-station-14

Length of output: 10355


Удалите неиспользуемый импорт.

Директива using Content.Shared.EntityEffects; на строке 11 не используется в файле и должна быть удалена.

🤖 Prompt for AI Agents
In @Content.Server/Backmen/Blob/Systems/BlobTileSystem.cs at line 11, Удалите
неиспользуемый импорт: уберите директиву using Content.Shared.EntityEffects;.
Откройте файл, содержащий класс BlobTileSystem и удалите строку с этим using,
затем пересоберите/перезапустите проверку сборки, чтобы убедиться, что
предупреждение исчезло.

using Content.Shared.Mobs.Components;
using Content.Shared.NPC.Components;
using Content.Shared.NPC.Prototypes;
Expand Down Expand Up @@ -35,7 +36,7 @@ public sealed class BlobTileSystem : SharedBlobTileSystem

private EntityQuery<BlobCoreComponent> _blobCoreQuery;

private readonly ProtoId<NpcFactionPrototype> BlobFaction = "Blob";
private static readonly ProtoId<NpcFactionPrototype> BlobFaction = "Blob";

public override void Initialize()
{
Expand Down
4 changes: 2 additions & 2 deletions Content.Server/Backmen/Chapel/SacrificialAltarSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ public override void Initialize()

}

private readonly ProtoId<EntityTablePrototype> DropTable = "AltarStandartTable";
private readonly ProtoId<EntityTablePrototype> DropChapelTable = "AltarHolyTable";
private static readonly ProtoId<EntityTablePrototype> DropTable = "AltarStandartTable";
private static readonly ProtoId<EntityTablePrototype> DropChapelTable = "AltarHolyTable";

private void OnDoAfter(EntityUid uid, SacrificialAltarComponent component, SacrificeDoAfterEvent args)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ public CloningSpawnEvent(Entity<CloningPodComponent>? device, EntityUid source)

public sealed class MetempsychoticMachineSystem : EntitySystem
{
private readonly ProtoId<WeightedRandomPrototype> MetempsychoticHumanoidPool = "MetempsychoticHumanoidPool";
private readonly ProtoId<WeightedRandomPrototype> MetempsychoticNonHumanoidPool = "MetempsychoticNonhumanoidPool";
private static readonly ProtoId<WeightedRandomPrototype> MetempsychoticHumanoidPool = "MetempsychoticHumanoidPool";
private static readonly ProtoId<WeightedRandomPrototype> MetempsychoticNonHumanoidPool = "MetempsychoticNonhumanoidPool";

[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
Expand Down
Loading
Loading