]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
make timers constructable and deconstructable (#15571)
authordeltanedas <39013340+deltanedas@users.noreply.github.com>
Sat, 6 May 2023 11:15:07 +0000 (11:15 +0000)
committerGitHub <noreply@github.com>
Sat, 6 May 2023 11:15:07 +0000 (21:15 +1000)
Co-authored-by: deltanedas <@deltanedas:kde.org>
Resources/Prototypes/Catalog/Research/technologies.yml
Resources/Prototypes/Entities/Objects/Devices/Electronics/timer.yml [new file with mode: 0644]
Resources/Prototypes/Entities/Structures/Machines/lathe.yml
Resources/Prototypes/Entities/Structures/Wallmounts/timer.yml
Resources/Prototypes/Recipes/Construction/Graphs/utilities/timer.yml [new file with mode: 0644]
Resources/Prototypes/Recipes/Construction/Graphs/utilities/timer_electronics.yml [new file with mode: 0644]
Resources/Prototypes/Recipes/Construction/utilities.yml
Resources/Prototypes/Recipes/Lathes/electronics.yml
Resources/Prototypes/tags.yml

index 1dae0e3546a09dca1a611d543a38f5ee437a214b..63544039e3308c1aa438a24d8924e4b78887130b 100644 (file)
   - AirAlarmElectronics
   - FireAlarmElectronics
   - MailingUnitElectronics
+  - SignalTimerElectronics
 
 - type: technology
   name: technologies-material-sheet-printing
diff --git a/Resources/Prototypes/Entities/Objects/Devices/Electronics/timer.yml b/Resources/Prototypes/Entities/Objects/Devices/Electronics/timer.yml
new file mode 100644 (file)
index 0000000..60b9076
--- /dev/null
@@ -0,0 +1,42 @@
+- type: entity
+  id: SignalTimerElectronics
+  parent: BaseElectronics
+  name: signal timer electronics
+  description: An electronics board used in timer circuitry. Looks like you could use a screwdriver to change the board type.
+  components:
+  - type: Sprite
+    sprite: Objects/Misc/module.rsi
+    state: charger_APC
+  - type: Construction
+    deconstructionTarget: null
+    graph: TimerElectronics
+    node: signal
+  - type: Tag
+    tags:
+    - TimerSignalElectronics
+
+- type: entity
+  id: ScreenTimerElectronics
+  parent: SignalTimerElectronics
+  name: screen timer electronics
+  components:
+  - type: Construction
+    deconstructionTarget: null
+    graph: TimerElectronics
+    node: screen
+  - type: Tag
+    tags:
+    - TimerScreenElectronics
+
+- type: entity
+  id: BrigTimerElectronics
+  parent: SignalTimerElectronics
+  name: brig timer electronics
+  components:
+  - type: Construction
+    deconstructionTarget: null
+    graph: TimerElectronics
+    node: brig
+  - type: Tag
+    tags:
+    - TimerBrigElectronics
index 8831c7f59266c928cfaccb2b7208a37025d4334e..3fecef3304cf060b879752b3f4fd1d12f2475fd6 100644 (file)
       - FireAlarmElectronics
       - IntercomElectronics
       - MailingUnitElectronics
+      - SignalTimerElectronics
       - Bucket
       - MopItem
       - AdvMopItem
       - FireAlarmElectronics
       - MailingUnitElectronics
       - IntercomElectronics
+      - SignalTimerElectronics
       - SMESMachineCircuitboard
       - SubstationMachineCircuitboard
       - ThermomachineFreezerMachineCircuitBoard
index 0f95a8712950476fe6c86e94a31eca91491bba6f..7f27dfd51dd2ef42dd5efb95b4ec883e43e3899a 100644 (file)
@@ -38,6 +38,9 @@
     usesApcPower: true
   - type: ExtensionCableReceiver
   - type: ActivatableUIRequiresPower
+  - type: Construction
+    graph: Timer
+    node: signal
 
 - type: entity
   id: ScreenTimer
@@ -52,6 +55,9 @@
     sprite: Structures/Wallmounts/textscreen.rsi
     state: textscreen
     noRot: true
+  - type: Construction
+    graph: Timer
+    node: screen
 
 - type: entity
   id: BrigTimer
   components:
   - type: AccessReader
     access: [["Security"]]
+  - type: Construction
+    graph: Timer
+    node: brig
+
+# Construction Frame
+
+- type: entity
+  noSpawn: true
+  id: TimerFrame
+  name: timer frame
+  description: A construction frame for a timer.
+  placement:
+    mode: SnapgridCenter
+  components:
+  - type: Clickable
+  - type: InteractionOutline
+  - type: Transform
+    anchored: true
+  - type: Sprite
+    drawdepth: WallMountedItems
+    netsync: false
+    sprite: Structures/Wallmounts/textscreen.rsi
+    state: textscreen
+  - type: Construction
+    graph: Timer
+    node: frame
+  - type: WallMount
diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/utilities/timer.yml b/Resources/Prototypes/Recipes/Construction/Graphs/utilities/timer.yml
new file mode 100644 (file)
index 0000000..6c5def7
--- /dev/null
@@ -0,0 +1,177 @@
+- type: constructionGraph
+  id: Timer
+  start: start
+  graph:
+    - node: start
+      edges:
+      - to: frame
+        steps:
+        - material: Steel
+          amount: 5
+          doAfter: 2
+
+    - node: frame
+      entity: TimerFrame
+      edges:
+      - to: start
+        steps:
+        - tool: Welding
+          doAfter: 4
+        completed:
+        - !type:GivePrototype
+          prototype: SheetSteel1
+          amount: 5
+        - !type:DeleteEntity {}
+      - to: parts
+        steps:
+        - material: Cable
+          amount: 2
+          doAfter: 2
+        - tool: Screwing
+          doAfter: 2
+
+    - node: parts
+      entity: TimerFrame
+      edges:
+      - to: signalElectronics
+        steps:
+        - tag: TimerSignalElectronics
+          store: board
+          name: "signal timer electronics"
+          icon:
+            sprite: "Objects/Misc/module.rsi"
+            state: "charger_APC"
+          doAfter: 1
+      - to: screenElectronics
+        steps:
+        - tag: TimerScreenElectronics
+          store: board
+          name: "screen timer electronics"
+          icon:
+            sprite: "Objects/Misc/module.rsi"
+            state: "charger_APC"
+          doAfter: 1
+      - to: brigElectronics
+        steps:
+        - tag: TimerBrigElectronics
+          store: board
+          name: "brig timer electronics"
+          icon:
+            sprite: "Objects/Misc/module.rsi"
+            state: "charger_APC"
+          doAfter: 1
+      - to: frame
+        steps:
+        - tool: Cutting
+          doAfter: 1
+        completed:
+        - !type:GivePrototype
+          prototype: CableApcStack1
+          amount: 2
+
+    - node: signalElectronics
+      entity: TimerFrame
+      edges:
+      - to: signal
+        steps:
+        - tool: Screwing
+          doAfter: 1
+      - to: parts
+        steps:
+        - tool: Prying
+          doAfter: 1
+        conditions:
+        - !type:ContainerNotEmpty
+          container: board
+        completed:
+        - !type:EmptyAllContainers {}
+
+    - node: screenElectronics
+      edges:
+      - to: screenGlass
+        steps:
+        - material: Glass
+          amount: 2
+          doAfter: 2
+      - to: parts
+        steps:
+        - tool: Prying
+          doAfter: 1
+        conditions:
+        - !type:ContainerNotEmpty
+          container: board
+        completed:
+        - !type:EmptyAllContainers {}
+
+    - node: brigElectronics
+      edges:
+      - to: brigGlass
+        steps:
+        - material: Glass
+          amount: 2
+          doAfter: 2
+      - to: parts
+        steps:
+        - tool: Prying
+          doAfter: 1
+        conditions:
+        - !type:ContainerNotEmpty
+          container: board
+        completed:
+        - !type:EmptyAllContainers {}
+
+    - node: screenGlass
+      entity: TimerFrame
+      edges:
+      - to: screenElectronics
+        steps:
+        - tool: Prying
+          doAfter: 1
+        completed:
+        - !type:GivePrototype
+          prototype: SheetGlass1
+          amount: 2
+      - to: screen
+        steps:
+        - tool: Screwing
+          doAfter: 1
+
+    - node: brigGlass
+      entity: TimerFrame
+      edges:
+      - to: brigElectronics
+        steps:
+        - tool: Prying
+          doAfter: 1
+        completed:
+        - !type:GivePrototype
+          prototype: SheetGlass1
+          amount: 2
+      - to: brig
+        steps:
+        - tool: Screwing
+          doAfter: 1
+
+    - node: signal
+      entity: SignalTimer
+      edges:
+      - to: signalElectronics
+        steps:
+        - tool: Screwing
+          doAfter: 2
+
+    - node: screen
+      entity: ScreenTimer
+      edges:
+      - to: screenGlass
+        steps:
+        - tool: Screwing
+          doAfter: 2
+
+    - node: brig
+      entity: BrigTimer
+      edges:
+      - to: brigGlass
+        steps:
+        - tool: Screwing
+          doAfter: 2
diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/utilities/timer_electronics.yml b/Resources/Prototypes/Recipes/Construction/Graphs/utilities/timer_electronics.yml
new file mode 100644 (file)
index 0000000..6b90a00
--- /dev/null
@@ -0,0 +1,25 @@
+- type: constructionGraph
+  id: TimerElectronics
+  start: signal
+  graph:
+  - node: signal
+    entity: SignalTimerElectronics
+    edges:
+    - to: screen
+      steps:
+      - tool: Screwing
+        doAfter: 2
+  - node: screen
+    entity: ScreenTimerElectronics
+    edges:
+    - to: brig
+      steps:
+      - tool: Screwing
+        doAfter: 2
+  - node: brig
+    entity: BrigTimerElectronics
+    edges:
+    - to: signal
+      steps:
+      - tool: Screwing
+        doAfter: 2
index fccaada6d620230693216531d30198de70756d73..c85d426c396879d761de9b0a96b9762dc6475580 100644 (file)
   canBuildInImpassable: true
   conditions:
   - !type:WallmountCondition {}
+
+# TIMERS
+- type: construction
+  name: signal timer
+  id: SignalTimer
+  graph: Timer
+  startNode: start
+  targetNode: signal
+  category: construction-category-utilities
+  description: "A wallmounted timer for sending timed signals to things."
+  icon:
+    sprite: Structures/Wallmounts/switch.rsi
+    state: on
+  objectType: Structure
+  placementMode: SnapgridCenter
+  canBuildInImpassable: true
+  conditions:
+  - !type:WallmountCondition
+
+- type: construction
+  name: screen timer
+  id: ScreenTimer
+  graph: Timer
+  startNode: start
+  targetNode: screen
+  category: construction-category-utilities
+  description: "A wallmounted timer for sending timed signals to things. This one has a screen for displaying text."
+  icon:
+    sprite: Structures/Wallmounts/textscreen.rsi
+    state: textscreen
+  objectType: Structure
+  canRotate: false
+  placementMode: SnapgridCenter
+  canBuildInImpassable: true
+  conditions:
+  - !type:WallmountCondition
+
+- type: construction
+  name: brig timer
+  id: BrigTimer
+  graph: Timer
+  startNode: start
+  targetNode: brig
+  category: construction-category-utilities
+  description: "A wallmounted timer for sending timed signals to things. This one has a screen for displaying text and requires security access to use."
+  icon:
+    sprite: Structures/Wallmounts/textscreen.rsi
+    state: textscreen
+  objectType: Structure
+  canRotate: false
+  placementMode: SnapgridCenter
+  canBuildInImpassable: true
+  conditions:
+  - !type:WallmountCondition
index 033804b6fa000be2a9a8dee56da905915a9b4c53..c33cc1763c999c4994d8df2b64184cef02356aef 100644 (file)
      Steel: 50
      Plastic: 50
 
+- type: latheRecipe
+  id: SignalTimerElectronics
+  result: SignalTimerElectronics
+  completetime: 2
+  materials:
+     Steel: 50
+     Plastic: 50
+
 - type: latheRecipe
   id: CloningPodMachineCircuitboard
   result: CloningPodMachineCircuitboard
index 166526ef72fb2c4416ff85b80f636adfe0d02798..9f989f04b437ea13f799144c53b456884d62c2af 100644 (file)
 - type: Tag
   id: Taser
 
+- type: Tag
+  id: TimerBrigElectronics
+
+- type: Tag
+  id: TimerScreenElectronics
+
+- type: Tag
+  id: TimerSignalElectronics
+
 - type: Tag
   id: Trash