From 48554749553650213e41bfd018471231a8f5aea9 Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Wed, 2 Oct 2019 19:39:23 +0200 Subject: [PATCH] Making sure altdisarm() works as intended. --- code/_globalvars/bitfields.dm | 1 + code/modules/mob/living/carbon/human/species.dm | 4 ++-- code/modules/recycling/disposal/bin.dm | 16 ++++++++-------- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm index 3b32745b5c..e2bc2e9565 100644 --- a/code/_globalvars/bitfields.dm +++ b/code/_globalvars/bitfields.dm @@ -32,6 +32,7 @@ GLOBAL_LIST_INIT(bitfields, list( "UNIQUE_RENAME" = UNIQUE_RENAME, "USES_TGUI" = USES_TGUI, "FROZEN" = FROZEN, + "SHOVABLE_ONTO" = SHOVABLE_ONTO ), "datum_flags" = list( "DF_USE_TAG" = DF_USE_TAG, diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 48b9e810c8..4ef1aef5ff 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -1832,7 +1832,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) //Thank you based whoneedsspace target_collateral_human = locate(/mob/living/carbon/human) in target_shove_turf.contents - if(target_collateral_human && target_collateral_human.resting) + if(target_collateral_human && !target_collateral_human.resting) shove_blocked = TRUE else target_collateral_human = null @@ -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_shove_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 24d7d0300b..a4a6a7d473 100644 --- a/code/modules/recycling/disposal/bin.dm +++ b/code/modules/recycling/disposal/bin.dm @@ -368,14 +368,14 @@ return ..() /obj/machinery/disposal/bin/shove_act(mob/living/target, mob/living/user) - 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]!", - "You shove [target.name] into \the [src]!", null, COMBAT_MESSAGE_RANGE) - log_combat(user, target, "shoved", "into [src] (disposal bin)") - return TRUE - return FALSE + if(!can_stuff_mob_in(target, user, TRUE)) + return FALSE + target.Knockdown(SHOVE_KNOCKDOWN_SOLID) + target.forceMove(src) + user.visible_message("[user.name] shoves [target.name] into \the [src]!", + "You shove [target.name] into \the [src]!", null, COMBAT_MESSAGE_RANGE) + log_combat(user, target, "shoved", "into [src] (disposal bin)") + return TRUE /obj/machinery/disposal/bin/flush()