Skip to content

Commit

Permalink
Джоб Доне
Browse files Browse the repository at this point in the history
готово
  • Loading branch information
Rafnik02 committed Nov 13, 2024
1 parent 256d7f9 commit 3a93dbd
Show file tree
Hide file tree
Showing 77 changed files with 125 additions and 0 deletions.
4 changes: 4 additions & 0 deletions code/__DEFINES/sound.dm
Original file line number Diff line number Diff line change
Expand Up @@ -152,3 +152,7 @@
#define DROP_SOUND_VOLUME 20
#define YEET_SOUND_VOLUME 90

//Звуки окружения СМа
#define SFX_SM_CALM "sm_calm"
#define SFX_SM_DELAM "sm_delam"

2 changes: 2 additions & 0 deletions code/__DEFINES/supermatter.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
///to prevent accent sounds from layering
#define SUPERMATTER_ACCENT_SOUND_MIN_COOLDOWN (2 SECONDS)
17 changes: 17 additions & 0 deletions code/datums/looping_sounds/machinery_sounds.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,20 @@
mid_length = 3
end_sound = 'sound/machines/engine/engine_end.ogg'
volume = 20

/datum/looping_sound/supermatter
mid_sounds = list('sound/machines/sm/loops/calm.ogg' = 1)
mid_length = 60
volume = 40
extra_range = 25
falloff_exponent = 10
falloff_distance = 5
vary = TRUE

/datum/looping_sound/destabilized_crystal
mid_sounds = list('sound/machines/sm/loops/delamming.ogg' = 1)
mid_length = 60
volume = 55
extra_range = 15
vary = TRUE

72 changes: 72 additions & 0 deletions code/game/sound.dm
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,78 @@ falloff_distance - Distance at which falloff begins. Sound is at peak volume (in
soundin = pick('sound/effects/clownstep1.ogg','sound/effects/clownstep2.ogg')
if("desceration")
soundin = pick('sound/misc/desceration-01.ogg','sound/misc/desceration-02.ogg','sound/misc/desceration-03.ogg')
if(SFX_SM_CALM)
soundin = pick(list(
'sound/machines/sm/accent/normal/1.ogg',
'sound/machines/sm/accent/normal/2.ogg',
'sound/machines/sm/accent/normal/3.ogg',
'sound/machines/sm/accent/normal/4.ogg',
'sound/machines/sm/accent/normal/5.ogg',
'sound/machines/sm/accent/normal/6.ogg',
'sound/machines/sm/accent/normal/7.ogg',
'sound/machines/sm/accent/normal/8.ogg',
'sound/machines/sm/accent/normal/9.ogg',
'sound/machines/sm/accent/normal/10.ogg',
'sound/machines/sm/accent/normal/11.ogg',
'sound/machines/sm/accent/normal/12.ogg',
'sound/machines/sm/accent/normal/13.ogg',
'sound/machines/sm/accent/normal/14.ogg',
'sound/machines/sm/accent/normal/15.ogg',
'sound/machines/sm/accent/normal/16.ogg',
'sound/machines/sm/accent/normal/17.ogg',
'sound/machines/sm/accent/normal/18.ogg',
'sound/machines/sm/accent/normal/19.ogg',
'sound/machines/sm/accent/normal/20.ogg',
'sound/machines/sm/accent/normal/21.ogg',
'sound/machines/sm/accent/normal/22.ogg',
'sound/machines/sm/accent/normal/23.ogg',
'sound/machines/sm/accent/normal/24.ogg',
'sound/machines/sm/accent/normal/25.ogg',
'sound/machines/sm/accent/normal/26.ogg',
'sound/machines/sm/accent/normal/27.ogg',
'sound/machines/sm/accent/normal/28.ogg',
'sound/machines/sm/accent/normal/29.ogg',
'sound/machines/sm/accent/normal/30.ogg',
'sound/machines/sm/accent/normal/31.ogg',
'sound/machines/sm/accent/normal/32.ogg',
'sound/machines/sm/accent/normal/33.ogg',
))
if(SFX_SM_DELAM)
soundin = pick(list(
'sound/machines/sm/accent/delam/1.ogg',
'sound/machines/sm/accent/delam/2.ogg',
'sound/machines/sm/accent/delam/3.ogg',
'sound/machines/sm/accent/delam/4.ogg',
'sound/machines/sm/accent/delam/5.ogg',
'sound/machines/sm/accent/delam/6.ogg',
'sound/machines/sm/accent/delam/7.ogg',
'sound/machines/sm/accent/delam/8.ogg',
'sound/machines/sm/accent/delam/9.ogg',
'sound/machines/sm/accent/delam/10.ogg',
'sound/machines/sm/accent/delam/11.ogg',
'sound/machines/sm/accent/delam/12.ogg',
'sound/machines/sm/accent/delam/13.ogg',
'sound/machines/sm/accent/delam/14.ogg',
'sound/machines/sm/accent/delam/15.ogg',
'sound/machines/sm/accent/delam/16.ogg',
'sound/machines/sm/accent/delam/17.ogg',
'sound/machines/sm/accent/delam/18.ogg',
'sound/machines/sm/accent/delam/19.ogg',
'sound/machines/sm/accent/delam/20.ogg',
'sound/machines/sm/accent/delam/21.ogg',
'sound/machines/sm/accent/delam/22.ogg',
'sound/machines/sm/accent/delam/23.ogg',
'sound/machines/sm/accent/delam/24.ogg',
'sound/machines/sm/accent/delam/25.ogg',
'sound/machines/sm/accent/delam/26.ogg',
'sound/machines/sm/accent/delam/27.ogg',
'sound/machines/sm/accent/delam/28.ogg',
'sound/machines/sm/accent/delam/29.ogg',
'sound/machines/sm/accent/delam/30.ogg',
'sound/machines/sm/accent/delam/31.ogg',
'sound/machines/sm/accent/delam/32.ogg',
'sound/machines/sm/accent/delam/33.ogg',
))
else
var/check_sound = FALSE
for(var/format in SOUND_ALLOWED_FILE_FORMATS)
Expand Down
10 changes: 10 additions & 0 deletions code/modules/power/supermatter/supermatter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@

//Украшение СМа гирляндой. С новым годом!
var/holiday_lights = FALSE
//Зацикленные звуки
var/datum/looping_sound/supermatter/soundloop
///cooldown tracker for accent sounds
var/last_accent_sound = 0

var/gasefficency = 0.125

Expand Down Expand Up @@ -107,6 +111,8 @@
if(GLOB.new_year_celebration && is_station_level(z))
holiday_lights()

soundloop = new(src, TRUE)

/obj/machinery/power/supermatter_shard/examine(mob/user)
. = ..()
if(holiday_lights)
Expand Down Expand Up @@ -165,6 +171,7 @@
if(damage > emergency_point)
emergency_lighting(0)
QDEL_NULL(radio)
QDEL_NULL(soundloop)
GLOB.poi_list.Remove(src)
SSair.atmos_machinery -= src
return ..()
Expand Down Expand Up @@ -298,6 +305,9 @@
air_update_turf()
transfer_energy()

//Звуки окружения
processing_sound()

for(var/mob/living/carbon/human/l in view(src, min(7, round(sqrt(power/6)))))
// No more hallucinate for ded pipol.
if(!l.stat)
Expand Down
20 changes: 20 additions & 0 deletions code/modules/power/supermatter/supermatter_special_effects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,26 @@
seed.product = /obj/item/reagent_containers/food/snacks/grown/random
seed.transform_into_random()

/obj/machinery/power/supermatter_shard/proc/processing_sound()
if(power)
soundloop.volume = clamp((50 + (power / 50)), 50, 100)
if(damage >= 300)
soundloop.mid_sounds = list('sound/machines/sm/loops/delamming.ogg' = 1)
else
soundloop.mid_sounds = list('sound/machines/sm/loops/calm.ogg' = 1)

//We play delam/neutral sounds at a rate determined by power and damage
if(last_accent_sound >= world.time || !prob(20))
return
var/aggression = min(((damage / 800) * (power / 2500)), 1.0) * 100
if(damage >= 300)
playsound(src, SFX_SM_DELAM, max(50, aggression), FALSE, 40, 30, falloff_distance = 10)
else
playsound(src, SFX_SM_CALM, max(50, aggression), FALSE, 25, 25, falloff_distance = 10)
var/next_sound = round((100 - aggression) * 5)
last_accent_sound = world.time + max(SUPERMATTER_ACCENT_SOUND_MIN_COOLDOWN, next_sound)


#undef DETONATION_MACHINE_BREAKDOWN_CHANCE
#undef DETONATION_MACHINE_EFFECT_CHANCE
#undef DETONATION_APC_BREAKDOWN_CHANCE
Expand Down
Binary file added sound/machines/sm/accent/delam/1.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/delam/10.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/delam/11.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/delam/12.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/delam/13.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/delam/14.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/delam/15.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/delam/16.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/delam/17.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/delam/18.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/delam/19.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/delam/2.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/delam/20.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/delam/21.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/delam/22.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/delam/23.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/delam/24.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/delam/25.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/delam/26.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/delam/27.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/delam/28.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/delam/29.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/delam/3.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/delam/30.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/delam/31.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/delam/32.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/delam/33.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/delam/4.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/delam/5.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/delam/6.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/delam/7.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/delam/8.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/delam/9.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/normal/1.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/normal/10.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/normal/11.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/normal/12.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/normal/13.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/normal/14.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/normal/15.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/normal/16.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/normal/17.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/normal/18.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/normal/19.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/normal/2.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/normal/20.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/normal/21.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/normal/22.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/normal/23.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/normal/24.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/normal/25.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/normal/26.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/normal/27.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/normal/28.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/normal/29.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/normal/3.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/normal/30.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/normal/31.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/normal/32.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/normal/33.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/normal/4.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/normal/5.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/normal/6.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/normal/7.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/normal/8.ogg
Binary file not shown.
Binary file added sound/machines/sm/accent/normal/9.ogg
Binary file not shown.
Binary file added sound/machines/sm/loops/calm.ogg
Binary file not shown.
Binary file added sound/machines/sm/loops/delamming.ogg
Binary file not shown.
Binary file added sound/machines/sm/supermatter1.ogg
Binary file not shown.
Binary file added sound/machines/sm/supermatter2.ogg
Binary file not shown.
Binary file added sound/machines/sm/supermatter3.ogg
Binary file not shown.

0 comments on commit 3a93dbd

Please sign in to comment.