Fancier Throws and Bullet Ejection (#12789)

* fixes that shit

* Revert "fixes that shit"

This reverts commit 8e6b495fa4.

* Update items.dm

* Update glass.dm

* Update drinks.dm

* Update drinks.dm

* Update bottle.dm

* Update inventory.dm

* Update _ammunition.dm

* Update reagent_containers.dm

* Update bottle.dm
This commit is contained in:
UselessTheremin
2021-12-11 11:12:53 -05:00
committed by GitHub
parent d048f68490
commit 54464df533
7 changed files with 33 additions and 0 deletions

View File

@@ -565,6 +565,11 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
if (callback) //call the original callback
. = callback.Invoke()
item_flags &= ~IN_INVENTORY
var/matrix/M = matrix(transform)
M.Turn(rand(-170, 170))
transform = M
pixel_x = rand(-12, 12)
pixel_y = rand(-12, 12)
/obj/item/proc/remove_item_from_storage(atom/newLoc) //please use this if you're going to snowflake an item out of a obj/item/storage
if(!newLoc)

View File

@@ -293,6 +293,9 @@ GLOBAL_LIST_INIT(plastitaniumglass_recipes, list(
pixel_y = rand(-5, 5)
if (icon_prefix)
icon_state = "[icon_prefix][icon_state]"
var/matrix/M = matrix(transform)
M.Turn(rand(-170, 170))
transform = M
/obj/item/shard/afterattack(atom/A as mob|obj, mob/user, proximity)
. = ..()

View File

@@ -121,6 +121,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))
var/obj/item/shard/S = new(drop_location())
target.Bumped(S)
@@ -306,6 +312,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)
target.Bumped(B)

View File

@@ -58,6 +58,12 @@
var/obj/item/broken_bottle/B = new (loc)
if(!ranged && thrower)
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)

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

View File

@@ -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.

View File

@@ -101,6 +101,7 @@
else if(bartender_check(target) && thrown)
visible_message(span_notice("[src] lands onto the [target.name] without spilling a single drop."))
transform = initial(transform)
return
else