From 50043d15f8a189af3bd1aba8bc3140e10fd3e9c4 Mon Sep 17 00:00:00 2001 From: Helg2 Date: Sat, 27 Jul 2024 21:36:20 +0300 Subject: [PATCH 1/6] this should do it --- code/modules/mob/living/silicon/ai/ai_verbs.dm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/code/modules/mob/living/silicon/ai/ai_verbs.dm b/code/modules/mob/living/silicon/ai/ai_verbs.dm index 09da883e2e3..b89f3a35fcd 100644 --- a/code/modules/mob/living/silicon/ai/ai_verbs.dm +++ b/code/modules/mob/living/silicon/ai/ai_verbs.dm @@ -235,12 +235,14 @@ if(stat == DEAD) return - src.anchored = !anchored + anchored = !anchored + if(!anchored) + move_resist = MOVE_RESIST_DEFAULT + else + move_resist = initial(move_resist) playsound(loc,'sound/mecha/mechanical_toggle.ogg', 20) - - to_chat(src, "You are now [anchored ? "" : "un"]anchored.") - + to_chat(src, span_notice("You are now [anchored ? "" : "un"]anchored.")) /mob/living/silicon/ai/verb/show_laws() set category = "Silicon" From d4ecb1fc76f3d3054d09617fdc8d2c4337b7b9e2 Mon Sep 17 00:00:00 2001 From: Helg2 Date: Sun, 28 Jul 2024 12:47:33 +0300 Subject: [PATCH 2/6] something like this? --- code/modules/mob/living/living.dm | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 6dc669f9175..3e52af62be7 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -359,17 +359,18 @@ if(!L.buckled && !L.anchored) var/mob_swap_mode = NO_SWAP - //the puller can always swap with its victim if on grab intent + // the puller can always swap with its victim if on grab intent if(L.pulledby == src && a_intent == INTENT_GRAB) mob_swap_mode = SWAPPING - //restrained people act if they were on 'help' intent to prevent a person being pulled from being seperated from their puller - else if((L.restrained() || L.a_intent == INTENT_HELP) && (restrained() || a_intent == INTENT_HELP) && L.move_force < MOVE_FORCE_VERY_STRONG) - mob_swap_mode = SWAPPING - else if(get_xeno_hivenumber() == L.get_xeno_hivenumber() && (L.pass_flags & PASS_XENO || pass_flags & PASS_XENO)) - mob_swap_mode = PHASING - else if((move_resist >= MOVE_FORCE_VERY_STRONG || move_resist > L.move_force) && a_intent == INTENT_HELP) //Larger mobs can shove aside smaller ones. Xenos can always shove xenos - mob_swap_mode = SWAPPING - ///if we're moving diagonally, but the mob isn't on the diagonal destination turf we have no reason to shuffle/push them + // Restrained people act if they were on 'help' intent to prevent a person being pulled from being seperated from their puller + else if(a_intent == INTENT_HELP || restrained()) + // xenos swap with xenos and almost whoever they want + if(isxeno(src) && (isxeno(L) || move_force > L.move_resist)) + mob_swap_mode = SWAPPING + // if target isn't xeno and both are on help intents, but we don't want xenos to move petrified humans ,then we swap + else if(!isxeno(L) && (L.a_intent == INTENT_HELP || L.restrained() && move_force > L.move_resist)) + mob_swap_mode = SWAPPING + /// if we're moving diagonally, but the mob isn't on the diagonal destination turf we have no reason to shuffle/push them if(moving_diagonally && (get_dir(src, L) in GLOB.cardinals) && get_step(src, dir).Enter(src, loc)) mob_swap_mode = PHASING if(mob_swap_mode) @@ -408,13 +409,12 @@ if(ismovableatom(A)) if(isxeno(src) && ishuman(A)) var/mob/living/carbon/human/H = A - if(!COOLDOWN_CHECK(H, xeno_push_delay)) + if(!COOLDOWN_CHECK(H, xeno_push_delay)) return COOLDOWN_START(H, xeno_push_delay, XENO_HUMAN_PUSHED_DELAY) if(PushAM(A)) return TURF_ENTER_ALREADY_MOVED - //Called when we want to push an atom/movable /mob/living/proc/PushAM(atom/movable/AM, force = move_force) if(AM.anchored) From 235822e3373af72216b7d505c821b00a54b70de9 Mon Sep 17 00:00:00 2001 From: Helg2 Date: Sun, 28 Jul 2024 15:39:25 +0300 Subject: [PATCH 3/6] Update living.dm --- code/modules/mob/living/living.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 3e52af62be7..a0f6c8ca2d2 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -368,7 +368,7 @@ if(isxeno(src) && (isxeno(L) || move_force > L.move_resist)) mob_swap_mode = SWAPPING // if target isn't xeno and both are on help intents, but we don't want xenos to move petrified humans ,then we swap - else if(!isxeno(L) && (L.a_intent == INTENT_HELP || L.restrained() && move_force > L.move_resist)) + else if(!isxeno(L) && move_force > L.move_resist && (L.a_intent == INTENT_HELP || L.restrained())) mob_swap_mode = SWAPPING /// if we're moving diagonally, but the mob isn't on the diagonal destination turf we have no reason to shuffle/push them if(moving_diagonally && (get_dir(src, L) in GLOB.cardinals) && get_step(src, dir).Enter(src, loc)) From d9e6bbd55bccafe5b963207ccfcc9cf1a6cecc34 Mon Sep 17 00:00:00 2001 From: Helg2 Date: Sun, 28 Jul 2024 18:50:58 +0300 Subject: [PATCH 4/6] Update living_defines.dm --- code/modules/mob/living/living_defines.dm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm index 605adb03c0e..74f20355716 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -63,9 +63,8 @@ var/disabilities = NONE var/restrained_flags = NONE - - var/now_pushing - + /// Will we bump into stuff right now? + var/now_pushing = FALSE var/cameraFollow From 3e3e47d049b58c5374927c3304fca0c2ea408d63 Mon Sep 17 00:00:00 2001 From: Helg2 Date: Sun, 28 Jul 2024 19:14:38 +0300 Subject: [PATCH 5/6] Update bump_attack.dm --- code/datums/components/bump_attack.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/datums/components/bump_attack.dm b/code/datums/components/bump_attack.dm index 94fef2e6130..64397b64d7e 100644 --- a/code/datums/components/bump_attack.dm +++ b/code/datums/components/bump_attack.dm @@ -58,7 +58,7 @@ if(TIMER_COOLDOWN_CHECK(src, COOLDOWN_BUMP_ATTACK)) return NONE var/mob/living/bumper = parent - if(!(target.flags_atom & BUMP_ATTACKABLE) || bumper.throwing || bumper.incapacitated() || HAS_TRAIT(target, TRAIT_TURRET_HIDDEN)) //RU TGMC EDIT + if(!(target.flags_atom & BUMP_ATTACKABLE) || bumper.throwing || bumper.incapacitated() || HAS_TRAIT(target, TRAIT_TURRET_HIDDEN)) return NONE ///Handles carbon bump action checks before actually doing the attack checks. From 13ac0d8849d3a1be57793af64a3b4299e1341c24 Mon Sep 17 00:00:00 2001 From: Helg2 Date: Sun, 28 Jul 2024 19:35:44 +0300 Subject: [PATCH 6/6] Update living.dm --- code/modules/mob/living/living.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index a0f6c8ca2d2..977329c4f1d 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -408,6 +408,9 @@ if(ismovableatom(A)) if(isxeno(src) && ishuman(A)) + var/datum/action/bump_attack_toggle/bump_action = actions_by_path[/datum/action/bump_attack_toggle] // there should be a better way to do this + if(a_intent != INTENT_DISARM && !bump_action.attacking) + return var/mob/living/carbon/human/H = A if(!COOLDOWN_CHECK(H, xeno_push_delay)) return