diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 67d8e0015b05..72360e203502 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -661,7 +661,7 @@ - `G`: The grab hitting this atom - Return: `TRUE` to skip attackby() and afterattack() or `FALSE` */ -/atom/proc/grab_attack(mob/user, obj/item/grab/grab) +/atom/proc/grab_attack(obj/item/grab/grab, mob/user) return FALSE /atom/proc/climb_on() diff --git a/code/game/machinery/OpTable.dm b/code/game/machinery/OpTable.dm index 33495ed800ef..cb50c4a62712 100644 --- a/code/game/machinery/OpTable.dm +++ b/code/game/machinery/OpTable.dm @@ -28,7 +28,7 @@ . = ..() to_chat(user, SPAN_NOTICE("The neural suppressors are switched [suppressing ? "on" : "off"].")) -/obj/machinery/optable/grab_attack(mob/user, obj/item/grab/grab) +/obj/machinery/optable/grab_attack(obj/item/grab/grab, mob/user) if(isliving(grab.affecting) && check_table(grab.affecting)) take_victim(grab.affecting, user) qdel(grab) diff --git a/code/game/machinery/bodyscanner.dm b/code/game/machinery/bodyscanner.dm index de125f4f4b0b..5658432aa1fa 100644 --- a/code/game/machinery/bodyscanner.dm +++ b/code/game/machinery/bodyscanner.dm @@ -68,7 +68,7 @@ if(istype(new_state)) updateUsrDialog() -/obj/machinery/bodyscanner/grab_attack(mob/user, obj/item/grab/grab) +/obj/machinery/bodyscanner/grab_attack(obj/item/grab/grab, mob/user) var/mob/living/victim = grab.get_affecting_mob() if(istype(victim) && user_can_move_target_inside(victim, user)) qdel(grab) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index bdb914cb2a53..a30c7dfaf794 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -392,7 +392,7 @@ attempt_enter(dropping, user) return TRUE -/obj/machinery/cryopod/grab_attack(mob/user, obj/item/grab/grab) +/obj/machinery/cryopod/grab_attack(obj/item/grab/grab, mob/user) var/mob/living/victim = grab.get_affecting_mob() if(istype(victim) && istype(user)) if(occupant) diff --git a/code/game/machinery/kitchen/cooking_machines/_cooker.dm b/code/game/machinery/kitchen/cooking_machines/_cooker.dm index 6eb0baafedbd..96a007811d7d 100644 --- a/code/game/machinery/kitchen/cooking_machines/_cooker.dm +++ b/code/game/machinery/kitchen/cooking_machines/_cooker.dm @@ -52,7 +52,7 @@ return SPAN_NOTICE("Wait for \the [src] to finish first!") return ..() -/obj/machinery/cooker/grab_attack(mob/user, obj/item/grab/grab) +/obj/machinery/cooker/grab_attack(obj/item/grab/grab, mob/user) // We are trying to cook a grabbed mob. var/mob/living/victim = grab.get_affecting_mob() if(!istype(victim)) diff --git a/code/game/machinery/kitchen/gibber.dm b/code/game/machinery/kitchen/gibber.dm index 0821e288447c..ce3f44d19386 100644 --- a/code/game/machinery/kitchen/gibber.dm +++ b/code/game/machinery/kitchen/gibber.dm @@ -71,7 +71,7 @@ return SPAN_NOTICE("You must wait for \the [src] to finish operating first!") return ..() -/obj/machinery/gibber/grab_attack(mob/user, obj/item/grab/grab) +/obj/machinery/gibber/grab_attack(obj/item/grab/grab, mob/user) if(grab.force_danger()) move_into_gibber(user, grab.affecting) qdel(grab) diff --git a/code/game/machinery/kitchen/microwave.dm b/code/game/machinery/kitchen/microwave.dm index 518c2ee7f8e6..b1d6db5feca8 100644 --- a/code/game/machinery/kitchen/microwave.dm +++ b/code/game/machinery/kitchen/microwave.dm @@ -49,7 +49,7 @@ * Item Adding ********************/ -/obj/machinery/microwave/grab_attack(mob/user, obj/item/grab/grab) +/obj/machinery/microwave/grab_attack(obj/item/grab/grab, mob/user) to_chat(user, SPAN_WARNING("This is ridiculous. You can not fit \the [grab.affecting] into \the [src].")) return TRUE diff --git a/code/game/machinery/suit_cycler.dm b/code/game/machinery/suit_cycler.dm index 65d743356f95..784d08b1f4a2 100644 --- a/code/game/machinery/suit_cycler.dm +++ b/code/game/machinery/suit_cycler.dm @@ -187,7 +187,7 @@ return TRUE return FALSE -/obj/machinery/suit_cycler/grab_attack(mob/user, obj/item/grab/grab) +/obj/machinery/suit_cycler/grab_attack(obj/item/grab/grab, mob/user) var/mob/living/victim = grab.get_affecting_mob() if(istype(victim) && try_move_inside(victim, user)) qdel(grab) diff --git a/code/game/objects/effects/chem/foam.dm b/code/game/objects/effects/chem/foam.dm index ddeb7bfd1176..5ff195477656 100644 --- a/code/game/objects/effects/chem/foam.dm +++ b/code/game/objects/effects/chem/foam.dm @@ -165,7 +165,7 @@ return TRUE -/obj/structure/foamedmetal/grab_attack(mob/user, obj/item/grab/grab) +/obj/structure/foamedmetal/grab_attack(obj/item/grab/grab, mob/user) grab.affecting.forceMove(loc) visible_message(SPAN_DANGER("\The [user] smashes \the [grab.affecting] through the foamed metal wall!")) qdel(grab) diff --git a/code/game/objects/items/weapons/implants/implantchair.dm b/code/game/objects/items/weapons/implants/implantchair.dm index a801a0015868..7d2dfe25367c 100644 --- a/code/game/objects/items/weapons/implants/implantchair.dm +++ b/code/game/objects/items/weapons/implants/implantchair.dm @@ -68,7 +68,7 @@ src.updateUsrDialog() src.add_fingerprint(usr) -/obj/machinery/implantchair/grab_attack(mob/user, obj/item/grab/grab) +/obj/machinery/implantchair/grab_attack(obj/item/grab/grab, mob/user) var/mob/living/victim = grab.get_affecting_mob() if(istype(victim) && victim.can_enter_cryopod(user) && put_mob(victim)) qdel(grab) diff --git a/code/game/objects/structures/__structure.dm b/code/game/objects/structures/__structure.dm index e8daf3b81b2f..db2c0c927077 100644 --- a/code/game/objects/structures/__structure.dm +++ b/code/game/objects/structures/__structure.dm @@ -215,7 +215,7 @@ AM.reset_offsets() AM.reset_plane_and_layer() -/obj/structure/grab_attack(mob/user, obj/item/grab/grab) +/obj/structure/grab_attack(obj/item/grab/grab, mob/user) if (!grab.force_danger()) to_chat(user, SPAN_WARNING("You need a better grip to do that!")) diff --git a/code/game/objects/structures/catwalk.dm b/code/game/objects/structures/catwalk.dm index 105370c56468..28d320d564f9 100644 --- a/code/game/objects/structures/catwalk.dm +++ b/code/game/objects/structures/catwalk.dm @@ -83,7 +83,7 @@ if(!QDELETED(src) && severity != 3) physically_destroyed() -/obj/structure/catwalk/grab_attack(mob/user, obj/item/grab/grab) +/obj/structure/catwalk/grab_attack(obj/item/grab/grab, mob/user) if(atom_flags & ATOM_FLAG_CLIMBABLE) var/obj/occupied = turf_is_crowded() if (occupied) diff --git a/code/game/objects/structures/crates_lockers/closets/__closet.dm b/code/game/objects/structures/crates_lockers/closets/__closet.dm index c984006e935b..3130191f59f1 100644 --- a/code/game/objects/structures/crates_lockers/closets/__closet.dm +++ b/code/game/objects/structures/crates_lockers/closets/__closet.dm @@ -245,7 +245,7 @@ var/global/list/closets = list() take_damage(proj_damage, Proj.atom_damage_type) // Override this so the logic in attackby() can run. -/obj/structure/closet/grab_attack(mob/user, obj/item/grab/grab) +/obj/structure/closet/grab_attack(obj/item/grab/grab, mob/user) return FALSE /obj/structure/closet/attackby(obj/item/used_item, mob/user) diff --git a/code/game/objects/structures/fires.dm b/code/game/objects/structures/fires.dm index 86b21b0738c0..0f15c4f6dc49 100644 --- a/code/game/objects/structures/fires.dm +++ b/code/game/objects/structures/fires.dm @@ -219,7 +219,7 @@ return ..() -/obj/structure/fire_source/grab_attack(mob/user, obj/item/grab/grab) +/obj/structure/fire_source/grab_attack(obj/item/grab/grab, mob/user) var/mob/living/victim = grab.get_affecting_mob() if(!istype(victim)) return FALSE @@ -528,7 +528,7 @@ color = /decl/material/solid/metal/iron::color obj_flags = OBJ_FLAG_HOLLOW -/obj/structure/fire_source/stove/grab_attack(mob/user, obj/item/grab/grab) +/obj/structure/fire_source/stove/grab_attack(obj/item/grab/grab, mob/user) return FALSE /obj/structure/fire_source/fireplace @@ -545,7 +545,7 @@ light_color_mid = "#d47b27" light_color_low = "#e44141" -/obj/structure/fire_source/fireplace/grab_attack(mob/user, obj/item/grab/grab) +/obj/structure/fire_source/fireplace/grab_attack(obj/item/grab/grab, mob/user) return FALSE #define MATERIAL_FIREPLACE(material_name) \ diff --git a/code/game/objects/structures/hand_cart.dm b/code/game/objects/structures/hand_cart.dm index 3473025cbc9d..e87082ef4650 100644 --- a/code/game/objects/structures/hand_cart.dm +++ b/code/game/objects/structures/hand_cart.dm @@ -35,7 +35,7 @@ carrying.forceMove(get_turf(src)) carrying = null -/obj/structure/hand_cart/grab_attack(mob/user, obj/item/grab/grab) +/obj/structure/hand_cart/grab_attack(obj/item/grab/grab, mob/user) if(isobj(grab.affecting)) to_chat(user, SPAN_NOTICE("You start loading \the [grab.affecting] onto \the [src].")) if(load_item(grab.affecting, user)) diff --git a/code/game/objects/structures/mineral_bath.dm b/code/game/objects/structures/mineral_bath.dm index 00cfb4e075a8..9bfecd7b1006 100644 --- a/code/game/objects/structures/mineral_bath.dm +++ b/code/game/objects/structures/mineral_bath.dm @@ -17,7 +17,7 @@ venus.adjust_multi(/decl/material/gas/chlorine, MOLES_N2STANDARD, /decl/material/gas/hydrogen, MOLES_O2STANDARD) return venus -/obj/structure/mineral_bath/grab_attack(mob/user, obj/item/grab/grab) +/obj/structure/mineral_bath/grab_attack(obj/item/grab/grab, mob/user) if(enter_bath(grab.affecting)) qdel(grab) return TRUE diff --git a/code/game/objects/structures/railing.dm b/code/game/objects/structures/railing.dm index e1bd7c3e6030..bd89fda94cda 100644 --- a/code/game/objects/structures/railing.dm +++ b/code/game/objects/structures/railing.dm @@ -196,7 +196,7 @@ WOOD_RAILING_SUBTYPE(yew) return 0 return 1 -/obj/structure/railing/grab_attack(mob/user, obj/item/grab/grab) +/obj/structure/railing/grab_attack(obj/item/grab/grab, mob/user) var/mob/living/victim = grab.get_affecting_mob() if(!istype(victim) || !istype(user)) return ..() diff --git a/code/game/objects/structures/stool_bed_chair_nest_sofa/bed.dm b/code/game/objects/structures/stool_bed_chair_nest_sofa/bed.dm index f2ceedc65aa7..70886c64c30b 100644 --- a/code/game/objects/structures/stool_bed_chair_nest_sofa/bed.dm +++ b/code/game/objects/structures/stool_bed_chair_nest_sofa/bed.dm @@ -127,7 +127,7 @@ remove_padding() return TRUE -/obj/structure/bed/grab_attack(mob/user, obj/item/grab/grab) +/obj/structure/bed/grab_attack(obj/item/grab/grab, mob/user) var/mob/living/victim = grab.get_affecting_mob() if(istype(victim) && istype(user)) user.visible_message(SPAN_NOTICE("\The [user] attempts to put \the [victim] onto \the [src]!")) diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index 67dcd82a8bc3..4d9e2bd2e9cb 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -148,7 +148,7 @@ var/global/list/hygiene_props = list() ..() icon_state = "toilet[open][cistern]" -/obj/structure/hygiene/toilet/grab_attack(mob/user, obj/item/grab/grab) +/obj/structure/hygiene/toilet/grab_attack(obj/item/grab/grab, mob/user) var/mob/living/victim = grab.get_affecting_mob() if(istype(victim)) user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) @@ -209,7 +209,7 @@ var/global/list/hygiene_props = list() directional_offset = @'{"NORTH":{"y":-32}, "SOUTH":{"y":32}, "EAST":{"x":-32}, "WEST":{"x":32}}' obj_flags = OBJ_FLAG_MOVES_UNSUPPORTED -/obj/structure/hygiene/urinal/grab_attack(mob/user, obj/item/grab/grab) +/obj/structure/hygiene/urinal/grab_attack(obj/item/grab/grab, mob/user) var/mob/living/victim = grab.get_affecting_mob() if(istype(victim)) if(!victim.loc == get_turf(src)) diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index a9bc5790f1f9..751cac70ac90 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -311,7 +311,7 @@ for(var/obj/item/thing in .) thing.set_color(paint_color) -/obj/structure/window/grab_attack(mob/user, obj/item/grab/grab) +/obj/structure/window/grab_attack(obj/item/grab/grab, mob/user) if (user.a_intent != I_HURT) return TRUE if (!grab.force_danger()) diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 53ae3ceaf9dd..87f73bef4ee0 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -219,7 +219,7 @@ /turf/attack_robot(var/mob/user) return attack_hand_with_interaction_checks(user) -/turf/grab_attack(mob/user, obj/item/grab/grab) +/turf/grab_attack(obj/item/grab/grab, mob/user) if (grab.affecting != user) grab.affecting.DoMove(get_dir(grab.affecting.loc, src), user, TRUE) return TRUE diff --git a/code/modules/butchery/butchery_hook.dm b/code/modules/butchery/butchery_hook.dm index 1782a2a13bc3..bd34f55f0c2b 100644 --- a/code/modules/butchery/butchery_hook.dm +++ b/code/modules/butchery/butchery_hook.dm @@ -53,7 +53,7 @@ to_chat(user, SPAN_WARNING("\The [occupant] is so badly mangled that removing them from \the [initial(name)] would be pointless.")) return TRUE -/obj/structure/meat_hook/grab_attack(mob/user, obj/item/grab/grab) +/obj/structure/meat_hook/grab_attack(obj/item/grab/grab, mob/user) var/mob/victim = grab.get_affecting_mob() if(istype(victim) && isturf(victim.loc)) try_spike(victim, user) diff --git a/code/modules/mob/grab/grab_object.dm b/code/modules/mob/grab/grab_object.dm index ea56cbe3ff05..5003b39ae9b4 100644 --- a/code/modules/mob/grab/grab_object.dm +++ b/code/modules/mob/grab/grab_object.dm @@ -117,7 +117,7 @@ /obj/item/grab/resolve_attackby(atom/A, mob/user, var/click_params) if(QDELETED(src) || !current_grab || !assailant) return TRUE - if(A.grab_attack(user, src) || current_grab.hit_with_grab(src, A, get_dist(user, A) <= 1)) + if(A.grab_attack(src, user) || current_grab.hit_with_grab(src, A, get_dist(user, A) <= 1)) return TRUE . = ..() diff --git a/code/modules/multiz/ladder.dm b/code/modules/multiz/ladder.dm index ddfa3e18dee7..e737b9164543 100644 --- a/code/modules/multiz/ladder.dm +++ b/code/modules/multiz/ladder.dm @@ -111,7 +111,7 @@ return ..() // Override to allow attackby() flow to function with grabs. -/obj/structure/ladder/grab_attack(mob/user, obj/item/grab/grab) +/obj/structure/ladder/grab_attack(obj/item/grab/grab, mob/user) return FALSE /obj/structure/ladder/attackby(obj/item/I, mob/user) diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm index c797c2ed1012..6c87855793ca 100644 --- a/code/modules/recycling/conveyor2.dm +++ b/code/modules/recycling/conveyor2.dm @@ -81,7 +81,7 @@ var/global/list/all_conveyor_switches = list() if(items_moved >= 10) break -/obj/machinery/conveyor/grab_attack(mob/user, obj/item/grab/grab) +/obj/machinery/conveyor/grab_attack(obj/item/grab/grab, mob/user) step(grab.affecting, get_dir(grab.affecting.loc, src)) return TRUE diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index 07c3c40b27b5..17283b5fef7e 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -74,7 +74,7 @@ var/global/list/diversion_junctions = list() return SPAN_NOTICE("Eject the items first!") return ..() -/obj/machinery/disposal/grab_attack(mob/user, obj/item/grab/grab) +/obj/machinery/disposal/grab_attack(obj/item/grab/grab, mob/user) var/mob/living/victim = grab.get_affecting_mob() if(istype(victim)) user.visible_message(SPAN_DANGER("\The [user] starts putting \the [victim] into the disposal.")) diff --git a/mods/gamemodes/deity/structures/altar.dm b/mods/gamemodes/deity/structures/altar.dm index c419a7f67f2e..888e4c935a9d 100644 --- a/mods/gamemodes/deity/structures/altar.dm +++ b/mods/gamemodes/deity/structures/altar.dm @@ -16,7 +16,7 @@ to_chat(src, SPAN_DANGER("You've lost an altar!")) return ..() -/obj/structure/deity/altar/grab_attack(mob/user, obj/item/grab/grab) +/obj/structure/deity/altar/grab_attack(obj/item/grab/grab, mob/user) var/mob/living/victim = grab.get_affecting_mob() if(grab.force_danger() && istype(victim)) victim.dropInto(loc)