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

Upstream 29.08.2024 #71

Merged
merged 40 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
303b5c8
Air alarms check sensors upon power returning
osjarw Jul 9, 2024
d8dbfa9
recolor riot helmet (#31530)
saintmuntzer Aug 28, 2024
460e587
Automatic changelog update
PJBot Aug 28, 2024
91eb0c2
added wide-spectrum anomaly locator to anomaly cyborg module (#31427)
coolboy911 Aug 28, 2024
24e9dc6
Automatic changelog update
PJBot Aug 28, 2024
8d38897
Add Robust.Xaml.csproj to the solution (#31573)
Winkarst-cpu Aug 28, 2024
6808558
add construction for carp statue (#31261)
deltanedas Aug 28, 2024
386733e
Automatic changelog update
PJBot Aug 28, 2024
f5a8be8
fix spelling error silicon jobs (#31581)
lzk228 Aug 28, 2024
c2ccf2b
Fixes shuttles not being able to FTL onto/near station (#31569)
PopGamer45 Aug 28, 2024
d088c8a
Automatic changelog update
PJBot Aug 28, 2024
0f2c42f
Fix defibs draining battery when turned off (#31593)
themias Aug 28, 2024
daba76d
Bagel - LV cable wasn't connected (#31591)
JustCone14 Aug 28, 2024
f7f255a
Marathon - Names a singular camera (#31590)
JustCone14 Aug 28, 2024
693fc75
Automatic changelog update
PJBot Aug 28, 2024
b2edae8
Reach - Scientist added to map's prototype (#31567)
JustCone14 Aug 28, 2024
98680ce
Change my copyright (#31599)
lzk228 Aug 28, 2024
6398f5b
Remove random cyrillic letters (#31600)
lzk228 Aug 28, 2024
af35c2b
escape pod tiny fan (#31601)
Emisse Aug 28, 2024
bea7210
Fix nuke disk erroneously being marked 'left behind' (#31602)
themias Aug 28, 2024
a4d58a5
Automatic changelog update
PJBot Aug 28, 2024
7454c77
bagel update (#31603)
Emisse Aug 28, 2024
50791db
Add rings (Salvage loot real)! (#31372)
beck-thompson Aug 28, 2024
d540f27
Automatic changelog update
PJBot Aug 28, 2024
604025e
bagel update (#31605)
Emisse Aug 28, 2024
26ba991
Sec Webbing Icon Resprite and Rename (#29599)
DieselMohawk Aug 29, 2024
d9b1369
Cherry (#28962)
RumiTiger Aug 29, 2024
d0aafae
Automatic changelog update
PJBot Aug 29, 2024
ff5acf7
Add Command Glasses (#30447)
SlamBamActionman Aug 29, 2024
a268ede
Automatic changelog update
PJBot Aug 29, 2024
6a52de8
Added plastitanium walls and windows (#31178)
Unisol Aug 29, 2024
a9602cb
Check air alarm sensors when repowering (#29857)
Partmedia Aug 29, 2024
b6391e1
Automatic changelog update
PJBot Aug 29, 2024
b3036de
Make railings render over tables (#31589)
Winkarst-cpu Aug 29, 2024
df392c7
Automatic changelog update
PJBot Aug 29, 2024
d921684
Update submodule to 232.0.0 (#31616)
metalgearsloth Aug 29, 2024
2fd57c2
Automatic changelog update
PJBot Aug 29, 2024
f0615ec
Fixup playerspawn stuff (#31546)
metalgearsloth Aug 29, 2024
3810cc7
Merge branch 'master' into upstream
Aug 29, 2024
d3bac3e
Merge remote-tracking branch 'upstream/master' into upstream
Aug 29, 2024
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 @@ -26,7 +26,7 @@
Text="{Loc 'news-read-ui-next-text'}"
ToolTip="{Loc 'news-read-ui-next-tooltip'}"/>
</BoxContainer>
<controls:StripeBack Name="АrticleNameContainer">
<controls:StripeBack Name="ArticleNameContainer">
<PanelContainer>
<Label Name="PageNum" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="4,0,0,0"/>
<Label Name="PageName" Align="Center"/>
Expand Down
8 changes: 4 additions & 4 deletions Content.IntegrationTests/Tests/PostMapInitTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -248,14 +248,14 @@ await server.WaitPost(() =>
var jobs = new HashSet<ProtoId<JobPrototype>>(comp.SetupAvailableJobs.Keys);

var spawnPoints = entManager.EntityQuery<SpawnPointComponent>()
.Where(x => x.SpawnType == SpawnPointType.Job)
.Select(x => x.Job!.Value);
.Where(x => x.SpawnType == SpawnPointType.Job && x.Job != null)
.Select(x => x.Job.Value);

jobs.ExceptWith(spawnPoints);

spawnPoints = entManager.EntityQuery<ContainerSpawnPointComponent>()
.Where(x => x.SpawnType == SpawnPointType.Job)
.Select(x => x.Job!.Value);
.Where(x => x.SpawnType is SpawnPointType.Job or SpawnPointType.Unset && x.Job != null)
.Select(x => x.Job.Value);

jobs.ExceptWith(spawnPoints);

Expand Down
4 changes: 2 additions & 2 deletions Content.Server/Anomaly/AnomalySynchronizerSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ private void OnPowerChanged(Entity<AnomalySynchronizerComponent> ent, ref PowerC
if (!TryComp<AnomalyComponent>(ent.Comp.ConnectedAnomaly, out var anomaly))
return;

DisconneсtFromAnomaly(ent, anomaly);
DisconnectFromAnomaly(ent, anomaly);
}

private void OnExamined(Entity<AnomalySynchronizerComponent> ent, ref ExaminedEvent args)
Expand Down Expand Up @@ -125,7 +125,7 @@ private void ConnectToAnomaly(Entity<AnomalySynchronizerComponent> ent, Entity<A

//TODO: disconnection from the anomaly should also be triggered if the anomaly is far away from the synchronizer.
//Currently only bluespace anomaly can do this, but for some reason it is the only one that cannot be connected to the synchronizer.
private void DisconneсtFromAnomaly(Entity<AnomalySynchronizerComponent> ent, AnomalyComponent anomaly)
private void DisconnectFromAnomaly(Entity<AnomalySynchronizerComponent> ent, AnomalyComponent anomaly)
{
if (ent.Comp.ConnectedAnomaly == null)
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ private void OnPacketRecv(EntityUid uid, AtmosMonitorComponent component, Device
}

_deviceNetSystem.QueuePacket(uid, args.SenderAddress, payload);
Alert(uid, component.LastAlarmState);
break;
}
}
Expand Down
7 changes: 1 addition & 6 deletions Content.Server/GameTicking/GameTicker.RoundFlow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@
using Content.Server.GameTicking.Events;
using Content.Server.Ghost;
using Content.Server.Maps;
using Content.Server.Voting.Managers;
using Content.Shared.CCVar;
using Content.Shared.Database;
using Content.Shared.GameTicking;
using Content.Shared.Mind;
using Content.Shared.Players;
using Content.Shared.Preferences;
using Content.Shared.Voting;
using JetBrains.Annotations;
using Prometheus;
using Robust.Server.Maps;
Expand All @@ -29,7 +27,6 @@ public sealed partial class GameTicker
{
[Dependency] private readonly DiscordWebhook _discord = default!;
[Dependency] private readonly ITaskManager _taskManager = default!;
[Dependency] private readonly IVoteManager _vote = default!;

private static readonly Counter RoundNumberMetric = Metrics.CreateCounter(
"ss14_round_number",
Expand Down Expand Up @@ -296,7 +293,7 @@ public void StartRound(bool force = false)
AnnounceRound();
UpdateInfoText();
SendRoundStartedDiscordMessage();
RaiseLocalEvent(new RoundStartedEvent(RoundId)); // Corvax
RaiseLocalEvent(new RoundStartedEvent(RoundId)); // Stories

#if EXCEPTION_TOLERANCE
}
Expand Down Expand Up @@ -520,8 +517,6 @@ public void RestartRound()
UpdateInfoText();

ReqWindowAttentionAll();
_vote.CreateStandardVote(null, StandardVoteType.Map); // Stories-AutoVote
_vote.CreateStandardVote(null, StandardVoteType.Preset); // Stories-AutoVote
}
}

Expand Down
3 changes: 2 additions & 1 deletion Content.Server/GameTicking/Rules/NukeopsRuleSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,10 @@ private void OnRoundEnd(Entity<NukeopsRuleComponent> ent)

var diskAtCentCom = false;
var diskQuery = AllEntityQuery<NukeDiskComponent, TransformComponent>();
while (diskQuery.MoveNext(out _, out var transform))
while (diskQuery.MoveNext(out var diskUid, out _, out var transform))
{
diskAtCentCom = transform.MapUid != null && centcomms.Contains(transform.MapUid.Value);
diskAtCentCom |= _emergency.IsTargetEscaping(diskUid);

// TODO: The target station should be stored, and the nuke disk should store its original station.
// This is fine for now, because we can assume a single station in base SS14.
Expand Down
12 changes: 4 additions & 8 deletions Content.Server/Shuttles/Systems/ArrivalsSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using Content.Server.Shuttles.Components;
using Content.Server.Shuttles.Events;
using Content.Server.Spawners.Components;
using Content.Server.Spawners.EntitySystems;
using Content.Server.Station.Components;
using Content.Server.Station.Events;
using Content.Server.Station.Systems;
Expand Down Expand Up @@ -69,11 +70,6 @@ public sealed class ArrivalsSystem : EntitySystem
/// </summary>
public bool Enabled { get; private set; }

/// <summary>
/// Flags if all players must arrive via the Arrivals system, or if they can spawn in other ways.
/// </summary>
public bool Forced { get; private set; }

/// <summary>
/// Flags if all players spawning at the departure terminal have godmode until they leave the terminal.
/// </summary>
Expand All @@ -95,6 +91,8 @@ public override void Initialize()
{
base.Initialize();

SubscribeLocalEvent<PlayerSpawningEvent>(HandlePlayerSpawning, before: new []{ typeof(ContainerSpawnPointSystem), typeof(SpawnPointSystem)});

SubscribeLocalEvent<StationArrivalsComponent, StationPostInitEvent>(OnStationPostInit);

SubscribeLocalEvent<ArrivalsShuttleComponent, ComponentStartup>(OnShuttleStartup);
Expand All @@ -112,11 +110,9 @@ public override void Initialize()

// Don't invoke immediately as it will get set in the natural course of things.
Enabled = _cfgManager.GetCVar(CCVars.ArrivalsShuttles);
Forced = _cfgManager.GetCVar(CCVars.ForceArrivals);
ArrivalsGodmode = _cfgManager.GetCVar(CCVars.GodmodeArrivals);

_cfgManager.OnValueChanged(CCVars.ArrivalsShuttles, SetArrivals);
_cfgManager.OnValueChanged(CCVars.ForceArrivals, b => Forced = b);
_cfgManager.OnValueChanged(CCVars.GodmodeArrivals, b => ArrivalsGodmode = b);

// Command so admins can set these for funsies
Expand Down Expand Up @@ -339,7 +335,7 @@ public void HandlePlayerSpawning(PlayerSpawningEvent ev)
return;

// Only works on latejoin even if enabled.
if (!Enabled || !Forced && _ticker.RunLevel != GameRunLevel.InRound)
if (!Enabled || _ticker.RunLevel != GameRunLevel.InRound)
return;

if (!HasComp<StationArrivalsComponent>(ev.Station))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ private void OnStationPostInit(ref StationPostInitEvent ev)
continue;
}

TryAddFTLDestination(gridXform.MapID, true, out _);
TryAddFTLDestination(gridXform.MapID, true, false, false, out _);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ public sealed class ContainerSpawnPointSystem : EntitySystem
[Dependency] private readonly StationSystem _station = default!;
[Dependency] private readonly StationSpawningSystem _stationSpawning = default!;

public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<PlayerSpawningEvent>(HandlePlayerSpawning, before: new []{ typeof(SpawnPointSystem) });
}

public void HandlePlayerSpawning(PlayerSpawningEvent args)
{
if (args.SpawnResult != null)
Expand Down
42 changes: 0 additions & 42 deletions Content.Server/Station/Systems/StationSpawningSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,27 +56,11 @@ public sealed class StationSpawningSystem : SharedStationSpawningSystem

private bool _randomizeCharacters;

private Dictionary<SpawnPriorityPreference, Action<PlayerSpawningEvent>> _spawnerCallbacks = new();

/// <inheritdoc/>
public override void Initialize()
{
base.Initialize();
Subs.CVar(_configurationManager, CCVars.ICRandomCharacters, e => _randomizeCharacters = e, true);

_spawnerCallbacks = new Dictionary<SpawnPriorityPreference, Action<PlayerSpawningEvent>>()
{
{ SpawnPriorityPreference.Arrivals, _arrivalsSystem.HandlePlayerSpawning },
{
SpawnPriorityPreference.Cryosleep, ev =>
{
if (_arrivalsSystem.Forced)
_arrivalsSystem.HandlePlayerSpawning(ev);
else
_containerSpawnPointSystem.HandlePlayerSpawning(ev);
}
}
};
}

/// <summary>
Expand All @@ -98,33 +82,7 @@ public override void Initialize()

var ev = new PlayerSpawningEvent(job, profile, station);

if (station != null && profile != null)
{
// Try to call the character's preferred spawner first.
if (_spawnerCallbacks.TryGetValue(profile.SpawnPriority, out var preferredSpawner))
{
preferredSpawner(ev);

foreach (var (key, remainingSpawner) in _spawnerCallbacks)
{
if (key == profile.SpawnPriority)
continue;

remainingSpawner(ev);
}
}
else
{
// Call all of them in the typical order.
foreach (var typicalSpawner in _spawnerCallbacks.Values)
{
typicalSpawner(ev);
}
}
}

RaiseLocalEvent(ev);

DebugTools.Assert(ev.SpawnResult is { Valid: true } or null);

return ev.SpawnResult;
Expand Down
6 changes: 0 additions & 6 deletions Content.Shared/CCVar/CCVars.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1478,12 +1478,6 @@ public static readonly CVarDef<int>
public static readonly CVarDef<bool> ArrivalsReturns =
CVarDef.Create("shuttle.arrivals_returns", false, CVar.SERVERONLY);

/// <summary>
/// Should all players be forced to spawn at departures, even on roundstart, even if their loadout says they spawn in cryo?
/// </summary>
public static readonly CVarDef<bool> ForceArrivals =
CVarDef.Create("shuttle.force_arrivals", false, CVar.SERVERONLY);

/// <summary>
/// Should all players who spawn at arrivals have godmode until they leave the map?
/// </summary>
Expand Down
Loading
Loading