Merge branch 'master' into upstream-merge-37476
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
throwforce = 0
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
materials = list(MAT_METAL = 500)
|
||||
var/fire_sound = null //What sound should play when this ammo is fired
|
||||
var/caliber = null //Which kind of guns it can be loaded into
|
||||
var/projectile_type = null //The bullet type to create when New() is called
|
||||
@@ -66,41 +67,11 @@
|
||||
bounce_away(FALSE, NONE)
|
||||
. = ..()
|
||||
|
||||
/obj/item/ammo_casing/proc/bounce_away(still_warm = FALSE, delay = 3)
|
||||
SpinAnimation(10, 1)
|
||||
/obj/item/ammo_casing/proc/bounce_away(still_warm = FALSE, bounce_delay = 3)
|
||||
update_icon()
|
||||
SpinAnimation(10, 1)
|
||||
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)
|
||||
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)))
|
||||
|
||||
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)))
|
||||
if(still_warm && T && T.bullet_sizzle)
|
||||
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.
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
desc = "A .50 bullet casing, specialised in sending the target to sleep, instead of hell."
|
||||
projectile_type = /obj/item/projectile/bullet/p50/soporific
|
||||
icon_state = "sleeper"
|
||||
harmful = FALSE
|
||||
|
||||
/obj/item/ammo_casing/p50/penetrator
|
||||
name = ".50 penetrator round bullet casing"
|
||||
|
||||
@@ -61,3 +61,4 @@
|
||||
desc = "Whose smart idea was it to use toys as crowd control? Ages 18 and up."
|
||||
projectile_type = /obj/item/projectile/bullet/reusable/foam_dart/riot
|
||||
icon_state = "foamdart_riot"
|
||||
materials = list(MAT_METAL = 1000)
|
||||
|
||||
Reference in New Issue
Block a user