mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 22:19:30 +01:00
Refactors datum AI idle behaviors into datums (#61455)
Co-authored-by: MonkeyThatCodes <monkey>
This commit is contained in:
co-authored by
MonkeyThatCodes <monkey>
parent
28ba8ee9a0
commit
f2b6fcb253
@@ -51,21 +51,12 @@
|
||||
|
||||
ai_traits = STOP_MOVING_WHEN_PULLED
|
||||
ai_movement = /datum/ai_movement/basic_avoidance
|
||||
idle_behavior = /datum/idle_behavior/idle_random_walk
|
||||
planning_subtrees = list(
|
||||
/datum/ai_planning_subtree/random_speech/cockroach,
|
||||
/datum/ai_planning_subtree/find_and_hunt_target
|
||||
)
|
||||
|
||||
|
||||
/datum/ai_controller/basic_controller/cockroach/PerformIdleBehavior(delta_time)
|
||||
. = ..()
|
||||
var/mob/living/living_pawn = pawn
|
||||
|
||||
if(DT_PROB(25, delta_time) && (living_pawn.mobility_flags & MOBILITY_MOVE) && isturf(living_pawn.loc) && !living_pawn.pulledby)
|
||||
var/move_dir = pick(GLOB.alldirs)
|
||||
living_pawn.Move(get_step(living_pawn, move_dir), move_dir)
|
||||
|
||||
|
||||
/obj/projectile/glockroachbullet
|
||||
damage = 10 //same damage as a hivebot
|
||||
damage_type = BRUTE
|
||||
|
||||
Reference in New Issue
Block a user