more xenoarch tweaks (#12540)
This commit is contained in:
@@ -114,19 +114,26 @@ public sealed partial class AnalysisConsoleMenu : FancyWindow
|
||||
}
|
||||
|
||||
if (state.Id != null) //node id
|
||||
message.AddMarkup(Loc.GetString("analysis-console-info-id", ("id", state.Id))+"\n");
|
||||
{
|
||||
message.AddMarkup(Loc.GetString("analysis-console-info-id", ("id", state.Id)));
|
||||
message.PushNewline();
|
||||
}
|
||||
if (state.Depth != null) //node depth
|
||||
message.AddMarkup(Loc.GetString("analysis-console-info-depth", ("depth", state.Depth))+"\n");
|
||||
{
|
||||
message.AddMarkup(Loc.GetString("analysis-console-info-depth", ("depth", state.Depth)));
|
||||
message.PushNewline();
|
||||
}
|
||||
|
||||
if (state.Triggered != null) //whether it has been triggered
|
||||
{
|
||||
var activated = state.Triggered.Value
|
||||
? "analysis-console-info-triggered-true"
|
||||
: "analysis-console-info-triggered-false";
|
||||
message.AddMarkup(Loc.GetString(activated)+"\n");
|
||||
message.AddMarkup(Loc.GetString(activated));
|
||||
message.PushNewline();
|
||||
}
|
||||
|
||||
message.AddMarkup("\n");
|
||||
message.PushNewline();
|
||||
var needSecondNewline = false;
|
||||
|
||||
if (state.TriggerProto != null && //possible triggers
|
||||
@@ -134,7 +141,8 @@ public sealed partial class AnalysisConsoleMenu : FancyWindow
|
||||
trigger.TriggerHint != null)
|
||||
{
|
||||
message.AddMarkup(Loc.GetString("analysis-console-info-trigger",
|
||||
("trigger", Loc.GetString(trigger.TriggerHint))) + "\n");
|
||||
("trigger", Loc.GetString(trigger.TriggerHint))));
|
||||
message.PushNewline();
|
||||
needSecondNewline = true;
|
||||
}
|
||||
|
||||
@@ -143,21 +151,24 @@ public sealed partial class AnalysisConsoleMenu : FancyWindow
|
||||
effect.EffectHint != null)
|
||||
{
|
||||
message.AddMarkup(Loc.GetString("analysis-console-info-effect",
|
||||
("effect", Loc.GetString(effect.EffectHint))) + "\n");
|
||||
("effect", Loc.GetString(effect.EffectHint))));
|
||||
message.PushNewline();
|
||||
needSecondNewline = true;
|
||||
}
|
||||
|
||||
if (needSecondNewline)
|
||||
message.AddMarkup("\n");
|
||||
message.PushNewline();
|
||||
|
||||
if (state.Edges != null) //number of edges
|
||||
message.AddMarkup(Loc.GetString("analysis-console-info-edges", ("edges", state.Edges))+"\n");
|
||||
if (state.Completion != null) //completion percentage
|
||||
{
|
||||
message.AddMarkup(Loc.GetString("analysis-console-info-completion",
|
||||
("percentage", Math.Round(state.Completion.Value * 100)))+"\n");
|
||||
message.AddMarkup(Loc.GetString("analysis-console-info-edges", ("edges", state.Edges)));
|
||||
message.PushNewline();
|
||||
}
|
||||
if (state.PointValue != null) //completion percentage
|
||||
{
|
||||
message.AddMarkup(Loc.GetString("analysis-console-info-value", ("value", state.PointValue)));
|
||||
message.PushNewline();
|
||||
}
|
||||
|
||||
Information.SetMessage(message);
|
||||
}
|
||||
|
||||
|
||||
@@ -65,6 +65,6 @@ public sealed class ArtifactAnalyzerComponent : Component
|
||||
public ArtifactNode? LastAnalyzedNode;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public float? LastAnalyzedCompletion;
|
||||
public int? LastAnalyzerPointValue;
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -132,19 +132,14 @@ public sealed class ArtifactAnalyzerSystem : EntitySystem
|
||||
|
||||
if (component.LastAnalyzedArtifact == null)
|
||||
{
|
||||
component.LastAnalyzedCompletion = null;
|
||||
component.LastAnalyzerPointValue = null;
|
||||
component.LastAnalyzedNode = null;
|
||||
}
|
||||
else if (TryComp<ArtifactComponent>(component.LastAnalyzedArtifact, out var artifact))
|
||||
{
|
||||
var lastNode = (ArtifactNode?) artifact.CurrentNode?.Clone();
|
||||
component.LastAnalyzedNode = lastNode;
|
||||
|
||||
if (artifact.NodeTree != null)
|
||||
{
|
||||
var discoveredNodes = artifact.NodeTree.AllNodes.Count(x => x.Discovered && x.Triggered);
|
||||
component.LastAnalyzedCompletion = (float) discoveredNodes / artifact.NodeTree.AllNodes.Count;
|
||||
}
|
||||
component.LastAnalyzerPointValue = _artifact.GetResearchPointValue(component.LastAnalyzedArtifact.Value, artifact);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,7 +173,7 @@ public sealed class ArtifactAnalyzerSystem : EntitySystem
|
||||
|
||||
EntityUid? artifact = null;
|
||||
ArtifactNode? node = null;
|
||||
float? completion = null;
|
||||
int? pointValue = null;
|
||||
var totalTime = TimeSpan.Zero;
|
||||
var canScan = false;
|
||||
var canPrint = false;
|
||||
@@ -186,7 +181,7 @@ public sealed class ArtifactAnalyzerSystem : EntitySystem
|
||||
{
|
||||
artifact = analyzer.LastAnalyzedArtifact;
|
||||
node = analyzer.LastAnalyzedNode;
|
||||
completion = analyzer.LastAnalyzedCompletion;
|
||||
pointValue = analyzer.LastAnalyzerPointValue;
|
||||
totalTime = analyzer.AnalysisDuration * analyzer.AnalysisDurationMulitplier;
|
||||
canScan = analyzer.Contacts.Any();
|
||||
canPrint = analyzer.ReadyToPrint;
|
||||
@@ -199,7 +194,7 @@ public sealed class ArtifactAnalyzerSystem : EntitySystem
|
||||
var remaining = active != null ? _timing.CurTime - active.StartTime : TimeSpan.Zero;
|
||||
|
||||
var state = new AnalysisConsoleScanUpdateState(artifact, analyzerConnected, serverConnected, canScan, canPrint,
|
||||
node?.Id, node?.Depth, node?.Edges.Count, node?.Triggered, node?.Effect.ID, node?.Trigger.ID, completion,
|
||||
node?.Id, node?.Depth, node?.Edges.Count, node?.Triggered, node?.Effect.ID, node?.Trigger.ID, pointValue,
|
||||
scanning, remaining, totalTime);
|
||||
|
||||
var bui = _ui.GetUi(uid, ArtifactAnalzyerUiKey.Key);
|
||||
@@ -250,7 +245,7 @@ public sealed class ArtifactAnalyzerSystem : EntitySystem
|
||||
|
||||
if (!TryComp<ArtifactAnalyzerComponent>(component.AnalyzerEntity, out var analyzer) ||
|
||||
analyzer.LastAnalyzedNode == null ||
|
||||
analyzer.LastAnalyzedCompletion == null ||
|
||||
analyzer.LastAnalyzerPointValue == null ||
|
||||
!analyzer.ReadyToPrint)
|
||||
{
|
||||
return;
|
||||
@@ -297,8 +292,7 @@ public sealed class ArtifactAnalyzerSystem : EntitySystem
|
||||
msg.AddMarkup(Loc.GetString("analysis-console-info-edges", ("edges", n.Edges.Count)));
|
||||
msg.PushNewline();
|
||||
|
||||
msg.AddMarkup(Loc.GetString("analysis-console-info-completion",
|
||||
("percentage", Math.Round(analyzer.LastAnalyzedCompletion.Value * 100))));
|
||||
msg.AddMarkup(Loc.GetString("analysis-console-info-value", ("value", analyzer.LastAnalyzerPointValue)));
|
||||
|
||||
_popup.PopupEntity(Loc.GetString("analysis-console-print-popup"), uid, Filter.Pvs(uid));
|
||||
_paper.SetContent(report, msg.ToMarkup());
|
||||
|
||||
@@ -53,7 +53,7 @@ public sealed class AnalysisConsoleScanUpdateState : BoundUserInterfaceState
|
||||
|
||||
public string? TriggerProto;
|
||||
|
||||
public float? Completion;
|
||||
public int? PointValue;
|
||||
|
||||
public bool Scanning;
|
||||
|
||||
@@ -62,7 +62,7 @@ public sealed class AnalysisConsoleScanUpdateState : BoundUserInterfaceState
|
||||
public TimeSpan TotalTime;
|
||||
|
||||
public AnalysisConsoleScanUpdateState(EntityUid? artifact, bool analyzerConnected, bool serverConnected, bool canScan, bool canPrint,
|
||||
int? id, int? depth, int? edges, bool? triggered, string? effectProto, string? triggerProto, float? completion,
|
||||
int? id, int? depth, int? edges, bool? triggered, string? effectProto, string? triggerProto, int? pointValue,
|
||||
bool scanning, TimeSpan timeRemaining, TimeSpan totalTime)
|
||||
{
|
||||
Artifact = artifact;
|
||||
@@ -77,7 +77,7 @@ public sealed class AnalysisConsoleScanUpdateState : BoundUserInterfaceState
|
||||
Triggered = triggered;
|
||||
EffectProto = effectProto;
|
||||
TriggerProto = triggerProto;
|
||||
Completion = completion;
|
||||
PointValue = pointValue;
|
||||
|
||||
Scanning = scanning;
|
||||
TimeRemaining = timeRemaining;
|
||||
|
||||
@@ -18,7 +18,7 @@ analysis-console-info-triggered-false = ACTIVATED: FALSE
|
||||
analysis-console-info-effect = REACTION: {$effect}
|
||||
analysis-console-info-trigger = STIMULUS: {$trigger}
|
||||
analysis-console-info-edges = EDGES: {$edges}
|
||||
analysis-console-info-completion = COMPLETION_PERCENTAGE: {$percentage}%
|
||||
analysis-console-info-value = CURRENT_VALUE: {$value}
|
||||
|
||||
analysis-console-info-scanner = Scanning...
|
||||
analysis-console-progress-text = {$seconds ->
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
- shape:
|
||||
!type:PhysShapeCircle
|
||||
radius: 0.45
|
||||
density: 235
|
||||
density: 75
|
||||
mask:
|
||||
- MachineMask
|
||||
layer:
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
- shape:
|
||||
!type:PhysShapeCircle
|
||||
radius: 0.45
|
||||
density: 235
|
||||
density: 75
|
||||
layer: # doesn't collide with artifact storage
|
||||
- Opaque
|
||||
- BulletImpassable
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
|
||||
- type: artifactEffect #bornana
|
||||
id: EffectBananaSpawn
|
||||
targetDepth: 1
|
||||
targetDepth: 0
|
||||
effectHint: artifact-effect-hint-creation
|
||||
components:
|
||||
- type: SpawnArtifact
|
||||
@@ -188,6 +188,20 @@
|
||||
types:
|
||||
Structural: 100
|
||||
|
||||
- type: artifactEffect
|
||||
id: EffectGas
|
||||
targetDepth: 2
|
||||
effectHint: artifact-effect-hint-environment
|
||||
components:
|
||||
- type: GasArtifact
|
||||
|
||||
- type: artifactEffect
|
||||
id: EffectBlink
|
||||
targetDepth: 2
|
||||
effectHint: artifact-effect-hint-displacement
|
||||
components:
|
||||
- type: RandomTeleportArtifact
|
||||
|
||||
- type: artifactEffect
|
||||
id: EffectMaterialSpawn
|
||||
targetDepth: 3
|
||||
@@ -227,19 +241,6 @@
|
||||
- UltraHighPowerMicroLaserStockPart
|
||||
- SuperMatterBinStockPart
|
||||
|
||||
- type: artifactEffect
|
||||
id: EffectGas
|
||||
targetDepth: 3
|
||||
effectHint: artifact-effect-hint-environment
|
||||
components:
|
||||
- type: GasArtifact
|
||||
|
||||
- type: artifactEffect
|
||||
id: EffectBlink
|
||||
targetDepth: 3
|
||||
effectHint: artifact-effect-hint-displacement
|
||||
components:
|
||||
- type: RandomTeleportArtifact
|
||||
|
||||
- type: artifactEffect
|
||||
id: EffectDisease
|
||||
@@ -258,7 +259,7 @@
|
||||
|
||||
- type: artifactEffect
|
||||
id: EffectRareMaterialSpawn
|
||||
targetDepth: 4
|
||||
targetDepth: 3
|
||||
effectHint: artifact-effect-hint-creation
|
||||
components:
|
||||
- type: SpawnArtifact
|
||||
@@ -272,7 +273,7 @@
|
||||
|
||||
- type: artifactEffect
|
||||
id: EffectPowerGen20K
|
||||
targetDepth: 4
|
||||
targetDepth: 3
|
||||
effectHint: artifact-effect-hint-release
|
||||
components:
|
||||
- type: PowerSupplier
|
||||
@@ -280,7 +281,7 @@
|
||||
|
||||
- type: artifactEffect
|
||||
id: EffectHeat
|
||||
targetDepth: 4
|
||||
targetDepth: 3
|
||||
effectHint: artifact-effect-hint-release
|
||||
components:
|
||||
- type: TemperatureArtifact
|
||||
@@ -288,7 +289,7 @@
|
||||
|
||||
- type: artifactEffect
|
||||
id: EffectFoamDangerous
|
||||
targetDepth: 4
|
||||
targetDepth: 3
|
||||
effectHint: artifact-effect-hint-biochemical
|
||||
components:
|
||||
- type: FoamArtifact
|
||||
|
||||
Reference in New Issue
Block a user