forked from space-syndicate/space-station-14-next
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Heretics update part 3 (space-syndicate#726)
* i got that dawg in me * dasasdsaddas * jhkhkjj * my lazy ass is not doing the rest * finally. * finally. * jesus christ 1 * help me * jesus christ 2 * UAAAAWHGHHGG BUABHAUBHAUBHHGH * jesus christ 3 * sdfjsdkghjdfkljbhsfuobd * 1984 * ash lore update * THE CURSE OF 220 * ultra violencce * fart * fdgfdgbfdbf * fgbdfgndfgn * it's raw propheting time * blbkblbkglbgkbgbgbgdfbfgbbb AAAAAAAAAAAAAAAAAAAAAAAAA * fdbfsgbybdf * bkbgkblkgbgbngfkb * void path part 1 * REAL!!!!!! * it is working * ok looks good to me * random influence spawn * hey shitass, wanna see me bypass yaml linter? * RAAAAAAAAAAGH * dghgdfbsfdgbsdf * dfvsfvavsd * help * help * bbnvbnvmvbnmvbnmvbn * guiedbook * fhfdsghfgdhdfgh * AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA * please * fucking die * vlkblvkbbgjhjfbhnbkvbnf A * i am malding * 6666 lines * FUCK * GOD SAVE MY SOUL!! * revert store shitassery * dfvdfgdf * Reapply "Uplink discounts (space-syndicate#580)" This reverts commit 55540db. * more uplink shittery revert * FUCK * based * dvsfv * dghfgghfgh * blnkbnbknlbnklb ** finally.
* yeah * bnbnmbvnm * vblknknvblnkvblknklvbn * fuck * gaming * bnkb,nkvbnklvbknvb * final fixez * I AM GOING TO KILL MYSELF * finally * yay guidebook * ugh * fuck * fuck * bruh. * guidebook * bruh * source * f- --------- Co-authored-by: whateverusername0 <whateveremail> Co-authored-by: Piras314 <[email protected]>
- Loading branch information
1 parent
7f94bcf
commit 2bf4287
Showing
240 changed files
with
1,805 additions
and
123 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
16 changes: 16 additions & 0 deletions
16
Content.Client/_Goobstation/Heretic/UI/LivingHeartMenu.xaml
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<ui:RadialMenu xmlns="https://spacestation14.io" | ||
xmlns:ui="clr-namespace:Content.Client.UserInterface.Controls" | ||
BackButtonStyleClass="RadialMenuBackButton" | ||
CloseButtonStyleClass="RadialMenuCloseButton" | ||
VerticalExpand="True" | ||
HorizontalExpand="True" | ||
MinSize="450 450"> | ||
|
||
<ui:RadialContainer Name="Main" | ||
VerticalExpand="True" | ||
HorizontalExpand="True" | ||
Radius="64" | ||
ReserveSpaceForHiddenChildren="False"/> | ||
|
||
|
||
</ui:RadialMenu> |
97 changes: 97 additions & 0 deletions
97
Content.Client/_Goobstation/Heretic/UI/LivingHeartMenu.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
using Content.Client.UserInterface.Controls; | ||
using Content.Shared.Heretic; | ||
using Robust.Client.Player; | ||
using Robust.Client.UserInterface.Controls; | ||
using Robust.Client.UserInterface.XAML; | ||
using Robust.Shared.Prototypes; | ||
using System.Numerics; | ||
|
||
namespace Content.Client._Goobstation.Heretic.UI; | ||
|
||
public sealed partial class LivingHeartMenu : RadialMenu | ||
{ | ||
[Dependency] private readonly EntityManager _ent = default!; | ||
[Dependency] private readonly IPrototypeManager _prot = default!; | ||
[Dependency] private readonly IPlayerManager _player = default!; | ||
|
||
public EntityUid Entity { get; private set; } | ||
|
||
public event Action<NetEntity>? SendActivateMessageAction; | ||
|
||
public LivingHeartMenu() | ||
{ | ||
IoCManager.InjectDependencies(this); | ||
RobustXamlLoader.Load(this); | ||
} | ||
|
||
public void SetEntity(EntityUid ent) | ||
{ | ||
Entity = ent; | ||
UpdateUI(); | ||
} | ||
|
||
private void UpdateUI() | ||
{ | ||
var main = FindControl<RadialContainer>("Main"); | ||
if (main == null) return; | ||
|
||
var player = _player.LocalEntity; | ||
|
||
if (!_ent.TryGetComponent<HereticComponent>(player, out var heretic)) | ||
return; | ||
|
||
foreach (var target in heretic.SacrificeTargets) | ||
{ | ||
if (target == null) continue; | ||
|
||
var ent = _ent.GetEntity(target); | ||
if (ent == null) | ||
continue; | ||
|
||
var button = new EmbeddedEntityMenuButton | ||
{ | ||
StyleClasses = { "RadialMenuButton" }, | ||
SetSize = new Vector2(64, 64), | ||
ToolTip = _ent.TryGetComponent<MetaDataComponent>(ent.Value, out var md) ? md.EntityName : "Unknown", | ||
NetEntity = (NetEntity) target, | ||
}; | ||
|
||
var texture = new SpriteView(ent.Value, _ent) | ||
{ | ||
OverrideDirection = Direction.South, | ||
VerticalAlignment = VAlignment.Center, | ||
SetSize = new Vector2(64, 64), | ||
VerticalExpand = true, | ||
Stretch = SpriteView.StretchMode.Fill, | ||
}; | ||
button.AddChild(texture); | ||
|
||
main.AddChild(button); | ||
} | ||
AddAction(main); | ||
} | ||
|
||
private void AddAction(RadialContainer main) | ||
{ | ||
if (main == null) | ||
return; | ||
|
||
foreach (var child in main.Children) | ||
{ | ||
var castChild = child as EmbeddedEntityMenuButton; | ||
if (castChild == null) | ||
continue; | ||
|
||
castChild.OnButtonUp += _ => | ||
{ | ||
SendActivateMessageAction?.Invoke(castChild.NetEntity); | ||
Close(); | ||
}; | ||
} | ||
} | ||
|
||
public sealed class EmbeddedEntityMenuButton : RadialMenuTextureButton | ||
{ | ||
public NetEntity NetEntity; | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
Content.Client/_Goobstation/Heretic/UI/LivingHeartMenuBoundUserInterface.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using Content.Shared.Heretic; | ||
using Robust.Client.Graphics; | ||
using Robust.Client.Input; | ||
using Robust.Client.UserInterface; | ||
|
||
namespace Content.Client._Goobstation.Heretic.UI; | ||
|
||
public sealed partial class LivingHeartMenuBoundUserInterface : BoundUserInterface | ||
{ | ||
[Dependency] private readonly IClyde _displayManager = default!; | ||
[Dependency] private readonly IInputManager _inputManager = default!; | ||
|
||
[NonSerialized] private LivingHeartMenu? _menu; | ||
|
||
public LivingHeartMenuBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey) | ||
{ | ||
IoCManager.InjectDependencies(this); | ||
} | ||
|
||
protected override void Open() | ||
{ | ||
base.Open(); | ||
|
||
_menu = this.CreateWindow<LivingHeartMenu>(); | ||
_menu.SetEntity(Owner); | ||
_menu.SendActivateMessageAction += SendMessage; | ||
_menu.OpenCenteredAt(_inputManager.MouseScreenPosition.Position / _displayManager.ScreenSize); | ||
} | ||
|
||
private void SendMessage(NetEntity netent) | ||
{ | ||
base.SendMessage(new EventHereticLivingHeartActivate() { Target = netent }); | ||
} | ||
} |
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
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
Oops, something went wrong.