* init * port better radials * change wizden radials to new radials * minor radial ui refactor * less redundant values * cleanup * minor cleanup + refactor * rename action + base ghost logic * ghost actions update * attack action + better action granting * add missing translation * add debug entity for testing * add radial actions sprites * micro fixes * translations for ghost panel * fix attack action logic * new pet action sprites * better attack target action params * add 2 new stock pets * add translation string for new pets * add additional checks for petting + cute effect for successful petting * add transfer pets to new body logic for cloning and gibbing * add summary for OnMasterGibbed * add stock pets to loadout menu * fix OnMasterGibbed logic and change it to OnMasterShutdown * add localisation support * add logic for shutdown pet component * pets that spawned as loadout automatically linked now * added new pets * cleanup * more pets * ы * фиксы --------- Co-authored-by: SplikZerys <tronezero700@yandex.ru> Co-authored-by: Vigers Ray <60344369+VigersRay@users.noreply.github.com> Co-authored-by: Vigers Ray <vigersray@gmail.com>
33 lines
1.2 KiB
C#
33 lines
1.2 KiB
C#
using Robust.Shared.Console;
|
||
using Robust.Shared.Random;
|
||
|
||
namespace Content.Client._Sunrise.UserInterface.Radial;
|
||
|
||
public sealed partial class RadialContainerCommandTest : LocalizedCommands
|
||
{
|
||
[Dependency] private readonly IRobustRandom _robustRandom = default!;
|
||
|
||
public override string Command => "radialtest";
|
||
|
||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||
{
|
||
string[] tips =
|
||
{
|
||
"Testovый туултип. Здесь можете расписать разную инфу о кнопке/действии",
|
||
"Из окна дуло. Штирлиц закрыл окно. Дуло исчезло.",
|
||
};
|
||
var radial = new RadialContainer();
|
||
for (int i = 0; i < 8; i++)
|
||
{
|
||
var testButton = radial.AddButton("Action " + i, "/Textures/Interface/emotions.svg.192dpi.png");
|
||
testButton.Tooltip = tips[_robustRandom.Next(0, 2)];
|
||
testButton.Controller.OnPressed += (_) => { Logger.Debug("Press gay"); };
|
||
}
|
||
|
||
radial.CloseButton.Controller.OnPressed += (_) =>
|
||
{
|
||
Logger.Debug("Close event for your own logic");
|
||
};
|
||
radial.OpenAttachedLocalPlayer();
|
||
}
|
||
}
|