mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-09 16:12:17 +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
@@ -121,13 +121,14 @@
|
||||
return
|
||||
destroy()
|
||||
|
||||
/obj/machinery/camera/hitby(AM as mob|obj)
|
||||
/obj/machinery/camera/hitby(atom/movable/source)
|
||||
..()
|
||||
if (istype(AM, /obj))
|
||||
var/obj/item/O = AM
|
||||
if(O.throwforce >= src.toughness)
|
||||
visible_message(span_boldwarning("[src] was hit by [O]."))
|
||||
take_damage(O.throwforce)
|
||||
if (!isobj(source))
|
||||
return
|
||||
var/obj/item/O = source
|
||||
if(O.throwforce >= src.toughness)
|
||||
visible_message(span_boldwarning("[src] was hit by [O]."))
|
||||
take_damage(O.throwforce)
|
||||
|
||||
/obj/machinery/camera/proc/setViewRange(var/num = 7)
|
||||
src.view_range = num
|
||||
|
||||
@@ -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