Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

Expedition early finish fix #155

Merged
merged 8 commits into from
May 26, 2024
Merged
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
2 changes: 1 addition & 1 deletion Content.Server/Salvage/SalvageSystem.ExpeditionConsole.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ private void OnSalvageFinishMessage(EntityUid entity, SalvageExpeditionConsoleCo
if (!TryComp<SalvageExpeditionComponent>(map, out var expedition))
return;

var newEndTime = _timing.CurTime + TimeSpan.FromSeconds(10);
var newEndTime = _timing.CurTime + TimeSpan.FromSeconds(20);

if (expedition.EndTime <= newEndTime)
return;
Expand Down
6 changes: 5 additions & 1 deletion Content.Server/Salvage/SalvageSystem.Expeditions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
using Robust.Shared.GameStates;
using Robust.Shared.Random;
using Robust.Shared.Map;
using Content.Server.Shuttles.Components;

namespace Content.Server.Salvage;

Expand Down Expand Up @@ -168,8 +169,11 @@ private void UpdateExpeditions()
if (comp.NextOffer > currentTime || comp.Claimed)
continue;

comp.Cooldown = false;
if (!HasComp<FTLComponent>(_station.GetLargestGrid(Comp<StationDataComponent>(uid))))
comp.Cooldown = false;

comp.NextOffer += TimeSpan.FromSeconds(_cooldown);

GenerateMissions(comp);
UpdateConsoles(comp);
}
Expand Down
2 changes: 1 addition & 1 deletion Content.Server/Salvage/SalvageSystem.Runner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ private void UpdateRunner()
Dirty(uid, comp);
Announce(uid, Loc.GetString("salvage-expedition-announcement-countdown-seconds", ("duration", TimeSpan.FromSeconds(45).Seconds)));
}
else if (comp.Stream == null && remaining < audioLength)
else if (comp.Stage < ExpeditionStage.MusicCountdown && comp.Stream == null && remaining < audioLength)
{
var audio = _audio.PlayPvs(comp.Sound, uid).Value;
comp.Stream = audio.Entity;
Expand Down
5 changes: 3 additions & 2 deletions Resources/Locale/ru-RU/procedural/expeditions.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ salvage-expedition-difficulty-Minor = Лёгкая
offering-window-claimed = Принято
offering-window-claim = Принять
salvage-expedition-window-next = Следующее предложение
salvage-expedition-window-finish = Завершить экспедицию
# Expedition descriptions
salvage-expedition-difficulty-players = Рекомендовано утилизаторов:
# С вас удержат налог в размере { $tax }% от добытых ресурсов.
Expand All @@ -55,7 +56,7 @@ salvage-expedition-announcement-countdown-seconds =
[few] секунды
*[other] секунд
}.
salvage-expedition-announcement-early-finish = Экспедиция завершена досрочно.
salvage-expedition-reward-description = Награда за завершение миссии
salvage-expedition-announcement-dungeon = Подземелье расположено от вас на { $direction }.
salvage-expedition-completed = Экспедиция окончена.
salvage-expedition-announcement-early-finish = Экспедиция завершена вручную.
salvage-expedition-completed = Миссия выполнена.
Loading