mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 15:14:27 +01:00
Converts giant spiders to basic mobs (#29796)
* Giant spiders initial * Ling spiders, araneous, conversion to basic * Removed some extra * Fixes cling spiders * Linters * Do_afters * Nurse AI works now * Cling spider AI * Forgot an element * Updatepaths * New Linters * AI New linters * Fixed action buttons * No longer wraps spiderlings, adds a movement delay * Fixes the sarge hatching from eggs, increases action cooldown on eggs * Improved cling spider AI, improved insect random speech --------- Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> Signed-off-by: Burzah <116982774+Burzah@users.noreply.github.com> Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
This commit is contained in:
@@ -17,3 +17,24 @@
|
||||
SIGNAL_HANDLER
|
||||
var/food_cooldown = blackboard[BB_EAT_FOOD_COOLDOWN] || EAT_FOOD_COOLDOWN
|
||||
set_blackboard_key(BB_NEXT_FOOD_EAT, world.time + food_cooldown)
|
||||
|
||||
/datum/ai_controller/basic_controller/on_stat_changed(mob/living/source, new_stat)
|
||||
. = ..()
|
||||
update_able_to_run()
|
||||
|
||||
/datum/ai_controller/basic_controller/setup_able_to_run()
|
||||
. = ..()
|
||||
if(ai_traits & AI_FLAG_PAUSE_DURING_DO_AFTER)
|
||||
RegisterSignals(pawn, list(COMSIG_DO_AFTER_BEGAN, COMSIG_DO_AFTER_ENDED), PROC_REF(update_able_to_run))
|
||||
|
||||
/datum/ai_controller/basic_controller/clear_able_to_run()
|
||||
UnregisterSignal(pawn, list(COMSIG_DO_AFTER_BEGAN, COMSIG_DO_AFTER_ENDED))
|
||||
return ..()
|
||||
|
||||
/datum/ai_controller/basic_controller/get_able_to_run()
|
||||
. = ..()
|
||||
if(. & AI_UNABLE_TO_RUN)
|
||||
return .
|
||||
var/mob/living/living_pawn = pawn
|
||||
if(ai_traits & AI_FLAG_PAUSE_DURING_DO_AFTER && LAZYLEN(living_pawn.do_afters))
|
||||
return AI_UNABLE_TO_RUN | AI_PREVENT_CANCEL_ACTIONS // dont erase targets post a do_after
|
||||
|
||||
Reference in New Issue
Block a user