Skip to content

Commit

Permalink
HTML Title Screen (#874)
Browse files Browse the repository at this point in the history
## About The Pull Request
Наконец доделал (вроде) браузерный тайтл скрин
ТМ крайне желателен

Убран с корнями трейт Scub, так как никто в нашем сообществе не понимает
этот мем, и мы считаем его бредиком.
Так же убран трейт Pet Day, потому что такое лучше вынести в квирк, да и
писать логику ради одного трейта - излишество, тем более что он должен
быть job а не просто трейт станции.

## Why It's Good For The Game
Все думаю и так знают, но вот видос


https://github.com/user-attachments/assets/660a50a6-5109-4dde-83df-95eb78563939

## Changelog

:cl:
add: Дефолтное лобби заменено на браузерное
/:cl:

---------

Co-authored-by: Gaxeer <[email protected]>
Co-authored-by: gaxeer <[email protected]>
  • Loading branch information
3 people authored Dec 25, 2024
1 parent a559fae commit 2d40450
Show file tree
Hide file tree
Showing 58 changed files with 1,336 additions and 38 deletions.
2 changes: 2 additions & 0 deletions code/_onclick/hud/hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -433,10 +433,12 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
return
update_robot_modules_display()

/* BANDASTATION REMOVAL - HTML Title Screen
/datum/hud/new_player/show_hud(version = 0, mob/viewmob)
. = ..()
if(.)
show_station_trait_buttons()
*/

/datum/hud/proc/hidden_inventory_update()
return
Expand Down
4 changes: 2 additions & 2 deletions code/_onclick/hud/new_player.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

/datum/hud/new_player/New(mob/owner)
. = ..()

/* BANDASTATION REMOVAL - HTML Title Screen
if (!owner || !owner.client)
return
Expand Down Expand Up @@ -605,7 +605,7 @@
//pull the shutter back off-screen
animate(transform = matrix(), time = SHUTTER_MOVEMENT_DURATION, easing = CUBIC_EASING|EASE_IN)

*/
#undef SHUTTER_MOVEMENT_DURATION
#undef SHUTTER_WAIT_DURATION
#undef MAX_STATION_TRAIT_BUTTONS_VERTICAL
4 changes: 3 additions & 1 deletion code/controllers/subsystem/processing/station.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ PROCESSING_SUBSYSTEM_DEF(station)
// Autowiki also wants consistent outputs, for example making sure the vending machine page always reports the normal products
#if !defined(UNIT_TESTS) && !defined(AUTOWIKI)
SetupTraits()
display_lobby_traits()
// display_lobby_traits() BANDASTATION REMOVAL - HTML Title Screen
#endif

announcer = new announcer() //Initialize the station's announcer datum
Expand Down Expand Up @@ -175,10 +175,12 @@ PROCESSING_SUBSYSTEM_DEF(station)
var/datum/station_trait/trait_to_remove = i
selectable_traits_by_types[initial(trait_to_remove.trait_type)] -= trait_to_remove

/* BANDASTATION REMOVAL - HTML Title Screen
/// Update station trait lobby buttons for clients who joined before we initialised this subsystem
/datum/controller/subsystem/processing/station/proc/display_lobby_traits()
for (var/mob/dead/new_player/player as anything in GLOB.new_player_list)
var/datum/hud/new_player/observer_hud = player.hud_used
if (!istype(observer_hud))
continue
observer_hud.show_station_trait_buttons()
*/
1 change: 1 addition & 0 deletions code/controllers/subsystem/ticker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ SUBSYSTEM_DEF(ticker)
/datum/controller/subsystem/ticker/proc/create_characters()
for(var/i in GLOB.new_player_list)
var/mob/dead/new_player/player = i
SStitle.show_title_screen_to(player.client) // BANDASTATION ADDITION - HTML Title Screen
if(player.ready == PLAYER_READY_TO_PLAY && player.mind)
GLOB.joined_player_list += player.ckey
var/atom/destination = player.mind.assigned_role.get_roundstart_spawn_point()
Expand Down
6 changes: 6 additions & 0 deletions code/datums/station_traits/_station_trait.dm
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ GLOBAL_LIST_EMPTY(lobby_station_traits)
GLOB.dynamic_ruleset_categories = dynamic_category
if(sign_up_button)
GLOB.lobby_station_traits += src
/* BANDASTATION REMOVAL - HTML Title Screen
if(SSstation.initialized)
SSstation.display_lobby_traits()
*/
if(trait_processes)
START_PROCESSING(SSstation, src)
if(trait_to_give)
Expand Down Expand Up @@ -96,6 +98,7 @@ GLOBAL_LIST_EMPTY(lobby_station_traits)
/datum/station_trait/proc/can_display_lobby_button(client/player)
return sign_up_button && !SSticker.HasRoundStarted()

/* BANDASTATION REMOVAL - HTML Title Screen
/// Apply any additional handling we need to our lobby button
/datum/station_trait/proc/setup_lobby_button(atom/movable/screen/lobby/button/sign_up/lobby_button)
SHOULD_CALL_PARENT(TRUE)
Expand All @@ -120,6 +123,7 @@ GLOBAL_LIST_EMPTY(lobby_station_traits)
/datum/station_trait/proc/on_lobby_button_destroyed(atom/movable/screen/lobby/button/sign_up/lobby_button)
SIGNAL_HANDLER
lobby_buttons -= lobby_button
*/

/// Proc ran when round starts. Use this for roundstart effects. By default we clean up our buttons here.
/datum/station_trait/proc/on_round_start()
Expand All @@ -128,6 +132,7 @@ GLOBAL_LIST_EMPTY(lobby_station_traits)

/// Remove all of our active lobby buttons
/datum/station_trait/proc/destroy_lobby_buttons()
/* BANDASTATION REMOVAL - HTML Title Screen
for (var/atom/movable/screen/button as anything in lobby_buttons)
var/mob/dead/new_player/hud_owner = button.get_mob()
if (QDELETED(hud_owner))
Expand All @@ -138,6 +143,7 @@ GLOBAL_LIST_EMPTY(lobby_station_traits)
qdel(button)
continue
using_hud.remove_station_trait_button(src)
*/

/// Called when overriding a pulsar star command report message.
/datum/station_trait/proc/get_pulsar_message()
Expand Down
12 changes: 12 additions & 0 deletions code/datums/station_traits/job_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
blacklist += subtypesof(/datum/station_trait/job) - type // All but ourselves
RegisterSignal(SSdcs, COMSIG_GLOB_PRE_JOBS_ASSIGNED, PROC_REF(pre_jobs_assigned))

/* BANDASTATION REMOVAL - HTML Title Screen
/datum/station_trait/job/setup_lobby_button(atom/movable/screen/lobby/button/sign_up/lobby_button)
RegisterSignal(lobby_button, COMSIG_ATOM_UPDATE_OVERLAYS, PROC_REF(on_lobby_button_update_overlays))
lobby_button.desc = button_desc
Expand All @@ -55,6 +56,7 @@
/datum/station_trait/job/proc/on_lobby_button_update_overlays(atom/movable/screen/lobby/button/sign_up/lobby_button, list/overlays)
SIGNAL_HANDLER
overlays += LAZYFIND(lobby_candidates, lobby_button.get_mob()) ? "tick" : "cross"
*/

/// Called before we start assigning roles, assign ours first
/datum/station_trait/job/proc/pre_jobs_assigned()
Expand Down Expand Up @@ -93,9 +95,11 @@
. = ..()
RegisterSignal(SSatoms, COMSIG_SUBSYSTEM_POST_INITIALIZE, PROC_REF(replace_cargo))

/* BANDASTATION REMOVAL - HTML Title Screen
/datum/station_trait/job/cargorilla/on_lobby_button_update_overlays(atom/movable/screen/lobby/button/sign_up/lobby_button, list/overlays)
. = ..()
overlays += LAZYFIND(lobby_candidates, lobby_button.get_mob()) ? "gorilla_on" : "gorilla_off"
*/

/// Remove the cargo equipment and personnel that are being replaced by a gorilla.
/datum/station_trait/job/cargorilla/proc/replace_cargo(datum/source)
Expand Down Expand Up @@ -126,9 +130,11 @@
. = ..()
RegisterSignal(SSatoms, COMSIG_SUBSYSTEM_POST_INITIALIZE, PROC_REF(add_coffeemaker))

/* BANDASTATION REMOVAL - HTML Title Screen
/datum/station_trait/job/bridge_assistant/on_lobby_button_update_overlays(atom/movable/screen/lobby/button/sign_up/lobby_button, list/overlays)
. = ..()
overlays += "bridge_assistant"
*/

/// Creates a coffeemaker in the bridge, if we don't have one yet.
/datum/station_trait/job/bridge_assistant/proc/add_coffeemaker(datum/source)
Expand Down Expand Up @@ -176,9 +182,11 @@
can_roll_antag = CAN_ROLL_PROTECTED
job_to_add = /datum/job/veteran_advisor

/* BANDASTATION REMOVAL - HTML Title Screen
/datum/station_trait/job/veteran_advisor/on_lobby_button_update_overlays(atom/movable/screen/lobby/button/sign_up/lobby_button, list/overlays)
. = ..()
overlays += "veteran_advisor"
*/

/datum/station_trait/job/human_ai
name = "Human AI"
Expand All @@ -201,9 +209,11 @@
UnregisterSignal(SSatoms, COMSIG_SUBSYSTEM_POST_INITIALIZE)
return ..()

/* BANDASTATION REMOVAL - HTML Title Screen
/datum/station_trait/job/human_ai/on_lobby_button_update_overlays(atom/movable/screen/lobby/button/sign_up/lobby_button, list/overlays)
. = ..()
overlays += LAZYFIND(lobby_candidates, lobby_button.get_mob()) ? "human_ai_on" : "human_ai_off"
*/

/datum/station_trait/job/human_ai/proc/remove_ai_job(datum/source)
SIGNAL_HANDLER
Expand Down Expand Up @@ -264,9 +274,11 @@
new /obj/effect/landmark/start/pun_pun(GLOB.the_one_and_only_punpun.loc)
qdel(GLOB.the_one_and_only_punpun)

/* BANDASTATION REMOVAL - HTML Title Screen
/datum/station_trait/job/pun_pun/on_lobby_button_update_overlays(atom/movable/screen/lobby/button/sign_up/lobby_button, list/overlays)
. = ..()
overlays += LAZYFIND(lobby_candidates, lobby_button.get_mob()) ? "pun_pun_on" : "pun_pun_off"
*/

#undef CAN_ROLL_ALWAYS
#undef CAN_ROLL_PROTECTED
Expand Down
10 changes: 10 additions & 0 deletions code/datums/station_traits/neutral_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -413,10 +413,12 @@
. = ..()
RegisterSignal(SSdcs, COMSIG_GLOB_JOB_AFTER_SPAWN, PROC_REF(on_job_after_spawn))

/* BANDASTATION REMOVAL - HTML Title Screen
/datum/station_trait/skub/setup_lobby_button(atom/movable/screen/lobby/button/sign_up/lobby_button)
RegisterSignal(lobby_button, COMSIG_ATOM_UPDATE_OVERLAYS, PROC_REF(on_lobby_button_update_overlays))
lobby_button.desc = "Are you pro-skub or anti-skub? Click to cycle through pro-skub, anti-skub, random and neutral."
return ..()
*/

/// Let late-joiners jump on this gimmick too.
/datum/station_trait/skub/can_display_lobby_button(client/player)
Expand All @@ -426,6 +428,7 @@
/datum/station_trait/skub/on_round_start()
return

/* BANDASTATION REMOVAL - HTML Title Screen
/datum/station_trait/skub/on_lobby_button_update_icon(atom/movable/screen/lobby/button/sign_up/lobby_button, location, control, params, mob/dead/new_player/user)
var/mob/player = lobby_button.get_mob()
var/skub_stance = skubbers[player.ckey]
Expand Down Expand Up @@ -467,6 +470,7 @@
overlays += "neutral_skub"
if(RANDOM_SKUB)
overlays += "random_skub"
*/

/datum/station_trait/skub/proc/on_job_after_spawn(datum/source, datum/job/job, mob/living/spawned, client/player_client)
SIGNAL_HANDLER
Expand Down Expand Up @@ -554,17 +558,20 @@
. = ..()
RegisterSignal(SSdcs, COMSIG_GLOB_JOB_AFTER_SPAWN, PROC_REF(on_job_after_spawn))

/* BANDASTATION REMOVAL - HTML Title Screen
/datum/station_trait/pet_day/setup_lobby_button(atom/movable/screen/lobby/button/sign_up/lobby_button)
lobby_button.desc = "Want to bring your innocent pet to a giant metal deathtrap? Click here to customize it!"
RegisterSignal(lobby_button, COMSIG_ATOM_UPDATE_OVERLAYS, PROC_REF(on_lobby_button_update_overlays))
return ..()
*/

/datum/station_trait/pet_day/can_display_lobby_button(client/player)
return sign_up_button

/datum/station_trait/pet_day/on_round_start()
return

/* BANDASTATION REMOVAL - HTML Title Screen
/datum/station_trait/pet_day/on_lobby_button_click(atom/movable/screen/lobby/button/sign_up/lobby_button, updates)
var/mob/our_player = lobby_button.get_mob()
var/client/player_client = our_player.client
Expand All @@ -574,6 +581,7 @@
if(isnull(customization))
customization = new(player_client)
INVOKE_ASYNC(customization, TYPE_PROC_REF(/datum, ui_interact), our_player)
*/

/datum/station_trait/pet_day/proc/on_job_after_spawn(datum/source, datum/job/job, mob/living/spawned, client/player_client)
SIGNAL_HANDLER
Expand All @@ -583,5 +591,7 @@
return
INVOKE_ASYNC(customization, TYPE_PROC_REF(/datum/pet_customization, create_pet), spawned, player_client)

/* BANDASTATION REMOVAL - HTML Title Screen
/datum/station_trait/pet_day/proc/on_lobby_button_update_overlays(atom/movable/screen/lobby/button/sign_up/lobby_button, list/overlays)
overlays += "select_pet"
*/
2 changes: 2 additions & 0 deletions code/modules/admin/admin_verbs.dm
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
/client/proc/add_admin_verbs()
control_freak = CONTROL_FREAK_SKIN | CONTROL_FREAK_MACROS
SSadmin_verbs.assosciate_admin(src)
SStitle.title_output(src, "true", "admin_buttons_visibility") // BANDASTATION ADDITION - HTML Title Screen

/client/proc/remove_admin_verbs()
control_freak = initial(control_freak)
SSadmin_verbs.deassosciate_admin(src)
SStitle.title_output(src, "false", "admin_buttons_visibility") // BANDASTATION ADDITION - HTML Title Screen

ADMIN_VERB(hide_verbs, R_NONE, "Adminverbs - Hide All", "Hide most of your admin verbs.", ADMIN_CATEGORY_MAIN)
user.remove_admin_verbs()
Expand Down
6 changes: 5 additions & 1 deletion code/modules/client/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,11 @@ GLOBAL_LIST_EMPTY(preferences_datums)

if (istype(requested_preference, /datum/preference/name))
tainted_character_profiles = TRUE

// BANDASTATION ADDITION - HTML Title Screen
for (var/datum/preference_middleware/preference_middleware as anything in middleware)
if (preference_middleware.post_set_preference(usr, requested_preference_key, value))
return TRUE
// BANDASTATION ADDITION END
return TRUE
if ("set_color_preference")
var/requested_preference_key = params["preference"]
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/dead/new_player/login.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
if(!client)
return

SStitle.show_title_screen_to(client) // BANDASTATION ADDITION - HTML Title Screen
if(CONFIG_GET(flag/use_exp_tracking))
client?.set_exp_from_db()
client?.set_db_player_flags()
Expand Down
2 changes: 2 additions & 0 deletions code/modules/mob/dead/new_player/new_player.dm
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
ready = PLAYER_NOT_READY
return FALSE

SStitle.hide_title_screen_from(client) // BANDASTATION ADDITION - HTML Title Screen
var/mob/dead/observer/observer = new()
spawning = TRUE

Expand Down Expand Up @@ -282,6 +283,7 @@
. = new_character
if(!.)
return
SStitle.hide_title_screen_from(client) // BANDASTATION ADDITION - HTML Title Screen
new_character.key = key //Manually transfer the key to log them in,
new_character.stop_sound_channel(CHANNEL_LOBBYMUSIC)
var/area/joined_area = get_area(new_character.loc)
Expand Down
Binary file added icons/ui/common/ss220.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified interface/fonts/PixCyrillic.ttf
Binary file not shown.
13 changes: 12 additions & 1 deletion interface/skin.dmf
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ window "mainwindow"
is-default = true
saved-params = "pos;size;is-minimized;is-maximized"
statusbar = false
icon = 'icons\\ui\\common\\tg_32.png'
icon = 'icons\\ui\\common\\ss220.png'
macro = "default"
menu = "menu"
elem "split"
Expand Down Expand Up @@ -126,6 +126,17 @@ window "mapwindow"
right-click = true
saved-params = "zoom;letterbox;zoom-mode"
style = ".center { text-align: center; } .maptext { font-family: 'Grand9K Pixel'; font-size: 6pt; -dm-text-outline: 1px black; color: white; line-height: 1.0; } .command_headset { font-weight: bold; } .context { font-family: 'Pix Cyrillic'; font-size: 12pt; -dm-text-outline: 1px black; } .subcontext { font-family: 'TinyUnicode'; font-size: 12pt; line-height: 0.75; } .small { font-family: 'Spess Font'; font-size: 6pt; line-height: 1.4; } .big { font-family: 'Pix Cyrillic'; font-size: 12pt; } .reallybig { font-size: 12pt; } .extremelybig { font-size: 12pt; } .greentext { color: #00FF00; font-size: 6pt; } .redtext { color: #FF0000; font-size: 6pt; } .clown { color: #FF69BF; font-weight: bold; } .his_grace { color: #15D512; } .hypnophrase { color: #0d0d0d; font-weight: bold; } .yell { font-weight: bold; } .italics { font-family: 'Spess Font'; font-size: 6pt; line-height: 1.4; }"
elem "title_browser"
type = BROWSER
pos = 0,0
size = 640x480
anchor1 = 0,0
anchor2 = 100,100
is-visible = false
is-disabled = true
saved-params = ""
auto-format = false
style = ".center { text-align: center; } .maptext { font-family: 'Grand9K Pixel'; font-size: 6pt; -dm-text-outline: 1px black; color: white; line-height: 1.0; } .command_headset { font-weight: bold; } .context { font-family: 'Pix Cyrillic'; font-size: 12pt; -dm-text-outline: 1px black; } .subcontext { font-family: 'TinyUnicode'; font-size: 12pt; line-height: 0.75; } .small { font-family: 'Spess Font'; font-size: 6pt; line-height: 1.4; } .big { font-family: 'Pix Cyrillic'; font-size: 12pt; } .reallybig { font-size: 12pt; } .extremelybig { font-size: 12pt; } .greentext { color: #00FF00; font-size: 6pt; } .redtext { color: #FF0000; font-size: 6pt; } .clown { color: #FF69BF; font-weight: bold; } .his_grace { color: #15D512; } .hypnophrase { color: #0d0d0d; font-weight: bold; } .yell { font-weight: bold; } .italics { font-family: 'Spess Font'; font-size: 6pt; line-height: 1.4; }"
elem "status_bar"
type = LABEL
pos = 0,464
Expand Down
3 changes: 0 additions & 3 deletions modular_bandastation/aesthetics/_aesthetics.dme
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@
// Lights
#include "lights/code/lights.dm"

// Lobby Menu
#include "lobby/code/lobby.dm"

// Radio
#include "radio/code/radio.dm"

Expand Down
11 changes: 0 additions & 11 deletions modular_bandastation/aesthetics/lobby/code/lobby.dm

This file was deleted.

Binary file not shown.
Binary file removed modular_bandastation/aesthetics/lobby/icons/join.dmi
Binary file not shown.
Binary file not shown.
Binary file not shown.
18 changes: 0 additions & 18 deletions modular_bandastation/discord/code/discord.dm
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,3 @@
else
to_chat(src, span_danger("The discord URL is not set in the server configuration."))
return

/mob/dead/new_player/Topic(href, href_list[])
if(src != usr)
return

if(!client)
return

if(client.interviewee)
return FALSE

if(href_list["observe"] || href_list["toggle_ready"] || href_list["late_join"])
if (!!CONFIG_GET(flag/sql_enabled) && !client.prefs.discord_id)
to_chat(usr, "<span class='danger'>Вам необходимо привязать дискорд-профиль к аккаунту!</span>")
to_chat(usr, "<span class='warning'>Нажмите 'Verify Discord Account' во вкладке 'OOC' для получения инструкций.</span>")
return FALSE

. = ..()
1 change: 1 addition & 0 deletions modular_bandastation/modular_bandastation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "_helpers220/_helpers220.dme"
#include "_signals220/_signals220.dme"
#include "_singletons/_singletons.dme"
#include "title_screen/_title_screen.dme"
#include "admin/_admin.dme"
#include "aesthetics/_aesthetics.dme"
#include "aesthetics_sounds/_aesthetics_sounds.dme"
Expand Down
14 changes: 14 additions & 0 deletions modular_bandastation/title_screen/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Изменения в изначальном коде

`interface/skin.dmf` - `add`:`elem "title_browser"`

`code/_onclick/hud/hud.dm`
`code/_onclick/hud/new_player.dm`
`code/controllers/subsystem/ticker.dm`
`code/controllers/subsystem/processing/station.dm`
`code/datums/station_traits/_station_trait.dm`
`code/datums/station_traits/job_traits.dm`
`code/datums/station_traits/neutral_traits.dm`
`code/modules/mob/dead/new_player/new_player.dm`

Конерктику ищите по комментарию - `HTML Title Screen`
4 changes: 4 additions & 0 deletions modular_bandastation/title_screen/_title_screen.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/datum/modpack/title_screen
name = "Title Screen"
desc = "Делает лобби браузерным, а не объектом в мире игры."
author = "Aylong"
Loading

0 comments on commit 2d40450

Please sign in to comment.