Fix disposals gremlins (#21044)

Disposal bins no longer try to drain the entire atmosphere from the ship
one tiny gulp at a time.
This commit is contained in:
Batrachophreno
2025-07-25 20:47:30 +00:00
committed by GitHub
parent 1ea48e6b4a
commit 4f0e20b0dd
2 changed files with 76 additions and 15 deletions
+18 -15
View File
@@ -475,28 +475,31 @@
if(length(contents))
if(mode == MODE_READY)
spawn(0)
feedback_inc("disposal_auto_flush",1)
flush()
feedback_inc("disposal_auto_flush",1)
flush()
flush_count = 0
src.updateDialog()
// Validate whether we're pressurized or not...
if(mode == MODE_PRESSURIZING && air_contents.return_pressure() >= SEND_PRESSURE)
mode = MODE_READY
// ... And if we need to pressurize, do so.
else
src.pressurize()
update()
return
// If we're ready, don't draw any extra power
if(mode == MODE_READY || !uses_air)
update_use_power(POWER_USE_IDLE)
// We used the manual flush button
if(flush)
flush()
return
update()
// We used the manual flush button
if(flush && mode == MODE_READY)
flush()
// Validate whether we're pressurized or not.
if(mode == MODE_PRESSURIZING && air_contents.return_pressure() >= SEND_PRESSURE)
mode = MODE_READY
update()
return
// If you turn this into a bare 'else' statement it just tries to pressurize infinitely and I don't know why.
else if(mode == MODE_PRESSURIZING && air_contents.return_pressure() < SEND_PRESSURE)
src.pressurize()
update()
return
/**
* If powered and working, transfer gas from local env to internal reservoir and use the required power to do so.
@@ -0,0 +1,58 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# - (fixes bugs)
# wip
# - (work in progress)
# qol
# - (quality of life)
# soundadd
# - (adds a sound)
# sounddel
# - (removes a sound)
# rscadd
# - (adds a feature)
# rscdel
# - (removes a feature)
# imageadd
# - (adds an image or sprite)
# imagedel
# - (removes an image or sprite)
# spellcheck
# - (fixes spelling or grammar)
# experiment
# - (experimental change)
# balance
# - (balance changes)
# code_imp
# - (misc internal code change)
# refactor
# - (refactors code)
# config
# - (makes a change to the config files)
# admin
# - (makes changes to administrator tools)
# server
# - (miscellaneous changes to server)
#################################
# Your name.
author: Batrachophrenoboocosmomachia
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit.
# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog.
changes:
- bugfix: "Disposal units no longer try to siphon the entire atmosphere."