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

Beacons #1196

Merged
merged 5 commits into from
Nov 9, 2024
Merged

Beacons #1196

Show file tree
Hide file tree
Changes from 2 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
3 changes: 1 addition & 2 deletions Content.Server/Dragon/DragonRiftSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,8 @@ public override void Update(float frameTime)
comp.State = DragonRiftState.AlmostFinished;
Dirty(comp);

var location = xform.LocalPosition;
_announcer.SendAnnouncement(_announcer.GetAnnouncementId("CarpRift"), Filter.Broadcast(),
"carp-rift-warning", colorOverride: Color.Red, localeArgs: ("location", location));
"carp-rift-warning", colorOverride: Color.Red, localeArgs: ("location", FormattedMessage.RemoveMarkup(_navMap.GetNearestBeaconString((uid, xform)))));
sleepyyapril marked this conversation as resolved.
Show resolved Hide resolved
_navMap.SetBeaconEnabled(uid, true);
}

Expand Down
7 changes: 1 addition & 6 deletions Content.Server/Nuke/NukeSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -452,11 +452,6 @@ public void ArmBomb(EntityUid uid, NukeComponent? component = null)
if (stationUid != null)
_alertLevel.SetLevel(stationUid.Value, component.AlertLevelOnActivate, true, true, true, true);

var pos = nukeXform.MapPosition;
var x = (int) pos.X;
var y = (int) pos.Y;
var posText = $"({x}, {y})";

// We are collapsing the randomness here, otherwise we would get separate random song picks for checking duration and when actually playing the song afterwards
_selectedNukeSong = _audio.GetSound(component.ArmMusic);

Expand All @@ -467,7 +462,7 @@ public void ArmBomb(EntityUid uid, NukeComponent? component = null)
Color.Red,
stationUid ?? uid,
null,
("time", (int) component.RemainingTime), ("position", posText)
("time", (int) component.RemainingTime), ("position", FormattedMessage.RemoveMarkup(_navMap.GetNearestBeaconString((uid, nukeXform))))
sleepyyapril marked this conversation as resolved.
Show resolved Hide resolved
);

_sound.PlayGlobalOnStation(uid, _audio.GetSound(component.ArmSound));
Expand Down
Loading