Skip to content

Commit

Permalink
Anomaly system (#257)
Browse files Browse the repository at this point in the history
* Update AnomalySystem.Generator.cs

* Update anomaly_equipment.yml
  • Loading branch information
dvir001 committed Aug 24, 2023
1 parent 0cbf1d6 commit bb57b93
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
12 changes: 3 additions & 9 deletions Content.Server/Anomaly/AnomalySystem.Generator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,16 +149,10 @@ private void OnGeneratingFinished(EntityUid uid, AnomalyGeneratorComponent compo
{
var xform = Transform(uid);

if (_station.GetStationInMap(xform.MapID) is not { } station ||
!TryComp<StationDataComponent>(station, out var data) ||
_station.GetLargestGrid(data) is not { } grid)
{
if (xform.GridUid == null)
return;
grid = xform.GridUid.Value;
}
if (xform.GridUid == null)
return;

SpawnOnRandomGridLocation(grid, component.SpawnerPrototype);
SpawnOnRandomGridLocation(xform.GridUid.Value, component.SpawnerPrototype);
RemComp<GeneratingAnomalyGeneratorComponent>(uid);
Appearance.SetData(uid, AnomalyGeneratorVisuals.Generating, false);
Audio.PlayPvs(component.GeneratingFinishedSound, uid);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,3 +301,5 @@
- type: GuideHelp
guides:
- AnomalousResearch
- type: Anchorable
delay: 999999

0 comments on commit bb57b93

Please sign in to comment.