-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'phantom-and-revenant' of https://github.com/FaDeOkno/AD…
…T_main into help_kote_phantom
- Loading branch information
Showing
392 changed files
with
12,132 additions
and
578 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 |
---|---|---|
@@ -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; | ||
} | ||
} |
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,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
61
Content.Client/ADT/Chaplain/EUI/AcceptReligionEuiWindow.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,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"), | ||
}) | ||
} | ||
}, | ||
} | ||
}, | ||
} | ||
}); | ||
} | ||
} |
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,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(); | ||
} | ||
|
||
} | ||
|
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,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"), | ||
}) | ||
} | ||
}, | ||
} | ||
}, | ||
} | ||
}); | ||
} | ||
} |
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,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
61
Content.Client/ADT/Phantom/EUI/AcceptPhantomPowersWindow.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,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"), | ||
}) | ||
} | ||
}, | ||
} | ||
}, | ||
} | ||
}); | ||
} | ||
} |
Oops, something went wrong.