Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
126 changes: 63 additions & 63 deletions _maps/map_files/generic/CentCom.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -26352,7 +26352,7 @@ fX
fX
fX
fX
fY
fX
fX
fX
fX
Expand Down Expand Up @@ -26866,7 +26866,7 @@ fX
fX
fX
fX
fX
fY
fX
fX
fX
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -29443,7 +29443,7 @@ ab
ab
ab
ab
ab
MO
aa
aa
aa
Expand Down
3 changes: 2 additions & 1 deletion code/__DEFINES/cinematics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
#define CINEMATIC_CULT_NUKE 13
#define CINEMATIC_CULT_FAIL 14
4 changes: 4 additions & 0 deletions code/__DEFINES/components.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
15 changes: 14 additions & 1 deletion code/_onclick/hud/fullscreen.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -189,4 +202,4 @@
/obj/screen/fullscreen/uber
icon_state = "uberoverlay"
plane = FULLSCREEN_PLANE
layer = CURSE_LAYER
layer = CURSE_LAYER
81 changes: 47 additions & 34 deletions code/datums/cinematic.dm
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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
Expand All @@ -38,61 +38,69 @@ 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
if(is_global && stop_ooc && GLOB.ooc_allowed)
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)

//Restore OOC
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)
Expand All @@ -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

Expand Down Expand Up @@ -254,4 +267,4 @@ Nuke.Explosion()

Narsie()
-> Cinematic(CULT,world)
*/
*/
Binary file modified config/title_screens/images/rare+fire.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 config/title_screens/images/rare+yogurt.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 config/title_screens/images/yogstation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.