Skip to content

Commit

Permalink
simplemobs will now climb, wolves now howl for help (within their sig…
Browse files Browse the repository at this point in the history
…ht range)
  • Loading branch information
crix870 committed Jan 6, 2025
1 parent 98be0e5 commit bee0c4d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions code/datums/ai/ai_movement/basic_avoidance.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,14 @@

var/turf/target_turf = get_step_towards(movable_pawn, controller.current_movement_target)


if (can_move && target_turf?.can_traverse_safely(movable_pawn))
if(istype(movable_pawn, /mob/living/simple_animal))
var/dir_to_target = get_dir(current_loc, target_turf)
for(var/obj/structure/O in get_step(movable_pawn, dir_to_target))
if(O.density && O.climbable)
O.climb_structure(movable_pawn)
break
step_to(movable_pawn, controller.current_movement_target, controller.blackboard[BB_CURRENT_MIN_MOVE_DISTANCE], controller.movement_delay)

if(current_loc == get_turf(movable_pawn)) //Did we even move after trying to move?
Expand Down
1 change: 1 addition & 0 deletions code/datums/ai/controllers/volf.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
planning_subtrees = list(
/datum/ai_planning_subtree/flee_target,
/datum/ai_planning_subtree/target_retaliate,
/datum/ai_planning_subtree/call_reinforcements,
/datum/ai_planning_subtree/simple_find_target,
/datum/ai_planning_subtree/basic_melee_attack_subtree,

Expand Down

0 comments on commit bee0c4d

Please sign in to comment.