Oxygen tanks use progress bar (#91387)

## About The Pull Request

Tanks while used as internals gives a progress bar to show how full they
are, starting from the pressure when first starting to get used, when we
expect the player to know how much is in the tank, and ticking down as
it gets used. Alternative to this could be using the initial pressure,
but then it would remain at 100% for quite a while when you put more
than it starts off with.

This replaces the stat panel entry for them, this is a part of
https://hackmd.io/443_dE5lRWeEAp9bjGcKYw


![image](https://github.com/user-attachments/assets/a0d5c3db-fbbd-4598-8f02-53f24c81524d)

## Why It's Good For The Game

Adds a visual indicator to tell people how much air they've used since
toggling the tank's internals which is much better than the previous'
random numbers in stat panel.

## Changelog

🆑
qol: internal tanks gives a progress bar when you toggle them, allowing
you to see how much you've consumed so far.
/🆑
This commit is contained in:
John Willard
2025-06-05 19:52:06 -04:00
committed by Roxy
parent 7c4ec2c8cc
commit f5e9794dfb
2 changed files with 11 additions and 9 deletions
+3 -1
View File
@@ -21,7 +21,7 @@
///Where to draw the progress bar above the icon
var/offset_y
/datum/progressbar/New(mob/User, goal_number, atom/target)
/datum/progressbar/New(mob/User, goal_number, atom/target, starting_amount)
. = ..()
if (!istype(target))
stack_trace("Invalid target [target] passed in")
@@ -60,6 +60,8 @@
RegisterSignal(user, COMSIG_MOB_LOGOUT, PROC_REF(clean_user_client))
RegisterSignal(user, COMSIG_MOB_LOGIN, PROC_REF(on_user_login))
if(starting_amount)
update(starting_amount)
/datum/progressbar/Destroy()
if(user)