-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
49 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,21 @@ | ||
/// Made for Adventure Time Project by ModerN. https://github.com/modern-nm mailto:[email protected] | ||
/// see also https://github.com/DocNITE/liebendorf-station/tree/feature/emote-radial-panel | ||
using Content.Client.Language.Systems; | ||
using Content.Client.Humanoid; | ||
using Content.Client.UserInterface.Systems.Radial; | ||
using Content.Client.UserInterface.Systems.Radial.Controls; | ||
using Content.Shared.Changeling; | ||
using Content.Shared.Changeling.Components; | ||
using Content.Shared.Polymorph; | ||
using Content.Shared.Humanoid.Prototypes; | ||
using FastAccessors; | ||
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; | ||
|
||
|
@@ -24,6 +26,8 @@ public sealed class ChangelingPanelSystem : EntitySystem | |
[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!; | ||
|
||
/// <summary> | ||
/// We should enable radial for single target | ||
|
@@ -59,17 +63,16 @@ private void HandleChangelingFormsMenuEvent(RequestChangelingFormsMenuEvent args | |
|
||
foreach (var humanoid in args.HumanoidData) | ||
{ | ||
var dummy = _entManager.SpawnEntity(_proto.Index<SpeciesPrototype>(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); | ||
|
||
// foreach (var humanoidData in args.ChangelingComponent.StoredDNA) | ||
// { | ||
// if (humanoidData.EntityUid == humanoidEntityUid) | ||
// { | ||
// | ||
var actionName = humanoid.Name; | ||
var texturePath = _spriteSystem.Frame0(new SpriteSpecifier.Texture(new ResPath(DefaultIcon))); | ||
|
||
var emoteButton = _openedMenu.AddButton(actionName, texturePath); | ||
var emoteButton = _openedMenu.AddButton(actionName, texturePath, face); | ||
emoteButton.Opacity = 210; | ||
emoteButton.Tooltip = null; | ||
emoteButton.Controller.OnPressed += (_) => | ||
|
@@ -78,8 +81,6 @@ private void HandleChangelingFormsMenuEvent(RequestChangelingFormsMenuEvent args | |
RaiseNetworkEvent(ev); | ||
_openedMenu.Dispose(); | ||
}; | ||
// } | ||
// } | ||
} | ||
_openedMenu.OnClose += (_) => | ||
{ | ||
|
@@ -90,58 +91,13 @@ private void HandleChangelingFormsMenuEvent(RequestChangelingFormsMenuEvent args | |
|
||
} | ||
|
||
// private void HandleLanguageMenuEvent(RequestLanguageMenuEvent args) | ||
// { | ||
// if (_openedMenu != null) | ||
// return; | ||
// if (_playerMan.LocalEntity == null) | ||
// { | ||
// return; | ||
// } | ||
// TryComp<LanguageSpeakerComponent>(_playerMan.LocalEntity.Value, out var languageSpeakerComponent); | ||
|
||
// _openedMenu = _userInterfaceManager.GetUIController<RadialUiController>() | ||
// .CreateRadialContainer(); | ||
|
||
// foreach (var protoId in args.Languages) | ||
// { | ||
// var prototype = _languageSystem.GetLanguage(protoId); | ||
// if (prototype == null) | ||
// { | ||
// continue; | ||
// } | ||
// var actionName = prototype.LocalizedName; | ||
// var texturePath = _spriteSystem.Frame0(new SpriteSpecifier.Texture(new ResPath(DefaultIcon))); | ||
// if (prototype.Icon != null) | ||
// texturePath = _spriteSystem.Frame0(prototype.Icon); | ||
|
||
// var languageButton = _openedMenu.AddButton(actionName, texturePath); | ||
// languageButton.Opacity = 210; | ||
// languageButton.Tooltip = null; | ||
// languageButton.Controller.OnPressed += (_) => | ||
// { | ||
// var ev = new SelectLanguageEvent(args.Target, protoId); | ||
// 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(); | ||
_openedMenu?.Dispose(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
Content.Client/UserInterface/Systems/Radial/Controls/RadialItem.xaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters