forked from space-wizards/space-station-14
-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Purifying tweaks and add DeCult reminder (#2424)
- Loading branch information
Showing
17 changed files
with
189 additions
and
57 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
32 changes: 32 additions & 0 deletions
32
Content.Client/SS220/CultYogg/DeCultReminder/DeCultReminderEui.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,32 @@ | ||
// © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt | ||
|
||
using Content.Client.Eui; | ||
using JetBrains.Annotations; | ||
using Robust.Client.Graphics; | ||
|
||
namespace Content.Client.SS220.CultYogg.DeCultReminder | ||
{ | ||
[UsedImplicitly] | ||
public sealed class DeCultReminderEui : BaseEui | ||
{ | ||
private readonly DeCultReminderWindow _window; | ||
|
||
public DeCultReminderEui() | ||
{ | ||
_window = new(); | ||
|
||
_window.AcceptButton.OnPressed += _ => _window.Close(); | ||
} | ||
|
||
public override void Opened() | ||
{ | ||
IoCManager.Resolve<IClyde>().RequestWindowAttention(); | ||
_window.OpenCentered(); | ||
} | ||
|
||
public override void Closed() | ||
{ | ||
_window.Close(); | ||
} | ||
} | ||
} |
57 changes: 57 additions & 0 deletions
57
Content.Client/SS220/CultYogg/DeCultReminder/DeCultReminderWindow.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,57 @@ | ||
// © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt | ||
|
||
using Robust.Client.UserInterface.Controls; | ||
using Robust.Client.UserInterface; | ||
using Robust.Client.UserInterface.CustomControls; | ||
using static Robust.Client.UserInterface.Controls.BoxContainer; | ||
using System.Numerics; | ||
|
||
|
||
namespace Content.Client.SS220.CultYogg.DeCultReminder | ||
{ | ||
public sealed class DeCultReminderWindow : DefaultWindow | ||
{ | ||
public readonly Button AcceptButton; | ||
|
||
public DeCultReminderWindow() | ||
{ | ||
Title = Loc.GetString("decult-reminder-window-title"); | ||
|
||
Contents.AddChild(new BoxContainer | ||
{ | ||
Orientation = LayoutOrientation.Vertical, | ||
Children = | ||
{ | ||
new BoxContainer | ||
{ | ||
Orientation = LayoutOrientation.Vertical, | ||
Children = | ||
{ | ||
(new Label() | ||
{ | ||
Text = Loc.GetString("decult-reminder-window-text") | ||
}), | ||
new BoxContainer | ||
{ | ||
Orientation = LayoutOrientation.Horizontal, | ||
Align = AlignMode.Center, | ||
Children = | ||
{ | ||
(AcceptButton = new Button | ||
{ | ||
Text = Loc.GetString("decult-reminder-window-accept-button"), | ||
}), | ||
|
||
(new Control() | ||
{ | ||
MinSize = new Vector2(20, 0) | ||
}), | ||
} | ||
}, | ||
} | ||
}, | ||
} | ||
}); | ||
} | ||
} | ||
} |
11 changes: 5 additions & 6 deletions
11
...ltYogg/Cultists/CultYoggCleansedSystem.cs → ...ltYogg/Cultists/CultYoggPurifiedSystem.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 |
---|---|---|
@@ -1,29 +1,28 @@ | ||
// © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt | ||
using Content.Shared.Atmos; | ||
using Content.Shared.SS220.CultYogg.Cultists; | ||
using Robust.Shared.Map; | ||
using Robust.Shared.Timing; | ||
|
||
namespace Content.Server.SS220.CultYogg.Cultists; | ||
|
||
public sealed class CultYoggCleansedSystem : EntitySystem | ||
public sealed class CultYoggPurifiedSystem : EntitySystem | ||
{ | ||
[Dependency] private readonly IGameTiming _timing = default!; | ||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
} | ||
|
||
public override void Update(float frameTime) | ||
{ | ||
base.Update(frameTime); | ||
|
||
var query = EntityQueryEnumerator<CultYoggCleansedComponent>(); | ||
var query = EntityQueryEnumerator<CultYoggPurifiedComponent>(); | ||
while (query.MoveNext(out var uid, out var cleansedComp)) | ||
{ | ||
if (_timing.CurTime < cleansedComp.CleansingDecayEventTime) | ||
if (_timing.CurTime < cleansedComp.PurifyingDecayEventTime) | ||
continue; | ||
|
||
RemComp<CultYoggCleansedComponent>(uid); | ||
RemComp<CultYoggPurifiedComponent>(uid); | ||
} | ||
} | ||
} |
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
10 changes: 10 additions & 0 deletions
10
Content.Server/SS220/CultYogg/DeCultReminder/DeCultReminderEui.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,10 @@ | ||
// © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt | ||
|
||
using Content.Server.EUI; | ||
|
||
namespace Content.Server.SS220.CultYogg.DeCultReminder | ||
{ | ||
public sealed class DeCultReminderEui : BaseEui | ||
{ | ||
} | ||
} |
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.