Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3mo xeno archeology (first phase) #33370

Open
wants to merge 79 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 52 commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
eba8da7
DAG Adjacency Matrix & Tests
EmoGarbage404 Jun 17, 2024
152d8d5
Merge branch 'master' of https://github.com/space-wizards/space-stati…
EmoGarbage404 Jun 17, 2024
c7e209a
Fix sandbox type errors
EmoGarbage404 Jun 17, 2024
d2e8d72
First pass on procgen
EmoGarbage404 Jun 18, 2024
5aa453b
Procgen adjustments
EmoGarbage404 Jun 19, 2024
2befbd0
Networking
EmoGarbage404 Jun 19, 2024
33c5775
Cruft and god and beauty and analysis console
EmoGarbage404 Jun 19, 2024
ad6e686
convert to data types that dont make me want to kill myself
EmoGarbage404 Jun 20, 2024
d6d9965
starting work on console UI
EmoGarbage404 Jun 21, 2024
1371613
drawing nodes n shit
EmoGarbage404 Jun 22, 2024
5dae996
damn that ui FUCKS
EmoGarbage404 Jun 23, 2024
e3cea19
XAT
EmoGarbage404 Jun 23, 2024
e833ba9
Add a bunch of basic triggers
EmoGarbage404 Jun 28, 2024
95de7f5
Fix trigger gen
EmoGarbage404 Jun 28, 2024
99b97c0
Add node info into the analysis console UI
EmoGarbage404 Jun 29, 2024
0dce0b0
Merge branch 'master' of https://github.com/space-wizards/space-stati…
EmoGarbage404 Jun 30, 2024
dd52fbe
Add node unlocking
EmoGarbage404 Jun 30, 2024
3c01fdb
more trigger cuz thats pretty cool
EmoGarbage404 Jul 5, 2024
34a703c
final triggers + incorporate gnostic faith
EmoGarbage404 Jul 6, 2024
c42a2b2
some ui changes, mostly
EmoGarbage404 Jul 6, 2024
2392c51
Fix orphaned procgen segments
EmoGarbage404 Jul 8, 2024
05e7918
its not random dipshit
EmoGarbage404 Jul 8, 2024
dbc3f70
yeah... this one will make pjb happy....
EmoGarbage404 Jul 9, 2024
e22daae
we call it a day for the UI
EmoGarbage404 Jul 12, 2024
c908214
imagine... shared power code...
EmoGarbage404 Jul 12, 2024
13fd4fb
Merge branch 'master' of https://github.com/space-wizards/space-stati…
EmoGarbage404 Jul 12, 2024
cd297d0
extraction WIP but we gotta sidequest momentarily
EmoGarbage404 Jul 13, 2024
2a97270
oh hey would you look at that its the actual functionality
EmoGarbage404 Jul 14, 2024
b0bc961
distrotrased
EmoGarbage404 Jul 15, 2024
5ad649d
Small departure for randomness.
EmoGarbage404 Jul 16, 2024
4c7c6fd
ok yep yep indeed that is an effect very cool.
EmoGarbage404 Jul 17, 2024
7c0ba34
thanos snap oldcode
EmoGarbage404 Jul 17, 2024
51d9c4c
fuck it we ball
EmoGarbage404 Jul 20, 2024
c315765
merge with master
Oct 29, 2024
6960349
Merge remote-tracking branch 'origin/master' into 3moArch
Nov 7, 2024
c390f61
feat: node scanner now displays triggered nodes. Removed unused old a…
Nov 13, 2024
49dc97a
refactor: most of preparations, cleanup and groundwork. also segment-…
Nov 16, 2024
4066b1d
feature: all basic effects returning
Nov 16, 2024
34b6c4e
feat: finished effects lits, created weight lists for struct and hand…
Nov 17, 2024
f9fca67
feat: prevent non-first-time-predicted calls in shared artifact effec…
Nov 17, 2024
e44dac6
fix: remove gun effect from artifact effects - as it interferes with …
Nov 17, 2024
6b39a61
Merge remote-tracking branch 'origin/master' into 3moArch
Nov 17, 2024
0784cb4
fix: foam reagent selection, neat ApplyComponents art effect scenario…
Nov 17, 2024
0842483
fix: moved spawn/ pry&throw effect systems back to server part of cod…
Nov 18, 2024
4ea9d3b
refactor: fix protos
Nov 18, 2024
32ce0f1
refactor: fix linter
Nov 18, 2024
41be02b
fix: fix old artifact component names in yml
Nov 19, 2024
38b318e
fix: no more throwing error on artifact spawn with empty XAEFoamCompo…
Nov 19, 2024
ff8fc26
fix: removed old component usage in maps
Nov 19, 2024
1f14968
fix: remove more deleted components from map
Nov 19, 2024
e2ac3db
fix: ContainerContainer is now part of initial artifact entity, it wo…
Nov 19, 2024
01134bb
refactor: fix tests, add loc description to toolshed commands
Nov 19, 2024
5cbfff3
Changed node scanner to tell the whole story about current artifact s…
Nov 24, 2024
e8f3a39
refactor: remove excessive get of EntityCoordinates in XAE systems, r…
Nov 24, 2024
45b0e1c
fix: turned off TriggerInteraction, removed XAESpawn usage and system…
Nov 25, 2024
d5aed90
fix: moved SharedXenoArtifactSystem.CancelUnlockingOnGraphStructureCh…
Nov 25, 2024
6c19b74
fix: XenoArtifactEffectJunkSpawn moved invalid rolls declaration
Nov 25, 2024
cbb88a7
refactor: set default value for XenoArtifactComponent.EffectsTable fo…
Nov 26, 2024
5087745
fix: now explosions XAE can be activated for effect
Nov 28, 2024
c358542
refactor: added some usedelay so artifactuse would'nt be spammed
Nov 28, 2024
922ef41
refactor: artifact-related hints improvements
Nov 28, 2024
9b4ad1c
merge with master
Nov 29, 2024
c1deec1
fix: artifact no longer spawns fauna into itself
Nov 30, 2024
47284c7
merge with master
Dec 1, 2024
f0a80de
Merge branch 'master' into 3moArch
Dec 2, 2024
74f447d
refactor: xml-doc and minor refactoring
Dec 10, 2024
692037a
refactor: xml-doc for Xeno Artifact systems, renaming of questionable…
Dec 14, 2024
0b818e2
map for playtest, TODO REVERT THIS
Dec 14, 2024
5114279
fix: magboots trigger art from a mile
Dec 19, 2024
5f6b3bf
refactor: bind artifact animation to unlocking state
Dec 19, 2024
cd3a798
feat: radiation dmg now have reference to source (and artifacts won't…
Dec 19, 2024
058c0e6
fix: random artifact node durability now is rolled for max and not cu…
Dec 19, 2024
4b4b276
refactor: gas effects are more rare, hand-held artifact effects are f…
Dec 19, 2024
2f83500
merge master
Dec 19, 2024
e551dc9
feat: animations and sound effects for artifact force-use and failed …
Dec 20, 2024
ca6891f
use only 1 file with art use animation
Dec 21, 2024
f509ed2
refactor: minor artifact dmg triggers tuning
Dec 21, 2024
65727ad
feat: now nodes that CAN be unlocked are displayed with specific colo…
Dec 21, 2024
ec338d4
feat: now unlocking stage time is dynamic and it depends on amount of…
Dec 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Content.Client/Xenoarchaeology/Artifact/XenoArtifactSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
using Content.Shared.Xenoarchaeology.Artifact;

namespace Content.Client.Xenoarchaeology.Artifact;

/// <inheritdoc/>
public sealed class XenoArtifactSystem : SharedXenoArtifactSystem;
38 changes: 38 additions & 0 deletions Content.Client/Xenoarchaeology/Equipment/ArtifactAnalyzerSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
using Content.Client.Xenoarchaeology.Ui;
using Content.Shared.Xenoarchaeology.Equipment;
using Content.Shared.Xenoarchaeology.Equipment.Components;
using Robust.Client.GameObjects;

namespace Content.Client.Xenoarchaeology.Equipment;

/// <summary>
/// This handles...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove redundant docstring (or explain what this class does)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missed it, sry :3

/// </summary>
public sealed class ArtifactAnalyzerSystem : SharedArtifactAnalyzerSystem
{
[Dependency] private readonly UserInterfaceSystem _ui = default!;

/// <inheritdoc/>
public override void Initialize()
{
base.Initialize();

SubscribeLocalEvent<AnalysisConsoleComponent, AfterAutoHandleStateEvent>(OnAnalysisConsoleAfterAutoHandleState);
SubscribeLocalEvent<ArtifactAnalyzerComponent, AfterAutoHandleStateEvent>(OnAnalyzerAfterAutoHandleState);
}

private void OnAnalysisConsoleAfterAutoHandleState(Entity<AnalysisConsoleComponent> ent, ref AfterAutoHandleStateEvent args)
{
if (_ui.TryGetOpenUi<AnalysisConsoleBoundUserInterface>(ent.Owner, ArtifactAnalyzerUiKey.Key, out var bui))
bui.Update(ent);
}

private void OnAnalyzerAfterAutoHandleState(Entity<ArtifactAnalyzerComponent> ent, ref AfterAutoHandleStateEvent args)
{
if (!TryGetAnalysisConsole(ent, out var analysisConsole))
return;

if (_ui.TryGetOpenUi<AnalysisConsoleBoundUserInterface>(analysisConsole.Value.Owner, ArtifactAnalyzerUiKey.Key, out var bui))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DRY, this is the same work as lines 26-27 using a different entity so make a method.

bui.Update(analysisConsole.Value);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,4 @@
namespace Content.Client.Xenoarchaeology.Equipment;

/// <inheritdoc/>
public sealed class ArtifactCrusherSystem : SharedArtifactCrusherSystem
{

}
public sealed class ArtifactCrusherSystem : SharedArtifactCrusherSystem;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid unneccesary file changes in an already chonky PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sign fine... but please do notice that it took me 20 minutes to enforce remove on last line to perfectly revert changes due to (i think) editor config defaults...

30 changes: 30 additions & 0 deletions Content.Client/Xenoarchaeology/Equipment/NodeScannerSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using Content.Client.Xenoarchaeology.Ui;
using Content.Shared.Xenoarchaeology.Equipment;
using Content.Shared.Xenoarchaeology.Equipment.Components;
using Robust.Client.GameObjects;

namespace Content.Client.Xenoarchaeology.Equipment;

public sealed class NodeScannerSystem : SharedNodeScannerSystem
{
[Dependency] private readonly UserInterfaceSystem _ui = default!;

/// <inheritdoc />
public override void Initialize()
{
base.Initialize();

SubscribeLocalEvent<NodeScannerComponent, AfterAutoHandleStateEvent>(OnAnalysisConsoleAfterAutoHandleState);
}

protected override void TryOpenUi(Entity<NodeScannerComponent> device, EntityUid actor)
{
_ui.TryOpenUi(device.Owner, NodeScannerUiKey.Key, actor, true);
}

private void OnAnalysisConsoleAfterAutoHandleState(Entity<NodeScannerComponent> ent, ref AfterAutoHandleStateEvent args)
{
if (_ui.TryGetOpenUi<NodeScannerBoundUserInterface>(ent.Owner, NodeScannerUiKey.Key, out var bui))
bui.Update(ent);
}
}
Original file line number Diff line number Diff line change
@@ -1,64 +1,37 @@
using Content.Shared.Xenoarchaeology.Equipment;
using Content.Shared.Research.Components;
using Content.Shared.Xenoarchaeology.Equipment.Components;
using JetBrains.Annotations;
using Robust.Client.GameObjects;
using Robust.Client.UserInterface;

namespace Content.Client.Xenoarchaeology.Ui;

[UsedImplicitly]
public sealed class AnalysisConsoleBoundUserInterface : BoundUserInterface
public sealed class AnalysisConsoleBoundUserInterface(EntityUid owner, Enum uiKey) : BoundUserInterface(owner, uiKey)
{
[ViewVariables]
private AnalysisConsoleMenu? _consoleMenu;

public AnalysisConsoleBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey)
{
}

protected override void Open()
{
base.Open();

_consoleMenu = this.CreateWindow<AnalysisConsoleMenu>();
_consoleMenu = new AnalysisConsoleMenu(Owner);

_consoleMenu.OnClose += Close;
_consoleMenu.OpenCentered();

_consoleMenu.OnServerSelectionButtonPressed += () =>
{
SendMessage(new AnalysisConsoleServerSelectionMessage());
};
_consoleMenu.OnScanButtonPressed += () =>
{
SendMessage(new AnalysisConsoleScanButtonPressedMessage());
};
_consoleMenu.OnPrintButtonPressed += () =>
{
SendMessage(new AnalysisConsolePrintButtonPressedMessage());
SendMessage(new ConsoleServerSelectionMessage());
};
_consoleMenu.OnExtractButtonPressed += () =>
{
SendMessage(new AnalysisConsoleExtractButtonPressedMessage());
};
_consoleMenu.OnUpBiasButtonPressed += () =>
{
SendMessage(new AnalysisConsoleBiasButtonPressedMessage(false));
};
_consoleMenu.OnDownBiasButtonPressed += () =>
{
SendMessage(new AnalysisConsoleBiasButtonPressedMessage(true));
};
}

protected override void UpdateState(BoundUserInterfaceState state)
public void Update(Entity<AnalysisConsoleComponent> ent)
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Public methods need docstring.

base.UpdateState(state);

switch (state)
{
case AnalysisConsoleUpdateState msg:
_consoleMenu?.SetButtonsDisabled(msg);
_consoleMenu?.UpdateInformationDisplay(msg);
_consoleMenu?.UpdateProgressBar(msg);
break;
}
_consoleMenu?.Update(ent);
}

protected override void Dispose(bool disposing)
Expand Down
145 changes: 78 additions & 67 deletions Content.Client/Xenoarchaeology/Ui/AnalysisConsoleMenu.xaml
Original file line number Diff line number Diff line change
@@ -1,80 +1,91 @@
<controls:FancyWindow xmlns="https://spacestation14.io"
<controls:FancyWindow xmlns="https://spacestation14.io"
xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
xmlns:customControls="clr-namespace:Content.Client.Administration.UI.CustomControls"
xmlns:ui="clr-namespace:Content.Client.Xenoarchaeology.Ui"
Title="{Loc 'analysis-console-menu-title'}"
MinSize="620 280"
SetSize="620 280">
MinSize="700 350"
SetSize="980 550">
<BoxContainer Orientation="Horizontal" HorizontalExpand="True" VerticalExpand="True">
<BoxContainer Margin="10 10 10 10" MinWidth="150" Orientation="Vertical"
VerticalExpand="True" SizeFlagsStretchRatio="1">
<BoxContainer Orientation="Vertical" VerticalExpand="True">
<Button Name="ServerSelectionButton"
Text="{Loc 'analysis-console-server-list-button'}"></Button>
<BoxContainer MinHeight="5"></BoxContainer>
<Button Name="ScanButton"
Text="{Loc 'analysis-console-scan-button'}"
ToolTip="{Loc 'analysis-console-scan-tooltip-info'}">
</Button>
<BoxContainer MinHeight="5"></BoxContainer>
<Button Name="PrintButton"
Text="{Loc 'analysis-console-print-button'}"
ToolTip="{Loc 'analysis-console-print-tooltip-info'}">
</Button>
<BoxContainer MinHeight="5"></BoxContainer>
<BoxContainer Orientation="Horizontal">
<Button Name="UpBiasButton"
Text="{Loc 'analysis-console-bias-up'}"
ToolTip="{Loc 'analysis-console-bias-button-info-up'}"
HorizontalExpand="True"
StyleClasses="OpenRight">
</Button>
<Button Name="DownBiasButton"
Text="{Loc 'analysis-console-bias-down'}"
ToolTip="{Loc 'analysis-console-bias-button-info-down'}"
HorizontalExpand="True"
StyleClasses="OpenLeft">
</Button>
<BoxContainer Margin="10 10 10 10" MaxWidth="220" SetWidth="220" Orientation="Vertical" HorizontalExpand="False" VerticalExpand="True">
<PanelContainer Name="BackPanel" HorizontalAlignment="Center">
<PanelContainer.PanelOverride>
<gfx:StyleBoxTexture Modulate="#1B1B1E" PatchMarginBottom="10" PatchMarginLeft="10" PatchMarginRight="10" PatchMarginTop="10"/>
</PanelContainer.PanelOverride>
<BoxContainer HorizontalExpand="True" VerticalExpand="True" MinSize="128 128">
<SpriteView Name="ArtifactView" Scale="4 4" HorizontalAlignment="Center" VerticalAlignment="Center" HorizontalExpand="True" VerticalExpand="True"/>
</BoxContainer>
<BoxContainer MinHeight="15"></BoxContainer>
<Button Name="ExtractButton"
Text="{Loc 'analysis-console-extract-button'}"
ToolTip="{Loc 'analysis-console-extract-button-info'}">
</Button>
</PanelContainer>
<customControls:HSeparator StyleClasses="HighDivider" Margin="0 15 0 10"/>
<BoxContainer Name="ExtractContainer" Orientation="Vertical" VerticalExpand="True" Visible="False">
<PanelContainer HorizontalExpand="True" VerticalExpand="True" RectClipContent="True">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#000000FF" />
</PanelContainer.PanelOverride>
<BoxContainer Margin="10 10 10 5" Orientation="Vertical" HorizontalExpand="True" VerticalExpand="True">
<ScrollContainer HScrollEnabled="False" HorizontalExpand="True" VerticalExpand="True">
<BoxContainer HorizontalExpand="True" VerticalExpand="True">
<RichTextLabel Name="ExtractionResearchLabel" VerticalAlignment="Top" HorizontalAlignment="Left"/>
</BoxContainer>
</ScrollContainer>
<Control MinHeight="5"/>
<RichTextLabel Name="ExtractionSumLabel" VerticalAlignment="Bottom" HorizontalAlignment="Left"/>
</BoxContainer>
</PanelContainer>
</BoxContainer>
<BoxContainer Orientation="Vertical">
<Label Name="ProgressLabel"></Label>
<ProgressBar
Name="ProgressBar"
MinValue="0"
MaxValue="1"
SetHeight="20">
</ProgressBar>
<BoxContainer Name="NodeViewContainer" Orientation="Vertical" VerticalExpand="True">
<ScrollContainer HScrollEnabled="False" HorizontalExpand="True" VerticalExpand="True">
<BoxContainer Orientation="Vertical" HorizontalExpand="False" VerticalExpand="True">
<Label Name="NoneSelectedLabel" Text="{Loc 'analysis-console-no-node'}" HorizontalAlignment="Center" VerticalAlignment="Center" VerticalExpand="True" Visible="False"/>
<BoxContainer Name="InfoContainer" Orientation="Vertical" HorizontalExpand="True" VerticalExpand="True">
<BoxContainer HorizontalExpand="True">
<RichTextLabel Name="IDLabel" HorizontalExpand="True"/>
<RichTextLabel Name="IDValueLabel" HorizontalAlignment="Right"/>
</BoxContainer>
<BoxContainer HorizontalExpand="True">
<RichTextLabel Name="ClassLabel" HorizontalExpand="True"/>
<RichTextLabel Name="ClassValueLabel" HorizontalAlignment="Right"/>
</BoxContainer>
<BoxContainer HorizontalExpand="True">
<RichTextLabel Name="LockedLabel" HorizontalExpand="True"/>
<RichTextLabel Name="LockedValueLabel" HorizontalAlignment="Right"/>
</BoxContainer>
<BoxContainer HorizontalExpand="True">
<RichTextLabel Name="DurabilityLabel" HorizontalExpand="True"/>
<RichTextLabel Name="DurabilityValueLabel" HorizontalAlignment="Right"/>
</BoxContainer>
<Control MinHeight="20"/>
<RichTextLabel Name="EffectLabel"/>
<RichTextLabel Name="EffectValueLabel" HorizontalExpand="True"/>
<RichTextLabel Name="TriggerLabel"/>
<RichTextLabel Name="TriggerValueLabel" HorizontalExpand="True"/>
</BoxContainer>
</BoxContainer>
</ScrollContainer>
<Control MinHeight="5"/>
<BoxContainer Orientation="Horizontal" HorizontalExpand="True">
<Button Name="ServerButton" Text="{Loc 'analysis-console-server-list-button'}" StyleClasses="OpenRight" HorizontalExpand="True" MinHeight="35"/>
<Button Name="ExtractButton" Text="{Loc 'analysis-console-extract-button'}" StyleClasses="OpenLeft" HorizontalExpand="True" MinHeight="35"/>
</BoxContainer>
</BoxContainer>
</BoxContainer>
<customControls:VSeparator StyleClasses="LowDivider" />
<PanelContainer Margin="10 10 10 10" HorizontalExpand="True" SizeFlagsStretchRatio="3">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#000000FF" />
</PanelContainer.PanelOverride>
<BoxContainer Margin="10 10 10 10" Orientation="Horizontal">
<BoxContainer Orientation="Vertical" HorizontalExpand="True">
<BoxContainer VerticalExpand="True">
<RichTextLabel Name="Information"> </RichTextLabel>
</BoxContainer>
<BoxContainer HorizontalExpand="True" VerticalExpand="True">
<PanelContainer Margin="10 10 10 10" HorizontalExpand="True" RectClipContent="True">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#000000FF" />
</PanelContainer.PanelOverride>
<BoxContainer Margin="10 10 10 10" Orientation="Horizontal" HorizontalExpand="True" VerticalExpand="True">
<ui:XenoArtifactGraphControl Name="GraphControl" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<Label Name="NoArtiLabel"
Text="{Loc 'analysis-console-info-no-artifact'}"
HorizontalExpand="True"
VerticalExpand="True"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</ui:XenoArtifactGraphControl>
</BoxContainer>
<BoxContainer VerticalExpand="False" Orientation="Vertical" MaxSize="64 64">
<SpriteView
Name="ArtifactDisplay"
OverrideDirection="South"
VerticalExpand="False"
SetSize="64 64"
MaxSize="64 64"
Scale="2 2">
</SpriteView>
</BoxContainer>
<BoxContainer VerticalExpand="True"></BoxContainer>
</BoxContainer>
</PanelContainer>
</PanelContainer>
</BoxContainer>
</BoxContainer>
</controls:FancyWindow>
Loading
Loading