Converts spiderlings to basic mobs (#30571)

* Converts spiderlings to basic mobs

* Address code reviews, add terror_spiderlings to isterrorspider()

* Update code/modules/mob/living/basic/hostile/spiderlings.dm

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>

* Update code/modules/mob/living/basic/hostile/spiderlings.dm

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>

* Breaks up ancient spiderling life into something more modern

* Fixed the brimming station of spiders

---------

Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
This commit is contained in:
PollardTheDragon
2025-11-15 18:36:15 -05:00
committed by GitHub
parent 00cc58395d
commit c6875a50d0
21 changed files with 204 additions and 345 deletions
@@ -1,4 +1,5 @@
/datum/ai_planning_subtree/ventcrawl_find_target
var/crawl_behavior = /datum/ai_behavior/find_ventcrawl_target
/datum/ai_planning_subtree/ventcrawl_find_target/select_behaviors(datum/ai_controller/controller, seconds_per_tick)
// We have a target already
@@ -11,7 +12,7 @@
else
vision_range = controller.blackboard[BB_VENT_SEARCH_RANGE]
// Find a target
controller.queue_behavior(/datum/ai_behavior/find_ventcrawl_target, BB_VENTCRAWL_FINAL_TARGET, vision_range)
controller.queue_behavior(crawl_behavior, BB_VENTCRAWL_FINAL_TARGET, vision_range)
return SUBTREE_RETURN_FINISH_PLANNING
/datum/ai_behavior/find_ventcrawl_target
@@ -1,4 +1,5 @@
/datum/ai_planning_subtree/ventcrawl
var/ventcrawl_finding_behavior = /datum/ai_behavior/find_and_set/ventcrawl
/datum/ai_planning_subtree/ventcrawl/select_behaviors(datum/ai_controller/controller, seconds_per_tick)
// we're in a pipe
@@ -15,7 +16,7 @@
return SUBTREE_RETURN_FINISH_PLANNING
// We dont have an exit vent, but we have a target. Let's find an exit vent near it.
if(controller.blackboard_key_exists(BB_VENTCRAWL_FINAL_TARGET))
controller.queue_behavior(/datum/ai_behavior/find_and_set/ventcrawl, BB_VENTCRAWL_EXIT, null, controller.blackboard[BB_VENT_SEARCH_RANGE])
controller.queue_behavior(ventcrawl_finding_behavior, BB_VENTCRAWL_EXIT, null, controller.blackboard[BB_VENT_SEARCH_RANGE])
return
// we dont have an set exit vent nor a final target... let's just get out of the pipe.
controller.queue_behavior(/datum/ai_behavior/find_and_set/pipenet_vent, BB_VENTCRAWL_EXIT, null, controller.blackboard[BB_VENT_SEARCH_RANGE])
@@ -34,12 +35,15 @@
// we're far-away, lets try to find a ventcrawl path
if(!controller.blackboard_key_exists(BB_VENTCRAWL_EXIT))
controller.queue_behavior(/datum/ai_behavior/find_and_set/ventcrawl, BB_VENTCRAWL_EXIT, null, controller.blackboard[BB_VENT_SEARCH_RANGE], FALSE)
controller.queue_behavior(ventcrawl_finding_behavior, BB_VENTCRAWL_EXIT, null, controller.blackboard[BB_VENT_SEARCH_RANGE], FALSE)
return
// we found a path, lets take it!
controller.queue_behavior(/datum/ai_behavior/interact_with_vent, BB_VENTCRAWL_ENTRANCE)
return SUBTREE_RETURN_FINISH_PLANNING
/datum/ai_behavior/find_and_set/ventcrawl
var/list/searched_entry_types = list(/obj/machinery/atmospherics/unary/vent_pump, /obj/machinery/atmospherics/unary/vent_scrubber)
/**
* This proc assumes that all ventcrawling creatures are omniscient.
*/
@@ -103,7 +107,7 @@
var/turf/current = popleft(open_set)
closed_set |= current
for(var/obj/machinery/atmospherics/atmos in current)
if(is_type_in_list(atmos, GLOB.ventcrawl_machinery) && atmos.can_crawl_through())
if(is_type_in_list(atmos, searched_entry_types) && atmos.can_crawl_through())
vents |= atmos
for(var/dir in GLOB.cardinal)
@@ -166,6 +170,6 @@
controller.set_blackboard_key(BB_VENTCRAWL_IS_ENTERING, TRUE)
L.handle_ventcrawl(vent)
controller.set_blackboard_key(BB_VENTCRAWL_IS_ENTERING, FALSE)
if(controller.pawn.loc != vent)
if(QDELETED(controller) || controller.pawn.loc != vent)
return AI_BEHAVIOR_DELAY | AI_BEHAVIOR_FAILED
return AI_BEHAVIOR_DELAY | AI_BEHAVIOR_SUCCEEDED