Skip to content

Commit

Permalink
[MIRROR] Fix Primal Instincts (#2072)
Browse files Browse the repository at this point in the history
* Fix Primal Instincts (#82741)

## About The Pull Request

#82539 randomly made these two lines switch their AI controllers to idle
rather than on, when the intent was for them to wake up immediately to
do make the mob attack or fight or do something

## Changelog

:cl: Melbert
fix: Primal Instincts and Living Flesh should be a tad more reactive
/:cl:

* Fix Primal Instincts

---------

Co-authored-by: MrMelbert <[email protected]>
  • Loading branch information
2 people authored and StealsThePRs committed Apr 19, 2024
1 parent cd8ed59 commit a0990b6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
5 changes: 1 addition & 4 deletions code/datums/ai/_ai_controller.dm
Original file line number Diff line number Diff line change
Expand Up @@ -379,10 +379,7 @@ multiple modular subtrees with behaviors
switch(ai_status)
if(AI_STATUS_ON)
START_PROCESSING(SSai_behaviors, src)
if(AI_STATUS_OFF)
STOP_PROCESSING(SSai_behaviors, src)
CancelActions()
if(AI_STATUS_IDLE)
if(AI_STATUS_OFF, AI_STATUS_IDLE)
STOP_PROCESSING(SSai_behaviors, src)
CancelActions()

Expand Down
3 changes: 2 additions & 1 deletion code/datums/brain_damage/special.dm
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,7 @@

owner.ai_controller = new /datum/ai_controller/monkey(owner)
owner.ai_controller.continue_processing_when_client = TRUE
owner.ai_controller.can_idle = FALSE
owner.ai_controller.set_ai_status(AI_STATUS_OFF)

/datum/brain_trauma/special/primal_instincts/on_lose(silent)
Expand All @@ -514,7 +515,7 @@
owner.grant_language(/datum/language/monkey, UNDERSTOOD_LANGUAGE, TRAUMA_TRAIT)
owner.ai_controller.set_blackboard_key(BB_MONKEY_AGGRESSIVE, prob(75))
if(owner.ai_controller.ai_status == AI_STATUS_OFF)
owner.ai_controller.set_ai_status(AI_STATUS_IDLE)
owner.ai_controller.set_ai_status(AI_STATUS_ON)
owner.log_message("became controlled by monkey instincts ([owner.ai_controller.blackboard[BB_MONKEY_AGGRESSIVE] ? "aggressive" : "docile"])", LOG_ATTACK, color = "orange")
to_chat(owner, span_warning("You feel the urge to act on your primal instincts..."))
// extend original timer if we roll the effect while it's already ongoing
Expand Down
3 changes: 1 addition & 2 deletions code/modules/mob/living/basic/ruin_defender/flesh.dm
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@
/mob/living/basic/living_limb_flesh/proc/wake_up(atom/limb)
visible_message(span_warning("[src] begins flailing around!"))
Shake(6, 6, 0.5 SECONDS)
ai_controller.set_ai_status(AI_STATUS_IDLE)
ai_controller.set_ai_status(AI_STATUS_ON)
forceMove(limb.drop_location())
qdel(limb)

0 comments on commit a0990b6

Please sign in to comment.