mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 22:50:26 +01:00
tgui: Knobs, Sliders and Performance Improvements (#50483)
* Optimize Box * Some tweaks to vending machines * Layout debugger, initial work on sliders * Slider, Knob, docs, refactoring, etc * Rebuild tgui * Knobby Canister * Remove imports
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
desc = "A canister for the storage of gas."
|
||||
icon_state = "yellow"
|
||||
density = TRUE
|
||||
ui_x = 420
|
||||
ui_y = 405
|
||||
ui_x = 346
|
||||
ui_y = 268
|
||||
|
||||
var/valve_open = FALSE
|
||||
var/obj/machinery/atmospherics/components/binary/passive_gate/pump
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
use_power = NO_POWER_USE
|
||||
circuit = /obj/item/circuitboard/machine/smes
|
||||
ui_x = 340
|
||||
ui_y = 440
|
||||
ui_y = 350
|
||||
|
||||
var/capacity = 5e6 // maximum charge
|
||||
var/charge = 0 // actual charge
|
||||
@@ -327,23 +327,21 @@
|
||||
|
||||
/obj/machinery/power/smes/ui_data()
|
||||
var/list/data = list(
|
||||
"capacityPercent" = round(100*charge/capacity, 0.1),
|
||||
"capacity" = capacity,
|
||||
"capacityPercent" = round(100*charge/capacity, 0.1),
|
||||
"charge" = charge,
|
||||
|
||||
"inputAttempt" = input_attempt,
|
||||
"inputting" = inputting,
|
||||
"inputLevel" = input_level,
|
||||
"inputLevel_text" = DisplayPower(input_level),
|
||||
"inputLevelMax" = input_level_max,
|
||||
"inputAvailable" = DisplayPower(input_available),
|
||||
|
||||
"inputAvailable" = input_available,
|
||||
"outputAttempt" = output_attempt,
|
||||
"outputting" = outputting,
|
||||
"outputLevel" = output_level,
|
||||
"outputLevel_text" = DisplayPower(output_level),
|
||||
"outputLevelMax" = output_level_max,
|
||||
"outputUsed" = DisplayPower(output_used)
|
||||
"outputUsed" = output_used,
|
||||
)
|
||||
return data
|
||||
|
||||
|
||||
Reference in New Issue
Block a user