mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-25 17:12:12 +00:00
* General maintenance for canisters (#80145) ## About The Pull Request 1. Fixes #80139 The greyscale config was not applied correctly and run timing halfway causing the appearance of the canister to be broken. That's fixed now. 2. Removes prototype canisters. They are not available in game and even as an admin tool their only function is to open the valve after an elapsed time interval. Even this was broken cause the UI for adjusting the timer was never added and the params had to be manually var edited all for a pretty pointless function. A better solution would be to allow players to attach signallers to canisters to control the delay but that could be a future PR 4. Other smaller optimizations include - converted vars like `can_min_release_pressure` and `can_max_release_pressure` & `temperature_resistance` into defines. Vars take up memory but not defines and so we saved some memory from this - removed var `starter_temp` cause its unused - removed var `protected_contents` cause it did nothing - moved the global canister list to its appropriate `code/define/globalvars/lists` folder where it belongs - Auto doc some vars & procs 5. Converted UI to typescript ## Changelog 🆑 fix: canisters don't disappear when their colours are changed code: changed some vars into defines to save memory, removed unused/useless vars & added auto docs code: converted UI to typescript. moved global canister list to its appropriate folder refactor: removed prototype canisters and optimized canisters as a whole. /🆑 * General maintenance for canisters --------- Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
30 lines
1.7 KiB
Plaintext
30 lines
1.7 KiB
Plaintext
///List of all the gases, used in labelling the canisters
|
|
GLOBAL_LIST_INIT(gas_id_to_canister, init_gas_id_to_canister())
|
|
|
|
///Returns a map of canister id to its type path
|
|
/proc/init_gas_id_to_canister()
|
|
return sort_list(list(
|
|
GAS_N2 = /obj/machinery/portable_atmospherics/canister/nitrogen,
|
|
GAS_O2 = /obj/machinery/portable_atmospherics/canister/oxygen,
|
|
GAS_CO2 = /obj/machinery/portable_atmospherics/canister/carbon_dioxide,
|
|
GAS_PLASMA = /obj/machinery/portable_atmospherics/canister/plasma,
|
|
GAS_N2O = /obj/machinery/portable_atmospherics/canister/nitrous_oxide,
|
|
GAS_NITRIUM = /obj/machinery/portable_atmospherics/canister/nitrium,
|
|
GAS_BZ = /obj/machinery/portable_atmospherics/canister/bz,
|
|
GAS_AIR = /obj/machinery/portable_atmospherics/canister/air,
|
|
GAS_WATER_VAPOR = /obj/machinery/portable_atmospherics/canister/water_vapor,
|
|
GAS_TRITIUM = /obj/machinery/portable_atmospherics/canister/tritium,
|
|
GAS_HYPER_NOBLIUM = /obj/machinery/portable_atmospherics/canister/nob,
|
|
GAS_PLUOXIUM = /obj/machinery/portable_atmospherics/canister/pluoxium,
|
|
"caution" = /obj/machinery/portable_atmospherics/canister,
|
|
GAS_MIASMA = /obj/machinery/portable_atmospherics/canister/miasma,
|
|
GAS_FREON = /obj/machinery/portable_atmospherics/canister/freon,
|
|
GAS_HYDROGEN = /obj/machinery/portable_atmospherics/canister/hydrogen,
|
|
GAS_HEALIUM = /obj/machinery/portable_atmospherics/canister/healium,
|
|
GAS_PROTO_NITRATE = /obj/machinery/portable_atmospherics/canister/proto_nitrate,
|
|
GAS_ZAUKER = /obj/machinery/portable_atmospherics/canister/zauker,
|
|
GAS_HELIUM = /obj/machinery/portable_atmospherics/canister/helium,
|
|
GAS_ANTINOBLIUM = /obj/machinery/portable_atmospherics/canister/antinoblium,
|
|
GAS_HALON = /obj/machinery/portable_atmospherics/canister/halon
|
|
))
|