diff --git a/_maps/map_files/generic/CentCom.dmm b/_maps/map_files/generic/CentCom.dmm index 1ea909b2e620..10e565b91343 100644 --- a/_maps/map_files/generic/CentCom.dmm +++ b/_maps/map_files/generic/CentCom.dmm @@ -26352,7 +26352,7 @@ fX fX fX fX -fY +fX fX fX fX @@ -26866,7 +26866,7 @@ fX fX fX fX -fX +fY fX fX fX @@ -28401,21 +28401,21 @@ aa aa aa aa -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -MO +fX +fX +fX +fX +fX +fX +fX +fX +fX +fX +fX +fX +fX +fX +fX aa aa aa @@ -28658,21 +28658,21 @@ aa aa aa aa -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab +fX +fX +fX +fX +fX +fX +fX +fX +fX +fX +fX +fX +fX +fX +fX aa aa aa @@ -28915,21 +28915,21 @@ aa aa aa aa -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab +fX +fX +fX +fX +fX +fX +fX +fX +fX +fX +fX +fX +fX +fX +fX aa aa aa @@ -29172,21 +29172,21 @@ aa aa aa aa -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab +fX +fX +fX +fX +fX +fX +fX +fX +fX +fX +fX +fX +fX +fX +fX aa aa aa @@ -29443,7 +29443,7 @@ ab ab ab ab -ab +MO aa aa aa diff --git a/code/__DEFINES/cinematics.dm b/code/__DEFINES/cinematics.dm index aa19ffb4cf12..f994dc82a4b3 100644 --- a/code/__DEFINES/cinematics.dm +++ b/code/__DEFINES/cinematics.dm @@ -10,4 +10,5 @@ #define CINEMATIC_NUKE_NO_CORE 10 #define CINEMATIC_NUKE_FAR 11 #define CINEMATIC_NUKE_CLOWNOP 12 -#define CINEMATIC_CULT_NUKE 13 \ No newline at end of file +#define CINEMATIC_CULT_NUKE 13 +#define CINEMATIC_CULT_FAIL 14 diff --git a/code/__DEFINES/components.dm b/code/__DEFINES/components.dm index 93ada4e1f53d..4ce4da0b19ed 100644 --- a/code/__DEFINES/components.dm +++ b/code/__DEFINES/components.dm @@ -395,3 +395,7 @@ ///Subsystem signals ///From base of datum/controller/subsystem/Initialize: (start_timeofday) #define COMSIG_SUBSYSTEM_POST_INITIALIZE "subsystem_post_initialize" + +/// called by datum/cinematic/play() : (datum/cinematic/new_cinematic) +#define COMSIG_GLOB_PLAY_CINEMATIC "!play_cinematic" +#define COMPONENT_GLOB_BLOCK_CINEMATIC (1<<0) diff --git a/code/_onclick/hud/fullscreen.dm b/code/_onclick/hud/fullscreen.dm index 9dfc2c2f50c2..f481b11306a2 100644 --- a/code/_onclick/hud/fullscreen.dm +++ b/code/_onclick/hud/fullscreen.dm @@ -158,6 +158,19 @@ /obj/screen/fullscreen/color_vision/blue color = "#0000ff" +/obj/screen/fullscreen/cinematic_backdrop + icon = 'icons/mob/screen_gen.dmi' + screen_loc = "WEST,SOUTH to EAST,NORTH" + icon_state = "flash" + plane = SPLASHSCREEN_PLANE + layer = SPLASHSCREEN_LAYER - 1 + color = "#000000" + show_when_dead = TRUE + +/obj/screen/fullscreen/cinematic_backdrop/Initialize() + . = ..() + layer = SPLASHSCREEN_LAYER - 1 + /obj/screen/fullscreen/lighting_backdrop icon = 'icons/mob/screen_gen.dmi' icon_state = "flash" @@ -189,4 +202,4 @@ /obj/screen/fullscreen/uber icon_state = "uberoverlay" plane = FULLSCREEN_PLANE - layer = CURSE_LAYER \ No newline at end of file + layer = CURSE_LAYER diff --git a/code/datums/cinematic.dm b/code/datums/cinematic.dm index e229b25258b3..818db502cc03 100644 --- a/code/datums/cinematic.dm +++ b/code/datums/cinematic.dm @@ -1,5 +1,3 @@ -GLOBAL_LIST_EMPTY(cinematics) - // Use to play cinematics. // Watcher can be world,mob, or a list of mobs // Blocks until sequence is done. @@ -18,14 +16,16 @@ GLOBAL_LIST_EMPTY(cinematics) playing.is_global = TRUE watcher = GLOB.mob_list playing.play(watcher) + qdel(playing) /obj/screen/cinematic icon = 'icons/effects/station_explosion.dmi' icon_state = "station_intact" plane = SPLASHSCREEN_PLANE - layer = SPLASHSCREEN_LAYER mouse_opacity = MOUSE_OPACITY_TRANSPARENT - screen_loc = "1,1" + layer = SPLASHSCREEN_LAYER + screen_loc = "BOTTOM,LEFT+50%" + appearance_flags = APPEARANCE_UI | TILE_BOUND /datum/cinematic var/id = CINEMATIC_DEFAULT @@ -38,28 +38,35 @@ GLOBAL_LIST_EMPTY(cinematics) var/stop_ooc = TRUE //Turns off ooc when played globally. /datum/cinematic/New() - GLOB.cinematics += src screen = new(src) /datum/cinematic/Destroy() - GLOB.cinematics -= src + for(var/CC in watching) + if(!CC) + continue + var/client/C = CC + C.mob.clear_fullscreen("cinematic") + C.screen -= screen + watching = null QDEL_NULL(screen) - for(var/mob/M in locked) + QDEL_NULL(special_callback) + for(var/MM in locked) + if(!MM) + continue + var/mob/M = MM M.notransform = FALSE + locked = null return ..() /datum/cinematic/proc/play(watchers) - //Check if you can actually play it (stop mob cinematics for global ones) and create screen objects - for(var/A in GLOB.cinematics) - var/datum/cinematic/C = A - if(C == src) - continue - if(C.is_global || !is_global) - return //Can't play two global or local cinematics at the same time + //Check if cinematic can actually play (stop mob cinematics for global ones) + if(SEND_GLOBAL_SIGNAL(COMSIG_GLOB_PLAY_CINEMATIC, src) & COMPONENT_GLOB_BLOCK_CINEMATIC) + return - //Close all open windows if global - if(is_global) - SStgui.close_all_uis() + //We are now playing this cinematic + + //Handle what happens when a different cinematic tries to play over us + RegisterSignal(SSdcs, COMSIG_GLOB_PLAY_CINEMATIC, .proc/replacement_cinematic) //Pause OOC var/ooc_toggled = FALSE @@ -67,24 +74,17 @@ GLOBAL_LIST_EMPTY(cinematics) ooc_toggled = TRUE toggle_ooc(FALSE) - - for(var/mob/M in GLOB.mob_list) - if(M in watchers) - M.notransform = TRUE //Should this be done for non-global cinematics or even at all ? - locked += M - //Close watcher ui's - SStgui.close_user_uis(M) - if(M.client) - watching += M.client - M.client.screen += screen - else - if(is_global) - M.notransform = TRUE - locked += M + //Place /atom/movable/screen/cinematic into everyone's screens, prevent them from moving + for(var/MM in watchers) + var/mob/M = MM + show_to(M, M.client) + RegisterSignal(M, COMSIG_MOB_CLIENT_LOGIN, .proc/show_to) + //Close watcher ui's + SStgui.close_user_uis(M) //Actually play it content() - + //Cleanup sleep(cleanup_time) @@ -92,7 +92,15 @@ GLOBAL_LIST_EMPTY(cinematics) if(ooc_toggled) toggle_ooc(TRUE) - qdel(src) +/datum/cinematic/proc/show_to(mob/M, client/C) + if(!M.notransform) + locked += M + M.notransform = TRUE //Should this be done for non-global cinematics or even at all ? + if(!C) + return + watching += C + M.overlay_fullscreen("cinematic",/obj/screen/fullscreen/cinematic_backdrop) + C.screen += screen //Sound helper /datum/cinematic/proc/cinematic_sound(s) @@ -111,6 +119,11 @@ GLOBAL_LIST_EMPTY(cinematics) /datum/cinematic/proc/content() sleep(50) +/datum/cinematic/proc/replacement_cinematic(datum/source, datum/cinematic/other) + if(!is_global && other.is_global) //Allow it to play if we're local and it's global + return NONE + return COMPONENT_GLOB_BLOCK_CINEMATIC + /datum/cinematic/nuke_win id = CINEMATIC_NUKE_WIN @@ -254,4 +267,4 @@ Nuke.Explosion() Narsie() -> Cinematic(CULT,world) -*/ \ No newline at end of file +*/ diff --git a/config/title_screens/images/rare+fire.png b/config/title_screens/images/rare+fire.png index f8a2067a500d..3432546d6df2 100644 Binary files a/config/title_screens/images/rare+fire.png and b/config/title_screens/images/rare+fire.png differ diff --git a/config/title_screens/images/rare+yogurt.png b/config/title_screens/images/rare+yogurt.png index 4a596228f9ec..e7e8f2d9e9fb 100644 Binary files a/config/title_screens/images/rare+yogurt.png and b/config/title_screens/images/rare+yogurt.png differ diff --git a/config/title_screens/images/yogstation.png b/config/title_screens/images/yogstation.png index 448c70d62e76..c6ea5e6c5a92 100644 Binary files a/config/title_screens/images/yogstation.png and b/config/title_screens/images/yogstation.png differ