Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/wizards/master' into upstr…
Browse files Browse the repository at this point in the history
…eam-sync

# Conflicts:
#	Content.Client/Preferences/ClientPreferencesManager.cs
#	Content.Client/Preferences/UI/CharacterSetupGui.xaml.cs
#	Content.Client/Preferences/UI/HumanoidProfileEditor.xaml.cs
#	Content.Server/Preferences/Managers/ServerPreferencesManager.cs
#	Content.Server/Station/Systems/StationSpawningSystem.cs
#	Content.Shared/Preferences/HumanoidCharacterProfile.cs
#	Content.Shared/Preferences/ICharacterProfile.cs
#	Resources/Prototypes/Roles/Jobs/Security/head_of_security.yml
#	Resources/Prototypes/Roles/Jobs/Security/security_cadet.yml
#	Resources/Prototypes/Roles/Jobs/Security/security_officer.yml
#	Resources/Prototypes/Roles/Jobs/Security/warden.yml
#	Resources/Prototypes/Roles/Jobs/Wildcards/psychologist.yml
#	Resources/Textures/Clothing/Hands/Gloves/Color/blue.rsi/inhand-left.png
#	Resources/Textures/Clothing/Hands/Gloves/Color/blue.rsi/inhand-right.png
#	Resources/Textures/Clothing/Hands/Gloves/Color/brown.rsi/icon.png
#	Resources/Textures/Clothing/Hands/Gloves/Color/brown.rsi/inhand-left.png
#	Resources/Textures/Clothing/Hands/Gloves/Color/brown.rsi/inhand-right.png
#	Resources/Textures/Clothing/Hands/Gloves/Color/brown.rsi/meta.json
#	Resources/Textures/Clothing/Hands/Gloves/Color/color.rsi/meta.json
#	Resources/Textures/Clothing/Hands/Gloves/Color/gray.rsi/icon.png
#	Resources/Textures/Clothing/Hands/Gloves/Color/gray.rsi/inhand-left.png
#	Resources/Textures/Clothing/Hands/Gloves/Color/gray.rsi/inhand-right.png
#	Resources/Textures/Clothing/Hands/Gloves/Color/gray.rsi/meta.json
#	Resources/Textures/Clothing/Hands/Gloves/Color/green.rsi/equipped-HAND.png
#	Resources/Textures/Clothing/Hands/Gloves/Color/green.rsi/icon.png
#	Resources/Textures/Clothing/Hands/Gloves/Color/green.rsi/meta.json
#	Resources/Textures/Clothing/Hands/Gloves/Color/lightbrown.rsi/icon.png
#	Resources/Textures/Clothing/Hands/Gloves/Color/lightbrown.rsi/inhand-left.png
#	Resources/Textures/Clothing/Hands/Gloves/Color/lightbrown.rsi/inhand-right.png
#	Resources/Textures/Clothing/Hands/Gloves/Color/lightbrown.rsi/meta.json
#	Resources/Textures/Clothing/Hands/Gloves/Color/orange.rsi/equipped-HAND.png
#	Resources/Textures/Clothing/Hands/Gloves/Color/orange.rsi/icon.png
#	Resources/Textures/Clothing/Hands/Gloves/Color/orange.rsi/inhand-left.png
#	Resources/Textures/Clothing/Hands/Gloves/Color/orange.rsi/inhand-right.png
#	Resources/Textures/Clothing/Hands/Gloves/Color/orange.rsi/meta.json
#	Resources/Textures/Clothing/Hands/Gloves/Color/purple.rsi/equipped-HAND.png
#	Resources/Textures/Clothing/Hands/Gloves/Color/purple.rsi/icon.png
#	Resources/Textures/Clothing/Hands/Gloves/Color/purple.rsi/inhand-left.png
#	Resources/Textures/Clothing/Hands/Gloves/Color/purple.rsi/inhand-right.png
#	Resources/Textures/Clothing/Hands/Gloves/Color/purple.rsi/meta.json
#	Resources/Textures/Clothing/Hands/Gloves/Color/red.rsi/equipped-HAND.png
#	Resources/Textures/Clothing/Hands/Gloves/Color/red.rsi/icon.png
#	Resources/Textures/Clothing/Hands/Gloves/Color/red.rsi/inhand-left.png
#	Resources/Textures/Clothing/Hands/Gloves/Color/red.rsi/inhand-right.png
#	Resources/Textures/Clothing/Hands/Gloves/Color/red.rsi/meta.json
#	Resources/Textures/Clothing/Hands/Gloves/Color/white.rsi/icon.png
#	Resources/Textures/Clothing/Hands/Gloves/Color/white.rsi/meta.json
#	Resources/Textures/Clothing/Shoes/Color/black.rsi/meta.json
#	Resources/Textures/Clothing/Shoes/Color/blue.rsi/meta.json
#	Resources/Textures/Clothing/Shoes/Color/brown.rsi/meta.json
#	Resources/Textures/Clothing/Shoes/Color/green.rsi/meta.json
#	Resources/Textures/Clothing/Shoes/Color/orange.rsi/meta.json
#	Resources/Textures/Clothing/Shoes/Color/purple.rsi/meta.json
#	Resources/Textures/Clothing/Shoes/Color/red.rsi/meta.json
#	Resources/Textures/Clothing/Shoes/Color/white.rsi/meta.json
#	Resources/Textures/Clothing/Shoes/Color/yellow.rsi/meta.json
#	Resources/Textures/Clothing/Uniforms/Jumpskirt/color.rsi/equipped-INNERCLOTHING-reptilian.png
#	Resources/Textures/Clothing/Uniforms/Jumpskirt/color.rsi/meta.json
#	Resources/Textures/Clothing/Uniforms/Jumpsuit/Color/black.rsi/meta.json
#	Resources/Textures/Clothing/Uniforms/Jumpsuit/Color/blue.rsi/meta.json
#	Resources/Textures/Clothing/Uniforms/Jumpsuit/Color/brown.rsi/meta.json
#	Resources/Textures/Clothing/Uniforms/Jumpsuit/Color/darkblue.rsi/meta.json
#	Resources/Textures/Clothing/Uniforms/Jumpsuit/Color/darkgreen.rsi/meta.json
#	Resources/Textures/Clothing/Uniforms/Jumpsuit/Color/green.rsi/meta.json
#	Resources/Textures/Clothing/Uniforms/Jumpsuit/Color/lightbrown.rsi/meta.json
#	Resources/Textures/Clothing/Uniforms/Jumpsuit/Color/lightpurple.rsi/meta.json
#	Resources/Textures/Clothing/Uniforms/Jumpsuit/Color/maroon.rsi/meta.json
#	Resources/Textures/Clothing/Uniforms/Jumpsuit/Color/orange.rsi/meta.json
#	Resources/Textures/Clothing/Uniforms/Jumpsuit/Color/pink.rsi/meta.json
#	Resources/Textures/Clothing/Uniforms/Jumpsuit/Color/red.rsi/meta.json
#	Resources/Textures/Clothing/Uniforms/Jumpsuit/Color/teal.rsi/meta.json
#	Resources/Textures/Clothing/Uniforms/Jumpsuit/Color/white.rsi/meta.json
#	Resources/Textures/Clothing/Uniforms/Jumpsuit/Color/yellow.rsi/meta.json
#	Resources/Textures/Clothing/Uniforms/Jumpsuit/prisoner.rsi/meta.json
  • Loading branch information
Arthur Asimov committed Apr 17, 2024
2 parents 5ba5641 + 5742dee commit 0b621a7
Show file tree
Hide file tree
Showing 686 changed files with 24,633 additions and 4,139 deletions.
3 changes: 2 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ indent_style = space
tab_width = 4

# New line preferences
#end_of_line = crlf
end_of_line = crlf:suggestion
insert_final_newline = true
trim_trailing_whitespace = true

Expand Down Expand Up @@ -104,6 +104,7 @@ csharp_preferred_modifier_order = public, private, protected, internal, new, abs

# 'using' directive preferences
csharp_using_directive_placement = outside_namespace:silent
csharp_style_namespace_declarations = file_scoped:suggestion

#### C# Formatting Rules ####

Expand Down
2 changes: 1 addition & 1 deletion Content.Benchmarks/SpawnEquipDeleteBenchmark.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ await _pair.Server.WaitPost(() =>
for (var i = 0; i < N; i++)
{
_entity = server.EntMan.SpawnAttachedTo(Mob, _coords);
_spawnSys.EquipStartingGear(_entity, _gear, null);
_spawnSys.EquipStartingGear(_entity, _gear);
server.EntMan.DeleteEntity(_entity);
}
});
Expand Down
31 changes: 31 additions & 0 deletions Content.Client/Clothing/Systems/WaddleClothingSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using Content.Shared.Clothing.Components;
using Content.Shared.Movement.Components;
using Content.Shared.Inventory.Events;

namespace Content.Client.Clothing.Systems;

public sealed class WaddleClothingSystem : EntitySystem
{
public override void Initialize()
{
base.Initialize();

SubscribeLocalEvent<WaddleWhenWornComponent, GotEquippedEvent>(OnGotEquipped);
SubscribeLocalEvent<WaddleWhenWornComponent, GotUnequippedEvent>(OnGotUnequipped);
}

private void OnGotEquipped(EntityUid entity, WaddleWhenWornComponent comp, GotEquippedEvent args)
{
var waddleAnimComp = EnsureComp<WaddleAnimationComponent>(args.Equipee);

waddleAnimComp.AnimationLength = comp.AnimationLength;
waddleAnimComp.HopIntensity = comp.HopIntensity;
waddleAnimComp.RunAnimationLengthMultiplier = comp.RunAnimationLengthMultiplier;
waddleAnimComp.TumbleIntensity = comp.TumbleIntensity;
}

private void OnGotUnequipped(EntityUid entity, WaddleWhenWornComponent comp, GotUnequippedEvent args)
{
RemComp<WaddleAnimationComponent>(args.Equipee);
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Linq;
using System.Numerics;
using Content.Shared.Atmos;
using Content.Client.UserInterface.Controls;
using Content.Shared.Damage;
using Content.Shared.Damage.Prototypes;
Expand Down Expand Up @@ -79,7 +80,7 @@ public void Populate(HealthAnalyzerScannedUserMessage msg)
);

Temperature.Text = Loc.GetString("health-analyzer-window-entity-temperature-text",
("temperature", float.IsNaN(msg.Temperature) ? "N/A" : $"{msg.Temperature - 273f:F1} °C ({msg.Temperature:F1} °K)")
("temperature", float.IsNaN(msg.Temperature) ? "N/A" : $"{msg.Temperature - Atmospherics.T0C:F1} °C ({msg.Temperature:F1} K)")
);

BloodLevel.Text = Loc.GetString("health-analyzer-window-entity-blood-level-text",
Expand Down
44 changes: 24 additions & 20 deletions Content.Client/IoC/ClientContentIoC.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
using Content.Client.Guidebook;
using Content.Client.Replay;
using Content.Shared.Administration.Managers;
using Content.Shared.Players.PlayTimeTracking;


namespace Content.Client.IoC
Expand All @@ -30,26 +31,29 @@ internal static class ClientContentIoC
{
public static void Register()
{
IoCManager.Register<IParallaxManager, ParallaxManager>();
IoCManager.Register<IChatManager, ChatManager>();
IoCManager.Register<IClientPreferencesManager, ClientPreferencesManager>();
IoCManager.Register<IStylesheetManager, StylesheetManager>();
IoCManager.Register<IScreenshotHook, ScreenshotHook>();
IoCManager.Register<FullscreenHook, FullscreenHook>();
IoCManager.Register<IClickMapManager, ClickMapManager>();
IoCManager.Register<IClientAdminManager, ClientAdminManager>();
IoCManager.Register<ISharedAdminManager, ClientAdminManager>();
IoCManager.Register<EuiManager, EuiManager>();
IoCManager.Register<IVoteManager, VoteManager>();
IoCManager.Register<ChangelogManager, ChangelogManager>();
IoCManager.Register<RulesManager, RulesManager>();
IoCManager.Register<ViewportManager, ViewportManager>();
IoCManager.Register<ISharedAdminLogManager, SharedAdminLogManager>();
IoCManager.Register<GhostKickManager>();
IoCManager.Register<ExtendedDisconnectInformationManager>();
IoCManager.Register<JobRequirementsManager>();
IoCManager.Register<DocumentParsingManager>();
IoCManager.Register<ContentReplayPlaybackManager, ContentReplayPlaybackManager>();
var collection = IoCManager.Instance!;

collection.Register<IParallaxManager, ParallaxManager>();
collection.Register<IChatManager, ChatManager>();
collection.Register<IClientPreferencesManager, ClientPreferencesManager>();
collection.Register<IStylesheetManager, StylesheetManager>();
collection.Register<IScreenshotHook, ScreenshotHook>();
collection.Register<FullscreenHook, FullscreenHook>();
collection.Register<IClickMapManager, ClickMapManager>();
collection.Register<IClientAdminManager, ClientAdminManager>();
collection.Register<ISharedAdminManager, ClientAdminManager>();
collection.Register<EuiManager, EuiManager>();
collection.Register<IVoteManager, VoteManager>();
collection.Register<ChangelogManager, ChangelogManager>();
collection.Register<RulesManager, RulesManager>();
collection.Register<ViewportManager, ViewportManager>();
collection.Register<ISharedAdminLogManager, SharedAdminLogManager>();
collection.Register<GhostKickManager>();
collection.Register<ExtendedDisconnectInformationManager>();
collection.Register<JobRequirementsManager>();
collection.Register<DocumentParsingManager>();
collection.Register<ContentReplayPlaybackManager, ContentReplayPlaybackManager>();
collection.Register<ISharedPlaytimeManager, JobRequirementsManager>();
}
}
}
19 changes: 7 additions & 12 deletions Content.Client/Lobby/LobbyState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,19 @@ protected override void Startup()

_characterSetup.CloseButton.OnPressed += _ =>
{
// Reset sliders etc.
_characterSetup?.UpdateControls();

var controller = _userInterfaceManager.GetUIController<LobbyUIController>();
controller.SetClothes(true);
controller.UpdateProfile();
_lobby.SwitchState(LobbyGui.LobbyGuiState.Default);
};

_characterSetup.SaveButton.OnPressed += _ =>
{
_characterSetup.Save();
_lobby.CharacterPreview.UpdateUI();
_userInterfaceManager.GetUIController<LobbyUIController>().ReloadProfile();
};

LayoutContainer.SetAnchorPreset(_lobby, LayoutContainer.LayoutPreset.Wide);
Expand All @@ -84,10 +90,6 @@ protected override void Startup()
_gameTicker.InfoBlobUpdated += UpdateLobbyUi;
_gameTicker.LobbyStatusUpdated += LobbyStatusUpdated;
_gameTicker.LobbyLateJoinStatusUpdated += LobbyLateJoinStatusUpdated;

_preferencesManager.OnServerDataLoaded += PreferencesDataLoaded;

_lobby.CharacterPreview.UpdateUI();
}

protected override void Shutdown()
Expand All @@ -109,13 +111,6 @@ protected override void Shutdown()

_characterSetup?.Dispose();
_characterSetup = null;

_preferencesManager.OnServerDataLoaded -= PreferencesDataLoaded;
}

private void PreferencesDataLoaded()
{
_lobby?.CharacterPreview.UpdateUI();
}

private void OnSetupPressed(BaseButton.ButtonEventArgs args)
Expand Down
Loading

0 comments on commit 0b621a7

Please sign in to comment.