Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

untroll glimmermobspawnrule #1980

Merged
merged 3 commits into from
Oct 14, 2024
Merged
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Content.Shared.GameTicking.Components;
using Content.Shared.NPC.Components;
using Content.Shared.Psionics.Glimmer;
using Content.Shared.Station.Components;
using Robust.Shared.Random;
using Robust.Shared.Map;

Expand Down Expand Up @@ -46,12 +47,17 @@ protected override void Started(EntityUid uid, GlimmerMobRuleComponent comp, Gam
private List<EntityCoordinates> GetCoords<T>() where T : IComponent
{
var coords = new List<EntityCoordinates>();
var query = EntityQueryEnumerator<TransformComponent, T>();
while (query.MoveNext(out var xform, out _))
if (TryGetRandomStation(out var station))
MilonPL marked this conversation as resolved.
Show resolved Hide resolved
{
coords.Add(xform.Coordinates);
var query = EntityQueryEnumerator<TransformComponent, T>();
while (query.MoveNext(out var xform, out _))
{
if (CompOrNull<StationMemberComponent>(xform.GridUid)?.Station == station)
MilonPL marked this conversation as resolved.
Show resolved Hide resolved
{
coords.Add(xform.Coordinates);
}
}
}

return coords;
}

Expand Down
Loading