mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
Fixes as many instances of not using set_volume, set_temperature, and the proper adjust_gas args as I could find.
This commit is contained in:
@@ -362,5 +362,5 @@ proc/ShareHeat(datum/gas_mixture/A, datum/gas_mixture/B, connecting_tiles)
|
||||
maximum_energy_delta *= -1
|
||||
energy_delta = maximum_energy_delta
|
||||
|
||||
A.temperature -= energy_delta / (A.heat_capacity * A.group_multiplier)
|
||||
B.temperature += energy_delta / (B.heat_capacity * B.group_multiplier)
|
||||
A.set_temperature(A.temperature - energy_delta / (A.heat_capacity * A.group_multiplier))
|
||||
B.set_temperature(B.temperature + energy_delta / (B.heat_capacity * B.group_multiplier))
|
||||
@@ -307,15 +307,15 @@ datum/gas_mixture/proc/zburn(var/turf/T, force_burn)
|
||||
for(var/gasid in gases)
|
||||
var/datum/gas/current_gas = get_gas_by_id(gasid)
|
||||
if(current_gas.isOxidiser())
|
||||
adjust_gas(current_gas.gas_id, -gases[gasid] * used_reactants_ratio * current_gas.fuel_multiplier, 0, 0) //take the cost of oxidiser
|
||||
adjust_gas(current_gas.gas_id, -gases[gasid] * used_reactants_ratio * current_gas.fuel_multiplier, 0) //take the cost of oxidiser
|
||||
|
||||
//fuels
|
||||
for(var/gasid in gases)
|
||||
var/datum/gas/current_gas = get_gas_by_id(gasid)
|
||||
if(current_gas.isFuel())
|
||||
adjust_gas(current_gas.gas_id, -gases[gasid] * used_fuel_ratio * used_reactants_ratio * current_gas.fuel_multiplier, 0, 0) //take the cost of fuel
|
||||
adjust_gas(current_gas.gas_id, -gases[gasid] * used_fuel_ratio * used_reactants_ratio * current_gas.fuel_multiplier, 0) //take the cost of fuel
|
||||
|
||||
adjust_gas(CARBON_DIOXIDE, max(2 * total_fuel, 0), 0)
|
||||
adjust_gas(CARBON_DIOXIDE, max(2 * total_fuel, 0))
|
||||
|
||||
if(can_use_turf)
|
||||
if(T.getFireFuel()>0)
|
||||
|
||||
@@ -92,7 +92,7 @@ What are the archived variables for?
|
||||
//Outputs: null
|
||||
|
||||
for(var/a_gas in adjusts)
|
||||
adjust_gas(a_gas, adjusts[a_gas], 0)
|
||||
adjust_gas(a_gas, adjusts[a_gas])
|
||||
return
|
||||
|
||||
//Takes a gas string, and the amount of moles to adjust by.
|
||||
@@ -607,8 +607,8 @@ What are the archived variables for?
|
||||
&& (abs(sharer_temperature_delta) > MINIMUM_TEMPERATURE_RATIO_TO_SUSPEND*sharer.temperature_archived))
|
||||
return -1
|
||||
|
||||
temperature += self_temperature_delta
|
||||
sharer.temperature += sharer_temperature_delta
|
||||
set_temperature(temperature + self_temperature_delta)
|
||||
sharer.set_temperature(sharer.temperature + sharer_temperature_delta)
|
||||
|
||||
return 1
|
||||
//Logic integrated from: temperature_share(sharer, conduction_coefficient) for efficiency
|
||||
@@ -635,8 +635,8 @@ What are the archived variables for?
|
||||
&& (abs(self_temperature_delta) > MINIMUM_TEMPERATURE_RATIO_TO_SUSPEND*temperature_archived))
|
||||
return 0
|
||||
|
||||
temperature += self_temperature_delta
|
||||
sharer.temperature += sharer_temperature_delta
|
||||
set_temperature(temperature + self_temperature_delta)
|
||||
sharer.set_temperature(sharer.temperature + sharer_temperature_delta)
|
||||
|
||||
return 1
|
||||
//Logic integrated from: temperature_share(sharer, conduction_coefficient) for efficiency
|
||||
@@ -663,7 +663,7 @@ What are the archived variables for?
|
||||
&& (abs(self_temperature_delta) > MINIMUM_TEMPERATURE_RATIO_TO_SUSPEND*temperature_archived))
|
||||
return 0
|
||||
|
||||
temperature += self_temperature_delta
|
||||
set_temperature(temperature + self_temperature_delta)
|
||||
sharer.temperature += sharer_temperature_delta
|
||||
|
||||
return 1
|
||||
@@ -704,8 +704,8 @@ What are the archived variables for?
|
||||
var/heat = conduction_coefficient*delta_temperature* \
|
||||
(self_heat_capacity*sharer_heat_capacity/(self_heat_capacity+sharer_heat_capacity))
|
||||
|
||||
temperature -= heat/(self_heat_capacity*group_multiplier)
|
||||
sharer.temperature += heat/(sharer_heat_capacity*sharer.group_multiplier)
|
||||
set_temperature(temperature - heat/(self_heat_capacity*group_multiplier))
|
||||
sharer.set_temperature( sharer.temperature + heat/(sharer_heat_capacity*sharer.group_multiplier))
|
||||
|
||||
/datum/gas_mixture/proc/temperature_mimic(turf/model, conduction_coefficient, border_multiplier)
|
||||
var/delta_temperature = (temperature - model.temperature)
|
||||
@@ -720,9 +720,9 @@ What are the archived variables for?
|
||||
(self_heat_capacity*model.heat_capacity/(self_heat_capacity+model.heat_capacity))
|
||||
|
||||
if(border_multiplier)
|
||||
temperature -= heat*border_multiplier/(self_heat_capacity*group_multiplier)
|
||||
set_temperature(temperature - heat*border_multiplier/(self_heat_capacity*group_multiplier))
|
||||
else
|
||||
temperature -= heat/(self_heat_capacity*group_multiplier)
|
||||
set_temperature(temperature - heat/(self_heat_capacity*group_multiplier))
|
||||
|
||||
/datum/gas_mixture/proc/temperature_turf_share(turf/simulated/sharer, conduction_coefficient)
|
||||
var/delta_temperature = (temperature_archived - sharer.temperature)
|
||||
@@ -730,10 +730,9 @@ What are the archived variables for?
|
||||
var/self_heat_capacity = heat_capacity
|
||||
|
||||
if((sharer.heat_capacity > MINIMUM_HEAT_CAPACITY) && (self_heat_capacity > MINIMUM_HEAT_CAPACITY))
|
||||
var/heat = conduction_coefficient*delta_temperature* \
|
||||
(self_heat_capacity*sharer.heat_capacity/(self_heat_capacity+sharer.heat_capacity))
|
||||
var/heat = conduction_coefficient*delta_temperature * (self_heat_capacity*sharer.heat_capacity/(self_heat_capacity+sharer.heat_capacity))
|
||||
|
||||
temperature -= heat/(self_heat_capacity*group_multiplier)
|
||||
set_temperature(temperature - heat/(self_heat_capacity*group_multiplier))
|
||||
sharer.temperature += heat/sharer.heat_capacity
|
||||
|
||||
/datum/gas_mixture/proc/compare(datum/gas_mixture/sample)
|
||||
@@ -762,7 +761,7 @@ What are the archived variables for?
|
||||
return 0
|
||||
|
||||
for(var/gasid in right_side.gases)
|
||||
adjust_gas(gasid, right_side.gases[gasid], 0, 0)
|
||||
adjust_gas(gasid, right_side.gases[gasid], 0)
|
||||
|
||||
return 1
|
||||
|
||||
@@ -773,14 +772,14 @@ What are the archived variables for?
|
||||
//Outputs: 1
|
||||
|
||||
for(var/gasid in right_side.gases)
|
||||
adjust_gas(gasid, -right_side.gases[gasid], 0, 0)
|
||||
adjust_gas(gasid, -right_side.gases[gasid], 0)
|
||||
|
||||
return 1
|
||||
|
||||
/datum/gas_mixture/proc/multiply(factor)
|
||||
|
||||
for(var/gasid in gases)
|
||||
adjust_gas(gasid, (factor - 1) * gases[gasid], 0, 0)
|
||||
adjust_gas(gasid, (factor - 1) * gases[gasid], 0)
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user