From 43462c7ede2e0c1fa932eabdcb8488fe01d93b91 Mon Sep 17 00:00:00 2001 From: vulppine Date: Fri, 19 Aug 2022 05:53:49 -0700 Subject: [PATCH] air sensor entity --- .../Structures/Doors/Firelocks/firelock.yml | 2 +- .../Structures/Piping/Atmospherics/unary.yml | 19 --------- .../Specific/Atmospherics/sensor.yml | 37 ++++++++++++++++++ .../Structures/Wallmounts/air_alarm.yml | 2 +- .../Atmospherics/sensor.rsi/gsensor0.png | Bin 0 -> 166 bytes .../Atmospherics/sensor.rsi/gsensor1.png | Bin 0 -> 164 bytes .../Atmospherics/sensor.rsi/meta.json | 13 ++++++ 7 files changed, 52 insertions(+), 21 deletions(-) create mode 100644 Resources/Prototypes/Entities/Structures/Specific/Atmospherics/sensor.yml create mode 100644 Resources/Textures/Structures/Specific/Atmospherics/sensor.rsi/gsensor0.png create mode 100644 Resources/Textures/Structures/Specific/Atmospherics/sensor.rsi/gsensor1.png create mode 100644 Resources/Textures/Structures/Specific/Atmospherics/sensor.rsi/meta.json diff --git a/Resources/Prototypes/Entities/Structures/Doors/Firelocks/firelock.yml b/Resources/Prototypes/Entities/Structures/Doors/Firelocks/firelock.yml index 4312a31f46..e096185907 100644 --- a/Resources/Prototypes/Entities/Structures/Doors/Firelocks/firelock.yml +++ b/Resources/Prototypes/Entities/Structures/Doors/Firelocks/firelock.yml @@ -7,7 +7,7 @@ - type: AtmosAlarmable alarmedBy: - FireAlarm - - GasVentPump # TODO: No + - AirSensor - type: ApcPowerReceiver - type: ExtensionCableReceiver - type: DeviceNetwork diff --git a/Resources/Prototypes/Entities/Structures/Piping/Atmospherics/unary.yml b/Resources/Prototypes/Entities/Structures/Piping/Atmospherics/unary.yml index bdddfa018f..de129b0959 100644 --- a/Resources/Prototypes/Entities/Structures/Piping/Atmospherics/unary.yml +++ b/Resources/Prototypes/Entities/Structures/Piping/Atmospherics/unary.yml @@ -32,27 +32,8 @@ transmitFrequencyId: AtmosMonitor prefix: device-address-prefix-vent sendBroadcastAttemptEvent: true - - type: DeviceList - type: WiredNetworkConnection - - type: AtmosAlarmable - alarmedBy: - - GasVentPump # TODO: No - type: AtmosDevice - - type: AtmosMonitor - temperatureThreshold: stationTemperature - pressureThreshold: stationPressure - gasThresholds: - Oxygen: stationOxygen - Nitrogen: ignore - CarbonDioxide: stationCO2 - Plasma: danger # everything below is usually bad - Tritium: danger - WaterVapor: danger - Miasma: danger - NitrousOxide: danger - Frezon: danger - - type: AccessReader - access: [ [ "Atmospherics" ] ] - type: Sprite netsync: false drawdepth: FloorObjects diff --git a/Resources/Prototypes/Entities/Structures/Specific/Atmospherics/sensor.yml b/Resources/Prototypes/Entities/Structures/Specific/Atmospherics/sensor.yml new file mode 100644 index 0000000000..0326db4bd9 --- /dev/null +++ b/Resources/Prototypes/Entities/Structures/Specific/Atmospherics/sensor.yml @@ -0,0 +1,37 @@ +- type: entity + id: AirSensor + name: air sensor + description: Air sensor. It senses air. + components: + - type: ApcPowerReceiver + - type: ExtensionCableReceiver + - type: DeviceNetwork + deviceNetId: AtmosDevices + receiveFrequencyId: AtmosMonitor + transmitFrequencyId: AtmosMonitor + prefix: device-address-prefix-sensor + sendBroadcastAttemptEvent: true + - type: DeviceList + - type: WiredNetworkConnection + - type: AtmosDevice + - type: AtmosMonitor + temperatureThreshold: stationTemperature + pressureThreshold: stationPressure + gasThresholds: + Oxygen: stationOxygen + Nitrogen: ignore + CarbonDioxide: stationCO2 + Plasma: danger # everything below is usually bad + Tritium: danger + WaterVapor: danger + Miasma: danger + NitrousOxide: danger + Frezon: danger + - type: AccessReader + access: [ [ "Atmospherics" ] ] + - type: Sprite + netsync: false + drawdepth: FloorObjects + sprite: Structures/Specific/Atmospherics/sensor.rsi + layers: + - state: gsensor1 diff --git a/Resources/Prototypes/Entities/Structures/Wallmounts/air_alarm.yml b/Resources/Prototypes/Entities/Structures/Wallmounts/air_alarm.yml index 0860acdea2..7588231fa7 100644 --- a/Resources/Prototypes/Entities/Structures/Wallmounts/air_alarm.yml +++ b/Resources/Prototypes/Entities/Structures/Wallmounts/air_alarm.yml @@ -17,7 +17,7 @@ - type: WiredNetworkConnection - type: DeviceList - type: AtmosAlarmable - alarmedBy: ["GasVentPump"] + alarmedBy: ["AirSensor"] - type: AtmosDevice - type: AirAlarm - type: Clickable diff --git a/Resources/Textures/Structures/Specific/Atmospherics/sensor.rsi/gsensor0.png b/Resources/Textures/Structures/Specific/Atmospherics/sensor.rsi/gsensor0.png new file mode 100644 index 0000000000000000000000000000000000000000..c1a10f00200518d833b692952e44a806c559d461 GIT binary patch literal 166 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=ffJTu&Frkcv5Pr`+W{V8GFmd%RG< z{pE>u$@0IPr9KHPP2&E3P*KQ-Pg#hOfk7jU^U96c-z&L$X1;d`U3p$v&8A;kR#sw_ z<@~f>i<{>(l=^4*da=i_>2;nkFgs=VVW#AZ|NpKV2kc`%Wv-vO6S(7@jSDBx OVg^rFKbLh*2~7a+$T;Bu literal 0 HcmV?d00001 diff --git a/Resources/Textures/Structures/Specific/Atmospherics/sensor.rsi/gsensor1.png b/Resources/Textures/Structures/Specific/Atmospherics/sensor.rsi/gsensor1.png new file mode 100644 index 0000000000000000000000000000000000000000..e4e4a96da3b68a22440c550de1e22998a4b9ca2f GIT binary patch literal 164 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=ffJY)==*kcv5Pr#NyQFyLUxo&VVR z+kf@_ljWSerHWPrZETf|aA`W3an`qIwfCBqtqM;{GkPv4Jn#7IFMK+t zbL`XlBVRHe&`q0siE(;kFvGOMfWF4_XAb=NzJFfhC)(E1$NCyR{~ng N;OXk;vd$@?2>^}sJ&XVV literal 0 HcmV?d00001 diff --git a/Resources/Textures/Structures/Specific/Atmospherics/sensor.rsi/meta.json b/Resources/Textures/Structures/Specific/Atmospherics/sensor.rsi/meta.json new file mode 100644 index 0000000000..464ca9ba98 --- /dev/null +++ b/Resources/Textures/Structures/Specific/Atmospherics/sensor.rsi/meta.json @@ -0,0 +1,13 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC 3.0 BY-SA", + "copyright": "Taken from /tg/station on commit https://github.com/tgstation/tgstation/commit/1dd5021b2c5b64e954935bdf77bc973c34016a04", + "states": [ + { "name": "gsensor0" }, + { "name": "gsensor1" } + ] +}