mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-25 04:57:47 +01:00
Overhauls borg hypos to work like chem dispensers (#18662)
* We sorta kinda got a start here * Implements chemical searching * Stretches UI window for drinks, moves recording blinker to search * accounts for hypos with different maximums and transfer amounts * SFX + selected chem fix * modularizes chem dispenser macro UI * Adds recipe recorder UI to hypo * further modularizes chemical dispenser chemicals UI * tweaks borg hypo UI to account for chem UI changes * magic letter begone * Words this argument's description better * UI doesn't need to be passed ui_title, also usr to ui.user * TIL: UNTYPED_LIST_ADD is a thing * Apply borg UI theme * further modularizes chem dispenser settings UI * tweaks settings UI to fit new chem settings changes * MANY miscellaneous hypo changes * Implements proper recipe recording and selecting * More single letter vars be gone * gets rid of unnecessary stack * applies spans to recipe errors * ig this wasn't necessary * oops lol * oops missed this one * be careful with using the wrong elements * Uses static data + proper usage of borg theme; uses drink dispenser boolean for TGUI * func * fix that too * . * in case they get emagged * lil fix * implements functional recipe macros * typo fix * makes macro usage work with all types of hypos * Sort listed chemicals in UI by name * veritcally stretches drink UI a bit more * Fixes some button selection jank * wait we already have a confirm dialogue built in here! * Better balloon alerts + varies hypo sound * improves hypo alerts * in case people get injected by some reagents * removes balloon alert for synthesizer recording * fixes hypo not actually injecting stuff into mobs (oops) * better documentation * better-er documentation oopsie lol * O okay I'll move it here then * better words status flags * quick im/export basics * dispenser update * typo fix * sanitizing * cleanup of theming * . * Update ChemDispenserSettings.tsx --------- Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
@@ -150,16 +150,18 @@
|
||||
if("import_config")
|
||||
. = TRUE
|
||||
var/our_data = params["config"]
|
||||
var/imported_color = sanitize_hexcolor(our_data["base_color"])
|
||||
if(imported_color)
|
||||
base_color = imported_color
|
||||
set_new_name(our_data["name"])
|
||||
base_color = sanitize_hexcolor(our_data["base_color"])
|
||||
var/new_name = sanitize_name(our_data["name"])
|
||||
if(new_name)
|
||||
set_new_name(new_name)
|
||||
added_overlays.Cut()
|
||||
if(!possible_overlays)
|
||||
return
|
||||
for(var/overlay in our_data["overlays"])
|
||||
if(possible_overlays.Find(overlay["icon_state"]))
|
||||
added_overlays[overlay["icon_state"]] = list( color = overlay["color"], alpha = overlay["alpha"] )
|
||||
var/new_color = sanitize_hexcolor(overlay["color"])
|
||||
var/new_alpha = CLAMP(text2num(overlay["alpha"]), 0, 255)
|
||||
added_overlays[overlay["icon_state"]] = list(color = new_color, alpha = new_alpha)
|
||||
update_icon()
|
||||
|
||||
if("clear")
|
||||
|
||||
Reference in New Issue
Block a user