mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
Merge branch 'master' of https://github.com/tgstation/tgstation into upstream-25-02a
This commit is contained in:
@@ -42,7 +42,7 @@
|
||||
*
|
||||
* required user mob The mob interacting with the UI.
|
||||
*
|
||||
* return list Statuic Data to be sent to the UI.
|
||||
* return list Static Data to be sent to the UI.
|
||||
*/
|
||||
/datum/proc/ui_static_data(mob/user)
|
||||
return list()
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
// Disable UIs if unconscious.
|
||||
else if(stat)
|
||||
return UI_DISABLED
|
||||
// Update UIs if incapicitated but concious.
|
||||
// Update UIs if incapicitated but conscious.
|
||||
else if(incapacitated)
|
||||
return UI_UPDATE
|
||||
return UI_INTERACTIVE
|
||||
|
||||
@@ -50,7 +50,9 @@
|
||||
|
||||
/// Returns a UI status such that those without blocked hands will be able to interact,
|
||||
/// but everyone else can only watch.
|
||||
/proc/ui_status_user_has_free_hands(mob/user, atom/source)
|
||||
/proc/ui_status_user_has_free_hands(mob/user, atom/source, allowed_source)
|
||||
if(allowed_source)
|
||||
return HAS_TRAIT_NOT_FROM(user, TRAIT_HANDS_BLOCKED, allowed_source) ? UI_UPDATE : UI_INTERACTIVE
|
||||
return HAS_TRAIT(user, TRAIT_HANDS_BLOCKED) ? UI_UPDATE : UI_INTERACTIVE
|
||||
|
||||
/// Returns a UI status such that advanced tool users will be able to interact,
|
||||
@@ -110,3 +112,11 @@
|
||||
return UI_CLOSE
|
||||
|
||||
return UI_INTERACTIVE
|
||||
|
||||
/// Return UI_INTERACTIVE if the user is inside the target atom, whether they can see it or not.
|
||||
/// Return UI_CLOSE otherwise.
|
||||
/proc/ui_status_user_inside(mob/user, atom/target)
|
||||
if(target.contains(user))
|
||||
return UI_INTERACTIVE
|
||||
|
||||
return UI_CLOSE
|
||||
|
||||
@@ -246,7 +246,10 @@
|
||||
json_data["config"] = list(
|
||||
"title" = title,
|
||||
"status" = status,
|
||||
"interface" = interface,
|
||||
"interface" = list(
|
||||
"name" = interface,
|
||||
"layout" = user.client.prefs.read_preference(/datum/preference/choiced/tgui_layout),
|
||||
),
|
||||
"refreshing" = refreshing,
|
||||
"window" = list(
|
||||
"key" = window_key,
|
||||
|
||||
Reference in New Issue
Block a user