Merge pull request #9390 from Ghommie/Ghommie_cit212

Ensuring altdisarm() works as intended.
This commit is contained in:
deathride58
2019-10-03 20:16:05 -04:00
committed by GitHub
3 changed files with 11 additions and 10 deletions

View File

@@ -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,

View File

@@ -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("<span class='danger'>[user.name] shoves [target.name], knocking them down!</span>",
"<span class='danger'>You shove [target.name], knocking them down!</span>", null, COMBAT_MESSAGE_RANGE)

View File

@@ -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("<span class='danger'>[user.name] shoves [target.name] into \the [src]!</span>",
"<span class='danger'>You shove [target.name] into \the [src]!</span>", 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("<span class='danger'>[user.name] shoves [target.name] into \the [src]!</span>",
"<span class='danger'>You shove [target.name] into \the [src]!</span>", null, COMBAT_MESSAGE_RANGE)
log_combat(user, target, "shoved", "into [src] (disposal bin)")
return TRUE
/obj/machinery/disposal/bin/flush()