From 5464e8a0d7a29e66bf0fccfd65ef6409cd091b0b Mon Sep 17 00:00:00 2001 From: corentt <36075110+corentt@users.noreply.github.com> Date: Thu, 22 Sep 2022 17:57:24 +0200 Subject: [PATCH] Cleanup and re-parenting of wallmount/door electronics (#11397) --- .../Devices/Electronics/atmos_alarms.yml | 12 ++--------- .../Devices/Electronics/base_electronics.yml | 16 +++++++++++++++ .../Objects/Devices/Electronics/disposal.yml | 6 +----- .../Objects/Devices/Electronics/door.yml | 6 +----- .../Objects/Devices/Electronics/firelock.yml | 8 +------- .../Devices/Electronics/power_electronics.yml | 20 +++++-------------- .../Graphs/structures/airlock.yml | 2 +- .../Graphs/structures/shutter.yml | 4 ++-- .../Graphs/structures/shuttle.yml | 2 +- .../Graphs/structures/windoor.yml | 4 ++-- .../Graphs/utilities/air_alarms.yml | 4 ++-- .../Graphs/utilities/disposal_machines.yml | 2 +- Resources/Prototypes/tags.yml | 12 ----------- 13 files changed, 35 insertions(+), 63 deletions(-) create mode 100644 Resources/Prototypes/Entities/Objects/Devices/Electronics/base_electronics.yml diff --git a/Resources/Prototypes/Entities/Objects/Devices/Electronics/atmos_alarms.yml b/Resources/Prototypes/Entities/Objects/Devices/Electronics/atmos_alarms.yml index ac505900ec..85f1027f00 100644 --- a/Resources/Prototypes/Entities/Objects/Devices/Electronics/atmos_alarms.yml +++ b/Resources/Prototypes/Entities/Objects/Devices/Electronics/atmos_alarms.yml @@ -1,27 +1,19 @@ - type: entity id: AirAlarmElectronics - parent: BaseItem + parent: BaseElectronics name: air alarm electronics description: An electronics board used in air alarms components: - - type: Tag - tags: - - AirAlarmElectronics - - DroneUsable - type: Sprite sprite: Objects/Misc/module.rsi state: airalarm_electronics - type: entity id: FireAlarmElectronics - parent: BaseItem + parent: BaseElectronics name: fire alarm electronics description: An electronics board used in fire alarms components: - - type: Tag - tags: - - FireAlarmElectronics - - DroneUsable - type: Sprite sprite: Objects/Misc/module.rsi state: airalarm_electronics diff --git a/Resources/Prototypes/Entities/Objects/Devices/Electronics/base_electronics.yml b/Resources/Prototypes/Entities/Objects/Devices/Electronics/base_electronics.yml new file mode 100644 index 0000000000..e4f789f1f3 --- /dev/null +++ b/Resources/Prototypes/Entities/Objects/Devices/Electronics/base_electronics.yml @@ -0,0 +1,16 @@ +- type: entity + id: BaseElectronics + parent: BaseItem + name: base electronics + abstract: true + suffix: Electronics + components: + - type: Sprite + sprite: Objects/Misc/module.rsi + state: generic + netsync: false + - type: Tag + tags: + - DroneUsable + - type: StaticPrice + price: 100 diff --git a/Resources/Prototypes/Entities/Objects/Devices/Electronics/disposal.yml b/Resources/Prototypes/Entities/Objects/Devices/Electronics/disposal.yml index 03a91fef61..1784368684 100644 --- a/Resources/Prototypes/Entities/Objects/Devices/Electronics/disposal.yml +++ b/Resources/Prototypes/Entities/Objects/Devices/Electronics/disposal.yml @@ -1,13 +1,9 @@ - type: entity id: MailingUnitElectronics - parent: BaseItem + parent: BaseElectronics name: mailing unit electronics description: An electronics board used in mailing units components: - - type: Tag - tags: - - MailingUnitElectronics - - DroneUsable - type: Sprite sprite: Objects/Misc/module.rsi state: net_wired diff --git a/Resources/Prototypes/Entities/Objects/Devices/Electronics/door.yml b/Resources/Prototypes/Entities/Objects/Devices/Electronics/door.yml index d17ace440f..66a5ec4f25 100644 --- a/Resources/Prototypes/Entities/Objects/Devices/Electronics/door.yml +++ b/Resources/Prototypes/Entities/Objects/Devices/Electronics/door.yml @@ -1,13 +1,9 @@ - type: entity id: DoorElectronics - parent: BaseItem + parent: BaseElectronics name: door electronics description: An electronics board used in doors and airlocks components: - - type: Tag - tags: - - DoorElectronics - - DroneUsable - type: Sprite sprite: Objects/Misc/module.rsi state: door_electronics diff --git a/Resources/Prototypes/Entities/Objects/Devices/Electronics/firelock.yml b/Resources/Prototypes/Entities/Objects/Devices/Electronics/firelock.yml index 1e66ada1ea..2e1c4f5fee 100644 --- a/Resources/Prototypes/Entities/Objects/Devices/Electronics/firelock.yml +++ b/Resources/Prototypes/Entities/Objects/Devices/Electronics/firelock.yml @@ -1,16 +1,10 @@ - type: entity id: FirelockElectronics - parent: BaseItem + parent: BaseElectronics name: firelock electronics description: An electronics board used to detect differences in pressure, temperature and gas concentrations between the two sides of the door. components: - - type: Tag - tags: - - FirelockElectronics - - DroneUsable - type: Sprite sprite: Objects/Misc/module.rsi state: mainboard netsync: false - - type: StaticPrice - price: 100 diff --git a/Resources/Prototypes/Entities/Objects/Devices/Electronics/power_electronics.yml b/Resources/Prototypes/Entities/Objects/Devices/Electronics/power_electronics.yml index 4932bfdbb0..100507ada6 100644 --- a/Resources/Prototypes/Entities/Objects/Devices/Electronics/power_electronics.yml +++ b/Resources/Prototypes/Entities/Objects/Devices/Electronics/power_electronics.yml @@ -1,7 +1,7 @@ # APC - type: entity id: APCElectronics - parent: BaseItem + parent: BaseElectronics name: APC electronics description: Circuit used in APC construction. components: @@ -10,13 +10,11 @@ sprite: Objects/Misc/module.rsi state: charger_APC netsync: false - - type: StaticPrice - price: 100 # Wallmount Substation - type: entity id: WallmountSubstationElectronics - parent: BaseItem + parent: BaseElectronics name: wallmount substation electronics description: Circuit used to construct a wallmount substation. components: @@ -24,13 +22,11 @@ sprite: Objects/Misc/module.rsi state: charger_APC netsync: false - - type: StaticPrice - price: 100 # Wallmount Generator - type: entity id: WallmountGeneratorElectronics - parent: BaseItem + parent: BaseElectronics name: wallmount generator electronics description: Circuit used to construct a wallmount generator. components: @@ -38,13 +34,11 @@ sprite: Objects/Misc/module.rsi state: charger_APC netsync: false - - type: StaticPrice - price: 100 # APU - type: entity id: WallmountGeneratorAPUElectronics - parent: BaseItem + parent: BaseElectronics name: wallmount APU electronics description: Circuit used to construct a wallmount APU. components: @@ -52,12 +46,10 @@ sprite: Objects/Misc/module.rsi state: charger_APC netsync: false - - type: StaticPrice - price: 100 # Solar Tracker Electronics - type: entity - parent: BaseItem + parent: BaseElectronics id: SolarTrackerElectronics name: solar tracker electronics description: Advanced circuit board used to detect differences in pressure, temperature and gas concentrations between the two sides of the door. @@ -66,5 +58,3 @@ sprite: Objects/Misc/module.rsi state: generic netsync: false - - type: StaticPrice - price: 100 diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/structures/airlock.yml b/Resources/Prototypes/Recipes/Construction/Graphs/structures/airlock.yml index 6b9337f5ef..3f3b40b4a1 100644 --- a/Resources/Prototypes/Recipes/Construction/Graphs/structures/airlock.yml +++ b/Resources/Prototypes/Recipes/Construction/Graphs/structures/airlock.yml @@ -48,7 +48,7 @@ conditions: - !type:EntityAnchored {} steps: - - tag: DoorElectronics + - prototype: DoorElectronics store: board name: "door electronics circuit board" icon: diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/structures/shutter.yml b/Resources/Prototypes/Recipes/Construction/Graphs/structures/shutter.yml index d41614d921..87e791efce 100644 --- a/Resources/Prototypes/Recipes/Construction/Graphs/structures/shutter.yml +++ b/Resources/Prototypes/Recipes/Construction/Graphs/structures/shutter.yml @@ -44,7 +44,7 @@ - !type:EntityAnchored anchored: true steps: - - tag: DoorElectronics + - prototype: DoorElectronics name: Door Electronics icon: sprite: "Objects/Misc/module.rsi" @@ -176,4 +176,4 @@ welded: true steps: - tool: Anchoring - doAfter: 0.25 \ No newline at end of file + doAfter: 0.25 diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/structures/shuttle.yml b/Resources/Prototypes/Recipes/Construction/Graphs/structures/shuttle.yml index d73b52caf6..06c620f666 100644 --- a/Resources/Prototypes/Recipes/Construction/Graphs/structures/shuttle.yml +++ b/Resources/Prototypes/Recipes/Construction/Graphs/structures/shuttle.yml @@ -25,7 +25,7 @@ conditions: - !type:EntityAnchored {} steps: - - tag: DoorElectronics + - prototype: DoorElectronics store: board name: "door electronics circuit board" icon: diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/structures/windoor.yml b/Resources/Prototypes/Recipes/Construction/Graphs/structures/windoor.yml index da5dccfd26..0bbd6c4b8f 100644 --- a/Resources/Prototypes/Recipes/Construction/Graphs/structures/windoor.yml +++ b/Resources/Prototypes/Recipes/Construction/Graphs/structures/windoor.yml @@ -77,7 +77,7 @@ conditions: - !type:EntityAnchored {} steps: - - tag: DoorElectronics + - prototype: DoorElectronics store: board name: "door electronics circuit board" icon: @@ -178,7 +178,7 @@ conditions: - !type:EntityAnchored { } steps: - - tag: DoorElectronics + - prototype: DoorElectronics store: board name: "door electronics circuit board" icon: diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/utilities/air_alarms.yml b/Resources/Prototypes/Recipes/Construction/Graphs/utilities/air_alarms.yml index afa20ea2ef..16da0045ed 100644 --- a/Resources/Prototypes/Recipes/Construction/Graphs/utilities/air_alarms.yml +++ b/Resources/Prototypes/Recipes/Construction/Graphs/utilities/air_alarms.yml @@ -36,7 +36,7 @@ edges: - to: electronics steps: - - tag: AirAlarmElectronics + - prototype: AirAlarmElectronics store: board name: "air alarm electronics" icon: @@ -115,7 +115,7 @@ edges: - to: electronics steps: - - tag: FireAlarmElectronics + - prototype: FireAlarmElectronics store: board name: "fire alarm electronics" icon: diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/utilities/disposal_machines.yml b/Resources/Prototypes/Recipes/Construction/Graphs/utilities/disposal_machines.yml index 7a5e0d9c20..bf75a7c071 100644 --- a/Resources/Prototypes/Recipes/Construction/Graphs/utilities/disposal_machines.yml +++ b/Resources/Prototypes/Recipes/Construction/Graphs/utilities/disposal_machines.yml @@ -70,7 +70,7 @@ doAfter: 0.25 - to: frame_mailing steps: - - tag: MailingUnitElectronics + - prototype: MailingUnitElectronics name: Mailing Unit Electronics icon: sprite: "Objects/Misc/module.rsi" diff --git a/Resources/Prototypes/tags.yml b/Resources/Prototypes/tags.yml index f08b1ab1da..1ee06e768a 100644 --- a/Resources/Prototypes/tags.yml +++ b/Resources/Prototypes/tags.yml @@ -3,9 +3,6 @@ - type: Tag id: AirAlarm -- type: Tag - id: AirAlarmElectronics - - type: Tag id: AirSensor @@ -165,9 +162,6 @@ - type: Tag id: DoorBumpOpener -- type: Tag - id: DoorElectronics - - type: Tag id: DonkPocket @@ -192,9 +186,6 @@ - type: Tag id: FireAlarm -- type: Tag - id: FireAlarmElectronics - - type: Tag id: FireAxe @@ -329,9 +320,6 @@ - type: Tag id: Matchstick -- type: Tag - id: MailingUnitElectronics - - type: Tag id: Medkit