mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +01:00
* Air Sensor are Craftable, Removed from RPD UI, Have New Linking System (#75869) ## About The Pull Request **1. Craftable & Removed from RPD UI** 1. Air sensor's are now craftable 2. You can turn them on/off with hand. Even though turning off the sensor will change it to a diffrent type[from `obj/machinery/air_sensor` -> `obj/item/air_sensor`] it's I/O port's are sill preserved when turning them on although you have to assign it a new name again which is usefull if you want to change the sensor's purpose in game. 3. They can now only be deconstructed by a welding tool and should be wrenched in place to turn them on. 4. Turned off air sensor's once unwrenched can be picked up like any regular item 5. Air sensor's are removed from the RPD UI because they don't go with pipes so it logically doesn't make sense to group them with pipe related device's Removed unused code in the process https://github.com/tgstation/tgstation/assets/110812394/3439a0f3-9c48-43ac-8f4b-98135435ec13 **2. New ID System** The problem with air sensor's is that each sensor is assigned a unique ID which is then stored in `GLOB.objects_by_id_tag` list. Each sensor name it's assigned based on the gas it's trying to sense(for naming only even though it can detect other gases) So if 2 sensor's having the same ID are made they will overwrite each other in this list leaving one sensor orphaned in the world which cannot be referenced because it's value was overwritten by a new sensor having the same ID in this list. The Solution? Rather than having all atmos computer's look up sensor's from this 1 global list make each computer keep track of all sensor's it's responsible for in it's own local list[which i called `connected_sensor's`] this way 2 sensor's can have randomly generated names in the global `GLOB.objects_by_id_tag` list but the computer will know what sensor to look up in this list based on the stored sensor ID's in the `connected_sensor's` list Basically what i am getting at is now you can make as many air sensor's as you wish but you will know have to connect that sensor to the computer using a multitool. Notice in the video how i made 2 sensor's called `Supermatter Chamber Sensor's`] and every time you try to connect an sensor which has the same name[`Supermatter Chamber Sensor's` in this case] they will ovewrite the old sensor in it's list as shown in the video https://github.com/tgstation/tgstation/assets/110812394/b5283c3b-c8a1-4b94-a6a8-8ba7a0007615 **Why it's good for the game**  I agree. Also air sensor's taking up a full Tab/Section in the RPD UI wasted a lot of UI space so that's removed now. Also making the air sensor's wrenchable and pickable item's was also requested in https://github.com/tgstation/tgstation/pull/72019#issuecomment-1355499873 so you relate them to device's like meter's Another huge issue was that the number of air sensor's you can make in the world was limited because each sensor in the world must have a unique ID but that's finally fixed now so yeah make as many sensor's as you want. ## Changelog 🆑 add: air sensor's are craftable refactor: air sensor's can now be turned off by hand and can only be deconstructed by a welding tool refactor: removed `Params()` proc qol: unwrenched air sensors can be picked up & recycled like regular item's del: air sensor are removed from the RPD UI qol: air sensor's are no longer restricted by their unique ID's which mean you can craft as many air sensors as you want. /🆑 --------- Co-authored-by: Time-Green <timkoster1@ hotmail.com> * Air Sensor are Craftable, Removed from RPD UI, Have New Linking System --------- Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com> Co-authored-by: Time-Green <timkoster1@ hotmail.com>
74 lines
3.3 KiB
Plaintext
74 lines
3.3 KiB
Plaintext
// ATMOSIA GAS MONITOR SUITE TAGS
|
|
// Things that use these include atmos control monitors, sensors, inputs, and outlets.
|
|
// They last three adds _sensor, _in, and _out respectively to the id_tag variable.
|
|
// Dont put underscores here, we use them as delimiters.
|
|
|
|
#define ATMOS_GAS_MONITOR_O2 GAS_O2
|
|
#define ATMOS_GAS_MONITOR_PLAS GAS_PLASMA
|
|
#define ATMOS_GAS_MONITOR_AIR GAS_AIR
|
|
#define ATMOS_GAS_MONITOR_MIX "mix"
|
|
#define ATMOS_GAS_MONITOR_N2O GAS_N2O
|
|
#define ATMOS_GAS_MONITOR_N2 GAS_N2
|
|
#define ATMOS_GAS_MONITOR_CO2 GAS_CO2
|
|
#define ATMOS_GAS_MONITOR_BZ GAS_BZ
|
|
#define ATMOS_GAS_MONITOR_FREON GAS_FREON
|
|
#define ATMOS_GAS_MONITOR_HALON GAS_HALON
|
|
#define ATMOS_GAS_MONITOR_HEALIUM GAS_HEALIUM
|
|
#define ATMOS_GAS_MONITOR_H2 GAS_HYDROGEN
|
|
#define ATMOS_GAS_MONITOR_HYPERNOBLIUM GAS_HYPER_NOBLIUM
|
|
#define ATMOS_GAS_MONITOR_MIASMA GAS_MIASMA
|
|
#define ATMOS_GAS_MONITOR_NITRIUM GAS_NITRIUM
|
|
#define ATMOS_GAS_MONITOR_PLUOXIUM GAS_PLUOXIUM
|
|
#define ATMOS_GAS_MONITOR_PROTO_NITRATE GAS_PROTO_NITRATE
|
|
#define ATMOS_GAS_MONITOR_TRITIUM GAS_TRITIUM
|
|
#define ATMOS_GAS_MONITOR_H2O GAS_WATER_VAPOR
|
|
#define ATMOS_GAS_MONITOR_ZAUKER GAS_ZAUKER
|
|
#define ATMOS_GAS_MONITOR_HELIUM GAS_HEALIUM
|
|
#define ATMOS_GAS_MONITOR_ANTINOBLIUM GAS_ANTINOBLIUM
|
|
#define ATMOS_GAS_MONITOR_INCINERATOR "incinerator"
|
|
#define ATMOS_GAS_MONITOR_ORDNANCE_BURN "ordnanceburn"
|
|
#define ATMOS_GAS_MONITOR_ORDNANCE_FREEZER "ordnancefreezer"
|
|
#define ATMOS_GAS_MONITOR_DISTRO "distro"
|
|
#define ATMOS_GAS_MONITOR_WASTE "waste"
|
|
#define ATMOS_GAS_MONITOR_ENGINE "engine"
|
|
|
|
///maps an air sensor's chamber id to its input valve[ i.e. outlet_injector] id
|
|
#define CHAMBER_INPUT_FROM_ID(chamber_id) ((chamber_id) + "_in")
|
|
///maps an air sensor's chamber id to its output valve[i.e. vent pump] id
|
|
#define CHAMBER_OUTPUT_FROM_ID(chamber_id) ((chamber_id) + "_out")
|
|
|
|
///list of all air sensor's created round start
|
|
GLOBAL_LIST_EMPTY(map_loaded_sensors)
|
|
|
|
// Human-readble names of these funny tags.
|
|
GLOBAL_LIST_INIT(station_gas_chambers, list(
|
|
ATMOS_GAS_MONITOR_O2 = "Oxygen Supply",
|
|
ATMOS_GAS_MONITOR_PLAS = "Plasma Supply",
|
|
ATMOS_GAS_MONITOR_AIR = "Mixed Air Supply",
|
|
ATMOS_GAS_MONITOR_N2O = "Nitrous Oxide Supply",
|
|
ATMOS_GAS_MONITOR_N2 = "Nitrogen Supply",
|
|
ATMOS_GAS_MONITOR_CO2 = "Carbon Dioxide Supply",
|
|
ATMOS_GAS_MONITOR_BZ = "BZ Supply",
|
|
ATMOS_GAS_MONITOR_FREON = "Freon Supply",
|
|
ATMOS_GAS_MONITOR_HALON = "Halon Supply",
|
|
ATMOS_GAS_MONITOR_HEALIUM = "Healium Supply",
|
|
ATMOS_GAS_MONITOR_H2 = "Hydrogen Supply",
|
|
ATMOS_GAS_MONITOR_HYPERNOBLIUM = "Hypernoblium Supply",
|
|
ATMOS_GAS_MONITOR_MIASMA = "Miasma Supply",
|
|
ATMOS_GAS_MONITOR_NITRIUM = "Nitrium Supply",
|
|
ATMOS_GAS_MONITOR_PLUOXIUM = "Pluoxium Supply",
|
|
ATMOS_GAS_MONITOR_PROTO_NITRATE = "Proto-Nitrate Supply",
|
|
ATMOS_GAS_MONITOR_TRITIUM = "Tritium Supply",
|
|
ATMOS_GAS_MONITOR_H2O = "Water Vapor Supply",
|
|
ATMOS_GAS_MONITOR_ZAUKER = "Zauker Supply",
|
|
ATMOS_GAS_MONITOR_HELIUM = "Helium Supply",
|
|
ATMOS_GAS_MONITOR_ANTINOBLIUM = "Antinoblium Supply",
|
|
ATMOS_GAS_MONITOR_MIX = "Mix Chamber",
|
|
ATMOS_GAS_MONITOR_INCINERATOR = "Incinerator Chamber",
|
|
ATMOS_GAS_MONITOR_ORDNANCE_BURN = "Ordnance Burn Chamber",
|
|
ATMOS_GAS_MONITOR_ORDNANCE_FREEZER = "Ordnance Freezer Chamber",
|
|
ATMOS_GAS_MONITOR_DISTRO = "Distribution Loop",
|
|
ATMOS_GAS_MONITOR_WASTE = "Waste Loop",
|
|
ATMOS_GAS_MONITOR_ENGINE = "Supermatter Engine Chamber",
|
|
))
|