diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index 082597e37a..737493ea83 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -381,7 +381,7 @@ var/list/global_huds = list( UI_style_color_new = hud_used.ui_color hud_used.ui_color = UI_style_color_new - var/list/icons = hud_used.adding + hud_used.other + hud_used.hotkeybuttons + var/list/icons = hud_used.adding + hud_used.other + hud_used.hotkeybuttons + hud_used.other_important icons.Add(zone_sel) icons.Add(gun_setting_icon) icons.Add(item_use_icon) @@ -402,7 +402,8 @@ var/list/global_huds = list( for(var/obj/screen/I in icons) if(I.name in list(I_HELP, I_HURT, I_DISARM, I_GRAB)) continue - I.icon = ic + if(!(I.name in list("check known languages", "autowhisper", "autowhisper mode", "move downwards", "move upwards", "set pose"))) + I.icon = ic I.color = UI_style_color_new I.alpha = UI_style_alpha_new diff --git a/code/modules/client/preferences/_preference.dm b/code/modules/client/preferences/_preference.dm index 834ce4c489..28012c694f 100644 --- a/code/modules/client/preferences/_preference.dm +++ b/code/modules/client/preferences/_preference.dm @@ -318,7 +318,10 @@ GLOBAL_LIST_INIT(preference_entries_by_key, init_preference_entries_by_key()) /// Write a /datum/preference type and return its value directly to the json. /mob/proc/write_preference_directly(preference_type, preference_value) - return client?.prefs?.write_preference_by_type(preference_type, preference_value) + var/success = client?.prefs?.write_preference_by_type(preference_type, preference_value) + if(success) + client?.prefs?.value_cache[preference_type] = preference_value + return success /// Set a /datum/preference entry. /// Returns TRUE for a successful preference application. diff --git a/code/modules/client/ui_style.dm b/code/modules/client/ui_style.dm index 3baa865c5e..b8ef6f69e3 100644 --- a/code/modules/client/ui_style.dm +++ b/code/modules/client/ui_style.dm @@ -42,24 +42,30 @@ var/global/list/all_tooltip_styles = list( if(!ishuman(usr)) if(!isrobot(usr)) - to_chat(usr, span_warning("You must be a human or a robot to use this verb.")) + to_chat(src, span_warning("You must be a human or a robot to use this verb.")) return - var/UI_style_new = tgui_input_list(usr, "Select a style. White is recommended for customization", "UI Style Choice", all_ui_styles) + var/current_style = prefs.read_preference(/datum/preference/choiced/ui_style) + var/current_alpha = prefs.read_preference(/datum/preference/numeric/ui_style_alpha) + var/current_color = prefs.read_preference(/datum/preference/color/ui_style_color) + var/UI_style_new = tgui_input_list(src, "Select a style. White is recommended for customization", "UI Style Choice", all_ui_styles, current_style) if(!UI_style_new) return - var/UI_style_alpha_new = tgui_input_number(usr, "Select a new alpha (transparency) parameter for your UI, between 50 and 255", null, null, 255, 50) + var/UI_style_alpha_new = tgui_input_number(src, "Select a new alpha (transparency) parameter for your UI, between 50 and 255", null, current_alpha, 255, 50) if(!UI_style_alpha_new || !(UI_style_alpha_new <= 255 && UI_style_alpha_new >= 50)) return - var/UI_style_color_new = tgui_color_picker(usr, "Choose your UI color. Dark colors are not recommended!") + var/UI_style_color_new = tgui_color_picker(src, "Choose your UI color. Dark colors are not recommended!", null, current_color) if(!UI_style_color_new) return //update UI usr.update_ui_style(UI_style_new, UI_style_alpha_new, UI_style_color_new) - if(tgui_alert(usr, "Like it? Save changes?","Save?",list("Yes", "No")) == "Yes") + if(tgui_alert(src, "Like it? Save changes?","Save?",list("Yes", "No")) == "Yes") usr.write_preference_directly(/datum/preference/choiced/ui_style, UI_style_new) usr.write_preference_directly(/datum/preference/numeric/ui_style_alpha, UI_style_alpha_new) usr.write_preference_directly(/datum/preference/color/ui_style_color, UI_style_color_new) SScharacter_setup.queue_preferences_save(prefs) - to_chat(usr, "UI was saved") + to_chat(src, "UI was saved") + return + + usr.update_ui_style(current_style, current_alpha, current_color) diff --git a/code/modules/samples/samples.dm b/code/modules/samples/samples.dm index 1cc01aae16..23e233c738 100644 --- a/code/modules/samples/samples.dm +++ b/code/modules/samples/samples.dm @@ -9,7 +9,6 @@ var/fixed_tech = null //do we have a predetermined tech-group, per request? if so, overrides randomization for icon and name var/rand_tech = null //randomized tech-group from the list below var/list/valid_techs = list(TECH_COMBAT,TECH_MAGNET,TECH_POWER,TECH_BIO,TECH_DATA,TECH_ENGINEERING,TECH_PHORON,TECH_MATERIAL,TECH_BLUESPACE,TECH_ILLEGAL,TECH_ARCANE,TECH_PRECURSOR) - origin_tech = list() //blank list creation, or else we get a runtime trying to assign the new techgroup persist_storable = FALSE //don't shove hazardous shinies into the item bank!! also their properties are (usually) randomized on creation, so saving them is pointless-- you won't get out what you put in @@ -26,10 +25,15 @@ /obj/item/research_sample/Initialize(mapload) . = ..() - var/tech_mod = rand(0,rand_level) - var/tech_value = tech_level+tech_mod + var/new_tech + if(LAZYLEN(origin_tech)) + new_tech = origin_tech.Copy() + else + new_tech = list() + var/tech_mod = rand(0, rand_level) + var/tech_value = tech_level + tech_mod if(fixed_tech) - origin_tech.Add(list("[fixed_tech]" = tech_value)) + LAZYSET(new_tech, fixed_tech, tech_value) else //if we're not a preset, randomize the name, icon, and associated tech, to make sure samples aren't predictable/metagamable var/name_prefix = "[pick("strange","anomalous","exotic","atypical","unusual","incongruous","weird","aberrant","eccentric")]" var/name_suffix //blank because it's randomized per sample appearance @@ -62,7 +66,8 @@ name_suffix = "[pick("object","sample","thing","fragment","specimen","element","alloy","chunk","remnant","scrap","sliver")]" name = "[name_prefix] [name_suffix]" rand_tech = pick(valid_techs) //assign techs last - origin_tech.Add(list("[rand_tech]" = tech_value)) + LAZYSET(new_tech, rand_tech, tech_value) + origin_tech = new_tech /obj/item/research_sample/attack_hand(mob/user) . = ..() diff --git a/tgui/packages/tgui/interfaces/ICAssembly/Port.tsx b/tgui/packages/tgui/interfaces/ICAssembly/Port.tsx index 948998ec14..6ab064bc65 100644 --- a/tgui/packages/tgui/interfaces/ICAssembly/Port.tsx +++ b/tgui/packages/tgui/interfaces/ICAssembly/Port.tsx @@ -80,6 +80,8 @@ export class Port extends Component { const { portRef: iconRef } = this.state; const { port, color, output } = this.props; + const style = { display: output ? 'block' : 'flex' }; + return ( { onContextMenu={this.handlePortRightClick} onMouseUp={this.handlePortMouseUp} textAlign="center" + style={style} > {connections.map((val, index) => { @@ -76,6 +80,17 @@ export const Connections = (props: { path += `L ${to.x} ${to.y}`; break; } + case ConnectionStyle.SUBWAY_SHARP: { + let offset = 16; + if (val.index !== undefined) { + offset = 8 * (val.index % 32) + 32; + } + const yDiff = Math.abs(to.y - from.y); + path += `L ${Math.max(from.x + offset, to.x - offset)} ${from.y}`; + path += `L ${Math.max(from.x + offset, to.x - offset)} ${to.y}`; + path += `L ${to.x} ${to.y}`; + break; + } } return ( @@ -83,6 +98,7 @@ export const Connections = (props: { className={classes([ isColorClass(val.color) && `color-stroke-${val.color}`, ])} + stroke={(!isColorClass(val.color) && val.color) || undefined} key={index} d={path} fill="transparent"