diff --git a/code/game/turfs/closed.dm b/code/game/turfs/closed.dm index c9848fb793a..c6825be26f0 100644 --- a/code/game/turfs/closed.dm +++ b/code/game/turfs/closed.dm @@ -102,6 +102,7 @@ desc = "An extremely densely-packed rock, sheeted over with centuries worth of ice and snow." icon = 'icons/turf/walls.dmi' icon_state = "snowrock" + bullet_sizzle = TRUE /turf/closed/indestructible/rock/snow/ice name = "iced rock" diff --git a/code/game/turfs/simulated/floor/fancy_floor.dm b/code/game/turfs/simulated/floor/fancy_floor.dm index e664c620236..4a2051d890d 100644 --- a/code/game/turfs/simulated/floor/fancy_floor.dm +++ b/code/game/turfs/simulated/floor/fancy_floor.dm @@ -93,6 +93,7 @@ floor_tile = null initial_gas_mix = "o2=22;n2=82;TEMP=180" slowdown = 2 + bullet_sizzle = TRUE /turf/open/floor/grass/snow/try_replace_tile(obj/item/stack/tile/T, mob/user, params) return diff --git a/code/game/turfs/simulated/floor/plating/asteroid.dm b/code/game/turfs/simulated/floor/plating/asteroid.dm index 8cc61700d3f..4de53839382 100644 --- a/code/game/turfs/simulated/floor/plating/asteroid.dm +++ b/code/game/turfs/simulated/floor/plating/asteroid.dm @@ -279,6 +279,7 @@ planetary_atmos = TRUE archdrops = list(/obj/item/stack/sheet/mineral/snow = list(ARCH_PROB = 100, ARCH_MAXDROP = 5)) burnt_states = list("snow_dug") + bullet_sizzle = TRUE /turf/open/floor/plating/asteroid/snow/burn_tile() if(!burnt) diff --git a/code/game/turfs/simulated/floor/plating/misc_plating.dm b/code/game/turfs/simulated/floor/plating/misc_plating.dm index 12edefb6806..3a278736939 100644 --- a/code/game/turfs/simulated/floor/plating/misc_plating.dm +++ b/code/game/turfs/simulated/floor/plating/misc_plating.dm @@ -144,6 +144,7 @@ baseturfs = /turf/open/floor/plating/ice slowdown = 1 attachment_holes = FALSE + bullet_sizzle = TRUE /turf/open/floor/plating/ice/Initialize() . = ..() diff --git a/code/game/turfs/simulated/wall/mineral_walls.dm b/code/game/turfs/simulated/wall/mineral_walls.dm index 4f85d45d585..1346dc91e21 100644 --- a/code/game/turfs/simulated/wall/mineral_walls.dm +++ b/code/game/turfs/simulated/wall/mineral_walls.dm @@ -167,6 +167,7 @@ sheet_type = /obj/item/stack/sheet/mineral/snow canSmoothWith = null girder_type = null + bullet_sizzle = TRUE /turf/closed/wall/mineral/abductor name = "alien wall" diff --git a/code/game/turfs/simulated/wall/misc_walls.dm b/code/game/turfs/simulated/wall/misc_walls.dm index 7012c5f6d84..f40f74787aa 100644 --- a/code/game/turfs/simulated/wall/misc_walls.dm +++ b/code/game/turfs/simulated/wall/misc_walls.dm @@ -158,6 +158,7 @@ canSmoothWith = null hardness = 35 slicing_duration = 150 //welding through the ice+metal + bullet_sizzle = TRUE /turf/closed/wall/rust name = "rusted wall" diff --git a/code/game/turfs/simulated/water.dm b/code/game/turfs/simulated/water.dm index eb6fe8a194d..ffcf248bd30 100644 --- a/code/game/turfs/simulated/water.dm +++ b/code/game/turfs/simulated/water.dm @@ -7,6 +7,7 @@ initial_gas_mix = LAVALAND_DEFAULT_ATMOS planetary_atmos = TRUE slowdown = 1 + bullet_sizzle = TRUE /turf/open/water/Initialize() . = ..() diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index a40991b954f..eded96deca9 100755 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -28,6 +28,7 @@ var/requires_activation //add to air processing after initialize? var/changing_turf = FALSE + var/bullet_sizzle = FALSE //used by ammo_casing/bounce_away() to determine if the shell casing should make a sizzle sound when it's ejected over the turf. /turf/vv_edit_var(var_name, new_value) var/static/list/banned_edits = list("x", "y", "z") diff --git a/code/modules/holodeck/turfs.dm b/code/modules/holodeck/turfs.dm index a9ec1ac9f18..f3b472c0788 100644 --- a/code/modules/holodeck/turfs.dm +++ b/code/modules/holodeck/turfs.dm @@ -44,6 +44,7 @@ /turf/open/floor/holofloor/beach/water name = "water" icon_state = "water" + bullet_sizzle = TRUE /turf/open/floor/holofloor/asteroid name = "asteroid" @@ -110,6 +111,7 @@ icon = 'icons/turf/snow.dmi' icon_state = "snow" slowdown = 2 + bullet_sizzle = TRUE /turf/open/floor/holofloor/snow/cold initial_gas_mix = "nob=7500;TEMP=2.7" diff --git a/code/modules/projectiles/ammunition/_ammunition.dm b/code/modules/projectiles/ammunition/_ammunition.dm index 3644b616a3a..08dd42740b9 100644 --- a/code/modules/projectiles/ammunition/_ammunition.dm +++ b/code/modules/projectiles/ammunition/_ammunition.dm @@ -66,25 +66,16 @@ bounce_away(FALSE, NONE) . = ..() -/obj/item/ammo_casing/proc/bounce_away(still_warm = FALSE, delay = 3) +/obj/item/ammo_casing/proc/bounce_away(still_warm = FALSE, bounce_delay = 3) SpinAnimation(10, 1) update_icon() var/turf/T = get_turf(src) - if(still_warm && T && (is_type_in_typecache(T, GLOB.bullet_bounce_away_sizzle))) - addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, src, 'sound/items/welder.ogg', 20, 1), delay) + if(still_warm && T && T.bullet_sizzle) + addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, src, 'sound/items/welder.ogg', 20, 1), bounce_delay) else if(T && (!is_type_in_typecache(T, GLOB.bullet_bounce_away_blacklist))) - addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, src, 'sound/weapons/bulletremove.ogg', 60, 1), delay) - -GLOBAL_LIST_INIT(bullet_bounce_away_sizzle, typecacheof(list( - /turf/closed/indestructible/rock/snow, - /turf/closed/wall/ice, - /turf/closed/wall/mineral/snow, - /turf/open/floor/grass/snow, - /turf/open/floor/holofloor/snow, - /turf/open/floor/plating/asteroid/snow, - /turf/open/floor/plating/ice, - /turf/open/water))) + addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, src, 'sound/weapons/bulletremove.ogg', 60, 1), bounce_delay) +//Soft / non-solid turfs that shouldn't make a sound when a shell casing is ejected over them. GLOBAL_LIST_INIT(bullet_bounce_away_blacklist, typecacheof(list( /turf/closed/indestructible/rock/snow, /turf/closed/indestructible/splashscreen,