[MIRROR] Mop do_after multi use

(#11633)

Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-09-14 00:42:34 -07:00
committed by GitHub
parent 4f4098122b
commit 980ece6324
32 changed files with 216 additions and 364 deletions

View File

@@ -33,14 +33,19 @@
healthcheck()
return
/obj/structure/alien/hitby(AM as mob|obj)
/obj/structure/alien/hitby(atom/movable/source)
..()
visible_message(span_danger("\The [src] was hit by \the [AM]."))
var/tforce = 0
if(ismob(AM))
tforce = 10
else
tforce = AM:throwforce
visible_message(span_danger("\The [src] was hit by \the [source]."))
var/tforce
if(ismob(source))
tforce = 15
else if(isobj(source))
var/obj/object = source
if(isitem(object))
var/obj/item/our_item = object
tforce = our_item.throwforce
else
tforce = object.w_class
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
health = max(0, health - tforce)
healthcheck()

View File

@@ -285,17 +285,17 @@
tail_image.layer = BODY_LAYER + ((dir in tail_lower_dirs) ? TAIL_LOWER_LAYER : tail_layering)
add_overlay(tail_image)
/obj/structure/gargoyle/hitby(atom/movable/AM as mob|obj,var/speed = THROWFORCE_SPEED_DIVISOR)
/obj/structure/gargoyle/hitby(atom/movable/source ,var/speed = THROWFORCE_SPEED_DIVISOR)
var/mob/living/carbon/human/gargoyle = WR_gargoyle.resolve()
if(!gargoyle)
return
if(istype(AM,/obj/item) && gargoyle.vore_selected && gargoyle.trash_catching)
var/obj/item/I = AM
if(isitem(source) && gargoyle.vore_selected && gargoyle.trash_catching)
var/obj/item/I = source
if(gargoyle.adminbus_trash || is_type_in_list(I, GLOB.edible_trash) && I.trash_eatable && !is_type_in_list(I, GLOB.item_vore_blacklist))
gargoyle.hitby(AM, speed)
gargoyle.hitby(source, speed)
return
else if(isliving(AM))
var/mob/living/L = AM
else if(isliving(source))
var/mob/living/L = source
if(gargoyle.throw_vore && L.throw_vore && gargoyle.can_be_drop_pred && L.can_be_drop_prey)
var/drop_prey_temp = FALSE
if(gargoyle.can_be_drop_prey)

View File

@@ -257,14 +257,14 @@
take_damage(damage)
return
/obj/structure/low_wall/hitby(AM as mob|obj, var/speed)
/obj/structure/low_wall/hitby(atom/movable/source, var/speed)
..()
var/tforce = 0
if(ismob(AM)) // All mobs have a multiplier and a size according to mob_defines.dm
var/mob/I = AM
if(ismob(source)) // All mobs have a multiplier and a size according to mob_defines.dm
var/mob/I = source
tforce = I.mob_size * (speed/THROWFORCE_SPEED_DIVISOR)
else if(isitem(AM))
var/obj/item/O = AM
else if(isitem(source))
var/obj/item/O = source
tforce = O.throwforce * (speed/THROWFORCE_SPEED_DIVISOR)
if (tforce < 15)
return

View File

@@ -162,21 +162,21 @@
return !anchored // If it's anchored, it'll block air.
return TRUE // Don't stop airflow from the other sides.
/obj/structure/window/hitby(AM as mob|obj)
/obj/structure/window/hitby(atom/movable/source)
..()
visible_message(span_danger("[src] was hit by [AM]."))
visible_message(span_danger("[src] was hit by [source]."))
var/tforce = 0
if(ismob(AM))
if(ismob(source))
tforce = 40
else if(isobj(AM))
var/obj/item/I = AM
else if(isobj(source))
var/obj/item/I = source
tforce = I.throwforce
if(reinf) tforce *= 0.25
if(health - tforce <= 7 && !reinf)
anchored = FALSE
update_verbs()
update_nearby_icons()
step(src, get_dir(AM, src))
step(src, get_dir(source, src))
take_damage(tforce)
/obj/structure/window/attack_tk(mob/user as mob)