mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
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:
@@ -565,6 +565,11 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
|||||||
if (callback) //call the original callback
|
if (callback) //call the original callback
|
||||||
. = callback.Invoke()
|
. = callback.Invoke()
|
||||||
item_flags &= ~IN_INVENTORY
|
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
|
/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)
|
if(!newLoc)
|
||||||
|
|||||||
@@ -293,6 +293,9 @@ GLOBAL_LIST_INIT(plastitaniumglass_recipes, list(
|
|||||||
pixel_y = rand(-5, 5)
|
pixel_y = rand(-5, 5)
|
||||||
if (icon_prefix)
|
if (icon_prefix)
|
||||||
icon_state = "[icon_prefix][icon_state]"
|
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)
|
/obj/item/shard/afterattack(atom/A as mob|obj, mob/user, proximity)
|
||||||
. = ..()
|
. = ..()
|
||||||
|
|||||||
@@ -121,6 +121,12 @@
|
|||||||
I.SwapColor(rgb(255, 0, 220, 255), rgb(0, 0, 0, 0))
|
I.SwapColor(rgb(255, 0, 220, 255), rgb(0, 0, 0, 0))
|
||||||
B.icon = I
|
B.icon = I
|
||||||
B.name = "broken [name]"
|
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))
|
if(prob(33))
|
||||||
var/obj/item/shard/S = new(drop_location())
|
var/obj/item/shard/S = new(drop_location())
|
||||||
target.Bumped(S)
|
target.Bumped(S)
|
||||||
@@ -306,6 +312,12 @@
|
|||||||
B.force = 0
|
B.force = 0
|
||||||
B.throwforce = 0
|
B.throwforce = 0
|
||||||
B.desc = "A carton with the bottom half burst open. Might give you a papercut."
|
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)
|
transfer_fingerprints_to(B)
|
||||||
qdel(src)
|
qdel(src)
|
||||||
target.Bumped(B)
|
target.Bumped(B)
|
||||||
|
|||||||
@@ -58,6 +58,12 @@
|
|||||||
var/obj/item/broken_bottle/B = new (loc)
|
var/obj/item/broken_bottle/B = new (loc)
|
||||||
if(!ranged && thrower)
|
if(!ranged && thrower)
|
||||||
thrower.put_in_hands(B)
|
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
|
B.icon_state = icon_state
|
||||||
|
|
||||||
var/icon/I = new('icons/obj/drinks.dmi', src.icon_state)
|
var/icon/I = new('icons/obj/drinks.dmi', src.icon_state)
|
||||||
|
|||||||
@@ -188,6 +188,7 @@
|
|||||||
update_inv_hands()
|
update_inv_hands()
|
||||||
I.pixel_x = initial(I.pixel_x)
|
I.pixel_x = initial(I.pixel_x)
|
||||||
I.pixel_y = initial(I.pixel_y)
|
I.pixel_y = initial(I.pixel_y)
|
||||||
|
I.transform = initial(I.transform)
|
||||||
return hand_index || TRUE
|
return hand_index || TRUE
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
|
|||||||
@@ -73,6 +73,11 @@
|
|||||||
/obj/item/ammo_casing/proc/bounce_away(still_warm = FALSE, bounce_delay = 3)
|
/obj/item/ammo_casing/proc/bounce_away(still_warm = FALSE, bounce_delay = 3)
|
||||||
update_icon()
|
update_icon()
|
||||||
SpinAnimation(10, 1)
|
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)
|
var/turf/T = get_turf(src)
|
||||||
if(still_warm && T && T.bullet_sizzle)
|
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.
|
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.
|
||||||
|
|||||||
@@ -101,6 +101,7 @@
|
|||||||
|
|
||||||
else if(bartender_check(target) && thrown)
|
else if(bartender_check(target) && thrown)
|
||||||
visible_message(span_notice("[src] lands onto the [target.name] without spilling a single drop."))
|
visible_message(span_notice("[src] lands onto the [target.name] without spilling a single drop."))
|
||||||
|
transform = initial(transform)
|
||||||
return
|
return
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user