Skip to content
This repository has been archived by the owner on Jul 15, 2022. It is now read-only.

Commit

Permalink
optimizations, gasgas bad
Browse files Browse the repository at this point in the history
  • Loading branch information
Kapu1178 committed Jun 11, 2022
1 parent 5e536aa commit 378acac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions code/modules/atmospherics/machinery/airalarm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
))
var/total_moles = environment.get_moles()
var/partial_pressure = R_IDEAL_GAS_EQUATION * environment.temperature / environment.volume
for(var/gas_id in environment.getGases())
for(var/gas_id in environment.gas)
if(!(gas_id in TLV)) // We're not interested in this gas, it seems.
continue
cur_tlv = TLV[gas_id]
Expand Down Expand Up @@ -624,7 +624,7 @@
//cache for sanic speed (lists are references anyways)
var/list/cached_tlv = TLV

var/list/env_gases = environment.getGases()
var/list/env_gases = environment.gas
//var/partial_pressure = R_IDEAL_GAS_EQUATION * exposed_temperature / environment.volume

current_tlv = cached_tlv["pressure"]
Expand Down Expand Up @@ -994,7 +994,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/airalarm, 24)
pressure.set_output(round(environment.returnPressure()))
my_temperature.set_output(round(environment.temperature))
if(ispath(options_map[current_option]))
gas_amount.set_output(round(environment.getGases()[options_map[current_option]]))
gas_amount.set_output(round(environment.gas[options_map[current_option]]))
return

var/datum/tlv/settings = connected_alarm.TLV[options_map[current_option]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@
filtered_out.temperature = environment.temperature

var/total_moles_to_remove = 0
for(var/gas in filter_types & environment.getGases())
for(var/gas in filter_types & environment.gas)
total_moles_to_remove += environment.gas[gas]

if(total_moles_to_remove == 0)//sometimes this gets non gc'd values
Expand Down

0 comments on commit 378acac

Please sign in to comment.