From: deltanedas <39013340+deltanedas@users.noreply.github.com> Date: Sat, 6 May 2023 11:15:07 +0000 (+0000) Subject: make timers constructable and deconstructable (#15571) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=2f991060006b22dde9e04c0c6aae8240d4f38640;p=space-station-14.git make timers constructable and deconstructable (#15571) Co-authored-by: deltanedas <@deltanedas:kde.org> --- diff --git a/Resources/Prototypes/Catalog/Research/technologies.yml b/Resources/Prototypes/Catalog/Research/technologies.yml index 1dae0e3546..63544039e3 100644 --- a/Resources/Prototypes/Catalog/Research/technologies.yml +++ b/Resources/Prototypes/Catalog/Research/technologies.yml @@ -373,6 +373,7 @@ - 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 index 0000000000..60b9076c4c --- /dev/null +++ b/Resources/Prototypes/Entities/Objects/Devices/Electronics/timer.yml @@ -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 diff --git a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml index 8831c7f592..3fecef3304 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml @@ -214,6 +214,7 @@ - FireAlarmElectronics - IntercomElectronics - MailingUnitElectronics + - SignalTimerElectronics - Bucket - MopItem - AdvMopItem @@ -276,6 +277,7 @@ - FireAlarmElectronics - MailingUnitElectronics - IntercomElectronics + - SignalTimerElectronics - SMESMachineCircuitboard - SubstationMachineCircuitboard - ThermomachineFreezerMachineCircuitBoard diff --git a/Resources/Prototypes/Entities/Structures/Wallmounts/timer.yml b/Resources/Prototypes/Entities/Structures/Wallmounts/timer.yml index 0f95a87129..7f27dfd51d 100644 --- a/Resources/Prototypes/Entities/Structures/Wallmounts/timer.yml +++ b/Resources/Prototypes/Entities/Structures/Wallmounts/timer.yml @@ -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 @@ -61,3 +67,30 @@ 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 index 0000000000..6c5def7c4c --- /dev/null +++ b/Resources/Prototypes/Recipes/Construction/Graphs/utilities/timer.yml @@ -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 index 0000000000..6b90a00f6c --- /dev/null +++ b/Resources/Prototypes/Recipes/Construction/Graphs/utilities/timer_electronics.yml @@ -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 diff --git a/Resources/Prototypes/Recipes/Construction/utilities.yml b/Resources/Prototypes/Recipes/Construction/utilities.yml index fccaada6d6..c85d426c39 100644 --- a/Resources/Prototypes/Recipes/Construction/utilities.yml +++ b/Resources/Prototypes/Recipes/Construction/utilities.yml @@ -677,3 +677,57 @@ 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 diff --git a/Resources/Prototypes/Recipes/Lathes/electronics.yml b/Resources/Prototypes/Recipes/Lathes/electronics.yml index 033804b6fa..c33cc1763c 100644 --- a/Resources/Prototypes/Recipes/Lathes/electronics.yml +++ b/Resources/Prototypes/Recipes/Lathes/electronics.yml @@ -46,6 +46,14 @@ Steel: 50 Plastic: 50 +- type: latheRecipe + id: SignalTimerElectronics + result: SignalTimerElectronics + completetime: 2 + materials: + Steel: 50 + Plastic: 50 + - type: latheRecipe id: CloningPodMachineCircuitboard result: CloningPodMachineCircuitboard diff --git a/Resources/Prototypes/tags.yml b/Resources/Prototypes/tags.yml index 166526ef72..9f989f04b4 100644 --- a/Resources/Prototypes/tags.yml +++ b/Resources/Prototypes/tags.yml @@ -679,6 +679,15 @@ - type: Tag id: Taser +- type: Tag + id: TimerBrigElectronics + +- type: Tag + id: TimerScreenElectronics + +- type: Tag + id: TimerSignalElectronics + - type: Tag id: Trash