mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Allows robots to change UI style.
This commit is contained in:
@@ -9,6 +9,15 @@
|
||||
"minimalist" = 'icons/mob/screen/minimalist.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'
|
||||
)
|
||||
|
||||
/proc/ui_style2icon(ui_style)
|
||||
if(ui_style in all_ui_styles)
|
||||
return all_ui_styles[ui_style]
|
||||
@@ -21,8 +30,9 @@
|
||||
set desc = "Configure your user interface"
|
||||
|
||||
if(!ishuman(usr))
|
||||
usr << "<span class='warning'>You must be human to use this verb.</span>"
|
||||
return
|
||||
if(!isrobot(usr))
|
||||
usr << "<span class='warning'>You must be a human or a robot to use this verb.</span>"
|
||||
return
|
||||
|
||||
var/UI_style_new = input(usr, "Select a style. White is recommended for customization") as null|anything in all_ui_styles
|
||||
if(!UI_style_new) return
|
||||
@@ -42,6 +52,8 @@
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user