logic gate stuff (#16943)
Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
@@ -79,24 +79,19 @@
|
||||
description: signal-port-description-artifact-analyzer-receiver
|
||||
|
||||
- type: sinkPort
|
||||
id: A1
|
||||
name: "Input A1"
|
||||
description: "Input A1"
|
||||
id: InputA
|
||||
name: signal-port-name-logic-input-a
|
||||
description: signal-port-description-logic-input-a
|
||||
|
||||
- type: sinkPort
|
||||
id: B1
|
||||
name: "Input B1"
|
||||
description: "Input B1"
|
||||
id: InputB
|
||||
name: signal-port-name-logic-input-b
|
||||
description: signal-port-description-logic-input-b
|
||||
|
||||
- type: sinkPort
|
||||
id: A2
|
||||
name: "Input A2"
|
||||
description: "Input A2"
|
||||
|
||||
- type: sinkPort
|
||||
id: B2
|
||||
name: "Input B2"
|
||||
description: "Input B2"
|
||||
id: Input
|
||||
name: signal-port-name-logic-input
|
||||
description: signal-port-description-logic-input
|
||||
|
||||
- type: sinkPort
|
||||
id: SetParticleDelta
|
||||
|
||||
@@ -37,7 +37,8 @@
|
||||
- type: sourcePort
|
||||
id: DoorStatus
|
||||
name: signal-port-name-doorstatus
|
||||
description: signal-port-description-status
|
||||
description: signal-port-description-doorstatus
|
||||
defaultLinks: [ DoorBolt ]
|
||||
|
||||
- type: sourcePort
|
||||
id: OrderSender
|
||||
@@ -74,11 +75,16 @@
|
||||
defaultLinks: [ Close, Off ]
|
||||
|
||||
- type: sourcePort
|
||||
id: O1
|
||||
name: "Output 1"
|
||||
description: "Output 1"
|
||||
id: Output
|
||||
name: signal-port-name-logic-output
|
||||
description: signal-port-description-logic-output
|
||||
|
||||
- type: sourcePort
|
||||
id: O2
|
||||
name: "Output 2"
|
||||
description: "Output 2"
|
||||
id: OutputHigh
|
||||
name: signal-port-name-logic-output-high
|
||||
description: signal-port-description-logic-output-high
|
||||
|
||||
- type: sourcePort
|
||||
id: OutputLow
|
||||
name: signal-port-name-logic-output-low
|
||||
description: signal-port-description-logic-output-low
|
||||
|
||||
@@ -1,31 +1,68 @@
|
||||
- type: entity
|
||||
id: OrGate
|
||||
name: MS7432
|
||||
description: Dual 2-Input OR Gate
|
||||
abstract: true
|
||||
parent: BaseItem
|
||||
placement:
|
||||
mode: SnapgridCenter
|
||||
snap:
|
||||
- Wallmount
|
||||
id: BaseLogicItem
|
||||
components:
|
||||
- type: Anchorable
|
||||
- type: Sprite
|
||||
sprite: Objects/Devices/gates.rsi
|
||||
state: or
|
||||
- type: Anchorable
|
||||
- type: Rotatable
|
||||
- type: OrGate
|
||||
- type: DeviceNetwork
|
||||
deviceNetId: Wireless
|
||||
receiveFrequencyId: BasicDevice
|
||||
- type: WirelessNetworkConnection
|
||||
range: 200
|
||||
|
||||
- type: entity
|
||||
parent: BaseLogicItem
|
||||
id: LogicGate
|
||||
name: logic gate
|
||||
description: A logic gate with two inputs and one output. Technicians can change its mode of operation using a screwdriver.
|
||||
components:
|
||||
- type: Sprite
|
||||
layers:
|
||||
- state: base
|
||||
- state: or
|
||||
map: [ "enum.LogicGateLayers.Gate" ]
|
||||
- type: LogicGate
|
||||
- type: DeviceLinkSink
|
||||
ports:
|
||||
- A1
|
||||
- B1
|
||||
- A2
|
||||
- B2
|
||||
- InputA
|
||||
- InputB
|
||||
- type: DeviceLinkSource
|
||||
ports:
|
||||
- O1
|
||||
- O2
|
||||
- Output
|
||||
- type: Construction
|
||||
graph: LogicGate
|
||||
node: logic_gate
|
||||
- type: Appearance
|
||||
- type: GenericVisualizer
|
||||
visuals:
|
||||
enum.LogicGateVisuals.Gate:
|
||||
enum.LogicGateLayers.Gate:
|
||||
Or: { state: or }
|
||||
And: { state: and }
|
||||
Xor: { state: xor }
|
||||
Nor: { state: nor }
|
||||
Nand: { state: nand }
|
||||
Xnor: { state: xnor }
|
||||
|
||||
- type: entity
|
||||
parent: BaseLogicItem
|
||||
id: EdgeDetector
|
||||
name: edge detector
|
||||
description: Splits rising and falling edges into unique pulses and detects how edgy you are.
|
||||
components:
|
||||
- type: Sprite
|
||||
state: edge_detector
|
||||
- type: EdgeDetector
|
||||
- type: DeviceLinkSink
|
||||
ports:
|
||||
- Input
|
||||
- type: DeviceLinkSource
|
||||
ports:
|
||||
- OutputHigh
|
||||
- OutputLow
|
||||
- type: Construction
|
||||
graph: LogicGate
|
||||
node: edge_detector
|
||||
|
||||
@@ -75,25 +75,20 @@
|
||||
|
||||
- type: receiverPort
|
||||
id: DoorBolt
|
||||
name: "Bolt"
|
||||
description: "Bolt door when HIGH."
|
||||
name: signal-port-name-doorbolt
|
||||
description: signal-port-description-doorbolt
|
||||
|
||||
- type: receiverPort
|
||||
id: A1
|
||||
name: "Input A1"
|
||||
description: "Input A1"
|
||||
id: InputA
|
||||
name: signal-port-name-logic-input-a
|
||||
description: signal-port-description-logic-input-a
|
||||
|
||||
- type: receiverPort
|
||||
id: B1
|
||||
name: "Input B1"
|
||||
description: "Input B1"
|
||||
id: InputB
|
||||
name: signal-port-name-logic-input-b
|
||||
description: signal-port-description-logic-input-b
|
||||
|
||||
- type: receiverPort
|
||||
id: A2
|
||||
name: "Input A2"
|
||||
description: "Input A2"
|
||||
|
||||
- type: receiverPort
|
||||
id: B2
|
||||
name: "Input B2"
|
||||
description: "Input B2"
|
||||
id: Input
|
||||
name: signal-port-name-logic-input
|
||||
description: signal-port-description-logic-input
|
||||
|
||||
@@ -34,6 +34,12 @@
|
||||
description: signal-port-description-middle
|
||||
defaultLinks: [ Off, Close ]
|
||||
|
||||
- type: transmitterPort
|
||||
id: DoorStatus
|
||||
name: signal-port-name-doorstatus
|
||||
description: signal-port-description-doorstatus
|
||||
defaultLinks: [ DoorBolt ]
|
||||
|
||||
- type: transmitterPort
|
||||
id: OrderSender
|
||||
name: signal-port-name-order-sender
|
||||
@@ -49,7 +55,7 @@
|
||||
id: MedicalScannerSender
|
||||
name: signal-port-name-med-scanner-sender
|
||||
description: signal-port-description-med-scanner-sender
|
||||
|
||||
|
||||
- type: transmitterPort
|
||||
id: Timer
|
||||
name: signal-port-name-timer-trigger
|
||||
@@ -69,16 +75,16 @@
|
||||
defaultLinks: [ ArtifactAnalyzerReceiver ]
|
||||
|
||||
- type: transmitterPort
|
||||
id: DoorStatus
|
||||
name: "Door Status"
|
||||
description: "HIGH when door is open, LOW when door is closed."
|
||||
id: Output
|
||||
name: signal-port-name-logic-output
|
||||
description: signal-port-description-logic-output
|
||||
|
||||
- type: transmitterPort
|
||||
id: O1
|
||||
name: "Output 1"
|
||||
description: "Output 1"
|
||||
id: OutputHigh
|
||||
name: signal-port-name-logic-output-high
|
||||
description: signal-port-description-logic-output-high
|
||||
|
||||
- type: transmitterPort
|
||||
id: O2
|
||||
name: "Output 2"
|
||||
description: "Output 2"
|
||||
id: OutputLow
|
||||
name: signal-port-name-logic-output-low
|
||||
description: signal-port-description-logic-output-low
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
- type: constructionGraph
|
||||
id: LogicGate
|
||||
start: start
|
||||
graph:
|
||||
- node: start
|
||||
edges:
|
||||
- to: logic_gate
|
||||
steps:
|
||||
- material: Steel
|
||||
amount: 3
|
||||
doAfter: 1
|
||||
- material: Cable
|
||||
amount: 2
|
||||
doAfter: 1
|
||||
- to: edge_detector
|
||||
steps:
|
||||
- material: Steel
|
||||
amount: 3
|
||||
doAfter: 1
|
||||
- material: Cable
|
||||
amount: 2
|
||||
doAfter: 1
|
||||
- node: logic_gate
|
||||
entity: LogicGate
|
||||
- node: edge_detector
|
||||
entity: EdgeDetector
|
||||
@@ -8,3 +8,25 @@
|
||||
description: A torch fashioned from some wood.
|
||||
icon: { sprite: Objects/Misc/torch.rsi, state: icon }
|
||||
objectType: Item
|
||||
|
||||
- type: construction
|
||||
name: logic gate
|
||||
id: LogicGate
|
||||
graph: LogicGate
|
||||
startNode: start
|
||||
targetNode: logic_gate
|
||||
category: construction-category-tools
|
||||
description: A binary logic gate for signals.
|
||||
icon: { sprite: Objects/Devices/gates.rsi, state: or_icon }
|
||||
objectType: Item
|
||||
|
||||
- type: construction
|
||||
name: edge detector
|
||||
id: EdgeDetector
|
||||
graph: LogicGate
|
||||
startNode: start
|
||||
targetNode: edge_detector
|
||||
category: construction-category-tools
|
||||
description: An edge detector for signals.
|
||||
icon: { sprite: Objects/Devices/gates.rsi, state: edge_detector }
|
||||
objectType: Item
|
||||
|
||||
Reference in New Issue
Block a user