Apc device network and apc based light switch (#4908)

* Remove WireNet node group from cables
Implement extension cable components and system
Remove connection over distance logic from ApcPower... components

* Add extension cable components to prototypes

* Implement ApcNetwork
Implement ApcNetSwitch

* Fix ignoredComponents.cs

* Add friend attribute to new components

* Add construction graph for a light switch

* Address reviews

* Fix broken test

* Move ConnectionType enum to DeviceNetworkComponent
Change netId data definition to use the ConnectionType enum values

Co-authored-by: Julian Giebel <j.giebel@netrocks.info>
This commit is contained in:
Julian Giebel
2021-10-24 01:23:19 +02:00
committed by GitHub
parent e7f352d6c2
commit 45caf25ea9
43 changed files with 678 additions and 237 deletions

View File

@@ -44,3 +44,27 @@
prototype: SheetSteel1
amount: 1
- !type:DeleteEntity {}
- type: constructionGraph
id: lightSwitch
start: start
graph:
- node: start
edges:
- to: lightSwitch
steps:
- material: Steel
amount: 1
doAfter: 2.0
- node: lightSwitch
entity: ApcNetSwitch
edges:
- to: start
steps:
- tool: Screwing
doAfter: 2.0
completed:
- !type:SpawnPrototype
prototype: SheetSteel1
amount: 1
- !type:DeleteEntity {}

View File

@@ -34,3 +34,22 @@
conditions:
- !type:WallmountCondition {}
- type: construction
name: light switch
id: LightSwitchRecipe
graph: lightSwitch
startNode: start
targetNode: lightSwitch
category: Structures
description: A switch for toggling lights that are connected to the same apc.
icon:
sprite: Structures/Wallmounts/switch.rsi
state: on
objectType: Structure
placementMode: SnapgridCenter
canRotate: true
canBuildInImpassable: true
conditions:
- !type:WallmountCondition {}