mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-13 08:03:43 +01:00
Adds a cooldown progress bar to Cryocells (#20328)
* Add a cooldown progress bar to cryocells * Color the progress bar warningly while no beaker loaded * Give 'No beaker loaded' message a unique color * Give the progress bar a label
This commit is contained in:
@@ -216,7 +216,7 @@
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "Cryo", "Cryo Cell", 520, 490)
|
||||
ui = new(user, src, ui_key, "Cryo", "Cryo Cell", 520, 500)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/ui_data(mob/user)
|
||||
@@ -253,6 +253,7 @@
|
||||
if(beaker.reagents && beaker.reagents.reagent_list.len)
|
||||
for(var/datum/reagent/R in beaker.reagents.reagent_list)
|
||||
data["beakerVolume"] += R.volume
|
||||
data["cooldownProgress"] = round(clamp((world.time - last_injection) / injection_cooldown, 0, 1) * 100)
|
||||
|
||||
data["auto_eject_healthy"] = (auto_eject_prefs & AUTO_EJECT_HEALTHY) ? TRUE : FALSE
|
||||
data["auto_eject_dead"] = (auto_eject_prefs & AUTO_EJECT_DEAD) ? TRUE : FALSE
|
||||
|
||||
Reference in New Issue
Block a user