diff --git a/code/ATMOSPHERICS/components/trinary_devices/filter.dm b/code/ATMOSPHERICS/components/trinary_devices/filter.dm
index e2aaee092c..9e192afe1b 100755
--- a/code/ATMOSPHERICS/components/trinary_devices/filter.dm
+++ b/code/ATMOSPHERICS/components/trinary_devices/filter.dm
@@ -172,6 +172,7 @@
data["on"] = use_power
data["rate"] = set_flow_rate
data["max_rate"] = air1.volume
+ data["last_flow_rate"] = round(last_flow_rate, 0.1)
data["filter_types"] = list()
data["filter_types"] += list(list("name" = "Nothing", "f_type" = -1, "selected" = filter_type == -1))
diff --git a/code/game/machinery/computer/Operating.dm b/code/game/machinery/computer/Operating.dm
index aa76f23077..c965a54b15 100644
--- a/code/game/machinery/computer/Operating.dm
+++ b/code/game/machinery/computer/Operating.dm
@@ -177,8 +177,8 @@
playsound(src.loc, 'sound/machines/defib_success.ogg', 50, 0)
if(oxy && victim.getOxyLoss()>oxyAlarm)
playsound(src.loc, 'sound/machines/defib_safetyOff.ogg', 50, 0)
- if(healthAnnounce && victim.health <= healthAlarm)
- atom_say("[round(victim.health)]% health.")
+ if(healthAnnounce && ((victim.health / victim.maxHealth) * 100) <= healthAlarm)
+ atom_say("[round(((victim.health / victim.maxHealth) * 100))]% health.")
// Surgery Helpers
/obj/machinery/computer/operating/proc/build_surgery_list(mob/user)
diff --git a/code/game/machinery/pipe/pipe_dispenser.dm b/code/game/machinery/pipe/pipe_dispenser.dm
index 2e728775da..0d5e42f771 100644
--- a/code/game/machinery/pipe/pipe_dispenser.dm
+++ b/code/game/machinery/pipe/pipe_dispenser.dm
@@ -52,7 +52,16 @@
var/list/r = list()
for(var/i in 1 to cat.len)
var/datum/pipe_recipe/info = cat[i]
- r += list(list("pipe_name" = info.name, "pipe_index" = i))
+ r += list(list("pipe_name" = info.name, "ref" = "\ref[info]"))
+ // Stationary pipe dispensers don't allow you to pre-select pipe directions.
+ // This makes it impossble to spawn bent versions of bendable pipes.
+ // We add a "Bent" pipe type with a special param to work around it.
+ if(info.dirtype == PIPE_BENDABLE)
+ r += list(list(
+ "pipe_name" = ("Bent " + info.name),
+ "ref" = "\ref[info]",
+ "bent" = TRUE
+ ))
data["categories"] += list(list("cat_name" = c, "recipes" = r))
return data
@@ -68,24 +77,24 @@
if("p_layer")
p_layer = text2num(params["p_layer"])
if("dispense_pipe")
- if(!wait)
- var/list/recipes
- if(disposals)
- recipes = GLOB.disposal_pipe_recipes
- else
- recipes = GLOB.atmos_pipe_recipes
+ if(!wait)
+ var/datum/pipe_recipe/recipe = locate(params["ref"])
+ if(!istype(recipe))
+ return
- var/datum/pipe_recipe/recipe = recipes[params["category"]][text2num(params["pipe_type"])]
+ var/target_dir = NORTH
+ if(params["bent"])
+ target_dir = NORTHEAST
var/obj/created_object = null
if(istype(recipe, /datum/pipe_recipe/pipe))
var/datum/pipe_recipe/pipe/R = recipe
- created_object = new R.construction_type(loc, recipe.pipe_type, NORTH)
+ created_object = new R.construction_type(loc, recipe.pipe_type, target_dir)
var/obj/item/pipe/P = created_object
P.setPipingLayer(p_layer)
else if(istype(recipe, /datum/pipe_recipe/disposal))
var/datum/pipe_recipe/disposal/D = recipe
- var/obj/structure/disposalconstruct/C = new(loc, D.pipe_type, NORTH, 0, D.subtype ? D.subtype : 0)
+ var/obj/structure/disposalconstruct/C = new(loc, D.pipe_type, target_dir, 0, D.subtype ? D.subtype : 0)
C.update()
created_object = C
else if(istype(recipe, /datum/pipe_recipe/meter))
diff --git a/code/game/machinery/pipe/pipe_recipes.dm b/code/game/machinery/pipe/pipe_recipes.dm
index e5db17f4b1..8aee2a1908 100644
--- a/code/game/machinery/pipe/pipe_recipes.dm
+++ b/code/game/machinery/pipe/pipe_recipes.dm
@@ -79,10 +79,6 @@ GLOBAL_LIST_INIT(disposal_pipe_recipes, list(
var/dirtype // If using an RPD, this tells more about what previews to show.
var/pipe_type
-// Render an HTML link to select this pipe type. Returns text.
-/datum/pipe_recipe/proc/Render(dispenser)
- return "[name]
"
-
// Get preview for UIs
/datum/pipe_recipe/proc/get_preview(selected_dir)
var/list/dirs
@@ -123,10 +119,6 @@ GLOBAL_LIST_INIT(disposal_pipe_recipes, list(
return rows
-// Parameters for the Topic link returned by Render(). Returns text.
-/datum/pipe_recipe/proc/Params()
- return ""
-
//
// Subtype for actual pipes
//
@@ -144,18 +136,6 @@ GLOBAL_LIST_INIT(disposal_pipe_recipes, list(
icon_state_m = "[icon_state]m"
paintable = ispath(path, /obj/machinery/atmospherics/pipe) && !(ispath(path, /obj/machinery/atmospherics/pipe/vent)) // VOREStation Add
-// Render an HTML link to select this pipe type
-/datum/pipe_recipe/pipe/Render(dispenser)
- var/dat = ..(dispenser)
- // Stationary pipe dispensers don't allow you to pre-select pipe directions.
- // This makes it impossble to spawn bent versions of bendable pipes.
- // We add a "Bent" pipe type with a preset diagonal direction to work around it.
- if(istype(dispenser, /obj/machinery/pipedispenser) && (dirtype == PIPE_BENDABLE))
- dat += "Bent [name]
"
- return dat
-
-/datum/pipe_recipe/pipe/Params()
- return "makepipe=[pipe_type]"
//
// Subtype for meters
@@ -168,9 +148,6 @@ GLOBAL_LIST_INIT(disposal_pipe_recipes, list(
/datum/pipe_recipe/meter/New(label)
name = label
-/datum/pipe_recipe/meter/Params()
- return "makemeter=1"
-
//
// Subtype for disposal pipes
//
@@ -185,9 +162,3 @@ GLOBAL_LIST_INIT(disposal_pipe_recipes, list(
subtype = sort
if (dirtype == PIPE_TRIN_M)
icon_state_m = replacetext(state, "j1", "j2")
-
-/datum/pipe_recipe/disposal/Params()
- var/param = "dmake=[pipe_type]"
- if (subtype)
- param += "&sort=[subtype]"
- return param
diff --git a/code/modules/reagents/Chemistry-Machinery.dm b/code/modules/reagents/Chemistry-Machinery.dm
index b54e5a07ac..b5fe99b054 100644
--- a/code/modules/reagents/Chemistry-Machinery.dm
+++ b/code/modules/reagents/Chemistry-Machinery.dm
@@ -251,9 +251,9 @@
return
arguments["num"] = num
var/amount_per_bottle = CLAMP(reagents.total_volume / num, 0, MAX_UNITS_PER_BOTTLE)
- var/default_name = "[reagents.get_master_reagent_name()] ([amount_per_bottle]u)"
+ var/default_name = "[reagents.get_master_reagent_name()]"
var/bottles_text = num == 1 ? "new bottle" : "[num] new bottles"
- tgui_modal_input(src, id, "Please name your [bottles_text]:", null, arguments, default_name, MAX_CUSTOM_NAME_LEN)
+ tgui_modal_input(src, id, "Please name your [bottles_text] ([amount_per_bottle]u in bottle):", null, arguments, default_name, MAX_CUSTOM_NAME_LEN)
if("create_bottle_multiple")
if(condi || !reagents.total_volume)
return
diff --git a/tgui/packages/tgui/components/DraggableControl.js b/tgui/packages/tgui/components/DraggableControl.js
index c540401b37..a352eda039 100644
--- a/tgui/packages/tgui/components/DraggableControl.js
+++ b/tgui/packages/tgui/components/DraggableControl.js
@@ -170,6 +170,7 @@ export class DraggableControl extends Component {
onDrag,
children,
// Input props
+ forcedInputWidth,
height,
lineHeight,
fontSize,
@@ -206,6 +207,7 @@ export class DraggableControl extends Component {
style={{
display: !editing ? 'none' : undefined,
height: height,
+ width: forcedInputWidth,
'line-height': lineHeight,
'font-size': fontSize,
}}
diff --git a/tgui/packages/tgui/components/Knob.js b/tgui/packages/tgui/components/Knob.js
index 3bfa471da1..b8c11cddcc 100644
--- a/tgui/packages/tgui/components/Knob.js
+++ b/tgui/packages/tgui/components/Knob.js
@@ -21,6 +21,7 @@ export const Knob = props => {
const {
// Draggable props (passthrough)
animated,
+ forcedInputWidth,
format,
maxValue,
minValue,
@@ -48,6 +49,7 @@ export const Knob = props => {
dragMatrix={[0, -1]}
{...{
animated,
+ forcedInputWidth,
format,
maxValue,
minValue,
diff --git a/tgui/packages/tgui/interfaces/AtmosFilter.js b/tgui/packages/tgui/interfaces/AtmosFilter.js
index 99f5f7bb19..3c34a476e0 100644
--- a/tgui/packages/tgui/interfaces/AtmosFilter.js
+++ b/tgui/packages/tgui/interfaces/AtmosFilter.js
@@ -1,5 +1,5 @@
import { useBackend } from '../backend';
-import { Button, LabeledList, NumberInput, Section } from '../components';
+import { Button, LabeledList, NumberInput, Section, AnimatedNumber, Box } from '../components';
import { getGasLabel } from '../constants';
import { Window } from '../layouts';
@@ -22,6 +22,11 @@ export const AtmosFilter = (props, context) => {
onClick={() => act('power')} />
+
+ val + " L/s"} />
+
{
position="relative"
left="-8px">
act('pressure', {
pressure: value,
diff --git a/tgui/packages/tgui/interfaces/OperatingComputer.js b/tgui/packages/tgui/interfaces/OperatingComputer.js
index 1cd269bc3a..a81c0ecd2a 100644
--- a/tgui/packages/tgui/interfaces/OperatingComputer.js
+++ b/tgui/packages/tgui/interfaces/OperatingComputer.js
@@ -225,6 +225,7 @@ const OperatingComputerOptions = (props, context) => {
value={healthAlarm}
stepPixelSize="5"
ml="0"
+ format={val => val + "%"}
onChange={(e, val) => act('health_adj', {
new: val,
})}
diff --git a/tgui/packages/tgui/interfaces/PipeDispenser.js b/tgui/packages/tgui/interfaces/PipeDispenser.js
index caf008edc7..8204279259 100644
--- a/tgui/packages/tgui/interfaces/PipeDispenser.js
+++ b/tgui/packages/tgui/interfaces/PipeDispenser.js
@@ -63,7 +63,8 @@ export const PipeDispenser = (props, context) => {
content={recipe.pipe_name}
title={recipe.pipe_name}
onClick={() => act('dispense_pipe', {
- pipe_type: recipe.pipe_index,
+ ref: recipe.ref,
+ bent: recipe.bent,
category: shownCategory.cat_name,
})} />
))}
diff --git a/tgui/packages/tgui/interfaces/SmartVend.js b/tgui/packages/tgui/interfaces/SmartVend.js
index 7134247a81..782eb1fba0 100644
--- a/tgui/packages/tgui/interfaces/SmartVend.js
+++ b/tgui/packages/tgui/interfaces/SmartVend.js
@@ -28,33 +28,42 @@ export const SmartVend = (props, context) => {
) || (
-
+
Item
-
+
+ Amount
+
Dispense
{map((value, key) => (
-
+
{value.name}
-
- {value.amount}
+
+ {value.amount} in stock