Skip to content

Commit

Permalink
Corrects the pressure readouts on non-detailed gas reports (#28174)
Browse files Browse the repository at this point in the history
  • Loading branch information
Migratingcocofruit authored Jan 30, 2025
1 parent b665567 commit f47f0de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/game/objects/items/devices/scanners.dm
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,6 @@ SLIME SCANNER
else// Sum mixtures then present
for(var/datum/gas_mixture/air as anything in airs)
total_moles += air.total_moles()
pressure += air.return_pressure()
volume += air.return_volume()
heat_capacity += air.heat_capacity()
thermal_energy += air.thermal_energy()
Expand All @@ -789,6 +788,7 @@ SLIME SCANNER
agent_b += air.agent_b()

var/temperature = heat_capacity ? thermal_energy / heat_capacity : 0
pressure = volume ? total_moles * R_IDEAL_GAS_EQUATION * temperature / volume : 0

if(total_moles)
message += "<span class='notice'>Total: [round(total_moles, 0.01)] moles</span>"
Expand Down

0 comments on commit f47f0de

Please sign in to comment.