Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into Feat-gate_lizard-…
Browse files Browse the repository at this point in the history
…light-and-stuff
  • Loading branch information
konushi committed Oct 16, 2023
2 parents a3dc0e4 + 572e1e1 commit c63940f
Show file tree
Hide file tree
Showing 20 changed files with 226 additions and 44 deletions.
1 change: 1 addition & 0 deletions _maps/map_files220/cyberiad/cyberiad.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -55375,6 +55375,7 @@
pixel_x = 4;
pixel_y = 4
},
/obj/structure/reagent_dispensers/virusfood/north,
/turf/simulated/floor/plasteel{
dir = 1;
icon_state = "whitegreen"
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem/SSticker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ SUBSYSTEM_DEF(ticker)
for(var/datum/team/team in GLOB.antagonist_teams)
team.on_round_end()

SScredits.roll_credits_for_all_clients() // SS220 ADDITION
play_cinematic(/datum/cinematic/credits, world)

// Display the scoreboard window
score.scoreboard()
Expand Down
2 changes: 1 addition & 1 deletion config/credits/titles/random_titles_plural_2_1.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ПАДЕНИЕ
ВОСТАНИЕ
ВОССТАНИЕ
ПРОБЛЕМЫ
ПОСЛЕДНЯЯ БИТВА
ТЕМНАЯ СТОРОНА
Expand Down
3 changes: 3 additions & 0 deletions modular_ss220/cinematics/_cinematics.dme
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#include "_cinematics.dm"

#include "code/_defines.dm"
#include "code/_cinematics.dm"
#include "code/cinematics_client_proc.dm"
#include "code/cinematics_screen.dm"
#include "code/cinematics_ticker.dm"
#include "code/cinematics/malf_doomsday.dm"
#include "code/cinematics/narsie_summon.dm"
#include "code/cinematics/nuke_cinematics.dm"
#include "code/cinematics/credits.dm"
#include "code/~undefs.dm"
6 changes: 5 additions & 1 deletion modular_ss220/cinematics/code/_cinematics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
var/cleanup_time = 30 SECONDS
/// Whether the cinematic turns off ooc when played globally.
var/stop_ooc = TRUE
// screen type for cinematic backdrop
var/backdrop_type = /obj/screen/fullscreen/cinematic_backdrop

/datum/cinematic/New(watcher, datum/callback/special_callback)
screen = new(src)
Expand Down Expand Up @@ -118,7 +120,7 @@
return

watching += watching_client
watching_mob.overlay_fullscreen("cinematic", /obj/screen/fullscreen/cinematic_backdrop)
watching_mob.overlay_fullscreen("cinematic", backdrop_type)
watching_client.screen += screen
RegisterSignal(watching_client, COMSIG_PARENT_QDELETING, PROC_REF(remove_watcher))

Expand Down Expand Up @@ -149,6 +151,8 @@

qdel(src)

SEND_GLOBAL_SIGNAL(COMSIG_GLOB_CINEMATIC_STOPPED_PLAYING, null)

/// Locks a mob, preventing them from moving, being hurt, or acting
/datum/cinematic/proc/lock_mob(mob/to_lock)
locked += to_lock
Expand Down
1 change: 1 addition & 0 deletions modular_ss220/cinematics/code/_defines.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#define COMSIG_GLOB_CINEMATIC_STOPPED_PLAYING "!cinematic_waiting_to_play"
37 changes: 37 additions & 0 deletions modular_ss220/cinematics/code/cinematics/credits.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/datum/cinematic/credits
cleanup_time = 40 SECONDS
is_global = TRUE
backdrop_type = /obj/screen/fullscreen/cinematic_backdrop/credits

/datum/cinematic/credits/New(watcher, datum/callback/special_callback)
. = ..()
screen = new/obj/screen/cinematic/credits(src)

/datum/cinematic/credits/start_cinematic(list/watchers)
watching = watchers
if(SEND_GLOBAL_SIGNAL(COMSIG_GLOB_PLAY_CINEMATIC, src) & COMPONENT_GLOB_BLOCK_CINEMATIC)
RegisterSignal(SSdcs, COMSIG_GLOB_CINEMATIC_STOPPED_PLAYING, PROC_REF(queue_gone))
return
. = ..()

/datum/cinematic/credits/proc/queue_gone(datum/source, datum/cinematic/other)
SIGNAL_HANDLER

start_cinematic(src.watching)

/datum/cinematic/credits/play_cinematic()
play_cinematic_sound(sound(SScredits.title_music))
SScredits.roll_credits_for_clients(watching)

special_callback?.Invoke()

/obj/screen/cinematic/credits
icon_state = "blank"

/obj/screen/fullscreen/cinematic_backdrop/credits
alpha = 0

/obj/screen/fullscreen/cinematic_backdrop/credits/Initialize(mapload)
. = ..()

animate(src, alpha = 220, time = 3 SECONDS)
1 change: 1 addition & 0 deletions modular_ss220/cinematics/code/~undefs.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#undef COMSIG_GLOB_CINEMATIC_STOPPED_PLAYING
8 changes: 8 additions & 0 deletions modular_ss220/clothing/code/suits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,11 @@
name = "светло-голубой акулий капюшон"
icon_state = "shark_casual_light"
item_state = "shark_casual_light"

/obj/item/clothing/suit/space/deathsquad/officer/syndie
name = "куртка офицера синдиката"
desc = "Длинная куртка из высокопрочного волокна."
icon = 'modular_ss220/clothing/icons/object/suits.dmi'
icon_state = "jacket_syndie"
icon_override = 'modular_ss220/clothing/icons/mob/suits.dmi'
item_state = "jacket_syndie"
Binary file modified modular_ss220/clothing/icons/mob/suits.dmi
Binary file not shown.
Binary file modified modular_ss220/clothing/icons/object/suits.dmi
Binary file not shown.
90 changes: 56 additions & 34 deletions modular_ss220/credits/code/SScredits.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#define CREDITS_BACKGROUND_PLANE 25
#define CREDITS_PLANE 26

SUBSYSTEM_DEF(credits)
Expand All @@ -17,39 +16,39 @@ SUBSYSTEM_DEF(credits)
credit_animate_height = 14 * world.icon_size
title_music = pick(file2list("config/credits/sounds/title_music.txt"))

/datum/controller/subsystem/credits/proc/roll_credits_for_all_clients()
for(var/client/client in GLOB.clients)
SScredits.roll_credits(client)

/datum/controller/subsystem/credits/proc/roll_credits(client/client)
LAZYINITLIST(client.credits)

if(end_titles)
/datum/controller/subsystem/credits/proc/roll_credits_for_clients(list/clients)
if(!length(end_titles))
end_titles = generate_titles()

addtimer(CALLBACK(src, PROC_REF(roll_credits_for_client), client), 30 SECONDS, TIMER_CLIENT_TIME)
for(var/client/client in clients)
SScredits.roll_credits_for_client(client)

/datum/controller/subsystem/credits/proc/roll_credits_for_client(client/client)
LAZYINITLIST(client.credits)

var/list/_credits = client.credits

if(client.mob)
client.mob.overlay_fullscreen("black",/obj/screen/fullscreen/black)
SEND_SOUND(client, sound(title_music, repeat = FALSE, wait = FALSE, volume = 85 * client.prefs.get_channel_volume(CHANNEL_LOBBYMUSIC), channel = CHANNEL_LOBBYMUSIC))
var/obj/screen/credit/logo = new /obj/screen/credit/logo(null, "", client)

addtimer(CALLBACK(src, PROC_REF(roll_credits), _credits, logo, client), 5 SECONDS, TIMER_CLIENT_TIME)

/datum/controller/subsystem/credits/proc/roll_credits(list/credits, obj/screen/credit/logo/logo, client/client)
credits += logo
logo.rollem()

for(var/item in end_titles)
if(!client.credits)
if(!client?.credits)
return
var/obj/screen/credit/title = new(null, item, client)
_credits += title
credits += title
title.rollem()
sleep(credit_spawn_speed)

addtimer(CALLBACK(src, PROC_REF(clear_credits), client), (credit_roll_speed), TIMER_CLIENT_TIME)

/datum/controller/subsystem/credits/proc/clear_credits(client/client)
if(!client)
return
QDEL_NULL(client.credits)
client.mob.clear_fullscreen("black")
SEND_SOUND(client, sound(null, repeat = FALSE, wait = FALSE, volume = 85 * client.prefs.get_channel_volume(CHANNEL_LOBBYMUSIC), channel = CHANNEL_LOBBYMUSIC))

/datum/controller/subsystem/credits/proc/generate_titles()
RETURN_TYPE(/list)
Expand Down Expand Up @@ -83,6 +82,8 @@ SUBSYSTEM_DEF(credits)
continue
if(!human.last_known_ckey)
continue
if(!human.client?.holder)
continue
if(human.client.holder.rank == "Банда")
streamers += "<center>[human.real_name]([human.ckey]) в роли [human.job]<br><center>"
continue
Expand Down Expand Up @@ -151,26 +152,19 @@ SUBSYSTEM_DEF(credits)

return titles


/obj/screen/fullscreen/black
icon = 'icons/mob/screen_gen.dmi'
icon_state = "black"
screen_loc = "WEST,SOUTH to EAST,NORTH"
plane = CREDITS_BACKGROUND_PLANE
show_when_dead = TRUE


/obj/screen/credit
icon_state = "blank"
mouse_opacity = 0
alpha = 0
screen_loc = "CENTER-7,CENTER-7"
plane = CREDITS_PLANE
var/client/parent

var/matrix/target
var/client/parent

/obj/screen/credit/Initialize(mapload, credited, client/client)
. = ..()

parent = client
maptext = {"<div style="font:'Small Fonts'">[credited]</div>"}
maptext_height = world.icon_size * 2
Expand All @@ -182,21 +176,49 @@ SUBSYSTEM_DEF(credits)
animate(src, transform = M, time = SScredits.credit_roll_speed)
target = M
animate(src, alpha = 255, time = SScredits.credit_ease_duration, flags = ANIMATION_PARALLEL)
spawn(SScredits.credit_roll_speed - SScredits.credit_ease_duration)
if(!QDELETED(src))
animate(src, alpha = 0, transform = target, time = SScredits.credit_ease_duration)
sleep(SScredits.credit_ease_duration)
qdel(src)
addtimer(CALLBACK(src, PROC_REF(delete_credit)), SScredits.credit_roll_speed - SScredits.credit_ease_duration, TIMER_CLIENT_TIME)
parent.screen += src

/obj/screen/credit/proc/delete_credit()
if(!QDELETED(src))
animate(src, alpha = 0, transform = target, time = SScredits.credit_ease_duration)
sleep(SScredits.credit_ease_duration)
qdel(src)

/obj/screen/credit/Destroy()
if(parent)
parent.screen -= src
LAZYREMOVE(parent.credits, src)
parent = null
return ..()

/obj/screen/credit/logo
icon = 'modular_ss220/credits/icons/logo.dmi'
icon_state = "ss220"
screen_loc = "CENTER - 2,CENTER - 3"
alpha = 100


/obj/screen/credit/logo/Initialize(mapload, credited, client/client)
. = ..()
animate(src, alpha = 220, time = 3 SECONDS)
parent.screen += src

/obj/screen/credit/logo/rollem()
var/matrix/M = matrix(transform)
M.Translate(0, SScredits.credit_animate_height / 2)
animate(src, transform = M, time = SScredits.credit_roll_speed / 2)
target = M
animate(src, alpha = 255, time = SScredits.credit_ease_duration / 2, flags = ANIMATION_PARALLEL)
addtimer(CALLBACK(src, PROC_REF(delete_credit)),(SScredits.credit_roll_speed - SScredits.credit_ease_duration) / 2, TIMER_CLIENT_TIME)


/obj/screen/credit/logo/delete_credit()
if(!QDELETED(src))
animate(src, alpha = 0, transform = target, time = SScredits.credit_ease_duration / 2)
sleep(SScredits.credit_ease_duration / 2)
qdel(src)

/client/var/list/credits

#undef CREDITS_PLANE
#undef CREDITS_BACKGROUND_PLANE
Binary file added modular_ss220/credits/icons/logo.dmi
Binary file not shown.
3 changes: 2 additions & 1 deletion modular_ss220/modular_ss220.dme
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include "cinematics/_cinematics.dme"
#include "closet_picklocking/_closet_picklocking.dme"
#include "crawl_speed/_crawl_speed.dme"
#include "credits/_credits.dme"
#include "cyrillic_fixes/_cyrillic_fixes.dme"
#include "debug/_debug.dme"
#include "detective_rework/detective_rework.dme"
Expand All @@ -62,7 +63,7 @@
#include "text_to_speech/_tts.dme"
#include "title_screen/_title_screen.dme"
#include "whitelist/_whitelist.dme"
#include "credits/_credits.dme"
#include "outfits/_outfits.dme"

// --- PRIME --- //
// #define MODPACK_MAIN_ONLY
Expand Down
4 changes: 3 additions & 1 deletion modular_ss220/objects/code/weapons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
righthand_file = 'modular_ss220/objects/icons/guns_righthand.dmi'
icon = 'modular_ss220/objects/icons/guns.dmi'
icon_state = "anaconda"
item_state = "anaconda"

/obj/item/gun/projectile/revolver/anaconda/attackby(obj/item/A, mob/user, params)
if(istype(A, /obj/item/ammo_box/box_d44))
Expand Down Expand Up @@ -57,6 +58,7 @@
w_class = WEIGHT_CLASS_NORMAL
ammo_type = /obj/item/ammo_casing/d44
max_ammo = 24
icon = 'modular_ss220/objects/icons/ammo.dmi'
icon_state = "44_box"

/obj/structure/displaycase/hos
Expand Down Expand Up @@ -140,7 +142,7 @@
name = "ammo box (12.7)"
desc = "Contains up to 100 12.7mm cartridges."
w_class = WEIGHT_CLASS_BULKY
ammo_type = /obj/item/ammo_casing/d44
ammo_type = /obj/item/ammo_casing/mm127
max_ammo = 100
icon = 'modular_ss220/objects/icons/ammo.dmi'
icon_state = "mm127_box"
Binary file modified modular_ss220/objects/icons/guns_lefthand.dmi
Binary file not shown.
4 changes: 4 additions & 0 deletions modular_ss220/outfits/_outfits.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/datum/modpack/outfits
name = "Outfits"
desc = "Аутфиты для админ спавна."
author = "Grombila"
3 changes: 3 additions & 0 deletions modular_ss220/outfits/_outfits.dme
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#include "_outfits.dm"

#include "code/outfits.dm"
Loading

0 comments on commit c63940f

Please sign in to comment.