Moved to vars

This commit is contained in:
ShizCalev
2018-04-30 01:18:06 -04:00
parent 0bcdc963c1
commit ac2967fa66
14 changed files with 26 additions and 26 deletions
+5
View File
@@ -27,11 +27,13 @@
gender = PLURAL
name = "lush grass"
icon_state = "grass"
bullet_bounce_sound = null
/turf/open/floor/holofloor/beach
name = "sand"
icon = 'icons/misc/beach.dmi'
icon_state = "sand"
bullet_bounce_sound = null
/turf/open/floor/holofloor/beach/coast_t
name = "coastline"
@@ -77,6 +79,7 @@
name = "hyperspace"
icon = 'icons/turf/space.dmi'
icon_state = "speedspace_ns_1"
bullet_bounce_sound = null
/turf/open/floor/holofloor/hyperspace/Initialize()
icon_state = "speedspace_ns_[(x + 5*y + (y%2+1)*7)%15+1]"
@@ -94,6 +97,7 @@
floor_tile = /obj/item/stack/tile/carpet
smooth = SMOOTH_TRUE
canSmoothWith = null
bullet_bounce_sound = null
/turf/open/floor/holofloor/carpet/Initialize()
. = ..()
@@ -112,6 +116,7 @@
icon_state = "snow"
slowdown = 2
bullet_sizzle = TRUE
bullet_bounce_sound = null
/turf/open/floor/holofloor/snow/cold
initial_gas_mix = "nob=7500;TEMP=2.7"
+1
View File
@@ -474,3 +474,4 @@ GLOBAL_DATUM_INIT(_preloader, /dmm_suite/preloader, new)
/turf/template_noop
name = "Turf Passthrough"
icon_state = "noop"
bullet_bounce_sound = null
@@ -67,31 +67,10 @@
. = ..()
/obj/item/ammo_casing/proc/bounce_away(still_warm = FALSE, bounce_delay = 3)
SpinAnimation(10, 1)
update_icon()
SpinAnimation(10, 1)
var/turf/T = get_turf(src)
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), 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,
/turf/closed/wall/mineral/snow,
/turf/open/chasm,
/turf/open/floor/carpet,
/turf/open/floor/grass,
/turf/open/floor/holofloor/beach,
/turf/open/floor/holofloor/carpet,
/turf/open/floor/holofloor/grass,
/turf/open/floor/holofloor/hyperspace,
/turf/open/floor/holofloor/snow,
/turf/open/floor/plating/asteroid/snow,
/turf/open/floor/plating/beach,
/turf/open/indestructible/reebe_void,
/turf/open/lava,
/turf/open/space,
/turf/open/water,
/turf/template_noop)))
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, src, 'sound/items/welder.ogg', 20, 1), bounce_delay) //If the turf is made of water and the shell casing is still hot, make a sizzling sound when it's ejected.
else if(T && T.bullet_bounce_sound)
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, src, T.bullet_bounce_sound, 60, 1), bounce_delay) //Soft / non-solid turfs that shouldn't make a sound when a shell casing is ejected over them.