Skip to content

Commit

Permalink
Loading Lobby Art (#6684)
Browse files Browse the repository at this point in the history
# About the pull request

Loading around

# New icon
(animated, look in vsc/native editor for more info)

![image](https://github.com/user-attachments/assets/f5e32ab5-2e0a-4f28-85b5-59dade4ee9bb)

# Changelog

:cl: BlackCrystalic
qol: if server take too long to pre init all before lobby art, players
will see lobbyart "loading"
/:cl:
  • Loading branch information
blackcrystall authored Jul 25, 2024
1 parent 622971f commit 775112b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion code/controllers/subsystem/init/lobby_art.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ SUBSYSTEM_DEF(lobby_art)
/datum/controller/subsystem/lobby_art/Initialize()
var/list/lobby_arts = CONFIG_GET(str_list/lobby_art_images)
if(length(lobby_arts))
force_lobby_art(rand(1,length(lobby_arts)))
force_lobby_art(rand(1, length(lobby_arts)))
return SS_INIT_SUCCESS
20 changes: 11 additions & 9 deletions code/game/turfs/walls/wall_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -297,28 +297,30 @@ INITIALIZE_IMMEDIATE(/turf/closed/wall/indestructible/splashscreen)
/turf/closed/wall/indestructible/splashscreen
name = "Lobby Art"
desc = "Assorted artworks."
icon = 'icons/lobby/title.dmi'
icon_state = ""
// icon_state = "title_holiday"
icon = 'icons/lobby/title_loading.dmi'
icon_state = "title"
layer = FLY_LAYER
special_icon = 1
special_icon = TRUE

/turf/closed/wall/indestructible/splashscreen/Initialize()
. = ..()
tag = "LOBBYART"

/proc/force_lobby_art(art_id)
GLOB.displayed_lobby_art = art_id
var/turf/closed/wall/indestructible/splashscreen/SS = locate("LOBBYART")
var/turf/closed/wall/indestructible/splashscreen/lobby_art = locate("LOBBYART")
var/list/lobby_arts = CONFIG_GET(str_list/lobby_art_images)
var/list/lobby_authors = CONFIG_GET(str_list/lobby_art_authors)
SS.icon_state = lobby_arts[GLOB.displayed_lobby_art]
SS.desc = "Artwork by [lobby_authors[GLOB.displayed_lobby_art]]"
for(var/client/C in GLOB.clients)
lobby_art.icon = 'icons/lobby/title.dmi'
lobby_art.icon_state = lobby_arts[GLOB.displayed_lobby_art]
lobby_art.desc = "Artwork by [lobby_authors[GLOB.displayed_lobby_art]]"
lobby_art.pixel_x = -288
lobby_art.pixel_y = -288
for(var/client/player in GLOB.clients)
if(GLOB.displayed_lobby_art != -1)
var/author = lobby_authors[GLOB.displayed_lobby_art]
if(author != "Unknown")
to_chat_forced(C, SPAN_ROUNDBODY("<hr>This round's lobby art is brought to you by [author]<hr>"))
to_chat_forced(player, SPAN_ROUNDBODY("<hr>This round's lobby art is brought to you by [author]<hr>"))

/turf/closed/wall/indestructible/other
icon_state = "r_wall"
Expand Down
Binary file added icons/lobby/title_loading.dmi
Binary file not shown.
4 changes: 2 additions & 2 deletions maps/map_files/generic/Admin_level.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -2211,7 +2211,7 @@ hp
hp
hp
hp
kx
hp
"}
(2,1,1) = {"
aa
Expand Down Expand Up @@ -3570,7 +3570,7 @@ hp
hp
hp
hp
hp
kx
hp
hp
hp
Expand Down

0 comments on commit 775112b

Please sign in to comment.