mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Allows you to YEET mob holders
This commit is contained in:
@@ -27,6 +27,19 @@ var/list/holder_mob_icon_cache = list()
|
||||
..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/weapon/holder/throw_at(atom/target, range, speed, thrower)
|
||||
if(held_mob)
|
||||
held_mob.forceMove(loc)
|
||||
var/thrower_mob_size = 1
|
||||
if(ismob(thrower))
|
||||
var/mob/M = thrower
|
||||
thrower_mob_size = M.mob_size
|
||||
var/mob_range = round(range * min(thrower_mob_size / held_mob.mob_size, 1))
|
||||
held_mob.throw_at(target, mob_range, speed, thrower)
|
||||
held_mob = null
|
||||
drop_items()
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/holder/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
Reference in New Issue
Block a user