Skip to content

Commit

Permalink
Merge branch 'phantom-and-revenant' of https://github.com/FaDeOkno/AD…
Browse files Browse the repository at this point in the history
…T_main into help_kote_phantom
  • Loading branch information
Schrodinger71 committed Jun 25, 2024
2 parents 5e361ed + 066f294 commit b44166d
Show file tree
Hide file tree
Showing 392 changed files with 12,132 additions and 578 deletions.
53 changes: 53 additions & 0 deletions Content.Client/ADT/Chaplain/ChaplainSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
using Content.Shared.Bible.Components;
using Content.Shared.Phantom.Components;
using Robust.Client.GameObjects;
using Robust.Client.Player;
using Robust.Shared.Player;
using Robust.Shared.Prototypes;
using Content.Client.UserInterface.Systems.Radial;
using Content.Client.UserInterface.Systems.Radial.Controls;
using Robust.Shared.Random;
using Robust.Shared.Utility;
using Robust.Client.UserInterface;
using Content.Shared.StatusIcon.Components;
using Content.Shared.Ghost;
using Content.Shared.Antag;
using Content.Shared.Actions;
using Robust.Client.Graphics;
using Robust.Client.Utility;
using Content.Shared.Humanoid;
using Content.Shared.Humanoid.Prototypes;
using Content.Client.Humanoid;
using System.Numerics;
using Content.Shared.Preferences;

namespace Content.Client.Chaplain;

public sealed class ChaplainSystem : EntitySystem
{
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
[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 HumanoidAppearanceSystem _appearanceSystem = default!;
[Dependency] private readonly IEntityManager _entManager = default!;
public override void Initialize()
{
base.Initialize();

SubscribeLocalEvent<ChaplainComponent, CanDisplayStatusIconsEvent>(OnCanDisplayStatusIcons);
}

private void OnCanDisplayStatusIcons(EntityUid uid, ChaplainComponent component, ref CanDisplayStatusIconsEvent args)
{
if (HasComp<PhantomComponent>(args.User) || HasComp<ChaplainComponent>(args.User) || HasComp<ShowChaplainIconsComponent>(args.User))
return;

if (component.IconVisibleToGhost && HasComp<GhostComponent>(args.User))
return;

args.Cancelled = true;
}
}
46 changes: 46 additions & 0 deletions Content.Client/ADT/Chaplain/EUI/AcceptReligionEui.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
using Content.Client.Eui;
using Content.Shared.Cloning;
using JetBrains.Annotations;
using Robust.Client.Graphics;
using Content.Shared.Chaplain;
using Content.Shared.Bible.Components;

namespace Content.Client.Chaplain;

[UsedImplicitly]
public sealed class AcceptReligionEui : BaseEui
{
private readonly AcceptReligionWindow _window;

public AcceptReligionEui()
{
_window = new AcceptReligionWindow();

_window.DenyButton.OnPressed += _ =>
{
SendMessage(new AcceptReligionChoiceMessage(AcceptReligionButton.Deny));
_window.Close();
};

_window.OnClose += () => SendMessage(new AcceptReligionChoiceMessage(AcceptReligionButton.Deny));

_window.AcceptButton.OnPressed += _ =>
{
SendMessage(new AcceptReligionChoiceMessage(AcceptReligionButton.Accept));
_window.Close();
};
}

public override void Opened()
{
IoCManager.Resolve<IClyde>().RequestWindowAttention();
_window.OpenCentered();
}

public override void Closed()
{
_window.Close();
}

}

61 changes: 61 additions & 0 deletions Content.Client/ADT/Chaplain/EUI/AcceptReligionEuiWindow.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
using System.Numerics;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.Localization;
using static Robust.Client.UserInterface.Controls.BoxContainer;

namespace Content.Client.Chaplain;

public sealed class AcceptReligionWindow : DefaultWindow
{
public readonly Button DenyButton;
public readonly Button AcceptButton;

public AcceptReligionWindow()
{

Title = Loc.GetString("accept-religion-window-title");

Contents.AddChild(new BoxContainer
{
Orientation = LayoutOrientation.Vertical,
Children =
{
new BoxContainer
{
Orientation = LayoutOrientation.Vertical,
Children =
{
(new Label()
{
Text = Loc.GetString("accept-religion-window-prompt-text-part")
}),
new BoxContainer
{
Orientation = LayoutOrientation.Horizontal,
Align = AlignMode.Center,
Children =
{
(AcceptButton = new Button
{
Text = Loc.GetString("accept-religion-window-accept-button"),
}),

(new Control()
{
MinSize = new Vector2(20, 0)
}),

(DenyButton = new Button
{
Text = Loc.GetString("accept-religion-window-deny-button"),
})
}
},
}
},
}
});
}
}
45 changes: 45 additions & 0 deletions Content.Client/ADT/Phantom/EUI/AcceptHelpingHandEui.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
using Content.Client.Eui;
using Content.Shared.Cloning;
using JetBrains.Annotations;
using Robust.Client.Graphics;
using Content.Shared.Phantom;

namespace Content.Client.Phantom;

[UsedImplicitly]
public sealed class AcceptHelpingHandEui : BaseEui
{
private readonly AcceptHelpingHandWindow _window;

public AcceptHelpingHandEui()
{
_window = new AcceptHelpingHandWindow();

_window.DenyButton.OnPressed += _ =>
{
SendMessage(new AcceptHelpingHandChoiceMessage(AcceptHelpingHandButton.Deny));
_window.Close();
};

_window.OnClose += () => SendMessage(new AcceptHelpingHandChoiceMessage(AcceptHelpingHandButton.Deny));

_window.AcceptButton.OnPressed += _ =>
{
SendMessage(new AcceptHelpingHandChoiceMessage(AcceptHelpingHandButton.Accept));
_window.Close();
};
}

public override void Opened()
{
IoCManager.Resolve<IClyde>().RequestWindowAttention();
_window.OpenCentered();
}

public override void Closed()
{
_window.Close();
}

}

61 changes: 61 additions & 0 deletions Content.Client/ADT/Phantom/EUI/AcceptHelpingHandWindow.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
using System.Numerics;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.Localization;
using static Robust.Client.UserInterface.Controls.BoxContainer;

namespace Content.Client.Phantom;

public sealed class AcceptHelpingHandWindow : DefaultWindow
{
public readonly Button DenyButton;
public readonly Button AcceptButton;

public AcceptHelpingHandWindow()
{

Title = Loc.GetString("accept-phantom-help-window-title");

Contents.AddChild(new BoxContainer
{
Orientation = LayoutOrientation.Vertical,
Children =
{
new BoxContainer
{
Orientation = LayoutOrientation.Vertical,
Children =
{
(new Label()
{
Text = Loc.GetString("accept-phantom-help-window-prompt-text-part")
}),
new BoxContainer
{
Orientation = LayoutOrientation.Horizontal,
Align = AlignMode.Center,
Children =
{
(AcceptButton = new Button
{
Text = Loc.GetString("accept-phantom-help-window-accept-button"),
}),

(new Control()
{
MinSize = new Vector2(20, 0)
}),

(DenyButton = new Button
{
Text = Loc.GetString("accept-phantom-help-window-deny-button"),
})
}
},
}
},
}
});
}
}
45 changes: 45 additions & 0 deletions Content.Client/ADT/Phantom/EUI/AcceptPhantomPowersEui.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
using Content.Client.Eui;
using Content.Shared.Cloning;
using JetBrains.Annotations;
using Robust.Client.Graphics;
using Content.Shared.Phantom;

namespace Content.Client.Phantom;

[UsedImplicitly]
public sealed class AcceptPhantomPowersEui : BaseEui
{
private readonly AcceptPhantomPowersWindow _window;

public AcceptPhantomPowersEui()
{
_window = new AcceptPhantomPowersWindow();

_window.DenyButton.OnPressed += _ =>
{
SendMessage(new AcceptPhantomPowersChoiceMessage(AcceptPhantomPowersButton.Deny));
_window.Close();
};

_window.OnClose += () => SendMessage(new AcceptPhantomPowersChoiceMessage(AcceptPhantomPowersButton.Deny));

_window.AcceptButton.OnPressed += _ =>
{
SendMessage(new AcceptPhantomPowersChoiceMessage(AcceptPhantomPowersButton.Accept));
_window.Close();
};
}

public override void Opened()
{
IoCManager.Resolve<IClyde>().RequestWindowAttention();
_window.OpenCentered();
}

public override void Closed()
{
_window.Close();
}

}

61 changes: 61 additions & 0 deletions Content.Client/ADT/Phantom/EUI/AcceptPhantomPowersWindow.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
using System.Numerics;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.Localization;
using static Robust.Client.UserInterface.Controls.BoxContainer;

namespace Content.Client.Phantom;

public sealed class AcceptPhantomPowersWindow : DefaultWindow
{
public readonly Button DenyButton;
public readonly Button AcceptButton;

public AcceptPhantomPowersWindow()
{

Title = Loc.GetString("accept-phantom-window-title");

Contents.AddChild(new BoxContainer
{
Orientation = LayoutOrientation.Vertical,
Children =
{
new BoxContainer
{
Orientation = LayoutOrientation.Vertical,
Children =
{
(new Label()
{
Text = Loc.GetString("accept-phantom-window-prompt-text-part")
}),
new BoxContainer
{
Orientation = LayoutOrientation.Horizontal,
Align = AlignMode.Center,
Children =
{
(AcceptButton = new Button
{
Text = Loc.GetString("accept-phantom-window-accept-button"),
}),

(new Control()
{
MinSize = new Vector2(20, 0)
}),

(DenyButton = new Button
{
Text = Loc.GetString("accept-phantom-window-deny-button"),
})
}
},
}
},
}
});
}
}
Loading

0 comments on commit b44166d

Please sign in to comment.