mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-21 03:56:47 +01:00
Whitespace Standardization [MDB IGNORE] (#15748)
* Update settings * Whitespace changes * Comment out merger hooks in gitattributes Corrupt maps would have to be resolved in repo before hooks could be updated * Revert "Whitespace changes" This reverts commitafbdd1d844. * Whitespace again minus example * Gitignore example changelog * Restore changelog merge setting * Keep older dmi hook attribute until hooks can be updated * update vscode settings too * Renormalize remaining * Revert "Gitignore example changelog" This reverts commitde22ad375d. * Attempt to normalize example.yml (and another file I guess) * Try again
This commit is contained in:
@@ -1,81 +1,81 @@
|
||||
|
||||
|
||||
/var/all_ui_styles = list(
|
||||
"Midnight" = 'icons/mob/screen/midnight.dmi',
|
||||
"Orange" = 'icons/mob/screen/orange.dmi',
|
||||
"old" = 'icons/mob/screen/old.dmi',
|
||||
"White" = 'icons/mob/screen/white.dmi',
|
||||
"old-noborder" = 'icons/mob/screen/old-noborder.dmi',
|
||||
"minimalist" = 'icons/mob/screen/minimalist.dmi',
|
||||
"Hologram" = 'icons/mob/screen/holo.dmi'
|
||||
)
|
||||
|
||||
/var/all_ui_styles_robot = list(
|
||||
"Midnight" = 'icons/mob/screen1_robot.dmi',
|
||||
"Orange" = 'icons/mob/screen1_robot.dmi',
|
||||
"old" = 'icons/mob/screen1_robot.dmi',
|
||||
"White" = 'icons/mob/screen1_robot.dmi',
|
||||
"old-noborder" = 'icons/mob/screen1_robot.dmi',
|
||||
"minimalist" = 'icons/mob/screen1_robot_minimalist.dmi',
|
||||
"Hologram" = 'icons/mob/screen1_robot_minimalist.dmi'
|
||||
)
|
||||
|
||||
var/global/list/all_tooltip_styles = list(
|
||||
"Midnight", //Default for everyone is the first one,
|
||||
"Plasmafire",
|
||||
"Retro",
|
||||
"Slimecore",
|
||||
"Operative",
|
||||
"Clockwork"
|
||||
)
|
||||
|
||||
/proc/ui_style2icon(ui_style)
|
||||
if(ui_style in all_ui_styles)
|
||||
return all_ui_styles[ui_style]
|
||||
return all_ui_styles["White"]
|
||||
|
||||
|
||||
/client/verb/change_ui()
|
||||
set name = "Change UI"
|
||||
set category = "Preferences"
|
||||
set desc = "Configure your user interface"
|
||||
|
||||
if(!ishuman(usr))
|
||||
if(!isrobot(usr))
|
||||
to_chat(usr, "<span class='warning'>You must be a human or a robot to use this verb.</span>")
|
||||
return
|
||||
|
||||
var/UI_style_new = tgui_input_list(usr, "Select a style. White is recommended for customization", "UI Style Choice", all_ui_styles)
|
||||
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)
|
||||
if(!UI_style_alpha_new || !(UI_style_alpha_new <= 255 && UI_style_alpha_new >= 50)) return
|
||||
|
||||
var/UI_style_color_new = input(usr, "Choose your UI color. Dark colors are not recommended!") as color|null
|
||||
if(!UI_style_color_new) return
|
||||
|
||||
//update UI
|
||||
var/list/icons = usr.hud_used.adding + usr.hud_used.other + usr.hud_used.hotkeybuttons
|
||||
icons.Add(usr.zone_sel)
|
||||
icons.Add(usr.gun_setting_icon)
|
||||
icons.Add(usr.item_use_icon)
|
||||
icons.Add(usr.gun_move_icon)
|
||||
icons.Add(usr.radio_use_icon)
|
||||
|
||||
var/icon/ic = all_ui_styles[UI_style_new]
|
||||
if(isrobot(usr))
|
||||
ic = all_ui_styles_robot[UI_style_new]
|
||||
|
||||
for(var/obj/screen/I in icons)
|
||||
if(I.name in list(I_HELP, I_HURT, I_DISARM, I_GRAB)) continue
|
||||
I.icon = ic
|
||||
I.color = UI_style_color_new
|
||||
I.alpha = UI_style_alpha_new
|
||||
|
||||
|
||||
if(tgui_alert(usr, "Like it? Save changes?","Save?",list("Yes", "No")) == "Yes")
|
||||
prefs.UI_style = UI_style_new
|
||||
prefs.UI_style_alpha = UI_style_alpha_new
|
||||
prefs.UI_style_color = UI_style_color_new
|
||||
SScharacter_setup.queue_preferences_save(prefs)
|
||||
to_chat(usr, "UI was saved")
|
||||
|
||||
|
||||
/var/all_ui_styles = list(
|
||||
"Midnight" = 'icons/mob/screen/midnight.dmi',
|
||||
"Orange" = 'icons/mob/screen/orange.dmi',
|
||||
"old" = 'icons/mob/screen/old.dmi',
|
||||
"White" = 'icons/mob/screen/white.dmi',
|
||||
"old-noborder" = 'icons/mob/screen/old-noborder.dmi',
|
||||
"minimalist" = 'icons/mob/screen/minimalist.dmi',
|
||||
"Hologram" = 'icons/mob/screen/holo.dmi'
|
||||
)
|
||||
|
||||
/var/all_ui_styles_robot = list(
|
||||
"Midnight" = 'icons/mob/screen1_robot.dmi',
|
||||
"Orange" = 'icons/mob/screen1_robot.dmi',
|
||||
"old" = 'icons/mob/screen1_robot.dmi',
|
||||
"White" = 'icons/mob/screen1_robot.dmi',
|
||||
"old-noborder" = 'icons/mob/screen1_robot.dmi',
|
||||
"minimalist" = 'icons/mob/screen1_robot_minimalist.dmi',
|
||||
"Hologram" = 'icons/mob/screen1_robot_minimalist.dmi'
|
||||
)
|
||||
|
||||
var/global/list/all_tooltip_styles = list(
|
||||
"Midnight", //Default for everyone is the first one,
|
||||
"Plasmafire",
|
||||
"Retro",
|
||||
"Slimecore",
|
||||
"Operative",
|
||||
"Clockwork"
|
||||
)
|
||||
|
||||
/proc/ui_style2icon(ui_style)
|
||||
if(ui_style in all_ui_styles)
|
||||
return all_ui_styles[ui_style]
|
||||
return all_ui_styles["White"]
|
||||
|
||||
|
||||
/client/verb/change_ui()
|
||||
set name = "Change UI"
|
||||
set category = "Preferences"
|
||||
set desc = "Configure your user interface"
|
||||
|
||||
if(!ishuman(usr))
|
||||
if(!isrobot(usr))
|
||||
to_chat(usr, "<span class='warning'>You must be a human or a robot to use this verb.</span>")
|
||||
return
|
||||
|
||||
var/UI_style_new = tgui_input_list(usr, "Select a style. White is recommended for customization", "UI Style Choice", all_ui_styles)
|
||||
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)
|
||||
if(!UI_style_alpha_new || !(UI_style_alpha_new <= 255 && UI_style_alpha_new >= 50)) return
|
||||
|
||||
var/UI_style_color_new = input(usr, "Choose your UI color. Dark colors are not recommended!") as color|null
|
||||
if(!UI_style_color_new) return
|
||||
|
||||
//update UI
|
||||
var/list/icons = usr.hud_used.adding + usr.hud_used.other + usr.hud_used.hotkeybuttons
|
||||
icons.Add(usr.zone_sel)
|
||||
icons.Add(usr.gun_setting_icon)
|
||||
icons.Add(usr.item_use_icon)
|
||||
icons.Add(usr.gun_move_icon)
|
||||
icons.Add(usr.radio_use_icon)
|
||||
|
||||
var/icon/ic = all_ui_styles[UI_style_new]
|
||||
if(isrobot(usr))
|
||||
ic = all_ui_styles_robot[UI_style_new]
|
||||
|
||||
for(var/obj/screen/I in icons)
|
||||
if(I.name in list(I_HELP, I_HURT, I_DISARM, I_GRAB)) continue
|
||||
I.icon = ic
|
||||
I.color = UI_style_color_new
|
||||
I.alpha = UI_style_alpha_new
|
||||
|
||||
|
||||
if(tgui_alert(usr, "Like it? Save changes?","Save?",list("Yes", "No")) == "Yes")
|
||||
prefs.UI_style = UI_style_new
|
||||
prefs.UI_style_alpha = UI_style_alpha_new
|
||||
prefs.UI_style_color = UI_style_color_new
|
||||
SScharacter_setup.queue_preferences_save(prefs)
|
||||
to_chat(usr, "UI was saved")
|
||||
|
||||
Reference in New Issue
Block a user