Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ public sealed partial class UnionfallAnnouncerComponent : Component
/// Time before capturing is allowed. This is from roundstart, so you want to add the ship grace period ON TOP of the value you want.
/// </summary>
[DataField]
public float GracePeriod = 1200f; //20 minutes for unionfall
public float GracePeriod = 900f; //20 minutes for unionfall

}
Original file line number Diff line number Diff line change
Expand Up @@ -46,29 +46,52 @@ private void OnComponentInit(EntityUid uid, UnionfallAnnouncerComponent componen
Timer.Spawn(graceTime * 0.50, () => AnnouncementWarPeriodic(graceTime - graceTime * 0.50));
Timer.Spawn(graceTime * 0.75, () => AnnouncementWarPeriodic(graceTime - graceTime * 0.75));
Timer.Spawn(graceTime - TimeSpan.FromMinutes(1), AnnouncementWarAlmost);
Timer.Spawn(graceTime, AnnouncementWarGraceOver); // TODO: turn this into a cool 10 second countdown
}
Timer.Spawn(graceTime - TimeSpan.FromSeconds(10), AnnouncementWarGraceOver);

Timer.Spawn(graceTime, () =>
{
var query = EntityQueryEnumerator<UnionfallGraceBarrierComponent>();
while (query.MoveNext(out var barrierUid, out var _))
{
EntityManager.DeleteEntity(barrierUid);
}
});
}

private void AnnouncementWarStart(TimeSpan time)
{
_announcer.SendAnnouncement(_announcer.GetAnnouncementId("unionfallBegin"), Filter.Broadcast(),
"HADAL STORM DETECTED - Emergency repulsion field deployed, estimated storm dispersion time: <" + time + ">... Dispersion pattern confirms presence of a hostile fleet in the operating area.");
"HADAL STORM DETECTED - Emergency repulsion field deployed, estimated storm dispersion time: <" + time.ToString(@"hh\:mm\:ss") + ">... Dispersion pattern confirms presence of a hostile fleet in the operating area.");
}

private void AnnouncementWarPeriodic(TimeSpan time)
{
_announcer.SendAnnouncement(_announcer.GetAnnouncementId("unionfallPeriodic"), Filter.Broadcast(),
"<" + time + "> until the Hadal storm disperses.");
"<" + time.ToString(@"hh\:mm\:ss") + "> until the Hadal storm disperses.");
}

private void AnnouncementWarAlmost()
{
_announcer.SendAnnouncement(_announcer.GetAnnouncementId("unionfallAlmost"), Filter.Broadcast(),
"<00:01:00> LEFT UNTIL FULL HADAL STORM DISPERSION.");
}

private void AnnouncementWarGraceOver()
{
_announcer.SendAnnouncement(_announcer.GetAnnouncementId("unionfallGraceOver"), Filter.Broadcast(),
for (int i = 10; i > 0; i--)
{
int countdown = i;
Timer.Spawn(TimeSpan.FromSeconds(10 - countdown), () =>
{
_announcer.SendAnnouncement(_announcer.GetAnnouncementId("unionfallCountdown"), Filter.Broadcast(),
"HADAL STORM DISPERSING IN <00:00:" + countdown.ToString("D2") + ">...");
});
}

Timer.Spawn(TimeSpan.FromSeconds(10), () =>
{
_announcer.SendAnnouncement(_announcer.GetAnnouncementId("unionfallGraceOver"), Filter.Broadcast(),
"HADAL STORM HAS DISPERSED. Emergency dispersion field has been disabled. Long-Range radar readings confirm presence of hostile fleet.");
});
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public sealed partial class UnionfallCapturePointComponent : Component
/// Time before capturing is allowed. This is from roundstart, so you want to add the ship grace period ON TOP of the value you want.
/// </summary>
[DataField]
public float GracePeriod = 1200f; //20 minutes. 10 ship + 10 point
public float GracePeriod = 900f; //20 minutes. 10 ship + 10 point

/// <summary>
/// This decides wether the point announces UNIONFALL specific announcements regarding the grace period.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,11 @@ public override void Initialize()
_sawmill = IoCManager.Resolve<ILogManager>().GetSawmill("audio.ambience");
}

private void OnComponentInit(EntityUid uid, UnionfallCapturePointComponent component, ComponentInit args)
{
TimeSpan graceTime = TimeSpan.FromSeconds(component.GracePeriod);
Timer.Spawn(TimeSpan.FromMinutes(1), () => AnnouncementWarStart(graceTime));
Timer.Spawn(graceTime * 0.25, () => AnnouncementWarPeriodic(graceTime - graceTime * 0.25));
Timer.Spawn(graceTime * 0.50, () => AnnouncementWarPeriodic(graceTime - graceTime * 0.50));
Timer.Spawn(graceTime * 0.75, () => AnnouncementWarPeriodic(graceTime - graceTime * 0.75));
Timer.Spawn(graceTime - TimeSpan.FromMinutes(1), AnnouncementWarAlmost);
Timer.Spawn(graceTime, AnnouncementWarGraceOver); // TODO: turn this into a cool 10 second countdown
}
private void OnComponentInit(EntityUid uid, UnionfallCapturePointComponent component, ComponentInit args)
{
// Announcement timer'ları buradan kaldırıldı.
// Tüm announcement'lar UnionfallAnnouncerSystem üzerinden yönetiliyor.
}

public override void Update(float frameTime)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace Content.Server._Crescent.UnionfallCapturePoint;

[RegisterComponent]
public sealed partial class UnionfallGraceBarrierComponent : Component
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ public sealed partial class UnionfallShipNodeComponent : Component
/// Time before capturing is allowed. This is from roundstart, so you want to add the ship grace period ON TOP of the value you want.
/// </summary>
[DataField]
public float GracePeriod = 1200f; //20 minutes for unionfall
}
public float GracePeriod = 900f; //15 minutes for unionfall
}
1,682 changes: 930 additions & 752 deletions Resources/Maps/_Crescent/Unionfall/DSM/unionfall_ibis.yml

Large diffs are not rendered by default.

9,170 changes: 4,961 additions & 4,209 deletions Resources/Maps/_Crescent/Unionfall/DSM/unionfall_laelaps.yml

Large diffs are not rendered by default.

Loading
Loading