fancier throws, fancier bullet casings, fancier window destruction, fancier bottle smashing (#7997)

This commit is contained in:
deathride58
2019-02-14 00:02:00 -05:00
committed by kevinz000
parent ae903ce89b
commit 7db87db43a
7 changed files with 33 additions and 1 deletions
@@ -120,6 +120,12 @@
I.SwapColor(rgb(255, 0, 220, 255), rgb(0, 0, 0, 0))
B.icon = I
B.name = "broken [name]"
if(ranged)
var/matrix/M = matrix(B.transform)
M.Turn(rand(-170, 170))
B.transform = M
B.pixel_x = rand(-12, 12)
B.pixel_y = rand(-12, 12)
if(prob(33))
new/obj/item/shard(drop_location())
playsound(src, "shatter", 70, 1)
@@ -296,6 +302,12 @@
B.force = 0
B.throwforce = 0
B.desc = "A carton with the bottom half burst open. Might give you a papercut."
if(ranged)
var/matrix/M = matrix(B.transform)
M.Turn(rand(-170, 170))
B.transform = M
B.pixel_x = rand(-12, 12)
B.pixel_y = rand(-12, 12)
transfer_fingerprints_to(B)
qdel(src)
@@ -23,6 +23,12 @@
var/obj/item/broken_bottle/B = new (loc)
if(!ranged)
thrower.put_in_hands(B)
else
var/matrix/M = matrix(B.transform)
M.Turn(rand(-170, 170))
B.transform = M
B.pixel_x = rand(-12, 12)
B.pixel_y = rand(-12, 12)
B.icon_state = icon_state
var/icon/I = new('icons/obj/drinks.dmi', src.icon_state)
+1
View File
@@ -188,6 +188,7 @@
update_inv_hands()
I.pixel_x = initial(I.pixel_x)
I.pixel_y = initial(I.pixel_y)
I.transform = initial(I.transform)
return hand_index || TRUE
return FALSE
@@ -73,6 +73,11 @@
/obj/item/ammo_casing/proc/bounce_away(still_warm = FALSE, bounce_delay = 3)
update_icon()
SpinAnimation(10, 1)
var/matrix/M = matrix(transform)
M.Turn(rand(-170,170))
transform = M
pixel_x = rand(-12, 12)
pixel_y = rand(-12, 12)
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) //If the turf is made of water and the shell casing is still hot, make a sizzling sound when it's ejected.
@@ -103,6 +103,7 @@
else if(bartender_check(target) && thrown)
visible_message("<span class='notice'>[src] lands onto the [target.name] without spilling a single drop.</span>")
transform = initial(transform)
return
else