Skip to content

Commit

Permalink
[MIRROR] fix: allow giant spiders aggressively grab again (#2787) (#3588
Browse files Browse the repository at this point in the history
)

* fix: allow giant spiders aggressively grab again (#83531)

## About The Pull Request

Remove check that restricted non-carbon mobs from upgrading grab, using
`max_grab` instead which exists for this purpose
All mobs now have `max_grab` set to `GRAB_PASSIVE` by default, overrided
where required.
Giant spiders can now agressively grab, which makes `ambush` spider
playable again (i hope).

closes #83485

## Why It's Good For The Game

Ambush spider works as intended, as it has `STRONG_GRABBER` trait, but
effectively it didn't work, as spiders couldn't grab agressively.

## Changelog

:cl:
fix: ambush spider (should instantly agressive grab) and other giant
spiders can now agressively grab
/:cl:

* fix: allow giant spiders aggressively grab again

---------

Co-authored-by: NovaBot <[email protected]>
Co-authored-by: Gaxeer <[email protected]>
Co-authored-by: NovaBot13 <[email protected]>
  • Loading branch information
4 people authored Jun 2, 2024
1 parent 44f954f commit e5d2a6b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion code/game/atoms_movable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
var/atom/movable/pulling
var/grab_state = GRAB_PASSIVE
/// The strongest grab we can acomplish
var/max_grab = GRAB_KILL
var/max_grab = GRAB_PASSIVE
var/throwforce = 0
var/datum/component/orbiter/orbiting

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
icon_state = "amerifat"
icon_living = "amerifat"

max_grab = GRAB_AGGRESSIVE
basic_mob_flags = DEL_ON_DEATH
mob_biotypes = MOB_ROBOTIC|MOB_HUMANOID
sentience_type = SENTIENCE_ARTIFICIAL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
gold_core_spawnable = HOSTILE_SPAWN
ai_controller = /datum/ai_controller/basic_controller/giant_spider
bite_injection_flags = INJECT_CHECK_PENETRATE_THICK
max_grab = GRAB_AGGRESSIVE
/// Actions to grant on Initialize
var/list/innate_actions = null

Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/carbon/human/human_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
can_be_shoved_into = TRUE
initial_language_holder = /datum/language_holder/empty // We get stuff from our species
flags_1 = PREVENT_CONTENTS_EXPLOSION_1
max_grab = GRAB_KILL

maxHealth = HUMAN_MAXHEALTH //NOVA EDIT ADDITION
health = HUMAN_MAXHEALTH //NOVA EDIT ADDITION
Expand Down
9 changes: 5 additions & 4 deletions code/modules/mob/living/living_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -258,22 +258,23 @@
/mob/living/proc/grabbedby(mob/living/user, supress_message = FALSE, grabbed_part) // NOVA EDIT CHANGE - ORIGINAL: /mob/living/proc/grabbedby(mob/living/user, supress_message = FALSE)
if(user == src || anchored || !isturf(user.loc))
return FALSE

if(!user.pulling || user.pulling != src)
user.start_pulling(src, supress_message = supress_message)
return
// This line arbitrarily prevents any non-carbon from upgrading grabs
if(!iscarbon(user))
return

if(!(status_flags & CANPUSH) || HAS_TRAIT(src, TRAIT_PUSHIMMUNE))
to_chat(user, span_warning("[src] can't be grabbed more aggressively!"))
return FALSE

if(user.grab_state >= GRAB_AGGRESSIVE && HAS_TRAIT(user, TRAIT_PACIFISM))
to_chat(user, span_warning("You don't want to risk hurting [src]!"))
return FALSE

grippedby(user)

//proc to upgrade a simple pull into a more aggressive grab.
/mob/living/proc/grippedby(mob/living/carbon/user, instant = FALSE)
/mob/living/proc/grippedby(mob/living/user, instant = FALSE)
if(user.grab_state >= user.max_grab)
return
user.changeNext_move(CLICK_CD_GRABBING)
Expand Down

0 comments on commit e5d2a6b

Please sign in to comment.