logic gate stuff (#16943)

Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
deltanedas
2023-06-07 23:48:42 +00:00
committed by GitHub
parent d954957a11
commit 07d2430840
29 changed files with 547 additions and 205 deletions

View File

@@ -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