* tgui 516

* nuking

* .

* .

* redux test

* this

* no longer in use

* removes debugs for now until someone ports the macro handling

* import types

* .

* maxWidth

* temp fix

* fix type import

* fix that

* also that

* version up

* also push this while on it

* rid of that

* dependency up

* allow mark up inputs

* update

* mb to search

* add scroll to nanoMap

* type fixing

* Update ExportTab.tsx

* Update index.tsx

* Update XenoarchReplicator.tsx

* Update XenoarchReplicator_clothing_vr.tsx

* Update XenoarchReplicator_clothing_vr.tsx

* Update XenoarchReplicator.tsx

* crew monitor improvements

* types
This commit is contained in:
Kashargul
2025-02-13 18:30:38 +01:00
committed by GitHub
parent 32c323ece8
commit 542b35e56f
422 changed files with 1193 additions and 1595 deletions
-7
View File
@@ -5,13 +5,6 @@
"tgui.bundle.css" = file("tgui/public/tgui.bundle.css"),
)
/datum/asset/simple/tgui_edge
keep_local_name = TRUE
assets = list(
"tgui.bundle.edge.js" = file("tgui/public/tgui.bundle.edge.js"),
"tgui.bundle.edge.css" = file("tgui/public/tgui.bundle.edge.css"),
)
/datum/asset/simple/tgui_panel
keep_local_name = TRUE
assets = list(
+4 -20
View File
@@ -223,9 +223,7 @@
//CONNECT//
///////////
/client/New(TopicData)
// TODO: Remove version check with 516
if(byond_version >= 516) // Enable 516 compat browser storage mechanisms
winset(src, null, "browser-options=[DEFAULT_CLIENT_BROWSER_OPTIONS]")
winset(src, null, "browser-options=[DEFAULT_CLIENT_BROWSER_OPTIONS]")
TopicData = null //Prevent calls to client.Topic from connect
@@ -349,11 +347,9 @@
fully_created = TRUE
attempt_auto_fit_viewport()
// TODO: Remove version check with 516
if(byond_version >= 516)
// Now that we're fully initialized, use our prefs
if(prefs?.read_preference(/datum/preference/toggle/browser_dev_tools))
winset(src, null, "browser-options=[DEFAULT_CLIENT_BROWSER_OPTIONS],devtools")
// Now that we're fully initialized, use our prefs
if(prefs?.read_preference(/datum/preference/toggle/browser_dev_tools))
winset(src, null, "browser-options=[DEFAULT_CLIENT_BROWSER_OPTIONS],devtools")
//////////////
//DISCONNECT//
@@ -665,18 +661,6 @@
src << browse("<html>[message]</html>","window=dropmessage;size=480x360;can_close=1")
qdel(src)
/// Keydown event in a tgui window this client has open. Has keycode passed to it.
/client/verb/TguiKeyDown(keycode as text)
set name = "TguiKeyDown"
set hidden = TRUE
return // stub
/// Keyup event in a tgui window this client has open. Has keycode passed to it.
/client/verb/TguiKeyUp(keycode as text) // Doesn't seem to currently fire?
set name = "TguiKeyUp"
set hidden = TRUE
return // stub
/client/verb/toggle_fullscreen()
set name = "Toggle Fullscreen"
set category = "OOC.Client Settings"
@@ -338,7 +338,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
var/key = pref.rlimb_data[name]
if(!istext(key))
log_debug("Bad rlimb_data for [key_name(pref.client)], [name] was set to [key]")
to_chat(user, span_warning("Error loading robot limb data for `[name]`, clearing pref."))
to_chat(usr, span_warning("Error loading robot limb data for `[name]`, clearing pref."))
pref.rlimb_data -= name
else
R = LAZYACCESS(all_robolimbs, key)
@@ -549,7 +549,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
pref.set_biological_gender(mob_species.genders[1])
pref.custom_species = null
//grab one of the valid hair styles for the newly chosen species
var/list/valid_hairstyles = pref.get_valid_hairstyles(user)
var/list/valid_hairstyles = pref.get_valid_hairstyles()
if(valid_hairstyles.len)
if(!(pref.h_style in valid_hairstyles))
@@ -601,7 +601,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
return TOPIC_REFRESH_UPDATE_PREVIEW
else if(href_list["hair_style"])
var/list/valid_hairstyles = pref.get_valid_hairstyles(user)
var/list/valid_hairstyles = pref.get_valid_hairstyles()
var/new_h_style = tgui_input_list(user, "Choose your character's hair style:", "Character Preference", valid_hairstyles, pref.h_style)
if(new_h_style && CanUseTopic(user))
@@ -618,7 +618,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
else if(href_list["hair_style_left"])
var/H = href_list["hair_style_left"]
var/list/valid_hairstyles = pref.get_valid_hairstyles(user)
var/list/valid_hairstyles = pref.get_valid_hairstyles()
var/start = valid_hairstyles.Find(H)
if(start != 1) //If we're not the beginning of the list, become the previous element.
@@ -629,7 +629,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
else if(href_list["hair_style_right"])
var/H = href_list["hair_style_right"]
var/list/valid_hairstyles = pref.get_valid_hairstyles(user)
var/list/valid_hairstyles = pref.get_valid_hairstyles()
var/start = valid_hairstyles.Find(H)
if(start != valid_hairstyles.len) //If we're not the end of the list, become the next element.
@@ -1043,7 +1043,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
return TOPIC_REFRESH_UPDATE_PREVIEW
else if(href_list["ear_color2"])
var/new_earc2 = tgui_color_picker(user, "Choose your character's ear colour:", "Character Preference",
var/new_earc2 = tgui_color_picker(user, "Choose your character's secondary ear colour:", "Character Preference",
pref.read_preference(/datum/preference/color/human/ears_color2))
if(new_earc2)
pref.update_preference_by_type(/datum/preference/color/human/ears_color2, new_earc2)
@@ -81,7 +81,7 @@
savefile_identifier = PREFERENCE_PLAYER
minimum = 1
maximum = 5
maximum = 20
step = 1
/datum/preference/numeric/tgui_say_height/create_default_value()
@@ -90,6 +90,22 @@
/datum/preference/numeric/tgui_say_height/apply_to_client(client/client, value)
client.tgui_say?.load()
/datum/preference/numeric/tgui_say_width
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "tgui_say_width"
savefile_identifier = PREFERENCE_PLAYER
minimum = 360
maximum = 800
step = 20
/datum/preference/numeric/tgui_say_width/create_default_value()
return 360
/datum/preference/numeric/tgui_say_width/apply_to_client(client/client, value)
client.tgui_say?.load()
/datum/preference/text/preset_colors
category = PREFERENCE_CATEGORY_MANUALLY_RENDERED
savefile_identifier = PREFERENCE_PLAYER
@@ -25,7 +25,7 @@ var/global/list/MOVE_KEY_MAPPINGS = list(
// Validate input. Must be one (and only one) of the key codes)
if(isnull(movekey) || (movekey & ~0xFFF) || (movekey & (movekey - 1)))
log_debug("Client [ckey] sent an illegal movement key down: [movekeyName] ([movekey])")
// og_debug("Client [ckey] sent an illegal movement key down: [movekeyName] ([movekey])") // We forward tgui keys nowadays
return
// Record that we are now holding the key!
@@ -57,7 +57,7 @@ var/global/list/MOVE_KEY_MAPPINGS = list(
// Validate input. Must be one (and only one) of the key codes)
if(isnull(movekey) || (movekey & ~0xFFF) || (movekey & (movekey - 1)))
log_debug("Client [ckey] sent an illegal movement key up: [movekeyName] ([movekey])")
// log_debug("Client [ckey] sent an illegal movement key up: [movekeyName] ([movekey])") // We forward tgui keys nowadays
return
// Clear bit indicating we were holding the key
+2 -5
View File
@@ -106,11 +106,8 @@
strict_mode = TRUE,
fancy = user.read_preference(/datum/preference/toggle/tgui_fancy),
assets = list(
// FIXME: Delete this when 516 is required!
user.client.byond_version >= 516 \
? get_asset_datum(/datum/asset/simple/tgui_edge) \
: get_asset_datum(/datum/asset/simple/tgui),
))
get_asset_datum(/datum/asset/simple/tgui),
))
else
window.send_message("ping")
send_assets()
+1 -1
View File
@@ -18,7 +18,7 @@
else
return
// Client does NOT have tgui_input on: Returns regular input
if(!user.client.prefs.read_preference(/datum/preference/toggle/tgui_input_mode) || user.client.byond_version < 516) // Todo, remove once virgo is on 516, but currently the TGUI interface is already programmed for edge
if(!user.client.prefs.read_preference(/datum/preference/toggle/tgui_input_mode))
return input(user, message, title, default) as color|null
var/datum/tgui_color_picker/picker = new(user, message, title, default, timeout, autofocus)
picker.tgui_interact(user)
+3 -1
View File
@@ -65,11 +65,13 @@
window_open = FALSE
var/minimumHeight = client?.prefs?.read_preference(/datum/preference/numeric/tgui_say_height) || 1
winset(client, "tgui_say", "pos=410,400;size=360,[(minimumHeight * 20) + 10];is-visible=0;")
var/minimumWidth = client?.prefs?.read_preference(/datum/preference/numeric/tgui_say_width) || 1
winset(client, "tgui_say", "pos=410,400;size=360,30;is-visible=0;")
window.send_message("props", list(
lightMode = client?.prefs?.read_preference(/datum/preference/toggle/tgui_say_light),
minimumHeight = minimumHeight,
minimumWidth = minimumWidth,
maxLength = max_length,
))
+3 -6
View File
@@ -32,12 +32,9 @@
tgui_panel.initialize(force = TRUE)
// Force show the panel to see if there are any errors
winset(src, "legacy_output_selector", "left=output_browser")
// TODO: Remove version check with 516
if(byond_version >= 516)
if(prefs?.read_preference(/datum/preference/toggle/browser_dev_tools))
winset(src, null, "browser-options=[DEFAULT_CLIENT_BROWSER_OPTIONS],devtools")
else
winset(src, null, "browser-options=[DEFAULT_CLIENT_BROWSER_OPTIONS]")
if(prefs?.read_preference(/datum/preference/toggle/browser_dev_tools))
winset(src, null, "browser-options=[DEFAULT_CLIENT_BROWSER_OPTIONS],devtools")
/client/verb/refresh_tgui()
set name = "Refresh TGUI"
+2 -1
View File
@@ -111,7 +111,8 @@ Notes:
last_target = null
/datum/tooltip/proc/do_hide()
winshow(owner, control, FALSE)
if(owner)
winshow(owner, control, FALSE)
/datum/tooltip/Destroy(force)
last_target = null