Skip to content

Commit

Permalink
Beacons (#1196)
Browse files Browse the repository at this point in the history
<!--
This is a semi-strict format, you can add/remove sections as needed but
the order/format should be kept the same
Remove these comments before submitting
-->

# Description

<!--
Explain this PR in as much detail as applicable

Some example prompts to consider:
How might this affect the game? The codebase?
What might be some alternatives to this?
How/Who does this benefit/hurt [the game/codebase]?
-->

No merge this time, quite literally just basic changes. Should solve all
issues, as this is how I did it on my fork.
Changes carp rifts and nuke arming to use readable locations.

---

<!--
This is default collapsed, readers click to expand it and see all your
media
The PR media section can get very large at times, so this is a good way
to keep it clean
The title is written using HTML tags
The title must be within the <summary> tags or you won't see it
-->

<details><summary><h1>Media</h1></summary>
<p>

![Beacons
example](https://github.com/user-attachments/assets/9272b442-9b11-41b3-a0d1-d7954a645b1d)

</p>
</details>

---

# Changelog
nah
  • Loading branch information
sleepyyapril authored Nov 9, 2024
1 parent 8d5572b commit a2b86bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
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.RemoveMarkupPermissive(_navMap.GetNearestBeaconString((uid, xform)))));
_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.RemoveMarkupPermissive(_navMap.GetNearestBeaconString((uid, nukeXform))))
);

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

0 comments on commit a2b86bc

Please sign in to comment.