Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Rxup committed Mar 18, 2024
1 parent a4c4034 commit 78a06c8
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public sealed class PsionicRegenerationPowerSystem : EntitySystem
[Dependency] private readonly SharedPopupSystem _popupSystem = default!;
[Dependency] private readonly SharedPsionicAbilitiesSystem _psionics = default!;
[Dependency] private readonly IGameTiming _gameTiming = default!;
[Dependency] private readonly ExamineSystemShared _examine = default!;


public override void Initialize()
Expand Down Expand Up @@ -66,7 +67,7 @@ private void OnPowerUsed(EntityUid uid, PsionicRegenerationPowerComponent compon
_popupSystem.PopupEntity(Loc.GetString("psionic-regeneration-begin", ("entity", uid)),
uid,
// TODO: Use LoS-based Filter when one is available.
Filter.Pvs(uid).RemoveWhereAttachedEntity(entity => !ExamineSystemShared.InRangeUnOccluded(uid, entity, ExamineRange, null)),
Filter.Pvs(uid).RemoveWhereAttachedEntity(entity => !_examine.InRangeUnOccluded(uid, entity, ExamineRange, null)),
true,
PopupType.Medium);

Expand Down
11 changes: 7 additions & 4 deletions Content.Server/Backmen/Arachne/ArachneSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ public sealed class ArachneSystem : EntitySystem
[Dependency] private readonly InventorySystem _inventorySystem = default!;
[Dependency] private readonly ISharedAdminLogManager _adminLogger = default!;
[Dependency] private readonly SharedContainerSystem _containerSystem = default!;
[Dependency] private readonly ExamineSystemShared _examine = default!;


private const string BodySlot = "body_slot";

Expand Down Expand Up @@ -126,7 +128,8 @@ private void OnCocEntInserted(EntityUid uid, CocoonComponent component, EntInser
component.WasReplacementAccent = true;
component.OldAccent = currentAccent.Accent;
currentAccent.Accent = "mumble";
} else
}
else
{
component.WasReplacementAccent = false;
var replacement = EnsureComp<ReplacementAccentComponent>(args.Entity);
Expand Down Expand Up @@ -251,7 +254,7 @@ private void OnSpinWeb(SpinWebActionEvent args)
}

_popupSystem.PopupEntity(Loc.GetString("spin-web-start-third-person", ("spider", Identity.Entity(args.Performer, EntityManager))), args.Performer,
Filter.PvsExcept(args.Performer).RemoveWhereAttachedEntity(entity => !ExamineSystemShared.InRangeUnOccluded(args.Performer, entity, ExamineRange, null)),
Filter.PvsExcept(args.Performer).RemoveWhereAttachedEntity(entity => !_examine.InRangeUnOccluded(args.Performer, entity, ExamineRange, null)),
true,
Shared.Popups.PopupType.MediumCaution);
_popupSystem.PopupEntity(Loc.GetString("spin-web-start-second-person"), args.Performer, args.Performer, Shared.Popups.PopupType.Medium);
Expand All @@ -269,7 +272,7 @@ private void StartCocooning(EntityUid uid, ArachneComponent component, EntityUid
{
_popupSystem.PopupEntity(Loc.GetString("cocoon-start-third-person", ("target", Identity.Entity(target, EntityManager)), ("spider", Identity.Entity(uid, EntityManager))), uid,
// TODO: We need popup occlusion lmao
Filter.PvsExcept(uid).RemoveWhereAttachedEntity(entity => !ExamineSystemShared.InRangeUnOccluded(uid, entity, ExamineRange, null)),
Filter.PvsExcept(uid).RemoveWhereAttachedEntity(entity => !_examine.InRangeUnOccluded(uid, entity, ExamineRange, null)),
true,
Shared.Popups.PopupType.MediumCaution);

Expand Down Expand Up @@ -305,7 +308,7 @@ private void OnWebDoAfter(EntityUid uid, ArachneComponent component, ArachneWebD

Spawn(ArachneWeb, GetCoordinates(args.Coords).SnapToGrid());
_popupSystem.PopupEntity(Loc.GetString("spun-web-third-person", ("spider", Identity.Entity(uid, EntityManager))), uid,
Filter.PvsExcept(uid).RemoveWhereAttachedEntity(entity => !ExamineSystemShared.InRangeUnOccluded(uid, entity, ExamineRange, null)),
Filter.PvsExcept(uid).RemoveWhereAttachedEntity(entity => !_examine.InRangeUnOccluded(uid, entity, ExamineRange, null)),
true,
Shared.Popups.PopupType.MediumCaution);
_popupSystem.PopupEntity(Loc.GetString("spun-web-second-person"), uid, uid, Shared.Popups.PopupType.Medium);
Expand Down
4 changes: 3 additions & 1 deletion Content.Server/Backmen/Blob/ZombieBlobSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@
using Content.Shared.Mind.Components;
using Content.Shared.Mobs;
using Content.Shared.NPC.Components;
using Content.Shared.NPC.Prototypes;
using Content.Shared.NPC.Systems;
using Content.Shared.Physics;
using Content.Shared.Tag;
using Robust.Shared.Audio.Systems;
using Robust.Shared.Physics;
using Robust.Shared.Physics.Systems;
using Robust.Shared.Prototypes;

namespace Content.Server.Backmen.Blob;

Expand Down Expand Up @@ -119,7 +121,7 @@ private void OnStartup(EntityUid uid, ZombieBlobComponent component, ComponentSt

var oldFactions = new List<string>();
var factionComp = EnsureComp<NpcFactionMemberComponent>(uid);
foreach (var factionId in new List<string>(factionComp.Factions))
foreach (var factionId in new List<ProtoId<NpcFactionPrototype>>(factionComp.Factions))
{
oldFactions.Add(factionId);
_faction.RemoveFaction(uid, factionId);
Expand Down
4 changes: 3 additions & 1 deletion Content.Server/Backmen/Fugitive/FugitiveSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using Content.Server.Objectives;
using Content.Server.Chat.Systems;
using Content.Server.Communications;
using Content.Server.Examine;
using Content.Server.Paper;
using Content.Server.Popups;
using Content.Server.Stunnable;
Expand Down Expand Up @@ -70,6 +71,7 @@ public sealed class FugitiveSystem : EntitySystem
[Dependency] private readonly FugitiveSystem _fugitiveSystem = default!;
[Dependency] private readonly ObjectivesSystem _objectivesSystem = default!;
[Dependency] private readonly RandomHelperSystem _randomHelper = default!;
[Dependency] private readonly ExamineSystem _examine = default!;

public override void Initialize()
{
Expand Down Expand Up @@ -284,7 +286,7 @@ private void DoSpawnEffects(EntityUid uid, FugitiveComponent? component = null)

_popupSystem.PopupEntity(Loc.GetString("fugitive-spawn", ("name", uid)), uid,
Filter.Pvs(uid).RemoveWhereAttachedEntity(entity =>
!ExamineSystemShared.InRangeUnOccluded(uid, entity, ExamineRange, null)), true,
!_examine.InRangeUnOccluded(uid, entity, ExamineRange, null)), true,
Shared.Popups.PopupType.LargeCaution);

_stun.TryParalyze(uid, TimeSpan.FromSeconds(2), false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
using Content.Server.NPC.Systems;
using Content.Shared.Backmen.Abilities.Psionics;
using Content.Shared.Eye;
using Content.Shared.NPC.Components;
using Content.Shared.NPC.Prototypes;
using Content.Shared.NPC.Systems;
using Robust.Shared.Containers;
using Robust.Server.GameObjects;
Expand Down Expand Up @@ -38,6 +40,12 @@ private void OnInit(EntityUid uid, PotentialPsionicComponent component, Componen
SetCanSeePsionicInvisiblity(uid, false);
}

[ValidatePrototypeId<NpcFactionPrototype>]
private const string PsionicInterloper = "PsionicInterloper";

[ValidatePrototypeId<NpcFactionPrototype>]
private const string GlimmerMonster = "GlimmerMonster";

private void OnInsulInit(EntityUid uid, PsionicInsulationComponent component, ComponentInit args)
{
if (!HasComp<PotentialPsionicComponent>(uid))
Expand All @@ -46,17 +54,22 @@ private void OnInsulInit(EntityUid uid, PsionicInsulationComponent component, Co
if (HasComp<PsionicInvisibilityUsedComponent>(uid))
_invisSystem.ToggleInvisibility(uid);

if (_npcFactonSystem.ContainsFaction(uid, "PsionicInterloper"))
if (TryComp<NpcFactionMemberComponent>(uid, out var npcFactionMemberComponent))
{
component.SuppressedFactions.Add("PsionicInterloper");
_npcFactonSystem.RemoveFaction(uid, "PsionicInterloper");
Entity<NpcFactionMemberComponent?> ent = (uid, npcFactionMemberComponent);
if (_npcFactonSystem.IsMember(ent, "PsionicInterloper"))
{
component.SuppressedFactions.Add("PsionicInterloper");
_npcFactonSystem.RemoveFaction(ent, "PsionicInterloper");
}

if (_npcFactonSystem.IsMember(ent, "GlimmerMonster"))
{
component.SuppressedFactions.Add("GlimmerMonster");
_npcFactonSystem.RemoveFaction(ent, "GlimmerMonster");
}
}

if (_npcFactonSystem.ContainsFaction(uid, "GlimmerMonster"))
{
component.SuppressedFactions.Add("GlimmerMonster");
_npcFactonSystem.RemoveFaction(uid, "GlimmerMonster");
}

SetCanSeePsionicInvisiblity(uid, true);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Content.Server.NPC.Components;
using Content.Shared.NPC.Prototypes;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;

namespace Content.Server.Backmen.Species.Shadowkin.Components;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ public void SuppressFactions(EntityUid uid, bool set)
return;

// Copy the suppressed factions to the power component
component.SuppressedFactions = factions.Factions.ToList();
component.SuppressedFactions = factions.Factions.Select(x=>x.Id).ToList();

// Remove the factions from the entity
foreach (var faction in factions.Factions)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using Content.Server.StationEvents.Events;
using Content.Shared.Backmen.Psionics.Glimmer;
using Content.Shared.Backmen.Abilities.Psionics;
using Content.Shared.NPC.Components;
using Robust.Shared.Map;
using Robust.Shared.Prototypes;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
map: ["spiderWebLayer"]
drawdepth: WallMountedItems
netsync: false
- type: SlowContacts
- type: SpeedModifierContacts
walkSpeedModifier: 0.5
sprintSpeedModifier: 0.5
ignoreWhitelist:
components:
- IgnoreSpiderWebArachneClassic
- IgnoreSpiderWebArachneClassic
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
web1: ""
- enum.DamageStateVisualLayers.Base: #your guess for why randomsprite requires an arbitrary layer is as good as mine friend
web2: ""
- type: SlowContacts
- type: SpeedModifierContacts
walkSpeedModifier: 0.2
sprintSpeedModifier: 0.2
ignoreWhitelist:
Expand Down

0 comments on commit 78a06c8

Please sign in to comment.