Spiderling Pathing Tweaks (#15151)

* Spiderling Pathing Tweaks

* fixes spiderling/rechargestation interaction the right way

* Steel suggestion

Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>

Co-authored-by: Kyep <Kyep@users.noreply.github.com>
Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>
This commit is contained in:
Kyep
2021-01-10 20:12:55 +00:00
committed by GitHub
co-authored by SteelSlayer Kyep
parent f02a5903b2
commit bd7347378a
3 changed files with 17 additions and 14 deletions
+14 -6
View File
@@ -156,12 +156,8 @@
//=================
else if(prob(33))
var/list/nearby = oview(10, src)
if(nearby.len)
var/target_atom = pick(nearby)
walk_to(src, target_atom)
if(prob(40))
visible_message("<span class='notice'>[src] skitters[pick(" away"," around","")].</span>")
if(random_skitter() && prob(40))
visible_message("<span class='notice'>[src] skitters[pick(" away"," around","")].</span>")
else if(prob(10))
//ventcrawl!
for(var/obj/machinery/atmospherics/unary/vent_pump/v in view(7,src))
@@ -190,6 +186,18 @@
to_chat(S, "<span class='biggerdanger'>You are a spider who is loyal to [S.master_commander], obey [S.master_commander]'s every order and assist [S.master_commander.p_them()] in completing [S.master_commander.p_their()] goals at any cost.</span>")
qdel(src)
/obj/structure/spider/spiderling/proc/random_skitter()
var/list/available_turfs = list()
for(var/turf/simulated/S in oview(10, src))
// no !isspaceturf check needed since /turf/simulated is not a subtype of /turf/space
if(S.density)
continue
available_turfs += S
if(!length(available_turfs))
return FALSE
walk_to(src, pick(available_turfs))
return TRUE
/obj/structure/spider/spiderling/decompile_act(obj/item/matter_decompiler/C, mob/user)
if(!istype(user, /mob/living/silicon/robot/drone))
user.visible_message("<span class='notice'>[user] sucks [src] into its decompiler. There's a horrible crunching noise.</span>", \