Passes thrownthing to hitby (#41411)

* Passes thrownthing to hitby

* Items now also pass thrownthing

* No longer uses default arguments

Also fixes bananium shield

* Adds more arguments to hitby calls

* Standardises throw_impact

* Clears up some loose ends

* Adds back wacky comment

* Reinstates can_push=FALSE on bananium shield
This commit is contained in:
4dplanner
2018-11-15 09:25:04 +00:00
committed by yogstation13-bot
parent 8c530d1b19
commit 8d1be69d22
57 changed files with 114 additions and 114 deletions

View File

@@ -466,7 +466,7 @@
/atom/movable/proc/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
set waitfor = 0
SEND_SIGNAL(src, COMSIG_MOVABLE_IMPACT, hit_atom, throwingdatum)
return hit_atom.hitby(src)
return hit_atom.hitby(src, throwingdatum=throwingdatum)
/atom/movable/hitby(atom/movable/AM, skipcatch, hitpush = TRUE, blocked, datum/thrownthing/throwingdatum)
if(!anchored && hitpush && (!throwingdatum || (throwingdatum.force >= (move_resist * MOVE_FORCE_PUSH_RATIO))))

View File

@@ -145,9 +145,9 @@
C.throw_mode_on() //so they can catch it on the return.
return ..()
/obj/item/shield/energy/bananium/throw_impact(atom/hit_atom)
/obj/item/shield/energy/bananium/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(active)
var/caught = hit_atom.hitby(src, 0, 0)
var/caught = hit_atom.hitby(src, FALSE, FALSE, throwingdatum=throwingdatum)
if(iscarbon(hit_atom) && !caught)//if they are a carbon and they didn't catch it
GET_COMPONENT(slipper, /datum/component/slippery)
slipper.Slip(src, hit_atom)

View File

@@ -424,7 +424,7 @@
throwforce = 35
icon_state = "punching_glove"
/obj/item/punching_glove/throw_impact(atom/hit_atom)
/obj/item/punching_glove/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(!..())
if(ismovableatom(hit_atom))
var/atom/movable/AM = hit_atom

View File

@@ -107,8 +107,8 @@
/obj/mecha/attack_tk()
return
/obj/mecha/hitby(atom/movable/A as mob|obj) //wrapper
log_message("Hit by [A].", LOG_MECHA, color="red")
/obj/mecha/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum) //wrapper
log_message("Hit by [AM].", LOG_MECHA, color="red")
. = ..()

View File

@@ -513,16 +513,16 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
else
return
/obj/item/throw_impact(atom/A, datum/thrownthing/throwingdatum)
if(A && !QDELETED(A))
SEND_SIGNAL(src, COMSIG_MOVABLE_IMPACT, A, throwingdatum)
if(is_hot() && isliving(A))
var/mob/living/L = A
/obj/item/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(hit_atom && !QDELETED(hit_atom))
SEND_SIGNAL(src, COMSIG_MOVABLE_IMPACT, hit_atom, throwingdatum)
if(is_hot() && isliving(hit_atom))
var/mob/living/L = hit_atom
L.IgniteMob()
var/itempush = 1
if(w_class < 4)
itempush = 0 //too light to push anything
return A.hitby(src, 0, itempush)
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
@@ -616,7 +616,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
/obj/item/proc/get_held_item_speechspans(mob/living/carbon/user)
return
/obj/item/hitby(atom/movable/AM)
/obj/item/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
return
/obj/item/attack_hulk(mob/living/carbon/human/user)

View File

@@ -160,7 +160,7 @@
/obj/item/dice/attack_self(mob/user)
diceroll(user)
/obj/item/dice/throw_impact(atom/target)
/obj/item/dice/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
diceroll(thrownby)
. = ..()

View File

@@ -329,7 +329,7 @@
return
playsound(src.loc,'sound/weapons/bolathrow.ogg', 75, 1)
/obj/item/restraints/legcuffs/bola/throw_impact(atom/hit_atom)
/obj/item/restraints/legcuffs/bola/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(..() || !iscarbon(hit_atom))//if it gets caught or the target can't be cuffed,
return//abort
var/mob/living/carbon/C = hit_atom
@@ -357,7 +357,7 @@
w_class = WEIGHT_CLASS_SMALL
breakouttime = 60
/obj/item/restraints/legcuffs/bola/energy/throw_impact(atom/hit_atom)
/obj/item/restraints/legcuffs/bola/energy/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(iscarbon(hit_atom))
var/obj/item/restraints/legcuffs/beartrap/B = new /obj/item/restraints/legcuffs/beartrap/energy/cyborg(get_turf(hit_atom))
B.Crossed(hit_atom)
@@ -372,7 +372,7 @@
slowdown = 0
var/datum/status_effect/gonbolaPacify/effectReference
/obj/item/restraints/legcuffs/bola/gonbola/throw_impact(atom/hit_atom)
/obj/item/restraints/legcuffs/bola/gonbola/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
. = ..()
if(iscarbon(hit_atom))
var/mob/living/carbon/C = hit_atom

View File

@@ -287,13 +287,13 @@
if(proximity_flag)
consume_everything(target)
/obj/item/melee/supermatter_sword/throw_impact(target)
/obj/item/melee/supermatter_sword/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
..()
if(ismob(target))
var/mob/M
if(ismob(hit_atom))
var/mob/M = hit_atom
if(src.loc == M)
M.dropItemToGround(src)
consume_everything(target)
consume_everything(hit_atom)
/obj/item/melee/supermatter_sword/pickup(user)
..()

View File

@@ -103,10 +103,10 @@
playsound(src.loc, "sparks", 50, 1)
shock(M)
/obj/item/twohanded/mjollnir/throw_impact(atom/target)
/obj/item/twohanded/mjollnir/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
. = ..()
if(isliving(target))
shock(target)
if(isliving(hit_atom))
shock(hit_atom)
/obj/item/twohanded/mjollnir/update_icon() //Currently only here to fuck with the on-mob icons.
icon_state = "mjollnir[wielded]"

View File

@@ -35,7 +35,7 @@
/obj/item/stack/ore/bluespace_crystal/proc/blink_mob(mob/living/L)
do_teleport(L, get_turf(L), blink_range, asoundin = 'sound/effects/phasein.ogg')
/obj/item/stack/ore/bluespace_crystal/throw_impact(atom/hit_atom)
/obj/item/stack/ore/bluespace_crystal/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(!..()) // not caught in mid-air
visible_message("<span class='notice'>[src] fizzles and disappears upon impact!</span>")
var/turf/T = get_turf(hit_atom)

View File

@@ -334,7 +334,7 @@
merge(o)
. = ..()
/obj/item/stack/hitby(atom/movable/AM, skip, hitpush)
/obj/item/stack/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
if(istype(AM, merge_type))
merge(AM)
. = ..()

View File

@@ -35,7 +35,7 @@
cell = new preload_cell_type(src)
update_icon()
/obj/item/melee/baton/throw_impact(atom/hit_atom)
/obj/item/melee/baton/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
..()
//Only mob/living types have stun handling
if(status && prob(throw_hit_chance) && iscarbon(hit_atom))

View File

@@ -235,7 +235,7 @@
if(proximity && ismovableatom(O) && O != sliver)
Consume(O, user)
/obj/item/hemostat/supermatter/throw_impact(atom/hit_atom) // no instakill supermatter javelins
/obj/item/hemostat/supermatter/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum) // no instakill supermatter javelins
if(sliver)
sliver.forceMove(loc)
to_chat(usr, "<span class='notice'>\The [sliver] falls out of \the [src] as you throw them.</span>")

View File

@@ -83,7 +83,7 @@
else
return ..()
/obj/item/toy/balloon/throw_impact(atom/hit_atom)
/obj/item/toy/balloon/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(!..()) //was it caught by a mob?
balloon_burst(hit_atom)
@@ -393,7 +393,7 @@
/obj/item/toy/snappop/fire_act(exposed_temperature, exposed_volume)
pop_burst()
/obj/item/toy/snappop/throw_impact(atom/hit_atom)
/obj/item/toy/snappop/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(!..())
pop_burst()
@@ -1014,7 +1014,7 @@
icon_state = "minimeteor"
w_class = WEIGHT_CLASS_SMALL
/obj/item/toy/minimeteor/throw_impact(atom/hit_atom)
/obj/item/toy/minimeteor/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(!..())
playsound(src, 'sound/effects/meteorimpact.ogg', 40, 1)
for(var/mob/M in urange(10, src))
@@ -1062,7 +1062,7 @@
if(user.dropItemToGround(src))
throw_at(target, throw_range, throw_speed)
/obj/item/toy/snowball/throw_impact(atom/hit_atom)
/obj/item/toy/snowball/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(!..())
playsound(src, 'sound/effects/pop.ogg', 20, 1)
qdel(src)

View File

@@ -555,7 +555,7 @@
icon_state = "spearbomb[wielded]"
//THIS MIGHT BE UNBALANCED SO I DUNNO // it totally is.
/obj/item/twohanded/spear/explosive/throw_impact(atom/target)
/obj/item/twohanded/spear/explosive/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
. = ..()
if(!.) //not caught
explosive.prime()

View File

@@ -46,7 +46,7 @@
if(BURN)
playsound(src.loc, 'sound/items/welder.ogg', 100, 1)
/obj/hitby(atom/movable/AM)
/obj/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
..()
take_damage(AM.throwforce, BRUTE, "melee", 1, get_dir(src, AM))

View File

@@ -258,7 +258,7 @@
take_damage(1, BURN, 0, 0)
..()
/obj/structure/grille/hitby(AM as mob|obj)
/obj/structure/grille/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
if(isobj(AM))
if(prob(50) && anchored && !broken)
var/obj/O = AM

View File

@@ -43,7 +43,7 @@
if(!islava(newloc) && !L.on_fire)
L.update_fire()
/turf/open/lava/hitby(atom/movable/AM)
/turf/open/lava/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
if(burn_stuff(AM))
START_PROCESSING(SSobj, src)

View File

@@ -45,10 +45,10 @@
bonus_damage *= 3 //total 30 damage on cultists, 50 with ratvar
GLOB.clockwork_vitality += target.adjustFireLoss(bonus_damage) //adds the damage done to existing vitality
/obj/item/clockwork/weapon/ratvarian_spear/throw_impact(atom/target)
var/turf/T = get_turf(target)
if(isliving(target))
var/mob/living/L = target
/obj/item/clockwork/weapon/ratvarian_spear/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
var/turf/T = get_turf(hit_atom)
if(isliving(hit_atom))
var/mob/living/L = hit_atom
if(is_servant_of_ratvar(L))
if(L.put_in_active_hand(src))
L.visible_message("<span class='warning'>[L] catches [src] out of the air!</span>")

View File

@@ -262,7 +262,7 @@
to_chat(user, "<span class='warning'>The bola seems to take on a life of its own!</span>")
throw_impact(user)
/obj/item/restraints/legcuffs/bola/cult/throw_impact(atom/hit_atom)
/obj/item/restraints/legcuffs/bola/cult/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(iscultist(hit_atom))
return
. = ..()
@@ -673,10 +673,10 @@
/obj/item/twohanded/cult_spear/update_icon()
icon_state = "bloodspear[wielded]"
/obj/item/twohanded/cult_spear/throw_impact(atom/target)
var/turf/T = get_turf(target)
if(isliving(target))
var/mob/living/L = target
/obj/item/twohanded/cult_spear/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
var/turf/T = get_turf(hit_atom)
if(isliving(hit_atom))
var/mob/living/L = hit_atom
if(iscultist(L))
playsound(src, 'sound/weapons/throwtap.ogg', 50)
if(L.put_in_active_hand(src))
@@ -964,11 +964,11 @@
return TRUE
return FALSE
/obj/item/shield/mirror/throw_impact(atom/target, throwingdatum)
var/turf/T = get_turf(target)
/obj/item/shield/mirror/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
var/turf/T = get_turf(hit_atom)
var/datum/thrownthing/D = throwingdatum
if(isliving(target))
var/mob/living/L = target
if(isliving(hit_atom))
var/mob/living/L = hit_atom
if(iscultist(L))
playsound(src, 'sound/weapons/throwtap.ogg', 50)
if(L.put_in_active_hand(src))

View File

@@ -380,7 +380,7 @@
user.dropItemToGround(src)
scatter()
/obj/item/ectoplasm/revenant/throw_impact(atom/hit_atom)
/obj/item/ectoplasm/revenant/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
..()
if(inert)
return

View File

@@ -142,7 +142,7 @@
. = ..()
olddir = dir
/obj/item/assembly/infra/throw_impact()
/obj/item/assembly/infra/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
. = ..()
if(!olddir)
return

View File

@@ -130,10 +130,10 @@
return FALSE
/obj/item/assembly/mousetrap/hitby(A as mob|obj)
/obj/item/assembly/mousetrap/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
if(!armed)
return ..()
visible_message("<span class='warning'>[src] is triggered by [A].</span>")
visible_message("<span class='warning'>[src] is triggered by [AM].</span>")
triggered(null)

View File

@@ -213,9 +213,9 @@ GLOBAL_LIST_INIT(hallucination_list, list(
. = ..()
name = "alien hunter ([rand(1, 1000)])"
/obj/effect/hallucination/simple/xeno/throw_impact(A)
/obj/effect/hallucination/simple/xeno/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
update_icon("alienh_pounce")
if(A == target && target.stat!=DEAD)
if(hit_atom == target && target.stat!=DEAD)
target.Paralyze(100)
target.visible_message("<span class='danger'>[target] flails around wildly.</span>","<span class ='userdanger'>[name] pounces on you!</span>")

View File

@@ -101,10 +101,10 @@
to_chat(user, "<span class='notice'>You heat [name] with [I]!</span>")
..()
/obj/item/reagent_containers/food/drinks/throw_impact(atom/target, datum/thrownthing/throwinfo)
/obj/item/reagent_containers/food/drinks/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
. = ..()
if(!.) //if the bottle wasn't caught
smash(target, throwinfo?.thrower, TRUE)
smash(hit_atom, throwingdatum?.thrower, TRUE)
/obj/item/reagent_containers/food/drinks/proc/smash(atom/target, mob/thrower, ranged = FALSE)
if(!isGlass)

View File

@@ -418,7 +418,7 @@
isGlass = FALSE
return
/obj/item/reagent_containers/food/drinks/bottle/molotov/throw_impact(atom/target,datum/thrownthing/throwdata)
/obj/item/reagent_containers/food/drinks/bottle/molotov/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
var/firestarter = 0
for(var/datum/reagent/R in reagents.reagent_list)
for(var/A in accelerants)
@@ -426,8 +426,8 @@
firestarter = 1
break
if(firestarter && active)
target.fire_act()
new /obj/effect/hotspot(get_turf(target))
hit_atom.fire_act()
new /obj/effect/hotspot(get_turf(hit_atom))
..()
/obj/item/reagent_containers/food/drinks/bottle/molotov/attackby(obj/item/I, mob/user, params)

View File

@@ -31,7 +31,7 @@
var/color = mix_color_from_reagents(reagents.reagent_list)
add_atom_colour(color, FIXED_COLOUR_PRIORITY)
/obj/item/reagent_containers/food/snacks/egg/throw_impact(atom/hit_atom)
/obj/item/reagent_containers/food/snacks/egg/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(!..()) //was it caught by a mob?
var/turf/T = get_turf(hit_atom)
new/obj/effect/decal/cleanable/egg_smudge(T)

View File

@@ -467,8 +467,8 @@
head.color = C
add_overlay(head)
/obj/item/reagent_containers/food/snacks/lollipop/throw_impact(atom/A)
..(A)
/obj/item/reagent_containers/food/snacks/lollipop/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
..(hit_atom)
throw_speed = 1
throwforce = 0

View File

@@ -29,7 +29,7 @@
foodtype = GRAIN | DAIRY | SUGAR
var/stunning = TRUE
/obj/item/reagent_containers/food/snacks/pie/cream/throw_impact(atom/hit_atom)
/obj/item/reagent_containers/food/snacks/pie/cream/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
. = ..()
if(!.) //if we're not being caught
splat(hit_atom)

View File

@@ -228,7 +228,7 @@
if(boxes.len >= 3 && prob(25 * boxes.len))
disperse_pizzas()
/obj/item/pizzabox/throw_impact(atom/movable/AM)
/obj/item/pizzabox/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(boxes.len >= 2 && prob(20 * boxes.len))
disperse_pizzas()

View File

@@ -80,7 +80,7 @@
item_state = "dodgeball"
desc = "Used for playing the most violent and degrading of childhood games."
/obj/item/toy/beach_ball/holoball/dodgeball/throw_impact(atom/hit_atom)
/obj/item/toy/beach_ball/holoball/dodgeball/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
..()
if((ishuman(hit_atom)))
var/mob/living/carbon/M = hit_atom
@@ -123,7 +123,7 @@
else
..()
/obj/structure/holohoop/hitby(atom/movable/AM)
/obj/structure/holohoop/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
if (isitem(AM) && !istype(AM,/obj/item/projectile))
if(prob(50))
AM.forceMove(get_turf(src))

View File

@@ -91,7 +91,7 @@
squash(user)
..()
/obj/item/reagent_containers/food/snacks/grown/throw_impact(atom/hit_atom)
/obj/item/reagent_containers/food/snacks/grown/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(!..()) //was it caught by a mob?
if(seed)
for(var/datum/plant_gene/trait/T in seed.genes)

View File

@@ -47,7 +47,7 @@
return 1
return 0
/obj/item/grown/throw_impact(atom/hit_atom)
/obj/item/grown/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(!..()) //was it caught by a mob?
if(seed)
for(var/datum/plant_gene/trait/T in seed.genes)

View File

@@ -99,7 +99,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
recipes = GLOB.sand_recipes
. = ..()
/obj/item/stack/ore/glass/throw_impact(atom/hit_atom)
/obj/item/stack/ore/glass/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(..() || !ishuman(hit_atom))
return
var/mob/living/carbon/human/C = hit_atom

View File

@@ -5,7 +5,7 @@
/mob/living/carbon/alien/get_ear_protection()
return 2 //no ears
/mob/living/carbon/alien/hitby(atom/movable/AM, skipcatch, hitpush)
/mob/living/carbon/alien/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
..(AM, skipcatch = TRUE, hitpush = FALSE)

View File

@@ -54,18 +54,18 @@
weather_immunities -= "lava"
update_icons()
/mob/living/carbon/alien/humanoid/hunter/throw_impact(atom/A)
/mob/living/carbon/alien/humanoid/hunter/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(!leaping)
return ..()
pounce_cooldown = world.time + pounce_cooldown_time
if(A)
if(isliving(A))
var/mob/living/L = A
if(hit_atom)
if(isliving(hit_atom))
var/mob/living/L = hit_atom
var/blocked = FALSE
if(ishuman(A))
var/mob/living/carbon/human/H = A
if(ishuman(hit_atom))
var/mob/living/carbon/human/H = hit_atom
if(H.check_shields(src, 0, "the [name]", attack_type = LEAP_ATTACK))
blocked = TRUE
if(!blocked)
@@ -77,8 +77,8 @@
Paralyze(40, 1, 1)
toggle_leap(0)
else if(A.density && !A.CanPass(src))
visible_message("<span class ='danger'>[src] smashes into [A]!</span>", "<span class ='alertalien'>[src] smashes into [A]!</span>")
else if(hit_atom.density && !hit_atom.CanPass(src))
visible_message("<span class ='danger'>[src] smashes into [hit_atom]!</span>", "<span class ='alertalien'>[src] smashes into [hit_atom]!</span>")
Paralyze(40, 1, 1)
if(leaping)

View File

@@ -112,7 +112,7 @@
if(icon_state == "[initial(icon_state)]_thrown")
icon_state = "[initial(icon_state)]"
/obj/item/clothing/mask/facehugger/throw_impact(atom/hit_atom)
/obj/item/clothing/mask/facehugger/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
..()
if(stat == CONSCIOUS)
icon_state = "[initial(icon_state)]"

View File

@@ -93,7 +93,7 @@
return 1
return ..()
/mob/living/carbon/throw_impact(atom/hit_atom, throwingdatum)
/mob/living/carbon/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
. = ..()
var/hurt = TRUE
if(istype(throwingdatum, /datum/thrownthing))

View File

@@ -60,7 +60,7 @@
return
return TRUE
/mob/living/carbon/hitby(atom/movable/AM, skipcatch, hitpush = TRUE, blocked = FALSE)
/mob/living/carbon/hitby(atom/movable/AM, skipcatch, hitpush = TRUE, blocked = FALSE, datum/thrownthing/throwingdatum)
if(!skipcatch) //ugly, but easy
if(can_catch_item())
if(istype(AM, /obj/item))

View File

@@ -117,7 +117,7 @@
return TRUE
return FALSE
/mob/living/carbon/human/hitby(atom/movable/AM, skipcatch = FALSE, hitpush = TRUE, blocked = FALSE)
/mob/living/carbon/human/hitby(atom/movable/AM, skipcatch = FALSE, hitpush = TRUE, blocked = FALSE, datum/thrownthing/throwingdatum)
if(dna && dna.species)
var/spec_return = dna.species.spec_hitby(AM, src)
if(spec_return)

View File

@@ -401,7 +401,7 @@
retaliate(Proj.firer)
..()
/mob/living/carbon/monkey/hitby(atom/movable/AM, skipcatch = FALSE, hitpush = TRUE, blocked = FALSE)
/mob/living/carbon/monkey/hitby(atom/movable/AM, skipcatch = FALSE, hitpush = TRUE, blocked = FALSE, datum/thrownthing/throwingdatum)
if(istype(AM, /obj/item))
var/obj/item/I = AM
if(I.throwforce < src.health && I.thrownby && ishuman(I.thrownby))

View File

@@ -157,7 +157,7 @@ Maintenance panel panel is [open ? "opened" : "closed"]"},
bike_horn(A)
/mob/living/simple_animal/bot/honkbot/hitby(atom/movable/AM, skipcatch = 0, hitpush = 1, blocked = 0)
/mob/living/simple_animal/bot/honkbot/hitby(atom/movable/AM, skipcatch = FALSE, hitpush = TRUE, blocked = FALSE, datum/thrownthing/throwingdatum)
if(istype(AM, /obj/item))
playsound(src, honksound, 50, TRUE, -1)
var/obj/item/I = AM

View File

@@ -220,7 +220,7 @@ Auto Patrol: []"},
..()
/mob/living/simple_animal/bot/secbot/hitby(atom/movable/AM, skipcatch = FALSE, hitpush = TRUE, blocked = FALSE)
/mob/living/simple_animal/bot/secbot/hitby(atom/movable/AM, skipcatch = FALSE, hitpush = TRUE, blocked = FALSE, datum/thrownthing/throwingdatum)
if(istype(AM, /obj/item))
var/obj/item/I = AM
if(I.throwforce < src.health && I.thrownby && ishuman(I.thrownby))

View File

@@ -47,18 +47,18 @@
if(!charging)
..()
/mob/living/simple_animal/hostile/guardian/charger/throw_impact(atom/A)
/mob/living/simple_animal/hostile/guardian/charger/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(!charging)
return ..()
else if(A)
if(isliving(A) && A != summoner)
var/mob/living/L = A
else if(hit_atom)
if(isliving(hit_atom) && hit_atom != summoner)
var/mob/living/L = hit_atom
var/blocked = FALSE
if(hasmatchingsummoner(A)) //if the summoner matches don't hurt them
if(hasmatchingsummoner(hit_atom)) //if the summoner matches don't hurt them
blocked = TRUE
if(ishuman(A))
var/mob/living/carbon/human/H = A
if(ishuman(hit_atom))
var/mob/living/carbon/human/H = hit_atom
if(H.check_shields(src, 90, "[name]", attack_type = THROWN_PROJECTILE_ATTACK))
blocked = TRUE
if(!blocked)

View File

@@ -249,7 +249,7 @@
/mob/living/simple_animal/hostile/jungle/leaper/Goto()
return
/mob/living/simple_animal/hostile/jungle/leaper/throw_impact()
/mob/living/simple_animal/hostile/jungle/leaper/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
return
/mob/living/simple_animal/hostile/jungle/leaper/update_icons()

View File

@@ -147,7 +147,7 @@
update_icons()
Goto(target, move_to_delay, minimum_distance)
/mob/living/simple_animal/hostile/jungle/mook/throw_impact(atom/hit_atom, throwingdatum)
/mob/living/simple_animal/hostile/jungle/mook/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
. = ..()
if(isliving(hit_atom) && attack_state == MOOK_ATTACK_ACTIVE)
var/mob/living/L = hit_atom

View File

@@ -156,12 +156,12 @@ Difficulty: Hard
DestroySurroundings()
..()
/mob/living/simple_animal/hostile/megafauna/bubblegum/throw_impact(atom/A)
/mob/living/simple_animal/hostile/megafauna/bubblegum/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(!charging)
return ..()
else if(isliving(A))
var/mob/living/L = A
else if(isliving(hit_atom))
var/mob/living/L = hit_atom
L.visible_message("<span class='danger'>[src] slams into [L]!</span>", "<span class='userdanger'>[src] slams into you!</span>")
L.apply_damage(40, BRUTE)
playsound(get_turf(L), 'sound/effects/meteorimpact.ogg', 100, 1)

View File

@@ -45,7 +45,7 @@
visible_message("<span class='danger'>[P] has a reduced effect on [src]!</span>")
..()
/mob/living/simple_animal/hostile/asteroid/hitby(atom/movable/AM)//No floor tiling them to death, wiseguy
/mob/living/simple_animal/hostile/asteroid/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum) //No floor tiling them to death, wiseguy
if(istype(AM, /obj/item))
var/obj/item/T = AM
if(!stat)

View File

@@ -170,7 +170,7 @@
if(M.a_intent == INTENT_HARM)
Bruise()
/mob/living/simple_animal/hostile/mushroom/hitby(atom/movable/AM)
/mob/living/simple_animal/hostile/mushroom/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
..()
if(istype(AM, /obj/item))
var/obj/item/T = AM

View File

@@ -56,7 +56,7 @@
//If we hit the Ninja who owns this Katana, they catch it.
//Works for if the Ninja throws it or it throws itself or someone tries
//To throw it at the ninja
/obj/item/energy_katana/throw_impact(atom/hit_atom)
/obj/item/energy_katana/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(ishuman(hit_atom))
var/mob/living/carbon/human/H = hit_atom
if(istype(H.wear_suit, /obj/item/clothing/suit/space/space_ninja))

View File

@@ -96,7 +96,7 @@
/obj/item/paperplane/throw_at(atom/target, range, speed, mob/thrower, spin=FALSE, diagonals_first = FALSE, datum/callback/callback)
. = ..(target, range, speed, thrower, FALSE, diagonals_first, callback)
/obj/item/paperplane/throw_impact(atom/hit_atom)
/obj/item/paperplane/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(iscarbon(hit_atom))
var/mob/living/carbon/C = hit_atom
if(C.can_catch_item(TRUE))

View File

@@ -759,7 +759,7 @@
/obj/item/light/bulb/broken
status = LIGHT_BROKEN
/obj/item/light/throw_impact(atom/hit_atom)
/obj/item/light/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(!..()) //not caught by a mob
shatter()

View File

@@ -65,7 +65,7 @@
else
return ..()
/obj/item/ammo_casing/throw_impact(atom/A)
/obj/item/ammo_casing/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(heavy_metal)
bounce_away(FALSE, NONE)
. = ..()

View File

@@ -71,9 +71,9 @@
reagents.expose_temperature(exposed_temperature)
..()
/obj/item/reagent_containers/throw_impact(atom/target)
/obj/item/reagent_containers/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
. = ..()
SplashReagents(target, TRUE)
SplashReagents(hit_atom, TRUE)
/obj/item/reagent_containers/proc/bartender_check(atom/target)
. = FALSE

View File

@@ -334,7 +334,7 @@
. = TRUE
/obj/machinery/disposal/bin/hitby(atom/movable/AM)
/obj/machinery/disposal/bin/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
if(isitem(AM) && AM.CanEnterDisposals())
if(prob(75))
AM.forceMove(src)

View File

@@ -363,7 +363,7 @@
icon_state = "snappop"
w_class = WEIGHT_CLASS_TINY
/obj/item/spellpacket/lightningbolt/throw_impact(atom/hit_atom)
/obj/item/spellpacket/lightningbolt/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(!..())
if(isliving(hit_atom))
var/mob/living/M = hit_atom

View File

@@ -112,7 +112,7 @@
else
return ..()
/obj/item/bodypart/throw_impact(atom/hit_atom)
/obj/item/bodypart/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
..()
if(status != BODYPART_ROBOTIC)
playsound(get_turf(src), 'sound/misc/splort.ogg', 50, 1, -1)