mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-11 15:15:32 +01:00
lobby screen subsystem (#17686)
* lobby screen subsystem * . * tgui core 3.1.5 * use unknown in the class * . * second * Didn't even know you could type components like this * . * dependency up * can we not use any... --------- Co-authored-by: ShadowLarkens <shadowlarkens@gmail.com>
This commit is contained in:
@@ -121,6 +121,7 @@ var/global/list/runlevel_flags = list(RUNLEVEL_LOBBY, RUNLEVEL_SETUP, RUNLEVEL_G
|
||||
// The numbers just define the ordering, they are meaningless otherwise.
|
||||
#define INIT_ORDER_SERVER_MAINT 93
|
||||
#define INIT_ORDER_ADMIN_VERBS 84 // needs to be pretty high, admins can't do much without it
|
||||
#define INIT_ORDER_LOBBY 82
|
||||
#define INIT_ORDER_WEBHOOKS 50
|
||||
#define INIT_ORDER_SQLITE 41
|
||||
#define INIT_ORDER_GARBAGE 40
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
GLOBAL_LIST_EMPTY(new_player_list) //all /mob/new_player, in theory all should have clients and those that don't are in the process of spawning and get deleted when done.
|
||||
@@ -0,0 +1,49 @@
|
||||
SUBSYSTEM_DEF(lobby_monitor)
|
||||
name = "Lobby Art"
|
||||
init_order = INIT_ORDER_LOBBY
|
||||
// init_stage = INITSTAGE_EARLY
|
||||
flags = SS_NO_INIT
|
||||
wait = 1 SECOND
|
||||
runlevels = ALL
|
||||
|
||||
/// The clients who we've waited a [wait] duration to start working. If they haven't, we reboot them
|
||||
var/to_reinitialize = list()
|
||||
|
||||
/datum/controller/subsystem/lobby_monitor/fire(resumed)
|
||||
var/list/new_players = GLOB.new_player_list
|
||||
|
||||
for(var/mob/new_player/player as anything in to_reinitialize)
|
||||
if(!player.client)
|
||||
continue
|
||||
|
||||
var/datum/tgui/ui = SStgui.get_open_ui(player, player)
|
||||
if(ui && player.lobby_window && player.lobby_window.status > TGUI_WINDOW_CLOSED)
|
||||
continue
|
||||
|
||||
log_tgui(player, "Reinitialized [player.client.ckey]'s lobby window: [ui ? "ui" : "no ui"], status: [player.lobby_window?.status].", "lobby_monitor/Fire")
|
||||
INVOKE_ASYNC(player, TYPE_PROC_REF(/mob/new_player, initialize_lobby_screen))
|
||||
|
||||
var/initialize_queue = list()
|
||||
for(var/mob/new_player/player as anything in new_players)
|
||||
if(!player.client)
|
||||
continue
|
||||
|
||||
if(player in to_reinitialize)
|
||||
continue
|
||||
|
||||
var/datum/tgui/ui = SStgui.get_open_ui(player, player)
|
||||
if(ui && player.lobby_window && player.lobby_window.status > TGUI_WINDOW_CLOSED)
|
||||
continue
|
||||
|
||||
initialize_queue += player
|
||||
|
||||
to_reinitialize = initialize_queue
|
||||
|
||||
/datum/controller/subsystem/lobby_monitor/Shutdown()
|
||||
var/datum/asset/our_asset = get_asset_datum(/datum/asset/simple/restart_animation)
|
||||
var/to_send = "<!DOCTYPE html><html lang='en'><head><meta http-equiv='X-UA-Compatible' content='IE=edge' /></head><body style='overflow: hidden;padding: 0 !important;margin: 0 !important'><div style='background-image: url([our_asset.get_url_mappings()["loading"]]);background-position:center;background-size:cover;position:absolute;width:100%;height:100%'></body></html>"
|
||||
|
||||
for(var/client/client as anything in GLOB.clients)
|
||||
winset(client, "lobby_browser", "is-disabled=false;is-visible=true")
|
||||
|
||||
client << browse(to_send, "window=lobby_browser")
|
||||
@@ -9,3 +9,8 @@
|
||||
// not actually a gif
|
||||
assets["lobby_bg.gif"] = pick(using_map.lobby_screens)
|
||||
. = ..()
|
||||
|
||||
/datum/asset/simple/restart_animation
|
||||
assets = list(
|
||||
"loading" = 'html/lobby/loading.gif'
|
||||
)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/mob/Logout()
|
||||
SStgui.on_logout(src) // Cleanup any TGUIs the user has open
|
||||
SEND_SIGNAL(src, COMSIG_MOB_LOGOUT)
|
||||
SStgui.on_logout(src) // Cleanup any TGUIs the user has open
|
||||
player_list -= src
|
||||
disconnect_time = world.realtime //VOREStation Addition: logging when we disappear.
|
||||
update_client_z(null)
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
initialize_lobby_screen()
|
||||
|
||||
player_list |= src
|
||||
GLOB.new_player_list += src
|
||||
|
||||
created_for = ckey
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/mob/new_player/Logout()
|
||||
ready = 0
|
||||
|
||||
GLOB.new_player_list -= src
|
||||
QDEL_NULL(lobby_window)
|
||||
disable_lobby_browser()
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
add_verb(src, /mob/proc/insidePanel)
|
||||
|
||||
/mob/new_player/Destroy()
|
||||
GLOB.new_player_list -= src
|
||||
if(manifest_dialog)
|
||||
QDEL_NULL(manifest_dialog)
|
||||
if(late_choices_dialog)
|
||||
|
||||
@@ -255,8 +255,8 @@
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
var/msg = "[user] starts to pry open the incision on [target]'s [affected.name] with \the [tool]."
|
||||
var/self_msg = "You start to pry open the incision on [target]'s [affected.name] with \the [tool]."
|
||||
var/msgBall = "Starts to pry open the incision on [target]'s [affected.name]"
|
||||
var/self_msgBall = "Prying open the incision on [affected.name]"
|
||||
var/msgBall = "starts to pry open the incision on [target]'s [affected.name]"
|
||||
var/self_msgBall = "prying open the incision on [affected.name]"
|
||||
if (target_zone == BP_TORSO)
|
||||
msg = "[user] starts to separate the ribcage and rearrange the organs in [target]'s torso with \the [tool]."
|
||||
self_msg = "You start to separate the ribcage and rearrange the organs in [target]'s torso with \the [tool]."
|
||||
@@ -264,8 +264,8 @@
|
||||
self_msgBall = "Separating ribcage and rearranging organs."
|
||||
if (target_zone == BP_GROIN)
|
||||
msg = "[user] starts to pry open the incision and rearrange the organs in [target]'s lower abdomen with \the [tool]."
|
||||
self_msg = "You start to pry open the incision and rearrange the organs in [target]'s lower abdomen with \the [tool]."
|
||||
msgBall = "Starts to pry open the incison and rearrange the organs in [target]'s lower abdomen"
|
||||
self_msg = "you start to pry open the incision and rearrange the organs in [target]'s lower abdomen with \the [tool]."
|
||||
msgBall = "starts to pry open the incison and rearrange the organs in [target]'s lower abdomen"
|
||||
user.visible_message(span_filter_notice("[msg]"), span_filter_notice("[self_msg]"))
|
||||
user.balloon_alert_visible(msgBall, self_msgBall)
|
||||
target.custom_pain("It feels like the skin on your [affected.name] is on fire!", 40)
|
||||
@@ -275,18 +275,18 @@
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
var/msg = span_notice("[user] keeps the incision open on [target]'s [affected.name] with \the [tool].")
|
||||
var/self_msg = span_notice("You keep the incision open on [target]'s [affected.name] with \the [tool].")
|
||||
var/msgBall = "Keeps the incision open on [target]'s [affected.name]"
|
||||
var/self_msgBall = "Keeping the incision open on \the [affected.name]"
|
||||
var/msgBall = "keeps the incision open on [target]'s [affected.name]"
|
||||
var/self_msgBall = "keeping the incision open on \the [affected.name]"
|
||||
if (target_zone == BP_TORSO)
|
||||
msg = span_notice("[user] keeps the ribcage open on [target]'s torso with \the [tool].")
|
||||
self_msg = span_notice("You keep the ribcage open on [target]'s torso with \the [tool].")
|
||||
msgBall = "Keeps the ribcage open on [target]'s torso."
|
||||
self_msgBall = "Keeping the ribcage open."
|
||||
msgBall = "keeps the ribcage open on [target]'s torso."
|
||||
self_msgBall = "keeping the ribcage open."
|
||||
if (target_zone == BP_GROIN)
|
||||
msg = span_notice("[user] keeps the incision open on [target]'s lower abdomen with \the [tool].")
|
||||
self_msg = span_notice("You keep the incision open on [target]'s lower abdomen with \the [tool].")
|
||||
msgBall = "Keeps the incision open on [target]'s lower abdomen."
|
||||
self_msgBall = "Keeping the incision open on the lower abdomen."
|
||||
msgBall = "keeps the incision open on [target]'s lower abdomen."
|
||||
self_msgBall = "keeping the incision open on the lower abdomen."
|
||||
user.visible_message(msg, self_msg)
|
||||
user.balloon_alert_visible(msgBall, self_msgBall)
|
||||
affected.open = 2
|
||||
@@ -295,18 +295,18 @@
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
var/msg = span_danger("[user]'s hand slips, tearing the edges of the incision on [target]'s [affected.name] with \the [tool]!")
|
||||
var/self_msg = span_danger("Your hand slips, tearing the edges of the incision on [target]'s [affected.name] with \the [tool]!")
|
||||
var/msgBall = "Slips, tearing the edges of the incision."
|
||||
var/self_msgBall = "Your hand slips, tearing the edges of the incision."
|
||||
var/msgBall = "slips, tearing the edges of the incision."
|
||||
var/self_msgBall = "your hand slips, tearing the edges of the incision."
|
||||
if (target_zone == BP_TORSO)
|
||||
msg = span_danger("[user]'s hand slips, damaging several organs in [target]'s torso with \the [tool]!")
|
||||
self_msg = span_danger("Your hand slips, damaging several organs in [target]'s torso with \the [tool]!")
|
||||
msgBall = "Slips, damaging several organs in [target]'s torso."
|
||||
self_msgBall = "Your hand slips, damaging several organs in the torso."
|
||||
msgBall = "slips, damaging several organs in [target]'s torso."
|
||||
self_msgBall = "your hand slips, damaging several organs in the torso."
|
||||
if (target_zone == BP_GROIN)
|
||||
msg = span_danger("[user]'s hand slips, damaging several organs in [target]'s lower abdomen with \the [tool]!")
|
||||
self_msg = span_danger("Your hand slips, damaging several organs in [target]'s lower abdomen with \the [tool]!")
|
||||
msgBall = "Slips, damaging several organs in [target]'s lower abdomen."
|
||||
self_msgBall = "Your hand slips, damaging several organs in the torso."
|
||||
msgBall = "slips, damaging several organs in [target]'s lower abdomen."
|
||||
self_msgBall = "your hand slips, damaging several organs in the torso."
|
||||
user.visible_message(msg, self_msg)
|
||||
user.balloon_alert_visible(msgBall, self_msgBall)
|
||||
target.apply_damage(12, BRUTE, affected, sharp = TRUE)
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
# byond version
|
||||
export BYOND_MAJOR=516
|
||||
export BYOND_MINOR=1657
|
||||
export BYOND_MINOR=1662
|
||||
|
||||
# Macro Count
|
||||
export MACRO_COUNT=8
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0",
|
||||
"tgui": "workspace:*",
|
||||
"tgui-core": "^3.1.4"
|
||||
"tgui-core": "^3.1.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^19.1.0",
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0",
|
||||
"tgui": "workspace:*",
|
||||
"tgui-core": "^3.1.4",
|
||||
"tgui-core": "^3.1.5",
|
||||
"tgui-dev-server": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0",
|
||||
"tgui": "workspace:*",
|
||||
"tgui-core": "^3.1.4"
|
||||
"tgui-core": "^3.1.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^19.1.0",
|
||||
|
||||
@@ -152,7 +152,7 @@ export class CircuitComponent extends Component<CircuitProps, CircuitState> {
|
||||
}
|
||||
|
||||
return (
|
||||
<Box
|
||||
<Box<HTMLDivElement>
|
||||
className="ObjectComponent"
|
||||
position="absolute"
|
||||
left={x_pos + 'px'}
|
||||
|
||||
@@ -102,7 +102,7 @@ export const ListInputModal = (props) => {
|
||||
setTimeout(() => document!.getElementById(selected.toString())?.focus(), 1);
|
||||
}
|
||||
|
||||
function handleKeyDown(event: React.KeyboardEvent<HTMLDivElement>) {
|
||||
function handleKeyDown<T>(event: React.KeyboardEvent<T>) {
|
||||
const key = event.key;
|
||||
if (key === KEY.Down || key === KEY.Up) {
|
||||
event.preventDefault();
|
||||
|
||||
@@ -38,12 +38,12 @@ export const Wires = (props) => {
|
||||
);
|
||||
};
|
||||
|
||||
export const standardizeColor = (color: any): string => {
|
||||
export const standardizeColor = (color: string): string => {
|
||||
const canvas = new OffscreenCanvas(1, 1);
|
||||
const ctx = canvas.getContext('2d');
|
||||
if (ctx) {
|
||||
ctx.fillStyle = color;
|
||||
return ctx.fillStyle as string;
|
||||
return ctx.fillStyle;
|
||||
} else {
|
||||
return '#000000';
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
"marked": "^4.3.0",
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0",
|
||||
"tgui-core": "^3.1.4",
|
||||
"tgui-core": "^3.1.5",
|
||||
"tgui-dev-server": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
+8
-8
@@ -19904,19 +19904,19 @@ __metadata:
|
||||
react: "npm:^19.1.0"
|
||||
react-dom: "npm:^19.1.0"
|
||||
tgui: "workspace:*"
|
||||
tgui-core: "npm:^3.1.4"
|
||||
tgui-core: "npm:^3.1.5"
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"tgui-core@npm:^3.1.4":
|
||||
version: 3.1.4
|
||||
resolution: "tgui-core@npm:3.1.4"
|
||||
"tgui-core@npm:^3.1.5":
|
||||
version: 3.1.5
|
||||
resolution: "tgui-core@npm:3.1.5"
|
||||
dependencies:
|
||||
"@floating-ui/react": "npm:^0.27.6"
|
||||
peerDependencies:
|
||||
react: ^19.1.0
|
||||
react-dom: ^19.1.0
|
||||
checksum: 10c0/1f0caef121de74275c08dceef926d4d1e6260eaee32cbe1ee5614456d339de4c887ce13b7b2774674feba37b56bd99204519d3eadcc57b0df3f172aa37644704
|
||||
checksum: 10c0/fdaa2c55b323f51609e8207e0d58859ff757de9b98464d44f67fbc5237f94e8eb03c9995933a92cb33a02c109c53d4937088a77b8da0395376b8a911eac9d6e8
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -19944,7 +19944,7 @@ __metadata:
|
||||
react: "npm:^19.1.0"
|
||||
react-dom: "npm:^19.1.0"
|
||||
tgui: "workspace:*"
|
||||
tgui-core: "npm:^3.1.4"
|
||||
tgui-core: "npm:^3.1.5"
|
||||
tgui-dev-server: "workspace:*"
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
@@ -19959,7 +19959,7 @@ __metadata:
|
||||
react: "npm:^19.1.0"
|
||||
react-dom: "npm:^19.1.0"
|
||||
tgui: "workspace:*"
|
||||
tgui-core: "npm:^3.1.4"
|
||||
tgui-core: "npm:^3.1.5"
|
||||
vitest: "npm:^3.1.1"
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
@@ -20021,7 +20021,7 @@ __metadata:
|
||||
marked: "npm:^4.3.0"
|
||||
react: "npm:^19.1.0"
|
||||
react-dom: "npm:^19.1.0"
|
||||
tgui-core: "npm:^3.1.4"
|
||||
tgui-core: "npm:^3.1.5"
|
||||
tgui-dev-server: "workspace:*"
|
||||
vitest: "npm:^3.1.1"
|
||||
languageName: unknown
|
||||
|
||||
@@ -204,6 +204,7 @@
|
||||
#include "code\_global_vars\lists\logging.dm"
|
||||
#include "code\_global_vars\lists\mapping.dm"
|
||||
#include "code\_global_vars\lists\misc.dm"
|
||||
#include "code\_global_vars\lists\mob.dm"
|
||||
#include "code\_global_vars\lists\species.dm"
|
||||
#include "code\_global_vars\traits\_traits.dm"
|
||||
#include "code\_helpers\_global_objects.dm"
|
||||
@@ -388,6 +389,7 @@
|
||||
#include "code\controllers\subsystems\internal_wiki.dm"
|
||||
#include "code\controllers\subsystems\job.dm"
|
||||
#include "code\controllers\subsystems\lighting.dm"
|
||||
#include "code\controllers\subsystems\lobby_monitor.dm"
|
||||
#include "code\controllers\subsystems\machines.dm"
|
||||
#include "code\controllers\subsystems\mail.dm"
|
||||
#include "code\controllers\subsystems\mapping.dm"
|
||||
|
||||
Reference in New Issue
Block a user