Nodes in entities are now named. (#3825)

This commit is contained in:
Vera Aguilera Puerto
2021-04-09 20:47:31 +02:00
committed by GitHub
parent 8a26920e4c
commit 009870116d
25 changed files with 198 additions and 168 deletions

View File

@@ -59,7 +59,7 @@ namespace Content.IntegrationTests.Tests.Construction
foreach (var graph in protoMan.EnumeratePrototypes<ConstructionGraphPrototype>())
{
foreach (var (_, node) in graph.Nodes)
foreach (var node in graph.Nodes.Values)
{
foreach (var action in node.Actions)
{
@@ -99,7 +99,7 @@ namespace Content.IntegrationTests.Tests.Construction
foreach (var graph in protoMan.EnumeratePrototypes<ConstructionGraphPrototype>())
{
foreach (var (_, node) in graph.Nodes)
foreach (var node in graph.Nodes.Values)
{
if (string.IsNullOrEmpty(node.Entity) || protoMan.TryIndex(node.Entity, out EntityPrototype _)) continue;
@@ -125,7 +125,7 @@ namespace Content.IntegrationTests.Tests.Construction
foreach (var graph in protoMan.EnumeratePrototypes<ConstructionGraphPrototype>())
{
foreach (var (_, node) in graph.Nodes)
foreach (var node in graph.Nodes.Values)
{
foreach (var edge in node.Edges)
{

View File

@@ -23,8 +23,9 @@ namespace Content.IntegrationTests.Tests
components:
- type: NodeContainer
nodes:
- !type:AdjacentNode
nodeGroupID: HVPower
output:
!type:AdjacentNode
nodeGroupID: HVPower
- type: PowerSupplier
supplyRate: 3000
- type: Anchorable
@@ -39,8 +40,9 @@ namespace Content.IntegrationTests.Tests
offset: Center
- type: NodeContainer
nodes:
- !type:AdjacentNode
nodeGroupID: HVPower
input:
!type:AdjacentNode
nodeGroupID: HVPower
- type: PowerConsumer
drawRate: 50
@@ -53,10 +55,12 @@ namespace Content.IntegrationTests.Tests
startingCharge: 1000
- type: NodeContainer
nodes:
- !type:AdjacentNode
nodeGroupID: HVPower
- !type:AdjacentNode
nodeGroupID: MVPower
input:
!type:AdjacentNode
nodeGroupID: HVPower
output:
!type:AdjacentNode
nodeGroupID: MVPower
- type: PowerConsumer
- type: BatteryStorage
activeDrawRate: 1500
@@ -84,10 +88,12 @@ namespace Content.IntegrationTests.Tests
voltage: Medium
- type: NodeContainer
nodes:
- !type:AdjacentNode
nodeGroupID: MVPower
- !type:AdjacentNode
nodeGroupID: Apc
input:
!type:AdjacentNode
nodeGroupID: MVPower
output:
!type:AdjacentNode
nodeGroupID: Apc
- type: SnapGrid
offset: Center
- type: UserInterface
@@ -103,10 +109,12 @@ namespace Content.IntegrationTests.Tests
components:
- type: NodeContainer
nodes:
- !type:AdjacentNode
nodeGroupID: Apc
- !type:AdjacentNode
nodeGroupID: WireNet
apc:
!type:AdjacentNode
nodeGroupID: Apc
wire:
!type:AdjacentNode
nodeGroupID: WireNet
- type: PowerProvider
voltage: Apc
- type: Wire