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 sync #1626

Merged
merged 81 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
75580db
Remove gas tank throwing damage (#22296)
metalgearsloth Dec 10, 2023
b457ce7
Automatic changelog update
PJBot Dec 10, 2023
46e3693
High-latency DB testing stuff (#22282)
PJB3005 Dec 10, 2023
664d2b1
Don't allow disarm on incapacitated targets (#22298)
Errant-4 Dec 10, 2023
90786a5
small food slicing cleanup (#22291)
deltanedas Dec 10, 2023
aaad3bc
fix monkey pull (#22280)
Dutch-VanDerLinde Dec 10, 2023
3589ad9
Welder Blindness Effect Increase (#22304)
Nairodian Dec 10, 2023
b4f0a77
Automatic changelog update
PJBot Dec 10, 2023
09dbb24
Make items' default rotation orient them correctly (#22258)
EmoGarbage404 Dec 10, 2023
94d81d1
Medical Gauze Markings (#22245)
KittenColony Dec 10, 2023
add5236
Automatic changelog update
PJBot Dec 10, 2023
4eb7a8c
Add PercussionInstrument tag to Woodblock (#21874)
DanSAussieITS Dec 10, 2023
e1c9358
Fix hand order (#22306)
EmoGarbage404 Dec 11, 2023
bd3bea1
Cooler zombie moths (#21744)
Simyon264 Dec 11, 2023
6b7f1d2
Automatic changelog update
PJBot Dec 11, 2023
4dc0927
Added 7 textures of winter boots for each department. (#21810)
TheKilk Dec 11, 2023
07d8b14
Automatic changelog update
PJBot Dec 11, 2023
c095b7c
Animals obey conservation of matter unless they are undead (#21922)
Sirionaut Dec 11, 2023
76d64ac
Automatic changelog update
PJBot Dec 11, 2023
6444f7b
Make pipes leak when destroyed (#20928)
Partmedia Dec 11, 2023
dceb9fe
Automatic changelog update
PJBot Dec 11, 2023
923bbfb
Janitorial Bomb Suit (#22244)
UbaserB Dec 11, 2023
94c31d7
Automatic changelog update
PJBot Dec 11, 2023
5cf38a6
technical storage board spawner (#22314)
Emisse Dec 11, 2023
342b084
Fix planet command being ran on existing maps (#21775)
metalgearsloth Dec 11, 2023
1b5e503
Fix Glorfcode (#22271)
nok-ko Dec 11, 2023
aca2859
Automatic changelog update
PJBot Dec 11, 2023
ddec7a1
Update submodule to 190.1.0 (#22317)
metalgearsloth Dec 11, 2023
423c9fa
Two variations of human scars (#21895)
UbaserB Dec 11, 2023
bfee259
Automatic changelog update
PJBot Dec 11, 2023
79880a2
vault fridge (#22318)
Emisse Dec 11, 2023
8303be6
add black gloves to clothesmate (#22312)
QuietlyWhisper Dec 11, 2023
7679c5d
Emergency light tweaks (#22310)
mirrorcult Dec 11, 2023
19422e5
Automatic changelog update
PJBot Dec 11, 2023
f9dadba
fix (#22316)
UbaserB Dec 11, 2023
1945ded
fix small CanInsert bug (#22302)
EmoGarbage404 Dec 11, 2023
d264afd
Automatic changelog update
PJBot Dec 11, 2023
4035b76
Ert names ops (#22246)
lzk228 Dec 11, 2023
c2eb769
Remove noSpawn from all hardsuit helmets - allowing them to appear in…
Rainfey Dec 11, 2023
d82312e
The HUDening:tm: (SS13 HUD themes, Classic as default, and more) (#22…
Flareguy Dec 11, 2023
b339065
Automatic changelog update
PJBot Dec 11, 2023
02c8e58
Turn arrivals into a planetmap (#21777)
metalgearsloth Dec 11, 2023
3316e6e
Automatic changelog update
PJBot Dec 11, 2023
0188bbe
Adds cosmetic sunglasses (#22311)
QuietlyWhisper Dec 11, 2023
a04fe0d
Automatic changelog update
PJBot Dec 11, 2023
e85ca6a
make syndie bag and rigs explosion resistant (#22088)
deltanedas Dec 11, 2023
26a1198
Automatic changelog update
PJBot Dec 11, 2023
1bdf94d
Audio fixes (#22324)
metalgearsloth Dec 11, 2023
86432f1
Update submodule to 190.1.1 (#22325)
metalgearsloth Dec 11, 2023
c2df96a
Automatic changelog update
PJBot Dec 11, 2023
eb49ad1
Shuffle body container subs slightly (#21084)
metalgearsloth Dec 11, 2023
fb75a93
aspid update (#22326)
Emisse Dec 11, 2023
82c0616
atlas update (#22328)
Emisse Dec 11, 2023
5edff2c
bagel update (#22329)
Emisse Dec 11, 2023
36567bf
barratry update (#22330)
Emisse Dec 11, 2023
8d81a76
box update (#22331)
Emisse Dec 11, 2023
ef7baed
fland update (#22332)
Emisse Dec 11, 2023
e48ba7a
marathon update (#22333)
Emisse Dec 11, 2023
6545fd6
meta update (#22334)
Emisse Dec 11, 2023
f06f21d
omega update (#22335)
Emisse Dec 11, 2023
0179d64
packed update (#22336)
Emisse Dec 11, 2023
93760bc
saltern update (#22337)
Emisse Dec 11, 2023
c34ede3
give beer goggles solution scanning (#22321)
QuietlyWhisper Dec 11, 2023
2fa023a
Add Emergency Shotgun Cabinet (#21419) (#22327)
QuietlyWhisper Dec 11, 2023
7232a94
Add jensen glasses (#22323)
MACMAN2003 Dec 11, 2023
0b43ca0
Automatic changelog update
PJBot Dec 11, 2023
cf3a5fe
Automatic changelog update
PJBot Dec 11, 2023
b37b988
Even spaced hotbar (#22252)
EmoGarbage404 Dec 11, 2023
000c776
delete kettle files (#22338)
Emisse Dec 11, 2023
1cea524
Revert "Shuffle body container subs slightly (#21084)" (#22339)
metalgearsloth Dec 11, 2023
8b2579d
Remove gas prices temporarily (#22285)
metalgearsloth Dec 11, 2023
12dc894
Automatic changelog update
PJBot Dec 11, 2023
29f3f2a
the petahning (#22343)
asperger-sind Dec 11, 2023
96e8e2f
Add missing changelog entry (#22344)
Errant-4 Dec 11, 2023
e45e862
Automatic changelog update
PJBot Dec 11, 2023
45b12cd
Update guidebook botany entry (#22351)
willicassi Dec 11, 2023
2b5fd0e
Automatic changelog update
PJBot Dec 11, 2023
29a7082
Merge remote-tracking branch 'upstream/master' into upstream-sync
Morb0 Dec 11, 2023
3aaeb7f
Fix upstream
Morb0 Dec 11, 2023
e20807c
Update locale
Morb0 Dec 11, 2023
f74957c
Fix upstream
Morb0 Dec 11, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 7 additions & 4 deletions Content.Client/Audio/BackgroundAudioSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ namespace Content.Client.Audio;
[UsedImplicitly]
public sealed class BackgroundAudioSystem : EntitySystem
{
/*
* TODO: Nuke this system and merge into contentaudiosystem
*/
[Dependency] private readonly SharedAudioSystem _audio = default!;
[Dependency] private readonly IBaseClient _client = default!;
[Dependency] private readonly IConfigurationManager _configManager = default!;
Expand All @@ -22,7 +25,7 @@ public sealed class BackgroundAudioSystem : EntitySystem

private readonly AudioParams _lobbyParams = new(-5f, 1, "Master", 0, 0, 0, true, 0f);

private EntityUid? _lobbyStream;
public EntityUid? LobbyStream;

public override void Initialize()
{
Expand Down Expand Up @@ -109,7 +112,7 @@ public void RestartLobbyMusic()

public void StartLobbyMusic()
{
if (_lobbyStream != null || !_configManager.GetCVar(CCVars.LobbyMusicEnabled))
if (LobbyStream != null || !_configManager.GetCVar(CCVars.LobbyMusicEnabled))
return;

var file = _gameTicker.LobbySong;
Expand All @@ -118,12 +121,12 @@ public void StartLobbyMusic()
return;
}

_lobbyStream = _audio.PlayGlobal(file, Filter.Local(), false,
LobbyStream = _audio.PlayGlobal(file, Filter.Local(), false,
_lobbyParams.WithVolume(_lobbyParams.Volume + SharedAudioSystem.GainToVolume(_configManager.GetCVar(CCVars.LobbyMusicVolume))))?.Entity;
}

private void EndLobbyMusic()
{
_lobbyStream = _audio.Stop(_lobbyStream);
LobbyStream = _audio.Stop(LobbyStream);
}
}
2 changes: 1 addition & 1 deletion Content.Client/Audio/ContentAudioSystem.AmbientMusic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ private void UpdateAmbientMusic()
// Update still runs in lobby so just ignore it.
if (_state.CurrentState is not GameplayState)
{
FadeOut(_ambientMusicStream);
Audio.Stop(_ambientMusicStream);
_ambientMusicStream = null;
_musicProto = null;
return;
Expand Down
19 changes: 19 additions & 0 deletions Content.Client/Audio/ContentAudioSystem.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Content.Shared.Audio;
using Content.Shared.CCVar;
using Content.Shared.GameTicking;
using Robust.Client.GameObjects;
using Robust.Shared;
using Robust.Shared.Audio;
Expand Down Expand Up @@ -38,6 +39,24 @@ public override void Initialize()
base.Initialize();
UpdatesOutsidePrediction = true;
InitializeAmbientMusic();
SubscribeNetworkEvent<RoundRestartCleanupEvent>(OnRoundCleanup);
}

private void OnRoundCleanup(RoundRestartCleanupEvent ev)
{
_fadingOut.Clear();

// Preserve lobby music but everything else should get dumped.
var lobbyStream = EntityManager.System<BackgroundAudioSystem>().LobbyStream;
TryComp(lobbyStream, out AudioComponent? audioComp);
var oldGain = audioComp?.Gain;

SilenceAudio();

if (oldGain != null)
{
Audio.SetGain(lobbyStream, oldGain.Value, audioComp);
}
}

public override void Shutdown()
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Eye/Blinding/BlurryVisionOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ protected override void Draw(in OverlayDrawArgs args)
// Maybe gradually shrink the view-size?
// Make the effect only apply to the edge of the viewport?
// Actually make it blurry??
var opacity = 0.75f * _magnitude / BlurryVisionComponent.MaxMagnitude;
var opacity = 1f * _magnitude / BlurryVisionComponent.MaxMagnitude;
var worldHandle = args.WorldHandle;
var viewport = args.WorldBounds;
worldHandle.SetTransform(Matrix3.Identity);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -706,17 +706,14 @@ public void SendMessage(ChatBox box, ChatSelectChannel channel)

private void OnDamageForceSay(DamageForceSayEvent ev, EntitySessionEventArgs _)
{
if (UIManager.ActiveScreen?.GetWidget<ChatBox>() is not { } chatBox)
return;

var chatBox = UIManager.ActiveScreen?.GetWidget<ChatBox>() ?? UIManager.ActiveScreen?.GetWidget<ResizableChatBox>();
// Don't send on OOC/LOOC obviously!
if (chatBox.SelectedChannel is not
(ChatSelectChannel.Local or
if (chatBox?.SelectedChannel is not (ChatSelectChannel.Local or
ChatSelectChannel.Radio or
ChatSelectChannel.Whisper))
return;

if (_player.LocalPlayer?.ControlledEntity is not { } ent
if (_player.LocalSession?.AttachedEntity is not { } ent
|| !EntityManager.TryGetComponent<DamageForceSayComponent>(ent, out var forceSay))
return;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ public sealed class HandsContainer : ItemSlotUIContainer<HandButton>
public int ColumnLimit { get => _grid.Columns; set => _grid.Columns = value; }
public int MaxButtonCount { get; set; } = 0;

public int MaxButtonsPerRow { get; set; }= 6;

/// <summary>
/// Indexer. This is used to reference a HandsContainer from the
/// controller.
Expand All @@ -36,6 +38,7 @@ public HandsContainer()
_grid.AddChild(newButton);
}

_grid.Columns = Math.Min(_grid.ChildCount, MaxButtonsPerRow);
return base.AddButton(newButton);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,39 +24,46 @@
Visible="False"/>
</BoxContainer>
</Control>
<inventory:ItemSlotButtonContainer
Name="InventoryHotbar"
Access="Public"
Visible="False"
Columns="10"
SlotGroup="Default"
ExpandBackwards="True"
VerticalExpand="True"
HorizontalAlignment="Center"
VerticalAlignment="Bottom"
/>
<BoxContainer Orientation="Horizontal" Name="Hotbar">
<BoxContainer Orientation="Vertical">
<inventory:ItemSlotButtonContainer
Name="SecondHotbar"
SlotGroup="SecondHotbar"
VerticalAlignment="Bottom"
HorizontalAlignment="Right"
VerticalExpand="False"
Columns="6"
HorizontalExpand="True"/>
<hands:HandsContainer
Name="HandContainer"
Name="InventoryHotbar"
Access="Public"
Visible="False"
Columns="10"
SlotGroup="Default"
ExpandBackwards="True"
VerticalExpand="True"
HorizontalAlignment="Center"
ColumnLimit="6" />
<inventory:ItemSlotButtonContainer
Name="MainHotbar"
SlotGroup="MainHotbar"
VerticalExpand="False"
HorizontalAlignment="Left"
VerticalAlignment="Bottom"
HorizontalExpand="True"
Columns="6"
/>
Margin="0 0 0 4"
/>
<BoxContainer Orientation="Horizontal" Name="Hotbar" HorizontalAlignment="Center">
<inventory:ItemSlotButtonContainer
Name="SecondHotbar"
SlotGroup="SecondHotbar"
VerticalAlignment="Bottom"
HorizontalAlignment="Right"
VerticalExpand="False"
ExpandBackwards="True"
Columns="6"
HorizontalExpand="False"/>
<hands:HandsContainer
Name="HandContainer"
Access="Public"
HorizontalAlignment="Center"
HorizontalExpand="False"
ColumnLimit="6"
Margin="4 0 4 0"/>
<inventory:ItemSlotButtonContainer
Name="MainHotbar"
SlotGroup="MainHotbar"
VerticalExpand="False"
HorizontalAlignment="Left"
VerticalAlignment="Bottom"
HorizontalExpand="False"
ExpandBackwards="True"
Columns="6"
/>
</BoxContainer>
</BoxContainer>
</widgets:HotbarGui>
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public bool TryAddButton(SlotControl control)
{
if (!Children.Contains(newButton) && newButton.Parent == null && newButton.SlotName != "")
AddChild(newButton);
Columns = ChildCount;
return AddButtonToDict(newButton);
}

Expand Down
1 change: 0 additions & 1 deletion Content.IntegrationTests/Tests/PostMapInitTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ public sealed class PostMapInitTest
"Saltern",
"Core",
"Marathon",
"Kettle",
"Gemini",
"MeteorArena",
"Atlas"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
using Microsoft.EntityFrameworkCore;
using Robust.Shared.Configuration;
using Robust.Shared.Enums;
using Robust.Shared.Log;
using Robust.Shared.Maths;
using Robust.Shared.Network;
using Robust.Shared.Prototypes;
using Robust.UnitTesting;

namespace Content.IntegrationTests.Tests.Preferences
{
Expand Down Expand Up @@ -70,20 +72,22 @@ private static HumanoidCharacterProfile CharlieCharlieson()
);
}

private static ServerDbSqlite GetDb(IConfigurationManager cfgManager)
private static ServerDbSqlite GetDb(RobustIntegrationTest.ServerIntegrationInstance server)
{
var cfg = server.ResolveDependency<IConfigurationManager>();
var opsLog = server.ResolveDependency<ILogManager>().GetSawmill("db.ops");
var builder = new DbContextOptionsBuilder<SqliteServerDbContext>();
var conn = new SqliteConnection("Data Source=:memory:");
conn.Open();
builder.UseSqlite(conn);
return new ServerDbSqlite(() => builder.Options, true, cfgManager, true);
return new ServerDbSqlite(() => builder.Options, true, cfg, true, opsLog);
}

[Test]
public async Task TestUserDoesNotExist()
{
var pair = await PoolManager.GetServerClient();
var db = GetDb(pair.Server.ResolveDependency<IConfigurationManager>());
var db = GetDb(pair.Server);
// Database should be empty so a new GUID should do it.
Assert.Null(await db.GetPlayerPreferencesAsync(NewUserId()));

Expand All @@ -94,7 +98,7 @@ public async Task TestUserDoesNotExist()
public async Task TestInitPrefs()
{
var pair = await PoolManager.GetServerClient();
var db = GetDb(pair.Server.ResolveDependency<IConfigurationManager>());
var db = GetDb(pair.Server);
var username = new NetUserId(new Guid("640bd619-fc8d-4fe2-bf3c-4a5fb17d6ddd"));
const int slot = 0;
var originalProfile = CharlieCharlieson();
Expand All @@ -109,7 +113,7 @@ public async Task TestDeleteCharacter()
{
var pair = await PoolManager.GetServerClient();
var server = pair.Server;
var db = GetDb(server.ResolveDependency<IConfigurationManager>());
var db = GetDb(server);
var username = new NetUserId(new Guid("640bd619-fc8d-4fe2-bf3c-4a5fb17d6ddd"));
await db.InitPrefsAsync(username, new HumanoidCharacterProfile());
await db.SaveCharacterSlotAsync(username, CharlieCharlieson(), 1);
Expand Down
25 changes: 12 additions & 13 deletions Content.Server/Animals/Components/EggLayerComponent.cs
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
using Content.Shared.Storage;
using Robust.Shared.Audio;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;

namespace Content.Server.Animals.Components;

/// <summary>
/// This component handles animals which lay eggs (or some other item) on a timer, using up hunger to do so.
/// It also grants an action to players who are controlling these entities, allowing them to do it manually.
/// </summary>

[RegisterComponent]
public sealed partial class EggLayerComponent : Component
{
[DataField("eggLayAction", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
public string EggLayAction = "ActionAnimalLayEgg";
[DataField]
public EntProtoId EggLayAction = "ActionAnimalLayEgg";

[ViewVariables(VVAccess.ReadWrite)]
[DataField("hungerUsage")]
/// <summary>
/// The amount of nutrient consumed on update.
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public float HungerUsage = 60f;

/// <summary>
/// Minimum cooldown used for the automatic egg laying.
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
[DataField("eggLayCooldownMin")]
[DataField, ViewVariables(VVAccess.ReadWrite)]
public float EggLayCooldownMin = 60f;

/// <summary>
/// Maximum cooldown used for the automatic egg laying.
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
[DataField("eggLayCooldownMax")]
[DataField, ViewVariables(VVAccess.ReadWrite)]
public float EggLayCooldownMax = 120f;

/// <summary>
Expand All @@ -39,14 +39,13 @@ public sealed partial class EggLayerComponent : Component
[ViewVariables(VVAccess.ReadWrite)]
public float CurrentEggLayCooldown;

[ViewVariables(VVAccess.ReadWrite)]
[DataField("eggSpawn", required: true)]
[DataField(required: true), ViewVariables(VVAccess.ReadWrite)]
public List<EntitySpawnEntry> EggSpawn = default!;

[DataField("eggLaySound")]
[DataField]
public SoundSpecifier EggLaySound = new SoundPathSpecifier("/Audio/Effects/pop.ogg");

[DataField("accumulatedFrametime")]
[DataField]
public float AccumulatedFrametime;

[DataField] public EntityUid? Action;
Expand Down
Loading
Loading