From d2300765b2cd9016e19acf5afc27e83c15589a22 Mon Sep 17 00:00:00 2001
From: Ghommie <42542238+Ghommie@users.noreply.github.com>
Date: Tue, 1 Oct 2019 23:16:47 +0200
Subject: [PATCH] adjacency checks.
---
code/game/objects/structures/tables_racks.dm | 16 +++++++---------
code/modules/mob/living/carbon/human/species.dm | 2 +-
code/modules/recycling/disposal/bin.dm | 2 +-
3 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm
index 3ec6f783be..a7ea7d3c82 100644
--- a/code/game/objects/structures/tables_racks.dm
+++ b/code/game/objects/structures/tables_racks.dm
@@ -137,15 +137,13 @@
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "table", /datum/mood_event/table)
/obj/structure/table/shove_act(mob/living/target, mob/living/user)
- if(target.Adjacent(src))
- if(!target.resting)
- target.Knockdown(SHOVE_KNOCKDOWN_TABLE)
- user.visible_message("[user.name] shoves [target.name] onto \the [src]!",
- "You shove [target.name] onto \the [src]!", null, COMBAT_MESSAGE_RANGE)
- target.throw_at(target_table, 1, 1, null, FALSE) //1 speed throws with no spin are basically just forcemoves with a hard collision check
- log_combat(user, target, "shoved", "onto [src] (table)")
- return TRUE
- return FALSE
+ if(!target.resting)
+ target.Knockdown(SHOVE_KNOCKDOWN_TABLE)
+ user.visible_message("[user.name] shoves [target.name] onto \the [src]!",
+ "You shove [target.name] onto \the [src]!", null, COMBAT_MESSAGE_RANGE)
+ target.throw_at(target_table, 1, 1, null, FALSE) //1 speed throws with no spin are basically just forcemoves with a hard collision check
+ log_combat(user, target, "shoved", "onto [src] (table)")
+ return TRUE
/obj/structure/table/attackby(obj/item/I, mob/user, params)
if(!(flags_1 & NODECONSTRUCT_1))
diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm
index 2a6333832c..48b9e810c8 100644
--- a/code/modules/mob/living/carbon/human/species.dm
+++ b/code/modules/mob/living/carbon/human/species.dm
@@ -1843,7 +1843,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
if(shove_blocked && !target.buckled)
var/directional_blocked = !target.Adjacent(target_shove_turf)
var/targetatrest = target.resting
- if((directional_blocked || (!target_collateral_human && !target_turf.shove_act(target, user))) && !targetatrest)
+ if((directional_blocked || (!target_collateral_human && !target_shove_turf.shove_act(target, user))) && !targetatrest)
target.Knockdown(SHOVE_KNOCKDOWN_SOLID)
user.visible_message("[user.name] shoves [target.name], knocking them down!",
"You shove [target.name], knocking them down!", null, COMBAT_MESSAGE_RANGE)
diff --git a/code/modules/recycling/disposal/bin.dm b/code/modules/recycling/disposal/bin.dm
index fb638d3825..9798ecc948 100644
--- a/code/modules/recycling/disposal/bin.dm
+++ b/code/modules/recycling/disposal/bin.dm
@@ -143,7 +143,7 @@
return FALSE
/obj/machinery/disposal/bin/shove_act(mob/living/target, mob/living/user)
- if(target.Adjacent(src) && can_stuff_mob_in(target, user, TRUE))
+ if(can_stuff_mob_in(target, user, TRUE))
target.Knockdown(SHOVE_KNOCKDOWN_SOLID)
target.forceMove(src)
user.visible_message("[user.name] shoves [target.name] into \the [src]!",