diff --git a/.github/workflows/build-test-debug.yml b/.github/workflows/build-test-debug.yml index 47f9fd1a514..0189aa91a70 100644 --- a/.github/workflows/build-test-debug.yml +++ b/.github/workflows/build-test-debug.yml @@ -36,7 +36,7 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v3.2.0 with: - dotnet-version: 8.0.x + dotnet-version: 8.0.203 - name: Install dependencies run: dotnet restore diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 58cc9ba4d20..9f9cc0bf554 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -77,7 +77,7 @@ jobs: with: host: ${{ secrets.BUILDS_HOST }} username: ${{ secrets.BUILDS_USERNAME }} - password: ${{ secrets.BUILD_PASSWORD }} + key: ${{ secrets.BUILDS_SSH_KEY }} port: ${{ secrets.BUILDS_PORT }} script: python3 ~/manifest.py --version ${{ github.sha }} diff --git a/.github/workflows/test-packaging.yml b/.github/workflows/test-packaging.yml index e3cd5159d5d..be0399b3b75 100644 --- a/.github/workflows/test-packaging.yml +++ b/.github/workflows/test-packaging.yml @@ -51,7 +51,7 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v3.2.0 with: - dotnet-version: 8.0.x + dotnet-version: 8.0.203 - name: Install dependencies run: dotnet restore diff --git a/.github/workflows/yaml-linter.yml b/.github/workflows/yaml-linter.yml index dfe497b100c..32b933d6f72 100644 --- a/.github/workflows/yaml-linter.yml +++ b/.github/workflows/yaml-linter.yml @@ -26,7 +26,7 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v3.2.0 with: - dotnet-version: 8.0.x + dotnet-version: 8.0.203 - name: Install dependencies run: dotnet restore - name: Build diff --git a/ADT_STATION b/ADT_STATION index ed73f1253d5..97bff099ae4 160000 --- a/ADT_STATION +++ b/ADT_STATION @@ -1 +1 @@ -Subproject commit ed73f1253d585bbab612647b94eb4341b4344a09 +Subproject commit 97bff099ae4400e9d077e34f73ee7ca7996ee14f diff --git a/Content.Client/ADT/Changeling/ChangelingPanelSystem.cs b/Content.Client/ADT/Changeling/ChangelingPanelSystem.cs new file mode 100644 index 00000000000..e0e8bd60e19 --- /dev/null +++ b/Content.Client/ADT/Changeling/ChangelingPanelSystem.cs @@ -0,0 +1,104 @@ +/// Made for Adventure Time Project by ModerN. https://github.com/modern-nm mailto:modern-nm@yandex.by +/// see also https://github.com/DocNITE/liebendorf-station/tree/feature/emote-radial-panel +using Content.Client.Humanoid; +using Content.Client.UserInterface.Systems.Radial; +using Content.Client.UserInterface.Systems.Radial.Controls; +using Content.Shared.Changeling; +using Content.Shared.Humanoid.Prototypes; +using Robust.Client.GameObjects; +using Robust.Client.Player; +using Robust.Client.UserInterface; +using Robust.Client.UserInterface.Controls; +using Robust.Shared.Map; +using Robust.Shared.Player; +using Robust.Shared.Prototypes; +using Robust.Shared.Random; +using Robust.Shared.Utility; +using System.Numerics; + +namespace Content.Client.ADT.Language; + +public sealed class ChangelingPanelSystem : EntitySystem +{ + [Dependency] private readonly IPrototypeManager _proto = default!; + [Dependency] private readonly IRobustRandom _random = default!; + [Dependency] private readonly IUserInterfaceManager _userInterfaceManager = default!; + [Dependency] private readonly IPlayerManager _playerMan = default!; + [Dependency] private readonly SpriteSystem _spriteSystem = default!; + [Dependency] private readonly IEntityManager _entManager = default!; + [Dependency] private readonly HumanoidAppearanceSystem _appearanceSystem = default!; + + /// + /// We should enable radial for single target + /// + private RadialContainer? _openedMenu; + + private const string DefaultIcon = "/Textures/Interface/AdminActions/play.png"; + + private const string EmptyIcon = "/Textures/Interface/AdminActions/emptyIcon.png"; + + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnPlayerAttached); + SubscribeLocalEvent(OnPlayerDetached); + + SubscribeNetworkEvent(HandleChangelingFormsMenuEvent); + } + + private void HandleChangelingFormsMenuEvent(RequestChangelingFormsMenuEvent args) + { + if (_openedMenu != null) + return; + if (_playerMan.LocalEntity == null) + { + return; + } + + //if (!TryComp(_playerMan.LocalEntity.Value, out var changelingComponent)) // нет на клиенте + // return; + + _openedMenu = _userInterfaceManager.GetUIController() + .CreateRadialContainer(); + + foreach (var humanoid in args.HumanoidData) + { + var dummy = _entManager.SpawnEntity(_proto.Index(humanoid.Species).DollPrototype, MapCoordinates.Nullspace); + //var humanoidEntityUid = GetEntity(humanoid); // Entities on the client outside of the FOV are nonexistant. You can see that if you zoom out. //So it'll give you UID 0 which is EntityUid.Invalid. + _appearanceSystem.LoadProfile(dummy, humanoid.Profile); + var face = new SpriteView(); + face.SetEntity(dummy); + + var actionName = humanoid.Name; + var texturePath = _spriteSystem.Frame0(new SpriteSpecifier.Texture(new ResPath(EmptyIcon))); + + var emoteButton = _openedMenu.AddButton(actionName, texturePath, face); + emoteButton.Opacity = 210; + emoteButton.Tooltip = null; + emoteButton.Controller.OnPressed += (_) => + { + var ev = new SelectChangelingFormEvent(args.Target, entitySelected: humanoid.NetEntity); + RaiseNetworkEvent(ev); + _openedMenu.Dispose(); + }; + } + _openedMenu.OnClose += (_) => + { + _openedMenu = null; + }; + if (_playerMan.LocalEntity != null) + _openedMenu.OpenAttached(_playerMan.LocalEntity.Value); + + } + + private void OnPlayerAttached(PlayerAttachedEvent args) + { + _openedMenu?.Dispose(); + } + + private void OnPlayerDetached(PlayerDetachedEvent args) + { + _openedMenu?.Dispose(); + } +} diff --git a/Content.Client/ADT/license.txt b/Content.Client/ADT/license.txt new file mode 100644 index 00000000000..79f9846ed4e --- /dev/null +++ b/Content.Client/ADT/license.txt @@ -0,0 +1,19 @@ +Copyright (c) 2024 Adventure Station + +1. The provided software code in this and nested directories (hereinafter referred to as the "Adventure Station" project code) is intended solely for use within the "Adventure Station" project. + +2. Any use, copying, distribution, or modification of the "Adventure Station" project code outside of "Adventure Station" project is prohibited. + +3. This license does not grant any rights to own, use, or distribute the "Adventure Station" project code outside of the "Adventure Station" project. + +4. This license is valid indefinitely, or until a decision is made by the copyright holder of the "Adventure Station" project to revoke/modify it. + +Copyright (c) 2024 Adventure Station + +1. Представленный программный код в данном и вложенных директориях (далее - код проекта "Adventure Station") предназначен исключительно для использования в рамках проекта "Adventure Station" + +2. Любое использование, копирование, распространение и изменение кода проекта "Adventure Station" за пределами данного проекта запрещены. + +3. Настоящая лицензия не предоставляет никаких прав на владение, использование или распространение кода проекта "Adventure Station" вне проекта "Adventure Station". + +4. Настоящая лицензия действительна бессрочно, или до решения об упразднении/изменении правообладателем проекта "Adventure Station". \ No newline at end of file diff --git a/Content.Client/BluespaceHarvester/BluespaceHarvesterBoundUserInterface.cs b/Content.Client/BluespaceHarvester/BluespaceHarvesterBoundUserInterface.cs new file mode 100644 index 00000000000..dc64dcf751c --- /dev/null +++ b/Content.Client/BluespaceHarvester/BluespaceHarvesterBoundUserInterface.cs @@ -0,0 +1,53 @@ +using Content.Shared.BluespaceHarvester; +using JetBrains.Annotations; + +namespace Content.Client.BluespaceHarvester; + +[UsedImplicitly] +public sealed class BluespaceHarvesterBoundUserInterface : BoundUserInterface +{ + private BluespaceHarvesterMenu? _window; + + public BluespaceHarvesterBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey) + { + } + + protected override void Open() + { + base.Open(); + + _window = new BluespaceHarvesterMenu(this); + _window.OnClose += Close; + _window?.OpenCentered(); + } + + protected override void Dispose(bool disposing) + { + base.Dispose(disposing); + if (!disposing) + return; + + _window?.Dispose(); + _window = null; + } + + protected override void UpdateState(BoundUserInterfaceState state) + { + base.UpdateState(state); + + if (state is not BluespaceHarvesterBoundUserInterfaceState current) + return; + + _window?.UpdateState(current); + } + + public void SendTargetLevel(int level) + { + SendMessage(new BluespaceHarvesterTargetLevelMessage(level)); + } + + public void SendBuy(Shared.BluespaceHarvester.BluespaceHarvesterCategory category) + { + SendMessage(new BluespaceHarvesterBuyMessage(category)); + } +} diff --git a/Content.Client/BluespaceHarvester/BluespaceHarvesterCategory.xaml b/Content.Client/BluespaceHarvester/BluespaceHarvesterCategory.xaml new file mode 100644 index 00000000000..eef4ac89883 --- /dev/null +++ b/Content.Client/BluespaceHarvester/BluespaceHarvesterCategory.xaml @@ -0,0 +1,6 @@ + + + +