Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
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
4 changes: 2 additions & 2 deletions Content.Server/Backmen/Economy/ATM/ATMSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ private void OnInteract(Entity<AtmComponent> uid, ref AfterActivatableUIOpenEven
UpdateComponentUserInterface(uid, args.User);
}

private readonly ProtoId<MaterialPrototype> Credit = "Credit";
private readonly ProtoId<CurrencyPrototype> SpaceCash = "SpaceCash";
private static readonly ProtoId<MaterialPrototype> Credit = "Credit";
private static readonly ProtoId<CurrencyPrototype> SpaceCash = "SpaceCash";

public Dictionary<ProtoId<CurrencyPrototype>, FixedPoint2> GetCurrencyValue(EntityUid uid,
PhysicalCompositionComponent component)
Expand Down
4 changes: 2 additions & 2 deletions Content.Server/Backmen/Flesh/FleshCultistSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public sealed partial class FleshCultistSystem : EntitySystem
[Dependency] private readonly SharedContainerSystem _container = default!;
[Dependency] private readonly LanguageSystem _language = default!;

private readonly ProtoId<LanguagePrototype> FleshLang = "Flesh";
private static readonly ProtoId<LanguagePrototype> FleshLang = "Flesh";

public override void Initialize()
{
Expand Down Expand Up @@ -271,7 +271,7 @@ private void OnShop(EntityUid uid, FleshCultistComponent component, FleshCultist
_store.ToggleUi(uid, uid, store);
}

private readonly ProtoId<AlertPrototype> MutationPoint = "MutationPoint";
private static readonly ProtoId<AlertPrototype> MutationPoint = "MutationPoint";

private void ChangeParasiteHunger(EntityUid uid, FixedPoint2 amount, FleshCultistComponent? component = null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public sealed class PuddleFootPrintsSystem : EntitySystem
private EntityQuery<FootPrintsComponent> _footPrintsQuery;
private EntityQuery<SolutionContainerManagerComponent> _solutionContainerManageQuery;

private readonly ProtoId<ReagentPrototype> WaterId = "Water";
private static readonly ProtoId<ReagentPrototype> WaterId = "Water";

private bool _footprintEnabled = false;

Expand Down
2 changes: 1 addition & 1 deletion Content.Server/Backmen/Fugitive/FugitiveSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public sealed class FugitiveSystem : EntitySystem
{
private readonly EntProtoId FugitiveMindRole = "MindRoleFugitive";
private readonly EntProtoId EscapeObjective = "EscapeShuttleObjectiveFugitive";
private readonly ProtoId<JobPrototype> FugitiveRole = "Fugitive";
private static readonly ProtoId<JobPrototype> FugitiveRole = "Fugitive";


[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public override void Initialize()
SubscribeLocalEvent<GibOnCollideComponent, StartCollideEvent>(OnStartCollide);
}

private readonly ProtoId<DamageContainerPrototype> BiologicalDamageContainerPrototype = "Biological";
private static readonly ProtoId<DamageContainerPrototype> BiologicalDamageContainerPrototype = "Biological";

private void OnStartCollide(EntityUid uid, GibOnCollideComponent component, ref StartCollideEvent args)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,23 +104,23 @@ public EntityUid RemoveRequiredLanguage(
}

[CommandImplementation("lsspoken")]
public IEnumerable<string> ListSpoken([PipedArgument] EntityUid input)
public IEnumerable<ProtoId<LanguagePrototype>> ListSpoken([PipedArgument] EntityUid input)
{
if (!TryGetTranslatorComp(input, out var translator))
return [];
return translator.SpokenLanguages;
}

[CommandImplementation("lsunderstood")]
public IEnumerable<string> ListUnderstood([PipedArgument] EntityUid input)
public IEnumerable<ProtoId<LanguagePrototype>> ListUnderstood([PipedArgument] EntityUid input)
{
if (!TryGetTranslatorComp(input, out var translator))
return [];
return translator.UnderstoodLanguages;
}

[CommandImplementation("lsrequired")]
public IEnumerable<string> ListRequired([PipedArgument] EntityUid input)
public IEnumerable<ProtoId<LanguagePrototype>> ListRequired([PipedArgument] EntityUid input)
{
if (!TryGetTranslatorComp(input, out var translator))
return [];
Expand Down
Loading
Loading