Skip to content

Commit

Permalink
Merge branch 'master' into shadowkin-rework
Browse files Browse the repository at this point in the history
  • Loading branch information
FoxxoTrystan authored Nov 17, 2024
2 parents f9940a5 + 2eea0f7 commit 11b8405
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2289,7 +2289,7 @@ private Dictionary<string, object> CreateTree(List<LoadoutCategoryPrototype> cat
return match;

foreach (var subcategory in parent.Contents.Where(c => c is NeoTabContainer).Cast<NeoTabContainer>())
match = FindCategory(id, subcategory);
match ??= FindCategory(id, subcategory);

return match;
}
Expand Down
7 changes: 6 additions & 1 deletion Content.Server/StationEvents/Events/PirateRadioSpawnRule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
using Content.Shared.CCVar;
using Robust.Shared.Serialization.Manager;
using Content.Shared.Parallax.Biomes;
using Robust.Shared.Map;

namespace Content.Server.StationEvents.Events;

Expand All @@ -24,6 +25,7 @@ public sealed class PirateRadioSpawnRule : StationEventSystem<PirateRadioSpawnRu
[Dependency] private readonly GameTicker _gameTicker = default!;
[Dependency] private readonly TransformSystem _xform = default!;
[Dependency] private readonly ISerializationManager _serializationManager = default!;
[Dependency] private readonly IMapManager _mapManager = default!;

protected override void Started(EntityUid uid, PirateRadioSpawnRuleComponent component, GameRuleComponent gameRule, GameRuleStartedEvent args)
{
Expand All @@ -46,6 +48,9 @@ protected override void Started(EntityUid uid, PirateRadioSpawnRuleComponent com
return;

var targetStation = _random.Pick(stations);
if (!_mapManager.MapExists(Transform(targetStation).MapID))
return; /// SHUT UP HEISENTESTS. DIE.

var randomOffset = _random.NextVector2(component.MinimumDistance, component.MaximumDistance);

var outpostOptions = new MapLoadOptions
Expand All @@ -54,7 +59,7 @@ protected override void Started(EntityUid uid, PirateRadioSpawnRuleComponent com
LoadMap = false,
};

if (!_map.TryLoad(GameTicker.DefaultMap, _random.Pick(component.PirateRadioShuttlePath), out var outpostids, outpostOptions))
if (!_map.TryLoad(Transform(targetStation).MapID, _random.Pick(component.PirateRadioShuttlePath), out var outpostids, outpostOptions))
return;

SpawnDebris(component, outpostids);
Expand Down

0 comments on commit 11b8405

Please sign in to comment.