throw at mobs laying down

This commit is contained in:
SandPoot
2023-12-18 14:07:25 -03:00
parent b36da8f5d7
commit b9a422ee2d
35 changed files with 243 additions and 171 deletions
+3 -1
View File
@@ -168,7 +168,9 @@
diceroll(user)
/obj/item/dice/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
diceroll(thrownby)
var/mob/thrown_by = thrownby?.resolve()
if(thrown_by)
diceroll(thrown_by)
. = ..()
/obj/item/dice/proc/diceroll(mob/user)
+5 -4
View File
@@ -289,10 +289,11 @@
"<span class='userdanger'>[M] has been splashed with something!</span>")
var/turf/TT = get_turf(hit_atom)
var/throwerstring
if(thrownby)
log_combat(thrownby, M, "splashed", R)
var/turf/AT = get_turf(thrownby)
throwerstring = " THROWN BY [key_name(thrownby)] at [AT] (AREACOORD(AT)]"
var/mob/thrown_by = thrownby?.resolve()
if(thrown_by)
log_combat(thrown_by, M, "splashed", R)
var/turf/AT = get_turf(thrown_by)
throwerstring = " THROWN BY [key_name(thrown_by)] at [AT] (AREACOORD(AT)]"
log_reagent("SPLASH: [src] mob throw_impact() onto [key_name(hit_atom)] at [TT] ([AREACOORD(TT)])[throwerstring] - [R]")
reagents.reaction(hit_atom, TOUCH)
reagents.clear_reagents()
+8 -5
View File
@@ -61,9 +61,10 @@
/obj/item/melee/baton/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
..()
var/mob/thrown_by = thrownby?.resolve()
//Only mob/living types have stun handling
if(turned_on && prob(throw_hit_chance) && iscarbon(hit_atom) && thrownby)
baton_stun(hit_atom, thrownby, shoving = TRUE)
if(turned_on && prob(throw_hit_chance) && iscarbon(hit_atom) && thrown_by)
baton_stun(hit_atom, thrown_by, shoving = TRUE)
/obj/item/melee/baton/loaded //this one starts with a cell pre-installed.
preload_cell_type = /obj/item/stock_parts/cell/high/plus
@@ -387,8 +388,9 @@
/obj/item/melee/baton/boomerang/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(turned_on)
var/caught = hit_atom.hitby(src, FALSE, FALSE, throwingdatum=throwingdatum)
if(ishuman(hit_atom) && !caught && prob(throw_hit_chance) && thrownby)//if they are a carbon and they didn't catch it
baton_stun(hit_atom, thrownby, shoving = TRUE)
var/mob/thrown_by = thrownby?.resolve()
if(ishuman(hit_atom) && !caught && prob(throw_hit_chance) && thrown_by)//if they are a carbon and they didn't catch it
baton_stun(hit_atom, thrown_by, shoving = TRUE)
if(thrownby && !caught)
throw_back()
else
@@ -397,8 +399,9 @@
/obj/item/melee/baton/boomerang/proc/throw_back()
set waitfor = FALSE
sleep(1)
var/mob/thrown_by = thrownby?.resolve()
if(!QDELETED(src))
throw_at(thrownby, throw_range+2, throw_speed, null, TRUE)
throw_at(thrown_by, throw_range+2, throw_speed, null, TRUE)
/obj/item/melee/baton/boomerang/update_icon()
if(turned_on)