logic gate stuff (#16943)
Co-authored-by: deltanedas <@deltanedas:kde.org>
3
Resources/Locale/en-US/logic-gates/logic-gates.ftl
Normal file
@@ -0,0 +1,3 @@
|
||||
logic-gate-examine = It is currently {INDEFINITE($gate)} {$gate} gate.
|
||||
|
||||
logic-gate-cycle = Switched to {INDEFINITE($gate)} {$gate} gate
|
||||
@@ -23,7 +23,7 @@ signal-port-name-close = Close
|
||||
signal-port-description-close = Closes a device.
|
||||
|
||||
signal-port-name-doorbolt = Door bolt
|
||||
signal-port-description-doorbolt = Toggles door bolt.
|
||||
signal-port-description-doorbolt = Bolts door when HIGH.
|
||||
|
||||
signal-port-name-trigger = Trigger
|
||||
signal-port-description-trigger = Triggers some mechanism on the device.
|
||||
@@ -69,3 +69,12 @@ signal-port-description-set-particle-epsilon = Sets the type of particle this de
|
||||
|
||||
signal-port-name-set-particle-zeta = Set particle type: zeta
|
||||
signal-port-description-set-particle-zeta = Sets the type of particle this device emits to zeta.
|
||||
|
||||
signal-port-name-logic-input-a = Input A
|
||||
signal-port-description-logic-input-a = First input of a logic gate.
|
||||
|
||||
signal-port-name-logic-input-b = Input B
|
||||
signal-port-description-logic-input-b = Second input of a logic gate.
|
||||
|
||||
signal-port-name-logic-input = Input
|
||||
signal-port-description-logic-input = Input to the edge detector, cannot be a pulse signal.
|
||||
|
||||
@@ -14,7 +14,7 @@ signal-port-name-right = Right
|
||||
signal-port-description-right = This port is invoked whenever the lever is moved to the rightmost position.
|
||||
|
||||
signal-port-name-doorstatus = Door status
|
||||
signal-port-description-doorstatus = This port is invoked whenever the door's status changes.
|
||||
signal-port-description-doorstatus = This port is invoked with HIGH when the door opens and LOW when the door closes.
|
||||
|
||||
signal-port-name-middle = Middle
|
||||
signal-port-description-middle = This port is invoked whenever the lever is moved to the neutral position.
|
||||
@@ -24,3 +24,12 @@ signal-port-description-timer-trigger = This port is invoked whenever the timer
|
||||
|
||||
signal-port-name-timer-start = Timer Start
|
||||
signal-port-description-timer-start = This port is invoked whenever the timer starts.
|
||||
|
||||
signal-port-name-logic-output = Output
|
||||
signal-port-description-logic-output = This port is invoked with HIGH or LOW depending on the selected gate and inputs.
|
||||
|
||||
signal-port-name-logic-output-high = High Output
|
||||
signal-port-description-logic-output-high = This port is invoked whenever the input has a rising edge.
|
||||
|
||||
signal-port-name-logic-output-low = Low Output
|
||||
signal-port-description-logic-output-low = This port is invoked whenever the input has a falling edge.
|
||||
|
||||
@@ -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
|
||||
|
||||
BIN
Resources/Textures/Objects/Devices/gates.rsi/and.png
Normal file
|
After Width: | Height: | Size: 7.2 KiB |
BIN
Resources/Textures/Objects/Devices/gates.rsi/base.png
Normal file
|
After Width: | Height: | Size: 7.4 KiB |
BIN
Resources/Textures/Objects/Devices/gates.rsi/edge_detector.png
Normal file
|
After Width: | Height: | Size: 7.2 KiB |
@@ -1,14 +1,38 @@
|
||||
{
|
||||
"version": 1,
|
||||
"license": "CC-BY-SA-3.0",
|
||||
"copyright": "Kevin Zheng 2022",
|
||||
"size": {
|
||||
"x": 32,
|
||||
"y": 32
|
||||
"version": 1,
|
||||
"license": "CC-BY-SA-3.0",
|
||||
"copyright": "or.png originally created by Kevin Zheng, 2022. All are modified by deltanedas (github) for SS14, 2023.",
|
||||
"size": {
|
||||
"x": 32,
|
||||
"y": 32
|
||||
},
|
||||
"states": [
|
||||
{
|
||||
"name": "base"
|
||||
},
|
||||
"states": [
|
||||
{
|
||||
"name": "or"
|
||||
}
|
||||
]
|
||||
{
|
||||
"name": "or"
|
||||
},
|
||||
{
|
||||
"name": "and"
|
||||
},
|
||||
{
|
||||
"name": "xor"
|
||||
},
|
||||
{
|
||||
"name": "nor"
|
||||
},
|
||||
{
|
||||
"name": "nand"
|
||||
},
|
||||
{
|
||||
"name": "xnor"
|
||||
},
|
||||
{
|
||||
"name": "edge_detector"
|
||||
},
|
||||
{
|
||||
"name": "or_icon"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
BIN
Resources/Textures/Objects/Devices/gates.rsi/nand.png
Normal file
|
After Width: | Height: | Size: 7.2 KiB |
BIN
Resources/Textures/Objects/Devices/gates.rsi/nor.png
Normal file
|
After Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 7.2 KiB |
BIN
Resources/Textures/Objects/Devices/gates.rsi/or_icon.png
Normal file
|
After Width: | Height: | Size: 7.4 KiB |
BIN
Resources/Textures/Objects/Devices/gates.rsi/xnor.png
Normal file
|
After Width: | Height: | Size: 7.2 KiB |
BIN
Resources/Textures/Objects/Devices/gates.rsi/xor.png
Normal file
|
After Width: | Height: | Size: 7.2 KiB |
@@ -53,7 +53,10 @@ FoodCondimentBottleSmallHotsauce: FoodCondimentBottleHotsauce
|
||||
FoodBakedCookieFortune: FoodSnackCookieFortune
|
||||
GunSafeSubMachineGunVector: GunSafeSubMachineGunDrozd
|
||||
|
||||
# 2023-05-29
|
||||
OrGate: null
|
||||
|
||||
# 2023-05-31
|
||||
IHSVoidsuit: null
|
||||
ClothingHeadHelmetIHSVoidHelm: null
|
||||
ClothingHandsGlovesIhscombat: null
|
||||
ClothingHandsGlovesIhscombat: null
|
||||
|
||||