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