mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
[MIRROR] Mop do_after multi use
(#11633) Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
committed by
GitHub
parent
4f4098122b
commit
980ece6324
@@ -197,18 +197,21 @@
|
||||
|
||||
|
||||
|
||||
/obj/machinery/door/hitby(AM as mob|obj, var/speed=5)
|
||||
|
||||
/obj/machinery/door/hitby(atom/movable/source, var/speed=5)
|
||||
..()
|
||||
visible_message(span_danger("[src.name] was hit by [AM]."))
|
||||
visible_message(span_danger("[src.name] was hit by [source]."))
|
||||
var/tforce = 0
|
||||
if(ismob(AM))
|
||||
tforce = 15 * (speed/5)
|
||||
else
|
||||
tforce = AM:throwforce * (speed/5)
|
||||
if(ismob(source))
|
||||
tforce = 15 * (speed/THROWFORCE_SPEED_DIVISOR)
|
||||
else if(isobj(source))
|
||||
var/obj/object = source
|
||||
if(isitem(object))
|
||||
var/obj/item/our_item = object
|
||||
tforce = our_item.throwforce * (speed/THROWFORCE_SPEED_DIVISOR)
|
||||
else
|
||||
tforce = object.w_class * (speed/THROWFORCE_SPEED_DIVISOR)
|
||||
playsound(src, hitsound, 100, 1)
|
||||
take_damage(tforce)
|
||||
return
|
||||
|
||||
/obj/machinery/door/attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
Reference in New Issue
Block a user