mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-27 06:54:18 +01:00
Styles basic HTML UIs (#7001)
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
#define THEME_TYPE_DARK 1
|
||||
#define THEME_TYPE_LIGHT 0
|
||||
|
||||
#define FALLBACK_HTML_THEME "theme-nano dark-theme"
|
||||
|
||||
#define VUEUI_MONITOR_VARS(type, monitor_name) \
|
||||
/datum/vueui_var_monitor/##monitor_name { subject_type = type; }; \
|
||||
\
|
||||
|
||||
@@ -285,4 +285,13 @@ proc/tg_list2text(list/list, glue=",")
|
||||
if(isnull(c))
|
||||
return null
|
||||
r += ascii2text(c)
|
||||
return r
|
||||
return r
|
||||
|
||||
/proc/hex2cssrgba(var/hex, var/alpha)
|
||||
var/textr = copytext(hex, 2, 4)
|
||||
var/textg = copytext(hex, 4, 6)
|
||||
var/textb = copytext(hex, 6, 8)
|
||||
var/r = hex2num(textr)
|
||||
var/g = hex2num(textg)
|
||||
var/b = hex2num(textb)
|
||||
return "rgba([r], [g], [b], [alpha])"
|
||||
@@ -50,6 +50,11 @@ Byond Vue UI framework's management subsystem
|
||||
|
||||
..()
|
||||
|
||||
for(var/mob/M in mob_list)
|
||||
var/mob/abstract/new_player/np = M
|
||||
if(istype(np))
|
||||
np.new_player_panel_proc()
|
||||
|
||||
/**
|
||||
* Gets a vueui_var_monitor associated with the given source type.
|
||||
*
|
||||
@@ -222,25 +227,48 @@ Byond Vue UI framework's management subsystem
|
||||
if (!LAZYLEN(open_uis[old_object_key]))
|
||||
open_uis -= old_object_key
|
||||
|
||||
/datum/controller/subsystem/processing/vueui/proc/get_html_theme_header()
|
||||
return {"<meta http-equiv="X-UA-Compatible" content="IE=edge"><link rel="stylesheet" type="text/css" href="vueui.css">"}
|
||||
/datum/controller/subsystem/processing/vueui/proc/get_html_theme(var/mob/user)
|
||||
var/client/cl = null
|
||||
if(istype(user))
|
||||
cl = user.client
|
||||
else
|
||||
if(istype(user, /client))
|
||||
cl = user
|
||||
if(!cl)
|
||||
return
|
||||
var/style = cl.prefs.html_UI_style
|
||||
if(!(style in available_html_themes))
|
||||
style = "Nano"
|
||||
return available_html_themes[style]
|
||||
|
||||
/datum/controller/subsystem/processing/vueui/proc/get_html_theme_class(var/mob/user)
|
||||
if(user.client)
|
||||
var/style = user.client.prefs.html_UI_style
|
||||
if(!(style in available_html_themes))
|
||||
style = "Nano"
|
||||
var/list/theme = available_html_themes[style]
|
||||
var/class = ""
|
||||
class += "[theme["class"]]"
|
||||
if(theme["type"] == THEME_TYPE_DARK)
|
||||
class += " dark-theme"
|
||||
return class
|
||||
return ""
|
||||
var/list/theme = get_html_theme(user)
|
||||
if(!theme)
|
||||
return FALLBACK_HTML_THEME
|
||||
var/class = ""
|
||||
class += "[theme["class"]]"
|
||||
if(theme["type"] == THEME_TYPE_DARK)
|
||||
class += " dark-theme"
|
||||
return class
|
||||
|
||||
/datum/controller/subsystem/processing/vueui/proc/send_theme_resources(var/mob/user)
|
||||
if(user.client)
|
||||
var/datum/asset/assets = get_asset_datum(/datum/asset/simple/vueui_theming)
|
||||
assets.send(user.client)
|
||||
/proc/send_theme_resources(var/user)
|
||||
#ifdef UIDEBUG
|
||||
user << browse_rsc(file("vueui/dist/app.js"), "vueui.js")
|
||||
user << browse_rsc(file("vueui/dist/app.css"), "vueui.css")
|
||||
#else
|
||||
simple_asset_ensure_is_sent(user, /datum/asset/simple/vueui)
|
||||
#endif
|
||||
|
||||
/proc/get_html_theme_header(var/themeclass, var/extra_header = "")
|
||||
return {"<html><head><meta http-equiv="X-UA-Compatible" content="IE=edge"><link rel="stylesheet" type="text/css" href="vueui.css">[extra_header]</head><body class="[themeclass]">"}
|
||||
|
||||
/proc/get_html_theme_footer()
|
||||
return {"</body></html>"}
|
||||
|
||||
/proc/enable_ui_theme(var/user, var/contents, var/extra_header = "")
|
||||
var/theme_class = FALLBACK_HTML_THEME
|
||||
if(SSvueui)
|
||||
theme_class = SSvueui.get_html_theme_class(user)
|
||||
return get_html_theme_header(theme_class, extra_header) + contents + get_html_theme_footer()
|
||||
|
||||
#undef NULL_OR_EQUAL
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
total_positions = -1
|
||||
spawn_positions = -1
|
||||
supervisors = "absolutely everyone"
|
||||
selection_color = "#dddddd"
|
||||
selection_color = "#C0C0C0"
|
||||
economic_modifier = 1
|
||||
access = list() //See /datum/job/assistant/get_access()
|
||||
minimal_access = list() //See /datum/job/assistant/get_access()
|
||||
|
||||
@@ -10,7 +10,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
supervisors = "company officials and Corporate Regulations"
|
||||
selection_color = "#ccccff"
|
||||
selection_color = "#4747FF"
|
||||
access = list() //See get_access()
|
||||
minimal_access = list() //See get_access()
|
||||
minimal_player_age = 14
|
||||
@@ -71,7 +71,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
supervisors = "the captain"
|
||||
selection_color = "#ddddff"
|
||||
selection_color = "#9696FF"
|
||||
minimal_player_age = 10
|
||||
economic_modifier = 10
|
||||
ideal_character_age = 50
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
supervisors = "the head of personnel"
|
||||
selection_color = "#dddddd"
|
||||
selection_color = "#C0C0C0"
|
||||
access = list(access_hydroponics, access_bar, access_kitchen)
|
||||
minimal_access = list(access_bar)
|
||||
alt_titles = list("Barista")
|
||||
@@ -33,7 +33,7 @@
|
||||
total_positions = 2
|
||||
spawn_positions = 2
|
||||
supervisors = "the head of personnel"
|
||||
selection_color = "#dddddd"
|
||||
selection_color = "#C0C0C0"
|
||||
access = list(access_hydroponics, access_bar, access_kitchen)
|
||||
minimal_access = list(access_kitchen)
|
||||
alt_titles = list("Cook")
|
||||
@@ -63,7 +63,7 @@
|
||||
total_positions = 2
|
||||
spawn_positions = 1
|
||||
supervisors = "the head of personnel"
|
||||
selection_color = "#dddddd"
|
||||
selection_color = "#C0C0C0"
|
||||
access = list(access_hydroponics, access_bar, access_kitchen)
|
||||
minimal_access = list(access_hydroponics)
|
||||
alt_titles = list("Hydroponicist")
|
||||
@@ -105,7 +105,7 @@
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
supervisors = "the head of personnel"
|
||||
selection_color = "#dddddd"
|
||||
selection_color = "#C0C0C0"
|
||||
economic_modifier = 5
|
||||
access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mining, access_mining_station)
|
||||
minimal_access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mining, access_mining_station)
|
||||
@@ -135,7 +135,7 @@
|
||||
total_positions = 3
|
||||
spawn_positions = 3
|
||||
supervisors = "the quartermaster and the head of personnel"
|
||||
selection_color = "#dddddd"
|
||||
selection_color = "#C0C0C0"
|
||||
access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mining, access_mining_station)
|
||||
minimal_access = list(access_maint_tunnels, access_cargo, access_cargo_bot, access_mailsorting)
|
||||
outfit = /datum/outfit/job/cargo_tech
|
||||
@@ -159,7 +159,7 @@
|
||||
total_positions = 4
|
||||
spawn_positions = 4
|
||||
supervisors = "the quartermaster and the head of personnel"
|
||||
selection_color = "#dddddd"
|
||||
selection_color = "#C0C0C0"
|
||||
economic_modifier = 5
|
||||
access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mining, access_mining_station)
|
||||
minimal_access = list(access_mining, access_mining_station, access_mailsorting)
|
||||
@@ -195,7 +195,7 @@
|
||||
total_positions = 2
|
||||
spawn_positions = 2
|
||||
supervisors = "the head of personnel"
|
||||
selection_color = "#dddddd"
|
||||
selection_color = "#C0C0C0"
|
||||
access = list(access_janitor, access_maint_tunnels, access_engine, access_research, access_sec_doors, access_medical)
|
||||
minimal_access = list(access_janitor, access_maint_tunnels, access_engine, access_research, access_sec_doors, access_medical)
|
||||
outfit = /datum/outfit/job/janitor
|
||||
@@ -218,7 +218,7 @@
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
supervisors = "the head of personnel"
|
||||
selection_color = "#dddddd"
|
||||
selection_color = "#C0C0C0"
|
||||
access = list(access_journalist, access_maint_tunnels)
|
||||
minimal_access = list(access_journalist, access_maint_tunnels)
|
||||
alt_titles = list("Freelance Journalist")
|
||||
@@ -261,7 +261,7 @@
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
supervisors = "the head of personnel"
|
||||
selection_color = "#dddddd"
|
||||
selection_color = "#C0C0C0"
|
||||
access = list(access_library, access_maint_tunnels)
|
||||
minimal_access = list(access_library)
|
||||
outfit = /datum/outfit/job/librarian
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
supervisors = "the head of personnel"
|
||||
selection_color = "#dddddd"
|
||||
selection_color = "#C0C0C0"
|
||||
access = list(access_morgue, access_chapel_office, access_crematorium, access_maint_tunnels)
|
||||
minimal_access = list(access_morgue, access_chapel_office, access_crematorium)
|
||||
alt_titles = list("Presbyter","Rabbi","Imam","Priest","Shaman","Counselor")
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
supervisors = "the captain"
|
||||
selection_color = "#ffeeaa"
|
||||
selection_color = "#FFD737"
|
||||
economic_modifier = 10
|
||||
|
||||
ideal_character_age = 50
|
||||
@@ -60,7 +60,7 @@
|
||||
total_positions = 5
|
||||
spawn_positions = 5
|
||||
supervisors = "the chief engineer"
|
||||
selection_color = "#fff5cc"
|
||||
selection_color = "#FFEA95"
|
||||
economic_modifier = 5
|
||||
access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction, access_atmospherics)
|
||||
minimal_access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction)
|
||||
@@ -93,7 +93,7 @@
|
||||
total_positions = 3
|
||||
spawn_positions = 2
|
||||
supervisors = "the chief engineer"
|
||||
selection_color = "#fff5cc"
|
||||
selection_color = "#FFEA95"
|
||||
economic_modifier = 5
|
||||
access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction, access_atmospherics, access_external_airlocks)
|
||||
minimal_access = list(access_eva, access_engine, access_atmospherics, access_maint_tunnels, access_emergency_storage, access_construction, access_external_airlocks)
|
||||
@@ -122,7 +122,7 @@
|
||||
total_positions = 2
|
||||
spawn_positions = 2
|
||||
supervisors = "the Chief Engineer"
|
||||
selection_color = "#fff5cc"
|
||||
selection_color = "#FFEA95"
|
||||
access = list(access_maint_tunnels, access_construction, access_engine_equip, access_engine)
|
||||
minimal_access = list(access_maint_tunnels, access_construction, access_engine_equip, access_engine)
|
||||
outfit = /datum/outfit/job/intern_eng
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
var/spawn_positions = 0 // How many players can spawn in as this job
|
||||
var/current_positions = 0 // How many players have this job
|
||||
var/supervisors = null // Supervisors, who this person answers to directly
|
||||
var/selection_color = "#ffffff" // Selection screen color
|
||||
var/selection_color = "#888888" // Selection screen color
|
||||
var/list/alt_titles // List of alternate titles, if any
|
||||
var/list/title_accesses // A map of title -> list of accesses to add if the person has this title.
|
||||
var/minimal_player_age = 0 // If you have use_age_restriction_for_jobs config option enabled and the database set up, this option will add a requirement for players to be at least minimal_player_age days old. (meaning they first signed in at least that many days before.)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
supervisors = "the captain"
|
||||
selection_color = "#ffddf0"
|
||||
selection_color = "#FF56B4"
|
||||
economic_modifier = 10
|
||||
access = list(access_medical, access_medical_equip, access_morgue, access_genetics, access_heads,
|
||||
access_pharmacy, access_virology, access_cmo, access_surgery, access_RC_announce, access_engine, access_construction,
|
||||
@@ -50,7 +50,7 @@
|
||||
total_positions = 5
|
||||
spawn_positions = 3
|
||||
supervisors = "the chief medical officer"
|
||||
selection_color = "#ffeef0"
|
||||
selection_color = "#FF97D1"
|
||||
economic_modifier = 7
|
||||
access = list(access_medical, access_medical_equip, access_morgue, access_surgery, access_pharmacy, access_virology, access_genetics, access_eva)
|
||||
minimal_access = list(access_medical, access_medical_equip, access_morgue, access_surgery, access_eva)
|
||||
@@ -113,7 +113,7 @@
|
||||
total_positions = 2
|
||||
spawn_positions = 2
|
||||
supervisors = "the chief medical officer"
|
||||
selection_color = "#ffeef0"
|
||||
selection_color = "#FF97D1"
|
||||
economic_modifier = 5
|
||||
access = list(access_medical, access_medical_equip, access_morgue, access_surgery, access_pharmacy, access_virology, access_genetics)
|
||||
minimal_access = list(access_medical, access_medical_equip, access_pharmacy, access_virology)
|
||||
@@ -160,7 +160,7 @@
|
||||
spawn_positions = 1
|
||||
economic_modifier = 5
|
||||
supervisors = "the chief medical officer"
|
||||
selection_color = "#ffeef0"
|
||||
selection_color = "#FF97D1"
|
||||
access = list(access_medical, access_medical_equip, access_morgue, access_surgery, access_pharmacy, access_virology, access_genetics, access_psychiatrist)
|
||||
minimal_access = list(access_medical, access_medical_equip, access_psychiatrist)
|
||||
alt_titles = list("Psychologist")
|
||||
@@ -194,7 +194,7 @@
|
||||
total_positions = 2
|
||||
spawn_positions = 2
|
||||
supervisors = "the chief medical officer"
|
||||
selection_color = "#ffeef0"
|
||||
selection_color = "#FF97D1"
|
||||
economic_modifier = 4
|
||||
access = list(access_medical, access_medical_equip, access_morgue, access_surgery, access_pharmacy, access_virology, access_eva, access_maint_tunnels, access_external_airlocks, access_psychiatrist, access_paramedic)
|
||||
minimal_access = list(access_medical, access_medical_equip, access_morgue, access_eva, access_maint_tunnels, access_external_airlocks, access_paramedic)
|
||||
@@ -235,7 +235,7 @@
|
||||
total_positions = 2
|
||||
spawn_positions = 2
|
||||
supervisors = "the Chief Medical Officer"
|
||||
selection_color = "#ffeef0"
|
||||
selection_color = "#FF97D1"
|
||||
access = list(access_medical, access_surgery, access_medical_equip)
|
||||
minimal_access = list(access_medical, access_surgery, access_medical_equip)
|
||||
alt_titles = list("Medical Intern")
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
supervisors = "company officials"
|
||||
selection_color = "#dddddd"
|
||||
selection_color = "#C0C0C0"
|
||||
economic_modifier = 7
|
||||
latejoin_at_spawnpoints = TRUE
|
||||
access = list(access_lawyer, access_maint_tunnels)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
supervisors = "the captain"
|
||||
selection_color = "#ffddff"
|
||||
selection_color = "#FF40FF"
|
||||
economic_modifier = 15
|
||||
access = list(access_rd, access_heads, access_tox, access_genetics, access_morgue, access_eva, access_external_airlocks,
|
||||
access_tox_storage, access_teleporter, access_sec_doors, access_medical, access_engine, access_construction,
|
||||
@@ -49,7 +49,7 @@
|
||||
total_positions = 5
|
||||
spawn_positions = 3
|
||||
supervisors = "the research director"
|
||||
selection_color = "#ffeeff"
|
||||
selection_color = "#FFAAFF"
|
||||
economic_modifier = 7
|
||||
access = list(access_robotics, access_tox, access_tox_storage, access_research, access_xenobiology, access_xenoarch)
|
||||
minimal_access = list(access_tox, access_tox_storage, access_research, access_xenoarch)
|
||||
@@ -82,7 +82,7 @@
|
||||
total_positions = 3
|
||||
spawn_positions = 2
|
||||
supervisors = "the research director"
|
||||
selection_color = "#ffeeff"
|
||||
selection_color = "#FFAAFF"
|
||||
economic_modifier = 7
|
||||
access = list(access_robotics, access_tox, access_tox_storage, access_research, access_xenobiology, access_hydroponics)
|
||||
minimal_access = list(access_research, access_xenobiology, access_hydroponics, access_tox_storage)
|
||||
@@ -105,7 +105,7 @@
|
||||
total_positions = 2
|
||||
spawn_positions = 2
|
||||
supervisors = "research director"
|
||||
selection_color = "#ffeeff"
|
||||
selection_color = "#FFAAFF"
|
||||
economic_modifier = 5
|
||||
access = list(access_robotics, access_tox, access_tox_storage, access_tech_storage, access_morgue, access_research) //As a job that handles so many corpses, it makes sense for them to have morgue access.
|
||||
minimal_access = list(access_robotics, access_tech_storage, access_morgue, access_research) //As a job that handles so many corpses, it makes sense for them to have morgue access.
|
||||
@@ -139,7 +139,7 @@
|
||||
total_positions = 2
|
||||
spawn_positions = 2
|
||||
supervisors = "the Research Director"
|
||||
selection_color = "#ffeeff"
|
||||
selection_color = "#FFAAFF"
|
||||
access = list(access_research, access_tox)
|
||||
minimal_access = list(access_research, access_tox)
|
||||
outfit = /datum/outfit/job/intern_sci
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
supervisors = "the captain"
|
||||
selection_color = "#ffdddd"
|
||||
selection_color = "#FF6363"
|
||||
economic_modifier = 10
|
||||
access = list(access_security, access_eva, access_sec_doors, access_brig, access_armory,
|
||||
access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers,
|
||||
@@ -66,7 +66,7 @@
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
supervisors = "the head of security"
|
||||
selection_color = "#ffeeee"
|
||||
selection_color = "#FFA4A4"
|
||||
economic_modifier = 5
|
||||
access = list(access_security, access_eva, access_sec_doors, access_brig, access_armory, access_maint_tunnels, access_morgue, access_external_airlocks, access_weapons)
|
||||
minimal_access = list(access_security, access_eva, access_sec_doors, access_brig, access_armory, access_maint_tunnels, access_external_airlocks, access_weapons)
|
||||
@@ -112,7 +112,7 @@
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
supervisors = "the head of security"
|
||||
selection_color = "#ffeeee"
|
||||
selection_color = "#FFA4A4"
|
||||
economic_modifier = 5
|
||||
access = list(access_security, access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_detective, access_weapons)
|
||||
minimal_access = list(access_security, access_sec_doors, access_morgue, access_maint_tunnels, access_detective, access_weapons)
|
||||
@@ -150,7 +150,7 @@
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
supervisors = "the head of security"
|
||||
selection_color = "#ffeeee"
|
||||
selection_color = "#FFA4A4"
|
||||
economic_modifier = 5
|
||||
access = list(access_security, access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_weapons)
|
||||
minimal_access = list(access_security, access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_weapons)
|
||||
@@ -197,7 +197,7 @@
|
||||
total_positions = 4
|
||||
spawn_positions = 4
|
||||
supervisors = "the head of security"
|
||||
selection_color = "#ffeeee"
|
||||
selection_color = "#FFA4A4"
|
||||
// alt_titles = list("Junior Officer") //aurora already has security cadets
|
||||
economic_modifier = 4
|
||||
access = list(access_security, access_eva, access_sec_doors, access_brig, access_maint_tunnels, access_morgue, access_external_airlocks, access_weapons)
|
||||
@@ -241,7 +241,7 @@
|
||||
total_positions = 2
|
||||
spawn_positions = 2
|
||||
supervisors = "the Head of Security"
|
||||
selection_color = "#ffeeee"
|
||||
selection_color = "#FFA4A4"
|
||||
access = list(access_security, access_sec_doors, access_maint_tunnels)
|
||||
minimal_access = list(access_security, access_sec_doors, access_maint_tunnels)
|
||||
outfit = /datum/outfit/job/intern_sec
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
faction = "Station"
|
||||
total_positions = 0 // Not used for AI, see is_position_available below and modules/mob/living/silicon/ai/latejoin.dm
|
||||
spawn_positions = 1
|
||||
selection_color = "#ccffcc"
|
||||
selection_color = "#00ff00"
|
||||
supervisors = "your laws"
|
||||
minimal_player_age = 7
|
||||
account_allowed = 0
|
||||
@@ -30,7 +30,7 @@
|
||||
total_positions = 2
|
||||
spawn_positions = 2
|
||||
supervisors = "your laws and the AI" //Nodrak
|
||||
selection_color = "#ddffdd"
|
||||
selection_color = "#4dff4d"
|
||||
minimal_player_age = 1
|
||||
alt_titles = list("Android", "Robot")
|
||||
account_allowed = 0
|
||||
|
||||
@@ -196,31 +196,10 @@ var/list/asset_datums = list()
|
||||
|
||||
/datum/asset/simple/changelog
|
||||
assets = list(
|
||||
"88x31.png" = 'html/88x31.png',
|
||||
"bug-minus.png" = 'html/bug-minus.png',
|
||||
"cross-circle.png" = 'html/cross-circle.png',
|
||||
"hard-hat-exclamation.png" = 'html/hard-hat-exclamation.png',
|
||||
"image-minus.png" = 'html/image-minus.png',
|
||||
"image-plus.png" = 'html/image-plus.png',
|
||||
"map-pencil.png" = 'html/map-pencil.png',
|
||||
"music-minus.png" = 'html/music-minus.png',
|
||||
"music-plus.png" = 'html/music-plus.png',
|
||||
"tick-circle.png" = 'html/tick-circle.png',
|
||||
"wrench-screwdriver.png" = 'html/wrench-screwdriver.png',
|
||||
"spell-check.png" = 'html/spell-check.png',
|
||||
"burn-exclamation.png" = 'html/burn-exclamation.png',
|
||||
"scales.png" = 'html/scales.png',
|
||||
"chevron.png" = 'html/chevron.png',
|
||||
"chevron-expand.png" = 'html/chevron-expand.png',
|
||||
"changelog.css" = 'html/changelog.css',
|
||||
"changelog.js" = 'html/changelog.js'
|
||||
)
|
||||
|
||||
/datum/asset/simple/vueui_theming
|
||||
assets = list(
|
||||
"vueui.css" = 'vueui/dist/app.css'
|
||||
)
|
||||
|
||||
/datum/asset/simple/vueui
|
||||
assets = list(
|
||||
"vueui.js" = 'vueui/dist/app.js',
|
||||
|
||||
@@ -134,12 +134,12 @@ var/list/gear_datums = list()
|
||||
. += " [category] "
|
||||
else
|
||||
var/datum/loadout_category/LC = loadout_categories[category]
|
||||
var/tcolor = "#3366CC"
|
||||
var/style = ""
|
||||
for(var/thing in LC.gear)
|
||||
if(thing in pref.gear)
|
||||
tcolor = "#E67300"
|
||||
style = "style='color: #FF8000;'"
|
||||
break
|
||||
. += " <a href='?src=\ref[src];select_category=[category]'><font color = '[tcolor]'>[category]</font></a> "
|
||||
. += " <a href='?src=\ref[src];select_category=[category]'><font [style]>[category]</font></a> "
|
||||
. += "</b></center></td></tr>"
|
||||
|
||||
var/datum/loadout_category/LC = loadout_categories[current_tab]
|
||||
@@ -151,7 +151,10 @@ var/list/gear_datums = list()
|
||||
continue
|
||||
var/datum/gear/G = LC.gear[gear_name]
|
||||
var/ticked = (G.display_name in pref.gear)
|
||||
. += "<tr style='vertical-align:top'><td width=25%><a href='?src=\ref[src];toggle_gear=[G.display_name]'><font color='[ticked ? "#E67300" : "#3366CC"]'>[G.display_name]</font></a></td>"
|
||||
var/style = ""
|
||||
if(ticked)
|
||||
style = "style='color: #FF8000;'"
|
||||
. += "<tr style='vertical-align:top'><td width=25%><a href='?src=\ref[src];toggle_gear=[G.display_name]'><font [style]>[G.display_name]</font></a></td>"
|
||||
. += "<td width = 10% style='vertical-align:top'>[G.cost]</td>"
|
||||
. += "<td><font size=2><i>[G.description]</i></font></td></tr>"
|
||||
if(ticked)
|
||||
|
||||
@@ -165,15 +165,10 @@
|
||||
for(var/datum/job/job in faction.get_occupations())
|
||||
index += 1
|
||||
if((index >= limit) || (job.title in splitJobs))
|
||||
if((index < limit) && (lastJob != null))
|
||||
//If the cells were broken up by a job in the splitJob list then it will fill in the rest of the cells with
|
||||
//the last job's selection color. Creating a rather nice effect.
|
||||
for(var/i = 0, i < (limit - index), i += 1)
|
||||
dat += "<tr bgcolor='[lastJob.selection_color]'><td width='60%' align='right'><a> </a></td><td><a> </a></td></tr>"
|
||||
dat += "</table></td><td width='20%'><table width='100%' cellpadding='1' cellspacing='0'>"
|
||||
index = 0
|
||||
|
||||
dat += "<tr bgcolor='[job.selection_color]'><td width='60%' align='right'>"
|
||||
dat += "<tr style='background-color: [hex2cssrgba(job.selection_color, 0.4)];'><td width='60%' align='right'>"
|
||||
var/rank = job.title
|
||||
lastJob = job
|
||||
var/ban_reason = jobban_isbanned(user, rank)
|
||||
@@ -205,7 +200,7 @@
|
||||
else
|
||||
dat += " <font color=red>\[No]</font>"
|
||||
if(job.alt_titles) //Blatantly cloned from a few lines down.
|
||||
dat += "</a></td></tr><tr bgcolor='[lastJob.selection_color]'><td width='60%' align='center'> </td><td><a href='?src=\ref[src];select_alt_title=\ref[job]'>\[[pref.GetPlayerAltTitle(job)]\]</a></td></tr>"
|
||||
dat += "</a></td></tr><tr style='background-color: [hex2cssrgba(lastJob.selection_color, 0.4)];'><td width='60%' align='center'> </td><td><a href='?src=\ref[src];select_alt_title=\ref[job]'>\[[pref.GetPlayerAltTitle(job)]\]</a></td></tr>"
|
||||
dat += "</a></td></tr>"
|
||||
continue
|
||||
|
||||
@@ -218,7 +213,7 @@
|
||||
else
|
||||
dat += " <font color=red>\[NEVER]</font>"
|
||||
if(job.alt_titles)
|
||||
dat += "</a></td></tr><tr bgcolor='[lastJob.selection_color]'><td width='60%' align='center'> </td><td><a href='?src=\ref[src];select_alt_title=\ref[job]'>\[[pref.GetPlayerAltTitle(job)]\]</a></td></tr>"
|
||||
dat += "</a></td></tr><tr style='background-color: [hex2cssrgba(lastJob.selection_color, 0.4)];'><td width='60%' align='center'> </td><td><a href='?src=\ref[src];select_alt_title=\ref[job]'>\[[pref.GetPlayerAltTitle(job)]\]</a></td></tr>"
|
||||
dat += "</a></td></tr>"
|
||||
|
||||
dat += "</td'></tr></table>"
|
||||
|
||||
@@ -78,14 +78,14 @@
|
||||
var/level = pref.skills[S.ID]
|
||||
dat += "<tr style='text-align:left;'>"
|
||||
dat += "<th><a href='?src=\ref[src];skillinfo=\ref[S]'>[S.name]</a></th>"
|
||||
dat += "<th><a href='?src=\ref[src];setskill=\ref[S];newvalue=[SKILL_NONE]'><font color=[(level == SKILL_NONE) ? "red" : "black"]>\[Untrained\]</font></a></th>"
|
||||
dat += "<th><a href='?src=\ref[src];setskill=\ref[S];newvalue=[SKILL_NONE]'><font color=[(level == SKILL_NONE) ? "red" : ""]>\[Untrained\]</font></a></th>"
|
||||
// secondary skills don't have an amateur level
|
||||
if(S.secondary)
|
||||
dat += "<th></th>"
|
||||
else
|
||||
dat += "<th><a href='?src=\ref[src];setskill=\ref[S];newvalue=[SKILL_BASIC]'><font color=[(level == SKILL_BASIC) ? "red" : "black"]>\[Amateur\]</font></a></th>"
|
||||
dat += "<th><a href='?src=\ref[src];setskill=\ref[S];newvalue=[SKILL_ADEPT]'><font color=[(level == SKILL_ADEPT) ? "red" : "black"]>\[Trained\]</font></a></th>"
|
||||
dat += "<th><a href='?src=\ref[src];setskill=\ref[S];newvalue=[SKILL_EXPERT]'><font color=[(level == SKILL_EXPERT) ? "red" : "black"]>\[Professional\]</font></a></th>"
|
||||
dat += "<th><a href='?src=\ref[src];setskill=\ref[S];newvalue=[SKILL_BASIC]'><font color=[(level == SKILL_BASIC) ? "red" : ""]>\[Amateur\]</font></a></th>"
|
||||
dat += "<th><a href='?src=\ref[src];setskill=\ref[S];newvalue=[SKILL_ADEPT]'><font color=[(level == SKILL_ADEPT) ? "red" : ""]>\[Trained\]</font></a></th>"
|
||||
dat += "<th><a href='?src=\ref[src];setskill=\ref[S];newvalue=[SKILL_EXPERT]'><font color=[(level == SKILL_EXPERT) ? "red" : ""]>\[Professional\]</font></a></th>"
|
||||
dat += "</tr>"
|
||||
dat += "</table>"
|
||||
. = dat.Join()
|
||||
|
||||
@@ -224,7 +224,7 @@ datum/preferences
|
||||
|
||||
/datum/preferences/proc/ShowChoices(mob/user)
|
||||
if(!user || !user.client) return
|
||||
var/dat = "<html><body><center>"
|
||||
var/dat = "<center>"
|
||||
|
||||
if(path)
|
||||
dat += "<a href='?src=\ref[src];load=1'>Load slot</a> - "
|
||||
@@ -240,9 +240,8 @@ datum/preferences
|
||||
dat += player_setup.header()
|
||||
dat += "<br><HR></center>"
|
||||
dat += player_setup.content(user)
|
||||
|
||||
dat += "</html></body>"
|
||||
user << browse(dat, "window=preferences;size=800x800")
|
||||
send_theme_resources(user)
|
||||
user << browse(enable_ui_theme(user, dat), "window=preferences;size=800x800")
|
||||
|
||||
/datum/preferences/proc/process_link(mob/user, list/href_list)
|
||||
if(!user) return
|
||||
@@ -391,8 +390,7 @@ datum/preferences
|
||||
character.update_icons()
|
||||
|
||||
/datum/preferences/proc/open_load_dialog_sql(mob/user)
|
||||
var/dat = "<body>"
|
||||
dat += "<tt><center>"
|
||||
var/dat = "<tt><center>"
|
||||
|
||||
for(var/ckey in preferences_datums)
|
||||
var/datum/preferences/D = preferences_datums[ckey]
|
||||
@@ -426,12 +424,12 @@ datum/preferences
|
||||
dat += "<hr>"
|
||||
dat += "<a href='?src=\ref[src];close_load_dialog=1'>Close</a><br>"
|
||||
dat += "</center></tt>"
|
||||
user << browse(dat, "window=saves;size=300x390")
|
||||
send_theme_resources(user)
|
||||
user << browse(enable_ui_theme(user, dat), "window=saves;size=300x390")
|
||||
|
||||
|
||||
/datum/preferences/proc/open_load_dialog_file(mob/user)
|
||||
var/dat = "<body>"
|
||||
dat += "<tt><center>"
|
||||
var/dat = "<tt><center>"
|
||||
|
||||
var/savefile/S = new /savefile(path)
|
||||
if(S)
|
||||
@@ -447,7 +445,8 @@ datum/preferences
|
||||
|
||||
dat += "<hr>"
|
||||
dat += "</center></tt>"
|
||||
user << browse(dat, "window=saves;size=300x390")
|
||||
send_theme_resources(user)
|
||||
user << browse(enable_ui_theme(user, dat), "window=saves;size=300x390")
|
||||
|
||||
/datum/preferences/proc/close_load_dialog(mob/user)
|
||||
user << browse(null, "window=saves")
|
||||
|
||||
@@ -63,8 +63,8 @@ INITIALIZE_IMMEDIATE(/mob/abstract/new_player)
|
||||
output += "<p><a href='byond://?src=\ref[src];showpoll=1'>Show Player Polls</A></p>"
|
||||
|
||||
output += "</div>"
|
||||
|
||||
src << browse(output,"window=playersetup;size=310x350;can_close=0")
|
||||
send_theme_resources(src)
|
||||
src << browse(enable_ui_theme(src, output),"window=playersetup;size=310x350;can_close=0")
|
||||
|
||||
/mob/abstract/new_player/Stat()
|
||||
..()
|
||||
|
||||
@@ -494,7 +494,8 @@
|
||||
set category = "OOC"
|
||||
var/datum/asset/changelog = get_asset_datum(/datum/asset/simple/changelog)
|
||||
changelog.send(src)
|
||||
src << browse('html/changelog.html', "window=changes;size=675x650")
|
||||
send_theme_resources(src)
|
||||
src << browse(enable_ui_theme(src, file2text("html/changelog.html"), file2text("html/templates/changelog_extra_header.html")), "window=changes;size=675x650")
|
||||
if(prefs.lastchangelog != changelog_hash)
|
||||
prefs.lastchangelog = changelog_hash
|
||||
prefs.save_preferences()
|
||||
|
||||
@@ -172,13 +172,7 @@ main ui datum.
|
||||
* @return nothing
|
||||
*/
|
||||
/datum/vueui/proc/send_resources_and_assets(var/client/cl)
|
||||
#ifdef UIDEBUG
|
||||
cl << browse_rsc(file("vueui/dist/app.js"), "vueui.js")
|
||||
cl << browse_rsc(file("vueui/dist/app.css"), "vueui.css")
|
||||
#else
|
||||
var/datum/asset/assets = get_asset_datum(/datum/asset/simple/vueui)
|
||||
assets.send(cl)
|
||||
#endif
|
||||
send_theme_resources(cl)
|
||||
for(var/asset_name in assets)
|
||||
var/asset = assets[asset_name]
|
||||
if (!QDELETED(asset["img"]))
|
||||
|
||||
Reference in New Issue
Block a user