Merge branch 'master' into kk-misc

This commit is contained in:
Novacat
2020-08-18 09:27:06 -04:00
committed by GitHub
1223 changed files with 88545 additions and 34934 deletions
-309
View File
@@ -1,309 +0,0 @@
/*
Asset cache quick users guide:
Make a datum at the bottom of this file with your assets for your thing.
The simple subsystem will most like be of use for most cases.
Then call get_asset_datum() with the type of the datum you created and store the return
Then call .send(client) on that stored return value.
You can set verify to TRUE if you want send() to sleep until the client has the assets.
*/
// Amount of time(ds) MAX to send per asset, if this get exceeded we cancel the sleeping.
// This is doubled for the first asset, then added per asset after
#define ASSET_CACHE_SEND_TIMEOUT 7
//When sending mutiple assets, how many before we give the client a quaint little sending resources message
#define ASSET_CACHE_TELL_CLIENT_AMOUNT 8
//When passively preloading assets, how many to send at once? Too high creates noticable lag where as too low can flood the client's cache with "verify" files
#define ASSET_CACHE_PRELOAD_CONCURRENT 3
/client
var/list/cache = list() // List of all assets sent to this client by the asset cache.
var/list/completed_asset_jobs = list() // List of all completed jobs, awaiting acknowledgement.
var/list/sending = list()
var/last_asset_job = 0 // Last job done.
//This proc sends the asset to the client, but only if it needs it.
//This proc blocks(sleeps) unless verify is set to false
/proc/send_asset(var/client/client, var/asset_name, var/verify = TRUE)
client = CLIENT_FROM_VAR(client) // Will get client from a mob, or accept a client, or return null
if(!istype(client))
return 0
if(client.cache.Find(asset_name) || client.sending.Find(asset_name))
return 0
client << browse_rsc(SSassets.cache[asset_name], asset_name)
if(!verify) // Can't access the asset cache browser, rip.
client.cache += asset_name
return 1
client.sending |= asset_name
var/job = ++client.last_asset_job
client << browse({"
<script>
window.location.href="?asset_cache_confirm_arrival=[job]"
</script>
"}, "window=asset_cache_browser")
var/t = 0
var/timeout_time = (ASSET_CACHE_SEND_TIMEOUT * client.sending.len) + ASSET_CACHE_SEND_TIMEOUT
while(client && !client.completed_asset_jobs.Find(job) && t < timeout_time) // Reception is handled in Topic()
sleep(1) // Lock up the caller until this is received.
t++
if(client)
client.sending -= asset_name
client.cache |= asset_name
client.completed_asset_jobs -= job
return 1
//This proc blocks(sleeps) unless verify is set to false
/proc/send_asset_list(var/client/client, var/list/asset_list, var/verify = TRUE)
client = CLIENT_FROM_VAR(client) // Will get client from a mob, or accept a client, or return null
if(!istype(client))
return 0
var/list/unreceived = asset_list - (client.cache + client.sending)
if(!unreceived || !unreceived.len)
return 0
if(unreceived.len >= ASSET_CACHE_TELL_CLIENT_AMOUNT)
to_chat(client, "Sending Resources...")
for(var/asset in unreceived)
if(asset in SSassets.cache)
client << browse_rsc(SSassets.cache[asset], asset)
if(!verify) // Can't access the asset cache browser, rip.
client.cache += unreceived
return 1
client.sending |= unreceived
var/job = ++client.last_asset_job
client << browse({"
<script>
window.location.href="?asset_cache_confirm_arrival=[job]"
</script>
"}, "window=asset_cache_browser")
var/t = 0
var/timeout_time = ASSET_CACHE_SEND_TIMEOUT * client.sending.len
while(client && !client.completed_asset_jobs.Find(job) && t < timeout_time) // Reception is handled in Topic()
sleep(1) // Lock up the caller until this is received.
t++
if(client)
client.sending -= unreceived
client.cache |= unreceived
client.completed_asset_jobs -= job
return 1
//This proc will download the files without clogging up the browse() queue, used for passively sending files on connection start.
//The proc calls procs that sleep for long times.
/proc/getFilesSlow(var/client/client, var/list/files, var/register_asset = TRUE)
var/concurrent_tracker = 1
for(var/file in files)
if(!client)
break
if(register_asset)
register_asset(file, files[file])
if(concurrent_tracker >= ASSET_CACHE_PRELOAD_CONCURRENT)
concurrent_tracker = 1
send_asset(client, file)
else
concurrent_tracker++
send_asset(client, file, verify = FALSE)
sleep(0) //queuing calls like this too quickly can cause issues in some client versions
//This proc "registers" an asset, it adds it to the cache for further use, you cannot touch it from this point on or you'll fuck things up.
//if it's an icon or something be careful, you'll have to copy it before further use.
/proc/register_asset(var/asset_name, var/asset)
SSassets.cache[asset_name] = asset
//These datums are used to populate the asset cache, the proc "register()" does this.
//all of our asset datums, used for referring to these later
/var/global/list/asset_datums = list()
//get a assetdatum or make a new one
/proc/get_asset_datum(var/type)
if(!(type in asset_datums))
return new type()
return asset_datums[type]
/datum/asset
var/_abstract = /datum/asset // Marker so we don't instanatiate abstract types
/datum/asset/New()
asset_datums[type] = src
register()
/datum/asset/proc/register()
return
/datum/asset/proc/send(client)
return
//If you don't need anything complicated.
/datum/asset/simple
_abstract = /datum/asset/simple
var/assets = list()
var/verify = FALSE
/datum/asset/simple/register()
for(var/asset_name in assets)
register_asset(asset_name, assets[asset_name])
/datum/asset/simple/send(client)
send_asset_list(client,assets,verify)
//
// iconsheet Assets - For making lots of icon states available at once without sending a thousand tiny files.
//
/datum/asset/iconsheet
_abstract = /datum/asset/iconsheet
var/name // Name of the iconsheet. Asset will be named after this.
var/verify = FALSE
/datum/asset/iconsheet/register(var/list/sprites)
if (!name)
CRASH("iconsheet [type] cannot register without a name")
if (!islist(sprites))
CRASH("iconsheet [type] cannot register without a sprites list")
var/res_name = "iconsheet_[name].css"
var/fname = "data/iconsheets/[res_name]"
fdel(fname)
text2file(generate_css(sprites), fname)
register_asset(res_name, fcopy_rsc(fname))
fdel(fname)
/datum/asset/iconsheet/send(client/C)
if (!name)
return
send_asset_list(C, list("iconsheet_[name].css"), verify)
/datum/asset/iconsheet/proc/generate_css(var/list/sprites)
var/list/out = list(".[name]{display:inline-block;}")
for(var/sprite_id in sprites)
var/icon/I = sprites[sprite_id]
var/data_url = "'data:image/png;base64,[icon2base64(I)]'"
out += ".[name].[sprite_id]{width:[I.Width()]px;height:[I.Height()]px;background-image:url([data_url]);}"
return out.Join("\n")
/datum/asset/iconsheet/proc/build_sprite_list(icon/I, list/directions, prefix = null)
if (length(prefix))
prefix = "[prefix]-"
if (!directions)
directions = list(SOUTH)
var/sprites = list()
for (var/icon_state_name in cached_icon_states(I))
for (var/direction in directions)
var/suffix = (directions.len > 1) ? "-[dir2text(direction)]" : ""
var/sprite_name = "[prefix][icon_state_name][suffix]"
var/icon/sprite = icon(I, icon_state=icon_state_name, dir=direction, frame=1, moving=FALSE)
if (!sprite || !length(cached_icon_states(sprite))) // that direction or state doesn't exist
continue
sprites[sprite_name] = sprite
return sprites
// Get HTML link tag for including the iconsheet css file.
/datum/asset/iconsheet/proc/css_tag()
return "<link rel='stylesheet' href='iconsheet_[name].css' />"
// get HTML tag for showing an icon
/datum/asset/iconsheet/proc/icon_tag(icon_state, dir = SOUTH)
return "<span class='[name] [icon_state]-[dir2text(dir)]'></span>"
//DEFINITIONS FOR ASSET DATUMS START HERE.
/datum/asset/simple/generic
assets = list(
"search.js" = 'html/search.js',
"panels.css" = 'html/panels.css',
"loading.gif" = 'html/images/loading.gif',
"ntlogo.png" = 'html/images/ntlogo.png',
"sglogo.png" = 'html/images/sglogo.png',
"talisman.png" = 'html/images/talisman.png',
"paper_bg.png" = 'html/images/paper_bg.png',
"no_image32.png" = 'html/images/no_image32.png',
)
/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',
"chevron.png" = 'html/chevron.png',
"chevron-expand.png" = 'html/chevron-expand.png',
"changelog.css" = 'html/changelog.css',
"changelog.js" = 'html/changelog.js',
"changelog.html" = 'html/changelog.html'
)
/datum/asset/nanoui
var/list/common = list()
var/list/common_dirs = list(
"nano/css/",
"nano/images/",
"nano/images/modular_computers/",
"nano/js/"
)
var/list/template_dirs = list(
"nano/templates/"
)
/datum/asset/nanoui/register()
// Crawl the directories to find files.
for(var/path in common_dirs)
var/list/filenames = flist(path)
for(var/filename in filenames)
if(copytext(filename, length(filename)) != "/") // Ignore directories.
if(fexists(path + filename))
common[filename] = fcopy_rsc(path + filename)
register_asset(filename, common[filename])
// Combine all templates into a single bundle.
var/list/template_data = list()
for(var/path in template_dirs)
var/list/filenames = flist(path)
for(var/filename in filenames)
if(copytext(filename, length(filename) - 4) == ".tmpl") // Ignore directories.
template_data[filename] = file2text(path + filename)
var/template_bundle = "function nanouiTemplateBundle(){return [json_encode(template_data)];}"
var/fname = "data/nano_templates_bundle.js"
fdel(fname)
text2file(template_bundle, fname)
register_asset("nano_templates_bundle.js", fcopy_rsc(fname))
fdel(fname)
/datum/asset/nanoui/send(client)
send_asset_list(client, common)
// VOREStation Add Start - pipes iconsheet asset
/datum/asset/iconsheet/pipes
name = "pipes"
/datum/asset/iconsheet/pipes/register()
var/list/sprites = list()
for (var/each in list('icons/obj/pipe-item.dmi', 'icons/obj/pipes/disposal.dmi'))
sprites += build_sprite_list(each, global.alldirs)
..(sprites)
// VOREStation Add End
+15
View File
@@ -59,3 +59,18 @@
preload_rsc = PRELOAD_RSC
var/global/obj/screen/click_catcher/void
// List of all asset filenames sent to this client by the asset cache, along with their assoicated md5s
var/list/sent_assets = list()
/// List of all completed blocking send jobs awaiting acknowledgement by send_asset
var/list/completed_asset_jobs = list()
/// Last asset send job id.
var/last_asset_job = 0
var/last_completed_asset_job = 0
///world.time they connected
var/connection_time
///world.realtime they connected
var/connection_realtime
///world.timeofday they connected
var/connection_timeofday
+27 -4
View File
@@ -34,10 +34,12 @@
#endif
// asset_cache
var/asset_cache_job
if(href_list["asset_cache_confirm_arrival"])
var/job = text2num(href_list["asset_cache_confirm_arrival"])
completed_asset_jobs += job
return
asset_cache_job = asset_cache_confirm_arrival(href_list["asset_cache_confirm_arrival"])
if (!asset_cache_job)
return
//search the href for script injection
if( findtext(href,"<script",1,0) )
@@ -46,6 +48,10 @@
//del(usr)
return
// Tgui Topic middleware
if(!tgui_Topic(href_list))
return
//Admin PM
if(href_list["priv_msg"])
var/client/C = locate(href_list["priv_msg"])
@@ -106,6 +112,15 @@
if(config && config.log_hrefs && href_logfile)
WRITE_LOG(href_logfile, "[src] (usr:[usr])</small> || [hsrc ? "[hsrc] " : ""][href]")
//byond bug ID:2256651
if (asset_cache_job && (asset_cache_job in completed_asset_jobs))
to_chat(src, "<span class='danger'>An error has been detected in how your client is receiving resources. Attempting to correct.... (If you keep seeing these messages you might want to close byond and reconnect)</span>")
src << browse("...", "window=asset_cache_browser")
return
if (href_list["asset_cache_preload_data"])
asset_cache_preload_data(href_list["asset_cache_preload_data"])
return
switch(href_list["_src_"])
if("holder") hsrc = holder
if("usr") hsrc = mob
@@ -181,6 +196,10 @@
. = ..() //calls mob.Login()
prefs.sanitize_preferences()
connection_time = world.time
connection_realtime = world.realtime
connection_timeofday = world.timeofday
if(custom_event_msg && custom_event_msg != "")
to_chat(src, "<h1 class='alert'>Custom Event</h1>")
to_chat(src, "<h2 class='alert'>A custom event is taking place. OOC Info:</h2>")
@@ -408,8 +427,12 @@
//send resources to the client. It's here in its own proc so we can move it around easiliy if need be
/client/proc/send_resources()
spawn (10) //removing this spawn causes all clients to not get verbs.
//load info on what assets the client has
src << browse('code/modules/asset_cache/validate_assets.html', "window=asset_cache_browser")
//Precache the client with all other assets slowly, so as to not block other browse() calls
getFilesSlow(src, SSassets.preload, register_asset = FALSE)
addtimer(CALLBACK(GLOBAL_PROC, /proc/getFilesSlow, src, SSassets.preload, FALSE), 5 SECONDS)
mob/proc/MayRespawn()
return 0
@@ -336,7 +336,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
. += " Style: <a href='?src=\ref[src];hair_style_left=[pref.h_style]'><</a> <a href='?src=\ref[src];hair_style_right=[pref.h_style]''>></a> <a href='?src=\ref[src];hair_style=1'>[pref.h_style]</a><br>" //The <</a> & ></a> in this line is correct-- those extra characters are the arrows you click to switch between styles.
. += "<b>Gradient</b><br>"
. += "<a href='?src=\ref[src];grad_color=1'>Change Color</a> [color_square(pref.r_grad, pref.g_grad, pref.b_grad)] "
. += "<a href='?src=\ref[src];grad_color=1'>Change Color</a> [color_square(pref.r_grad, pref.g_grad, pref.b_grad)] "
. += " Style: <a href='?src=\ref[src];grad_style_left=[pref.grad_style]'><</a> <a href='?src=\ref[src];grad_style_right=[pref.grad_style]''>></a> <a href='?src=\ref[src];grad_style=1'>[pref.grad_style]</a><br>"
. += "<br><b>Facial</b><br>"
@@ -9,6 +9,10 @@
S["ooccolor"] >> pref.ooccolor
S["tooltipstyle"] >> pref.tooltipstyle
S["client_fps"] >> pref.client_fps
S["ambience_freq"] >> pref.ambience_freq
S["ambience_chance"] >> pref.ambience_chance
S["tgui_fancy"] >> pref.tgui_fancy
S["tgui_lock"] >> pref.tgui_lock
/datum/category_item/player_setup_item/player_global/ui/save_preferences(var/savefile/S)
S["UI_style"] << pref.UI_style
@@ -17,28 +21,40 @@
S["ooccolor"] << pref.ooccolor
S["tooltipstyle"] << pref.tooltipstyle
S["client_fps"] << pref.client_fps
S["ambience_freq"] << pref.ambience_freq
S["ambience_chance"] << pref.ambience_freq
S["tgui_fancy"] << pref.tgui_fancy
S["tgui_lock"] << pref.tgui_lock
/datum/category_item/player_setup_item/player_global/ui/sanitize_preferences()
pref.UI_style = sanitize_inlist(pref.UI_style, all_ui_styles, initial(pref.UI_style))
pref.UI_style_color = sanitize_hexcolor(pref.UI_style_color, initial(pref.UI_style_color))
pref.UI_style_alpha = sanitize_integer(pref.UI_style_alpha, 0, 255, initial(pref.UI_style_alpha))
pref.ooccolor = sanitize_hexcolor(pref.ooccolor, initial(pref.ooccolor))
pref.tooltipstyle = sanitize_inlist(pref.tooltipstyle, all_tooltip_styles, initial(pref.tooltipstyle))
pref.client_fps = sanitize_integer(pref.client_fps, 0, MAX_CLIENT_FPS, initial(pref.client_fps))
pref.UI_style = sanitize_inlist(pref.UI_style, all_ui_styles, initial(pref.UI_style))
pref.UI_style_color = sanitize_hexcolor(pref.UI_style_color, initial(pref.UI_style_color))
pref.UI_style_alpha = sanitize_integer(pref.UI_style_alpha, 0, 255, initial(pref.UI_style_alpha))
pref.ooccolor = sanitize_hexcolor(pref.ooccolor, initial(pref.ooccolor))
pref.tooltipstyle = sanitize_inlist(pref.tooltipstyle, all_tooltip_styles, initial(pref.tooltipstyle))
pref.client_fps = sanitize_integer(pref.client_fps, 0, MAX_CLIENT_FPS, initial(pref.client_fps))
pref.ambience_freq = sanitize_integer(pref.ambience_freq, 0, 60, initial(pref.ambience_freq)) // No more than once per hour.
pref.ambience_chance = sanitize_integer(pref.ambience_chance, 0, 100, initial(pref.ambience_chance)) // 0-100 range.
pref.tgui_fancy = sanitize_integer(pref.tgui_fancy, 0, 1, initial(pref.tgui_fancy))
pref.tgui_lock = sanitize_integer(pref.tgui_lock, 0, 1, initial(pref.tgui_lock))
/datum/category_item/player_setup_item/player_global/ui/content(var/mob/user)
. = "<b>UI Style:</b> <a href='?src=\ref[src];select_style=1'><b>[pref.UI_style]</b></a><br>"
. += "<b>Custom UI</b> (recommended for White UI):<br>"
. += "-Color: <a href='?src=\ref[src];select_color=1'><b>[pref.UI_style_color]</b></a> [color_square(hex = pref.UI_style_color)] <a href='?src=\ref[src];reset=ui'>reset</a><br>"
. += "-Alpha(transparency): <a href='?src=\ref[src];select_alpha=1'><b>[pref.UI_style_alpha]</b></a> <a href='?src=\ref[src];reset=alpha'>reset</a><br>"
. += "-Color: <a href='?src=\ref[src];select_color=1'><b>[pref.UI_style_color]</b></a>[color_square(hex = pref.UI_style_color)]<a href='?src=\ref[src];reset=ui'>reset</a><br>"
. += "-Alpha(transparency): <a href='?src=\ref[src];select_alpha=1'><b>[pref.UI_style_alpha]</b></a><a href='?src=\ref[src];reset=alpha'>reset</a><br>"
. += "<b>Tooltip Style:</b> <a href='?src=\ref[src];select_tooltip_style=1'><b>[pref.tooltipstyle]</b></a><br>"
. += "<b>Client FPS:</b> <a href='?src=\ref[src];select_client_fps=1'><b>[pref.client_fps]</b></a><br>"
. += "<b>Random Ambience Frequency:</b> <a href='?src=\ref[src];select_ambience_freq=1'><b>[pref.ambience_freq]</b></a><br>"
. += "<b>Ambience Chance:</b> <a href='?src=\ref[src];select_ambience_chance=1'><b>[pref.ambience_chance]</b></a><br>"
. += "<b>tgui Window Mode:</b> <a href='?src=\ref[src];tgui_fancy=1'><b>[(pref.tgui_fancy) ? "Fancy (default)" : "Compatible (slower)"]</b></a><br>"
. += "<b>tgui Window Placement:</b> <a href='?src=\ref[src];tgui_lock=1'><b>[(pref.tgui_lock) ? "Primary Monitor" : "Free (default)"]</b></a><br>"
if(can_select_ooc_color(user))
. += "<b>OOC Color:</b> "
. += "<b>OOC Color:</b>"
if(pref.ooccolor == initial(pref.ooccolor))
. += "<a href='?src=\ref[src];select_ooc_color=1'><b>Using Default</b></a><br>"
else
. += "<a href='?src=\ref[src];select_ooc_color=1'><b>[pref.ooccolor]</b></a> [color_square(hex = pref.ooccolor)] <a href='?src=\ref[src];reset=ooc'>reset</a><br>"
. += "<a href='?src=\ref[src];select_ooc_color=1'><b>[pref.ooccolor]</b></a> [color_square(hex = pref.ooccolor)]<a href='?src=\ref[src];reset=ooc'>reset</a><br>"
/datum/category_item/player_setup_item/player_global/ui/OnTopic(var/href,var/list/href_list, var/mob/user)
if(href_list["select_style"])
@@ -79,6 +95,28 @@
if(pref.client)
pref.client.fps = fps_new
return TOPIC_REFRESH
else if(href_list["select_ambience_freq"])
var/ambience_new = input(user, "Input how often you wish to hear ambience repeated! (1-60 MINUTES, 0 for disabled)", "Global Preference", pref.ambience_freq) as null|num
if(isnull(ambience_new) || !CanUseTopic(user)) return TOPIC_NOACTION
if(ambience_new < 0 || ambience_new > 60) return TOPIC_NOACTION
pref.ambience_freq = ambience_new
return TOPIC_REFRESH
else if(href_list["select_ambience_chance"])
var/ambience_chance_new = input(user, "Input the chance you'd like to hear ambience played to you (On area change, or by random ambience). 35 means a 35% chance to play ambience. This is a range from 0-100. 0 disables ambience playing entirely. This is also affected by Ambience Frequency.", "Global Preference", pref.ambience_freq) as null|num
if(isnull(ambience_chance_new) || !CanUseTopic(user)) return TOPIC_NOACTION
if(ambience_chance_new < 0 || ambience_chance_new > 100) return TOPIC_NOACTION
pref.ambience_chance = ambience_chance_new
return TOPIC_REFRESH
else if(href_list["tgui_fancy"])
pref.tgui_fancy = !pref.tgui_fancy
return TOPIC_REFRESH
else if(href_list["tgui_lock"])
pref.tgui_lock = !pref.tgui_lock
return TOPIC_REFRESH
else if(href_list["reset"])
switch(href_list["reset"])
@@ -266,6 +266,18 @@ var/list/_client_preferences_by_type
enabled_description = "Enabled"
disabled_description = "Disabled"
/datum/client_preference/status_indicators
description = "Status Indicators"
key = "SHOW_STATUS"
enabled_description = "Show"
disabled_description = "Hide"
/datum/client_preference/status_indicators/toggled(mob/preference_mob, enabled)
. = ..()
if(preference_mob && preference_mob.plane_holder)
var/datum/plane_holder/PH = preference_mob.plane_holder
PH.set_vis(VIS_STATUS, enabled)
/********************
* Staff Preferences *
********************/
@@ -115,6 +115,15 @@
scarfs[initial(scarf_type.name)] = scarf_type
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(scarfs))
/datum/gear/accessory/scarfcolor
display_name = "scarf (recolorable)"
path = /obj/item/clothing/accessory/scarf/white
cost = 1
/datum/gear/accessory/scarfcolor/New()
..()
gear_tweaks = list(gear_tweak_free_color_choice)
/datum/gear/accessory/jacket
display_name = "suit jacket selection"
path = /obj/item/clothing/accessory/jacket
@@ -279,3 +288,7 @@
/datum/gear/accessory/cowledvest
display_name = "cowled vest"
path = /obj/item/clothing/accessory/cowledvest
/datum/gear/accessory/asymovercoat
display_name = "orange asymmetrical overcoat"
path = /obj/item/clothing/accessory/asymovercoat
@@ -183,12 +183,6 @@
ckeywhitelist = list("cockatricexl")
character_name = list("James Holder")
/datum/gear/fluff/jasmine_implant
path = /obj/item/weapon/implanter/reagent_generator/jasmine
display_name = "Jasmine's Implant"
ckeywhitelist = list("cameron653")
character_name = list("Jasmine Lizden")
/datum/gear/fluff/diana_robe
path = /obj/item/clothing/suit/fluff/purp_robes
display_name = "Diana's Robes"
@@ -310,11 +304,6 @@
allowed_roles = list("Explorer")
// G CKEYS
/datum/gear/fluff/eldi_implant
path = /obj/item/weapon/implanter/reagent_generator/eldi
display_name = "Eldi's Implant"
ckeywhitelist = list("gowst")
character_name = list("Eldi Moljir")
// H CKEYS
/datum/gear/fluff/lauren_medal
@@ -335,12 +324,6 @@
ckeywhitelist = list("hottokeeki")
character_name = list("Belle Day")
/datum/gear/fluff/belle_implant
path = /obj/item/weapon/implanter/reagent_generator/belle
display_name = "Belle's Implant"
ckeywhitelist = list("hottokeeki")
character_name = list("Belle Day")
// I CKEYS
/datum/gear/fluff/ruda_badge
path = /obj/item/clothing/accessory/badge/holo/detective/ruda
@@ -553,12 +536,6 @@
ckeywhitelist = list("kiwidaninja")
character_name = list("Chakat Taiga")
/datum/gear/fluff/rischi_implant
path = /obj/item/weapon/implanter/reagent_generator/rischi
display_name = "Rischi's Implant"
ckeywhitelist = list("konabird")
character_name = list("Rischi")
/datum/gear/fluff/ashley_medal
path = /obj/item/clothing/accessory/medal/nobel_science/fluff/ashley
display_name = "Ashley's Medal"
@@ -580,12 +557,6 @@
ckeywhitelist = list("luminescentring")
character_name = list("Briana Moore")
/datum/gear/fluff/savannah_implant
path = /obj/item/weapon/implanter/reagent_generator/savannah
display_name = "Savannah's Implant"
ckeywhitelist = list("lycanthorph")
character_name = list("Savannah Dixon")
// M CKEYS
/datum/gear/fluff/phi_box
path = /obj/item/weapon/storage/box/fluff/phi
@@ -842,12 +813,6 @@
ckeywhitelist = list("silvertalismen")
character_name = list("Tasy Ruffles")
/datum/gear/fluff/evian_implant
path = /obj/item/weapon/implanter/reagent_generator/evian
display_name = "Evian's Implant"
ckeywhitelist = list("silvertalismen")
character_name = list("Evian")
/datum/gear/fluff/fortune_backpack
path = /obj/item/weapon/storage/backpack/satchel/fluff/swat43bag
display_name = "Fortune's Backpack"
@@ -861,12 +826,6 @@
ckeywhitelist = list("stobarico")
character_name = list("Alexis Bloise")
/datum/gear/fluff/roiz_implant
path = /obj/item/weapon/implanter/reagent_generator/roiz
display_name = "Roiz's Implant"
ckeywhitelist = list("spoopylizz")
character_name = list("Roiz Lizden")
/datum/gear/fluff/roiz_coat
path = /obj/item/clothing/suit/storage/hooded/wintercoat/roiz
display_name = "Roiz's Coat"
@@ -1020,12 +979,6 @@
ckeywhitelist = list("vorrarkul")
character_name = list("Theodora Lindt")
/datum/gear/fluff/theodora_implant
path = /obj/item/weapon/implanter/reagent_generator/vorrarkul
display_name = "Theodora's Implant"
ckeywhitelist = list("vorrarkul")
character_name = list("Theodora Lindt")
/datum/gear/fluff/kaitlyn_plush
path = /obj/item/toy/plushie/mouse/fluff
display_name = "Kaitlyn's Mouse Plush"
@@ -1102,12 +1055,6 @@
ckeywhitelist = list("wickedtemp")
character_name = list("Chakat Tempest Venosare")
/datum/gear/fluff/tempest_implant
path = /obj/item/weapon/implanter/reagent_generator/tempest
display_name = "Tempest's Implant"
ckeywhitelist = list("wickedtemp")
character_name = list("Chakat Tempest Venosare")
// X CKEYS
/datum/gear/fluff/penelope_box
path = /obj/item/weapon/storage/box/fluff/penelope
@@ -0,0 +1,12 @@
/datum/gear/ball
display_name = "tennis ball selection"
description = "Choose from a num- BALL!"
path = /obj/item/toy/tennis
/datum/gear/ball/New()
..()
var/list/balls = list()
for(var/ball in typesof(/obj/item/toy/tennis/))
var/obj/item/toy/tennis/ball_type = ball
balls[initial(ball_type.name)] = ball_type
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(balls))
@@ -366,4 +366,20 @@
/datum/gear/head/jingasa
display_name = "jingasa"
path = /obj/item/clothing/head/jingasa
path = /obj/item/clothing/head/jingasa
/datum/gear/head/sunflower_crown
display_name = "sunflower crown"
path = /obj/item/clothing/head/sunflower_crown
/datum/gear/head/lavender_crown
display_name = "lavender crown"
path = /obj/item/clothing/head/lavender_crown
/datum/gear/head/poppy_crown
display_name = "poppy crown"
path = /obj/item/clothing/head/poppy_crown
/datum/gear/head/rose_crown
display_name = "rose crown"
path = /obj/item/clothing/head/rose_crown
@@ -20,4 +20,8 @@
/datum/gear/mask/sterile
display_name = "sterile mask"
path = /obj/item/clothing/mask/surgical
cost = 2
cost = 2
/datum/gear/mask/veil
display_name = "black veil"
path = /obj/item/clothing/mask/veil
@@ -77,7 +77,7 @@
/datum/gear/suit/mil
display_name = "military jacket selection"
path = /obj/item/clothing/suit/storage/miljacket
/datum/gear/suit/mil/New()
..()
var/list/mil_jackets = list()
@@ -556,4 +556,36 @@
/datum/gear/uniform/haltertop
display_name = "halter top"
path = /obj/item/clothing/under/haltertop
path = /obj/item/clothing/under/haltertop
/datum/gear/uniform/revealingdress
display_name = "revealing dress"
path = /obj/item/clothing/under/dress/revealingdress
/datum/gear/uniform/rippedpunk
display_name = "ripped punk jeans"
path = /obj/item/clothing/under/rippedpunk
/datum/gear/uniform/gothic
display_name = "gothic dress"
path = /obj/item/clothing/under/dress/gothic
/datum/gear/uniform/formalred
display_name = "formal red dress"
path = /obj/item/clothing/under/dress/formalred
/datum/gear/uniform/pentagram
display_name = "pentagram dress"
path = /obj/item/clothing/under/dress/pentagram
/datum/gear/uniform/yellowswoop
display_name = "yellow swooped dress"
path = /obj/item/clothing/under/dress/yellowswoop
/datum/gear/uniform/greenasym
display_name = "green asymmetrical jumpsuit"
path = /obj/item/clothing/under/greenasym
/datum/gear/uniform/cyberpunkharness
display_name = "cyberpunk strapped harness"
path = /obj/item/clothing/under/cyberpunkharness
@@ -411,5 +411,15 @@
sort_category = "Xenowear"
/datum/gear/suit/teshcoatwhite/New()
..()
gear_tweaks = list(gear_tweak_free_color_choice)
/datum/gear/accessory/teshneckscarf
display_name = "neckscarf, recolorable (Teshari)"
path = /obj/item/clothing/accessory/scarf/teshari/neckscarf
whitelisted = SPECIES_TESHARI
sort_category = "Xenowear"
/datum/gear/accessory/teshneckscarf/New()
..()
gear_tweaks = list(gear_tweak_free_color_choice)
+7
View File
@@ -23,6 +23,11 @@ datum/preferences
var/UI_style_alpha = 255
var/tooltipstyle = "Midnight" //Style for popup tooltips
var/client_fps = 0
var/ambience_freq = 5 // How often we're playing repeating ambience to a client.
var/ambience_chance = 35 // What's the % chance we'll play ambience (in conjunction with the above frequency)
var/tgui_fancy = TRUE
var/tgui_lock = FALSE
//character preferences
var/real_name //our character's name
@@ -336,6 +341,8 @@ datum/preferences
else if(href_list["resetslot"])
if("No" == alert("This will reset the current slot. Continue?", "Reset current slot?", "No", "Yes"))
return 0
if("No" == alert("Are you completely sure that you want to reset this character slot?", "Reset current slot?", "No", "Yes"))
return 0
load_character(SAVE_RESET)
sanitize_preferences()
else if(href_list["copy"])
@@ -334,6 +334,19 @@
You will have to reload VChat and/or reconnect to the server for these changes to take place. \
VChat message persistence is not guaranteed if you change this again before the start of the next round.")
/client/verb/toggle_status_indicators()
set name = "Toggle Status Indicators"
set category = "Preferences"
set desc = "Enable/Disable seeing status indicators over peoples' heads."
var/pref_path = /datum/client_preference/status_indicators
toggle_preference(pref_path)
SScharacter_setup.queue_preferences_save(prefs)
to_chat(src, "You will now [(is_preference_enabled(/datum/client_preference/status_indicators)) ? "see" : "not see"] status indicators.")
feedback_add_details("admin_verb","TStatusIndicators")
// Not attached to a pref datum because those are strict binary toggles
/client/verb/toggle_examine_mode()