Skip to content

Commit

Permalink
suicidal ai fix (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
Helg2 authored Aug 30, 2024
1 parent fc689b2 commit 1accc5d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion code/modules/ai/ai_behaviors/ai_behavior.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Registers signals, handles the pathfinding element addition/removal alongside ma
///When this timer is up, we force a change of node to ensure that the ai will never stay stuck trying to go to a specific node
var/anti_stuck_timer
///Minimum health percentage before the ai tries to run away
var/minimum_health = 0
var/minimum_health = 0.4
///If the mob attached to the ai is offered on xeno creation
var/is_offered_on_creation = FALSE
///Are we waiting for advanced pathfinding
Expand Down
3 changes: 3 additions & 0 deletions code/modules/ai/ai_behaviors/xeno/xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -243,3 +243,6 @@
/datum/ai_behavior/xeno/ranged
distance_to_maintain = 5
minimum_health = 0.3

/datum/ai_behavior/xeno/suicidal
minimum_health = 0
6 changes: 3 additions & 3 deletions code/modules/ai/presets/xeno_presets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/mob/living/carbon/xenomorph/beetle/ai/Initialize(mapload)
. = ..()
AddComponent(/datum/component/ai_controller, /datum/ai_behavior/xeno)
AddComponent(/datum/component/ai_controller, /datum/ai_behavior/xeno/suicidal)

/mob/living/carbon/xenomorph/crusher/ai

Expand Down Expand Up @@ -50,13 +50,13 @@

/mob/living/carbon/xenomorph/mantis/ai/Initialize(mapload)
. = ..()
AddComponent(/datum/component/ai_controller, /datum/ai_behavior/xeno)
AddComponent(/datum/component/ai_controller, /datum/ai_behavior/xeno/suicidal)

/mob/living/carbon/xenomorph/ravager/ai

/mob/living/carbon/xenomorph/ravager/ai/Initialize(mapload)
. = ..()
AddComponent(/datum/component/ai_controller, /datum/ai_behavior/xeno)
AddComponent(/datum/component/ai_controller, /datum/ai_behavior/xeno/suicidal)

/mob/living/carbon/xenomorph/runner/ai

Expand Down

0 comments on commit 1accc5d

Please sign in to comment.