Fixed thrownby hard del (#17686)

This commit is contained in:
DamianX
2022-05-16 22:48:42 +09:00
committed by GitHub
parent 61c8684192
commit 0766c6d236
12 changed files with 23 additions and 22 deletions
+3 -2
View File
@@ -82,7 +82,8 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/goonstation/effect
// non-clothing items
var/datum/dog_fashion/dog_fashion = null
var/mob/thrownby = null
/// UID of a /mob
var/thrownby
//So items can have custom embedd values
//Because customisation is king
@@ -651,7 +652,7 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/goonstation/effect
return hit_atom.hitby(src, 0, itempush, throwingdatum = throwingdatum)
/obj/item/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback, force)
thrownby = thrower
thrownby = thrower.UID()
callback = CALLBACK(src, .proc/after_throw, callback) //replace their callback with our own
. = ..(target, range, speed, thrower, spin, diagonals_first, callback, force)
+1 -1
View File
@@ -315,7 +315,7 @@
diceroll(user)
/obj/item/dice/throw_impact(atom/target)
diceroll(thrownby)
diceroll(locateUID(thrownby))
. = ..()
/obj/item/dice/proc/diceroll(mob/user)
+1 -1
View File
@@ -206,7 +206,7 @@
visible_message("<span class='boldwarning'>[owner] Deflects [I] directly back at the thrower! It's a home run!</span>", "<span class='boldwarning'>You deflect [I] directly back at the thrower! It's a home run!</span>")
playsound(get_turf(owner), 'sound/weapons/homerun.ogg', 100, 1)
do_attack_animation(I, ATTACK_EFFECT_DISARM)
I.throw_at(I.thrownby, 20, 20, owner)
I.throw_at(locateUID(I.thrownby), 20, 20, owner)
deflectmode = FALSE
if(!istype(I, /obj/item/beach_ball))
lastdeflect = world.time + 3000