mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 11:13:16 +00:00
Fading titlescreen from /tg/
This commit is contained in:
@@ -633,3 +633,43 @@
|
|||||||
/obj/screen/setup_preview/bg/Click(params)
|
/obj/screen/setup_preview/bg/Click(params)
|
||||||
pref?.bgstate = next_in_list(pref.bgstate, pref.bgstate_options)
|
pref?.bgstate = next_in_list(pref.bgstate, pref.bgstate_options)
|
||||||
pref?.update_preview_icon()
|
pref?.update_preview_icon()
|
||||||
|
|
||||||
|
/obj/screen/splash
|
||||||
|
screen_loc = "1,1"
|
||||||
|
layer = LAYER_HUD_ABOVE
|
||||||
|
plane = PLANE_PLAYER_HUD_ABOVE
|
||||||
|
var/client/holder
|
||||||
|
|
||||||
|
/obj/screen/splash/New(client/C, visible)
|
||||||
|
. = ..()
|
||||||
|
|
||||||
|
holder = C
|
||||||
|
|
||||||
|
if(!visible)
|
||||||
|
alpha = 0
|
||||||
|
|
||||||
|
if(!lobby_image)
|
||||||
|
qdel(src)
|
||||||
|
return
|
||||||
|
|
||||||
|
icon = lobby_image.icon
|
||||||
|
icon_state = lobby_image.icon_state
|
||||||
|
|
||||||
|
holder.screen += src
|
||||||
|
|
||||||
|
/obj/screen/splash/proc/Fade(out, qdel_after = TRUE)
|
||||||
|
if(QDELETED(src))
|
||||||
|
return
|
||||||
|
if(out)
|
||||||
|
animate(src, alpha = 0, time = 30)
|
||||||
|
else
|
||||||
|
alpha = 0
|
||||||
|
animate(src, alpha = 255, time = 30)
|
||||||
|
if(qdel_after)
|
||||||
|
QDEL_IN(src, 30)
|
||||||
|
|
||||||
|
/obj/screen/splash/Destroy()
|
||||||
|
if(holder)
|
||||||
|
holder.screen -= src
|
||||||
|
holder = null
|
||||||
|
return ..()
|
||||||
|
|||||||
@@ -416,6 +416,9 @@ var/global/datum/controller/subsystem/ticker/ticker
|
|||||||
// Created their playable character, delete their /mob/new_player
|
// Created their playable character, delete their /mob/new_player
|
||||||
if(new_char)
|
if(new_char)
|
||||||
qdel(player)
|
qdel(player)
|
||||||
|
if(new_char.client)
|
||||||
|
var/obj/screen/splash/S = new(new_char.client, TRUE)
|
||||||
|
S.Fade(TRUE)
|
||||||
|
|
||||||
// If they're a carbon, they can get manifested
|
// If they're a carbon, they can get manifested
|
||||||
if(J?.mob_type & JOB_CARBON)
|
if(J?.mob_type & JOB_CARBON)
|
||||||
|
|||||||
@@ -418,6 +418,9 @@
|
|||||||
var/mob/living/character = create_character(T) //creates the human and transfers vars and mind
|
var/mob/living/character = create_character(T) //creates the human and transfers vars and mind
|
||||||
character = job_master.EquipRank(character, rank, 1) //equips the human
|
character = job_master.EquipRank(character, rank, 1) //equips the human
|
||||||
UpdateFactionList(character)
|
UpdateFactionList(character)
|
||||||
|
if(character && character.client)
|
||||||
|
var/obj/screen/splash/Spl = new(character.client, TRUE)
|
||||||
|
Spl.Fade(TRUE)
|
||||||
|
|
||||||
var/datum/job/J = SSjob.get_job(rank)
|
var/datum/job/J = SSjob.get_job(rank)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user